Skip to content
Snippets Groups Projects
Commit 8372ef96 authored by Clemens Barth's avatar Clemens Barth
Browse files

T94008, T94292

When importing a PDB file, the user has to be in the 'OBJECT' mode. With the changes
in the code, this mode is automatically set before the PDB import. No error message should
appear when the 'EDIT' mode is still active.
parent 158b8587
Branches
Tags
No related merge requests found
...@@ -153,6 +153,8 @@ class IMPORT_OT_xyz(Operator, ImportHelper): ...@@ -153,6 +153,8 @@ class IMPORT_OT_xyz(Operator, ImportHelper):
col.prop(self, "images_per_key") col.prop(self, "images_per_key")
def execute(self, context): def execute(self, context):
# To be on the safe side, we switch to the 'OBJECT' mode.
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
del ALL_FRAMES[:] del ALL_FRAMES[:]
del ELEMENTS[:] del ELEMENTS[:]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment