diff options
Diffstat (limited to 'io_import_dxf/__init__.py')
-rw-r--r-- | io_import_dxf/__init__.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/io_import_dxf/__init__.py b/io_import_dxf/__init__.py index 9c539634..e3cfa99b 100644 --- a/io_import_dxf/__init__.py +++ b/io_import_dxf/__init__.py @@ -155,9 +155,14 @@ def _update_use_georeferencing_do(self, context): def _recenter_allowed(self): scene = bpy.context.scene - return (not (self.use_georeferencing and (self.proj_scene == 'TMERC' - or (not self.create_new_scene and is_ref_scene(scene)))) - or (not PYPROJ and self.dxf_indi == "EUCLIDEAN")) + conditional_requirement = self.proj_scene == 'TMERC' if PYPROJ else self.dxf_indi == "SPHERICAL" + return not ( + self.use_georeferencing and + ( + conditional_requirement or + (not self.create_new_scene and is_ref_scene(scene)) + ) + ) def _set_recenter(self, value): @@ -410,7 +415,9 @@ class IMPORT_OT_dxf(bpy.types.Operator): sub.enabled = not _recenter_allowed(self) sub.label("Geo Reference:") sub = box.column() - sub.enabled = not _recenter_allowed(self) and self.create_new_scene + sub.enabled = not _recenter_allowed(self) + if is_ref_scene(bpy.context.scene): + sub.enabled = False sub.prop(self, "merc_scene_lat", text="Lat") sub.prop(self, "merc_scene_lon", text="Lon") |