diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2022-04-19 09:13:12 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2022-04-19 09:13:12 +0300 |
commit | a65df677f70759440c4cea4bfe74ca458844bd78 (patch) | |
tree | 72db65616439d2043ed6aa1b7e17ed2cfa4281a3 /object_collection_manager/preferences.py | |
parent | 754d05ac7ebb78377bbe6d80068542c43d347974 (diff) |
Collection Manager: Add QCD widget preference. Task: T69577
Add a preference to enable/disable the QCD 3D Viewport header widget.
Diffstat (limited to 'object_collection_manager/preferences.py')
-rw-r--r-- | object_collection_manager/preferences.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/object_collection_manager/preferences.py b/object_collection_manager/preferences.py index 0b8a71c5..ec8bc25a 100644 --- a/object_collection_manager/preferences.py +++ b/object_collection_manager/preferences.py @@ -39,6 +39,12 @@ def update_qcd_view_edit_mode_hotkeys_status(self, context): else: qcd_init.unregister_qcd_view_edit_mode_hotkeys() +def update_qcd_3dview_header_widget_status(self, context): + if self.enable_qcd_3dview_header_widget: + qcd_init.register_qcd_3dview_header_widget() + else: + qcd_init.unregister_qcd_3dview_header_widget() + def get_tool_text(self): if self.tool_text_override: return self["tool_text_color"] @@ -188,7 +194,7 @@ class CMPreferences(AddonPreferences): # ENABLE QCD BOOLS enable_qcd: BoolProperty( name="QCD", - description="Enable/Disable QCD System.\nThe Quick Content Display system allows you to specify collections as QCD \"slots\" up to a maximum of 20. You can then interact with them through numerical hotkeys, a popup move widget, and a 3D View header widget", + description="Enable/Disable QCD System.\nThe Quick Content Display system allows you to specify collections as QCD \"slots\" up to a maximum of 20. You can then interact with them through numerical hotkeys, a popup move widget, and a 3D Viewport header widget", default=True, update=update_qcd_status, ) @@ -207,6 +213,13 @@ class CMPreferences(AddonPreferences): update=update_qcd_view_edit_mode_hotkeys_status, ) + enable_qcd_3dview_header_widget: BoolProperty( + name="QCD 3D Viewport Header Widget", + description="Enable/Disable the 3D Viewport header widget. This widget graphically represents the 20 QCD slots and allows you to interact with them through the GUI", + default=True, + update=update_qcd_3dview_header_widget_status, + ) + # OVERRIDE BOOLS tool_text_override: BoolProperty( @@ -431,6 +444,7 @@ class CMPreferences(AddonPreferences): box.row().prop(self, "enable_qcd_view_hotkeys") box.row().prop(self, "enable_qcd_view_edit_mode_hotkeys") + box.row().prop(self, "enable_qcd_3dview_header_widget") box.row().label(text="QCD Move Widget") |