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.
This commit is contained in:
parent
880efe429a
commit
158b85876a
|
@ -203,6 +203,9 @@ class IMPORT_OT_pdb(Operator, ImportHelper):
|
|||
|
||||
|
||||
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)
|
||||
|
||||
# This is in order to solve this strange 'relative path' thing.
|
||||
filepath_pdb = bpy.path.abspath(self.filepath)
|
||||
|
||||
|
|
Loading…
Reference in New Issue