mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
[BBIM] Add preference option for default startup workspace, remove ambiguous wording (#4749)
* [BlenderBIM] change ambiguous wording from preferences * [BlenderBIM] add option for BIM as default workspace * [BlenderBIM] revert variable name change
This commit is contained in:
@@ -301,7 +301,8 @@ def load_post(scene):
|
|||||||
|
|
||||||
if bpy.context.preferences.addons["blenderbim"].preferences.should_setup_workspace:
|
if bpy.context.preferences.addons["blenderbim"].preferences.should_setup_workspace:
|
||||||
if "BIM" in bpy.data.workspaces:
|
if "BIM" in bpy.data.workspaces:
|
||||||
bpy.context.window.workspace = bpy.data.workspaces["BIM"]
|
if bpy.context.preferences.addons["blenderbim"].preferences.activate_workspace:
|
||||||
|
bpy.context.window.workspace = bpy.data.workspaces["BIM"]
|
||||||
else:
|
else:
|
||||||
bpy.ops.workspace.append_activate(idname="BIM", filepath=os.path.join(cwd, "data", "workspace.blend"))
|
bpy.ops.workspace.append_activate(idname="BIM", filepath=os.path.join(cwd, "data", "workspace.blend"))
|
||||||
|
|
||||||
|
|||||||
@@ -195,18 +195,19 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
pdf_command: StringProperty(name="PDF Command", description='E.g. [["firefox", "path"]]')
|
pdf_command: StringProperty(name="PDF Command", description='E.g. [["firefox", "path"]]')
|
||||||
spreadsheet_command: StringProperty(name="Spreadsheet Command", description='E.g. [["libreoffice", "path"]]')
|
spreadsheet_command: StringProperty(name="Spreadsheet Command", description='E.g. [["libreoffice", "path"]]')
|
||||||
openlca_port: IntProperty(name="OpenLCA IPC Port", default=8080)
|
openlca_port: IntProperty(name="OpenLCA IPC Port", default=8080)
|
||||||
should_hide_empty_props: BoolProperty(name="Should Hide Empty Properties", default=True)
|
should_hide_empty_props: BoolProperty(name="Hide Empty Properties", default=True)
|
||||||
should_setup_workspace: BoolProperty(name="Should Setup Workspace Layout for BIM", default=True)
|
should_setup_workspace: BoolProperty(name="Setup Workspace Layout for BIM", default=True)
|
||||||
|
activate_workspace: BoolProperty(name="Activate BIM Workspace on Startup", default=True)
|
||||||
should_setup_toolbar: BoolProperty(
|
should_setup_toolbar: BoolProperty(
|
||||||
name="Always Show Toolbar In 3D Viewport",
|
name="Always Show Toolbar In 3D Viewport",
|
||||||
default=True,
|
default=True,
|
||||||
description="If disabled, the toolbar will only load when an IFC model is active",
|
description="If disabled, the toolbar will only load when an IFC model is active",
|
||||||
)
|
)
|
||||||
should_play_chaching_sound: BoolProperty(
|
should_play_chaching_sound: BoolProperty(
|
||||||
name="Should Make A Cha-Ching Sound When Project Costs Updates", default=False
|
name="Play A Cha-Ching Sound When Project Costs Updates", default=False
|
||||||
)
|
)
|
||||||
lock_grids_on_import: BoolProperty(name="Should Lock Grids By Default", default=True)
|
lock_grids_on_import: BoolProperty(name="Lock Grids By Default", default=True)
|
||||||
spatial_elements_unselectable: BoolProperty(name="Should Make Spatial Elements Unselectable By Default", default=True)
|
spatial_elements_unselectable: BoolProperty(name="Make Spatial Elements Unselectable By Default", default=True)
|
||||||
decorations_colour: bpy.props.FloatVectorProperty(
|
decorations_colour: bpy.props.FloatVectorProperty(
|
||||||
name="Decorations Colour", subtype="COLOR", default=(1, 1, 1, 1), min=0.0, max=1.0, size=4
|
name="Decorations Colour", subtype="COLOR", default=(1, 1, 1, 1), min=0.0, max=1.0, size=4
|
||||||
)
|
)
|
||||||
@@ -283,6 +284,8 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "should_setup_workspace")
|
row.prop(self, "should_setup_workspace")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
row.prop(self, "activate_workspace")
|
||||||
|
row = layout.row()
|
||||||
row.prop(self, "should_setup_toolbar")
|
row.prop(self, "should_setup_toolbar")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "should_play_chaching_sound")
|
row.prop(self, "should_play_chaching_sound")
|
||||||
|
|||||||
Reference in New Issue
Block a user