Change georeference decorator UI.

This commit is contained in:
Bruno Perdigão
2024-12-11 16:38:24 -03:00
parent eb68264bed
commit a447776fd7
3 changed files with 8 additions and 11 deletions
@@ -75,7 +75,7 @@ class GeoreferenceDecorator:
self.addon_prefs = tool.Blender.get_addon_preferences()
self.font_id = 0
font_size = tool.Blender.scale_font_size(12 + (self.scale / 8))
font_size = tool.Blender.scale_font_size(12 + (self.scale / 20))
blf.size(self.font_id, font_size)
color = self.addon_prefs.decorations_colour
blf.color(self.font_id, *color)
@@ -200,13 +200,13 @@ class BIMGeoreferenceProperties(PropertyGroup):
update=update_map_coordinates,
)
should_visualise: BoolProperty(
name="Should Visualise",
name="Visualise",
description="Displays a visualisation of all georeferencing data at the origin",
default=False,
update=update_should_visualise,
)
visualization_scale: IntProperty(
name="Visualization Scale", description="Affects the georeference decorator size", default=1, min=1, max=20
visualization_scale: FloatProperty(
name="Visualization Scale", description="Affects the georeference decorator size", default=1, min=0.1, max=50
)
grid_north_angle: StringProperty(name="Grid North Angle", update=update_grid_north_angle)
x_axis_abscissa: StringProperty(name="X Axis Abscissa", update=update_grid_north_vector)
@@ -88,11 +88,9 @@ class BIM_PT_gis(Panel):
row = self.layout.row(align=True)
row.label(text="Not Georeferenced", icon="ERROR")
row = self.layout.row(align=True)
row.label(text="Visualise")
row.prop(props, "should_visualise", icon="HIDE_OFF", text="")
row.prop(props, "visualization_scale", text="Size")
row.prop(props, "should_visualise", icon="HIDE_OFF")
row.prop(props, "visualization_scale", text="Size", slider=True)
if tool.Ifc.get_schema() != "IFC2X3":
row = self.layout.row(align=True)
row.prop(props, "coordinate_operation_class", text="")
row.operator("bim.add_georeferencing", icon="ADD", text="")
@@ -100,9 +98,8 @@ class BIM_PT_gis(Panel):
row = self.layout.row(align=True)
row.label(text="Projected CRS", icon="WORLD")
row = self.layout.row(align=True)
row.label(text="Visualise")
row.prop(props, "should_visualise", icon="HIDE_OFF", text="")
row.prop(props, "visualization_scale", text="Visualization Scale")
row.prop(props, "should_visualise", icon="HIDE_OFF")
row.prop(props, "visualization_scale", text="Size", slider=True)
if tool.Ifc.get_schema() != "IFC2X3":
row.operator("bim.enable_editing_georeferencing", icon="GREASEPENCIL", text="")
row.operator("bim.remove_georeferencing", icon="X", text="")