Hi,
I did a popup to ask user some strings, but how to invoque and get the result ?
The popup is launched by another python class/file like that :
bpy.ops.object.location_operator(‘INVOKE_DEFAULT’)
The popup loks like that :
class LocationManager(bpy.types.Operator): bl_idname = "object.location_operator"
bl_label = "Manage location on anchors"
result = {}
def get_results(self):
return self.result
def execute(self, context):
self.result = {"male" : self.male_string , "female":[]}
return{'FINISHED'}
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self, 500, 500)
def draw(self, context):
[...]
# The OK button in the dialog
class OnErrorOk(bpy.types.Operator):
bl_idname = "location.validation"
bl_label = "Manage location on anchors"
def execute(self, context):
return{'FINISHED'}
bpy.utils.register_class(LocationManager)
How can I run the popup and get the result (by getter ?) when user clic on OK ?
Thanks !