Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2020-10-25 08:14:53 +0300
committerRyan Inch <mythologylover75@gmail.com>2020-10-25 08:14:53 +0300
commit7cc2e4b14f8855659b611d3da1d0dc702618d43f (patch)
treea13096731e21b3fe17ca327e8b4be3b1d35f53f0 /object_collection_manager/preferences.py
parent8488f40e0b1f27acba8185e44c1b8566c388516c (diff)
Collection Manager: Add disable override. Task: T69577.
Add an override checkbox to the preferences to override the object hiding hotkeys with object disabling hotkeys and add menu items to the Object->Show/Hide menu for the disable object operators. Disabling objects is needed to preserve their visibility state when excluding and unexcluding collections. This makes it easier to disable objects, and disabling objects prevents QCD slot switching from resetting the objects visibility state.
Diffstat (limited to 'object_collection_manager/preferences.py')
-rw-r--r--object_collection_manager/preferences.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/object_collection_manager/preferences.py b/object_collection_manager/preferences.py
index d155b9ce..4a1d6540 100644
--- a/object_collection_manager/preferences.py
+++ b/object_collection_manager/preferences.py
@@ -26,8 +26,16 @@ from bpy.props import (
FloatVectorProperty,
)
+from . import cm_init
from . import qcd_init
+def update_disable_objects_hotkeys_status(self, context):
+ if self.enable_disable_objects_override:
+ cm_init.register_disable_objects_hotkeys()
+
+ else:
+ cm_init.unregister_disable_objects_hotkeys()
+
def update_qcd_status(self, context):
if self.enable_qcd:
qcd_init.register_qcd()
@@ -188,6 +196,17 @@ def set_tooltip_outline(self, values):
class CMPreferences(AddonPreferences):
bl_idname = __package__
+ # ENABLE DISABLE OBJECTS OVERRIDE
+ enable_disable_objects_override: BoolProperty(
+ name="Disable Objects Override",
+ description=(
+ "Replace the object hiding hotkeys with object disabling hotkeys and add them to the Object->Show/Hide menu.\n"
+ "Disabling objects prevents them from being automatically shown again when collections are unexcluded"
+ ),
+ default=False,
+ update=update_disable_objects_hotkeys_status,
+ )
+
# ENABLE QCD BOOLS
enable_qcd: BoolProperty(
name="QCD",
@@ -426,6 +445,7 @@ class CMPreferences(AddonPreferences):
layout = self.layout
box = layout.box()
+ box.row().prop(self, "enable_disable_objects_override")
box.row().prop(self, "enable_qcd")
if not self.enable_qcd: