I can load *.obj from one directory using python script in VSCode, using sth like:

for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.obj(filepath = path_to_file)

but Blender updates viewport only after all objects are loaded. During the whole session, it seems all objects are loaded into cache? Is it possible to load one object then display it in the viewport ?then load 2nd object,.....



You can use bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.