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...
Basically if a user cancels the event the operator remains open - which in my case is OK, sooner or later something will be added to the scene.
I think it's just some lacking blneder integration limitation for the moment. They need to add a specific operator to better handle deferred user input requests. basically a system to enable piggybacking to the open/close events of any modal window generated within the same call stack.
– MostHost LA Jun 01 '19 at 07:07