Besides the point but why is this not working as a default stack is expected to work?
I'm trying to get an operator to call another operator and wait for the operator's response before proceeding.
Doing so with sub-process doesn't work - apparently it needs to be fed "INVOKE_REGION_WIN" and that only works when calling it directly.
Doing so natively doesn't work. can't even loop like you would do for any File/IO transaction of a dialog (str = dialog(), if str!="" > move on else wait )
what's the proper way to do this for the Blender API?
NOTE: This is not a common "dialog" issue, we need to wait for the additional operator to completely finish and return {'FINISHED'}
same as it would if you stack 2 functions within one another ...
Edit. Adding in a code sample that doesn't work but it's closer then I got out of anything else.
def modal(self, context, event):
if self.fileimport == {'FINISHED'}:
bpy.ops.object.select_all(action='DESELECT')
print("finished")
return {'FINISHED'}
else:
print(self.fileimport,context,event)
return {'PASS_THROUGH'}
def invoke(self, context, event):
self.fileimport = bpy.ops.import_scene.fbx("INVOKE_REGION_WIN")
context.window_manager.modal_handler_add(self)
return {'RUNNING_MODAL'}
The problem with that is that the result copyed to file import is really only passed once at the start. Getting the modal function update it means locking up blender in a loop...