diff options
author | Clemens Barth <barth@root-1.de> | 2022-01-13 20:03:14 +0300 |
---|---|---|
committer | Clemens Barth <barth@root-1.de> | 2022-01-13 20:03:14 +0300 |
commit | 8372ef96ade7a6ec64ef328c0c84c89f9352d493 (patch) | |
tree | 2b211037e556191f1269047373267106a3b393d8 | |
parent | 158b85876a0e8410db2e009f4fc324bb049089aa (diff) |
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.
-rw-r--r-- | io_mesh_atomic/xyz_gui.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_mesh_atomic/xyz_gui.py b/io_mesh_atomic/xyz_gui.py index 2b452a61..18df0063 100644 --- a/io_mesh_atomic/xyz_gui.py +++ b/io_mesh_atomic/xyz_gui.py @@ -153,6 +153,8 @@ class IMPORT_OT_xyz(Operator, ImportHelper): col.prop(self, "images_per_key") 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 ELEMENTS[:] |