BUGFIXES:
- "Indication must be 'sperical' or 'planar'" error message if pyproj module is not available. - GeoReference options (lat/lon) was disabled without pyproj
This commit is contained in:
parent
03bdb32829
commit
97816cfd9d
|
@ -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")
|
||||
|
||||
|
|
|
@ -80,12 +80,12 @@ class Indicator:
|
|||
euclidean = False
|
||||
|
||||
def __init__(self, i):
|
||||
if i == "spherical":
|
||||
if i.upper() == "SPHERICAL":
|
||||
self.spherical = True
|
||||
elif i == "euclidean":
|
||||
elif i.upper() == "EUCLIDEAN":
|
||||
self.euclidean = True
|
||||
else:
|
||||
raise AttributeError("Indication must be 'spherical' or 'planar'.")
|
||||
raise AttributeError("Indication must be 'spherical' or 'euclidean'. Given: " + str(i))
|
||||
|
||||
|
||||
class Do:
|
||||
|
|
Loading…
Reference in New Issue