diff --git a/doc/python_api/examples/bpy.types.FileHandler.2.py b/doc/python_api/examples/bpy.types.FileHandler.2.py index aae178659ac..8e1a09408a8 100644 --- a/doc/python_api/examples/bpy.types.FileHandler.2.py +++ b/doc/python_api/examples/bpy.types.FileHandler.2.py @@ -78,6 +78,7 @@ class ShaderScriptImport(bpy.types.Operator, ImportHelper): If filepath information is not provided the file select window will be invoked instead. """ + def invoke(self, context, event): return self.invoke_popup(context) diff --git a/scripts/modules/bpy_extras/io_utils.py b/scripts/modules/bpy_extras/io_utils.py index da4d3174c30..7c84f0b9fdd 100644 --- a/scripts/modules/bpy_extras/io_utils.py +++ b/scripts/modules/bpy_extras/io_utils.py @@ -116,7 +116,8 @@ class ImportHelper: confirm_text = self.bl_label confirm_text = iface_(confirm_text) - return context.window_manager.invoke_props_dialog(self, confirm_text=confirm_text, title=title, translate=False) + return context.window_manager.invoke_props_dialog( + self, confirm_text=confirm_text, title=title, translate=False) context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'}