Is it possible, in Blender, to insert by script an object, wait 1 second, and put a second object? I used the time.sleep(1) (after that the first object has been imported into the scene) but it doesn't work because it put both the objects after 2 seconds. What's the problem??

import time if x == 3: bpy.ops.wm.append(directory= ...., filename= .....) time.sleep(1) elif x == 2: bpy.ops.wm.append(directory= ..., filename= .....)

  • 1
    $\begingroup$ It's probably actually doing what you want, but it won't update the UI until the script has finished executing. You want to use a modal operator. $\endgroup$ – JakeD Mar 15 '17 at 12:43
  • $\begingroup$ .. in particular a Modal Timer Operator $\endgroup$ – batFINGER Mar 15 '17 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.