I’m having problems with my Add-On.
I’m creating a new Collection, making it active, opening up an FBX-Import Window and if selected, loading the FBX File.
After that I would like to join and clean up the data, add materials, etc.
Unfortunately all of the commands after the FBX import are run before the import actually finished.
Here is part of the script:
bpy.ops.import_fbx.read_data('INVOKE_DEFAULT') print("Import FBX is ready")
The message gets printed before the import process finishes.
If I import an FBX via the UI, Blender hangs as long as it imports.
I though this will be the same with my Add-on but it seems that my import routine is called parallel to the execution of the rest of my script.
(I don’t mind if my Add-On hangs as long as the import is running).
Is there a way to wait until it is finished?
I read some examples about modal operators but I don’t really understand them. In those examples it seems to be important that the UI does not lock up. In the current state of my python experience level, I don’t mind if its locked up as long as it runs in sequence.