mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
Add decorator font scale property addon setting
This commit is contained in:
committed by
Bruno Perdigão
parent
c0857c715a
commit
1b784e22af
@@ -747,6 +747,12 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
default=".ifc.metadata.blend",
|
default=".ifc.metadata.blend",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
decorator_font_scale: bpy.props.FloatProperty(
|
||||||
|
name="Decorator Font Scale",
|
||||||
|
description="Scale factor for decorator font size.",
|
||||||
|
default=1.0,
|
||||||
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
svg2pdf_command: str
|
svg2pdf_command: str
|
||||||
svg2dxf_command: str
|
svg2dxf_command: str
|
||||||
@@ -786,6 +792,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
mass_time_units_in_wizard: bool
|
mass_time_units_in_wizard: bool
|
||||||
chain_filter_with_set_operations: bool
|
chain_filter_with_set_operations: bool
|
||||||
save_metadata_blend_file: bool
|
save_metadata_blend_file: bool
|
||||||
|
decorator_font_scale: float
|
||||||
|
|
||||||
def draw(self, context: bpy.types.Context) -> None:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -1009,6 +1016,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
else:
|
else:
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.manage_tab_visibility", icon="PREFERENCES")
|
row.operator("bim.manage_tab_visibility", icon="PREFERENCES")
|
||||||
|
layout.prop(self, "decorator_font_scale")
|
||||||
|
|
||||||
|
|
||||||
# Scene panel groups
|
# Scene panel groups
|
||||||
|
|||||||
@@ -1581,7 +1581,7 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
default_scale = default_dpi * default_pixel_size
|
default_scale = default_dpi * default_pixel_size
|
||||||
system = bpy.context.preferences.system
|
system = bpy.context.preferences.system
|
||||||
system_scale = system.dpi * system.pixel_size
|
system_scale = system.dpi * system.pixel_size
|
||||||
return (system_scale / default_scale) * base_size *platform_scale
|
return (system_scale / default_scale) * base_size *platform_scale * tool.Blender.get_addon_preferences().decorator_font_scale
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user