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:
Diffstat (limited to 'object_collection_manager/qcd_operators.py')
-rw-r--r--object_collection_manager/qcd_operators.py36
1 files changed, 27 insertions, 9 deletions
diff --git a/object_collection_manager/qcd_operators.py b/object_collection_manager/qcd_operators.py
index c9ecf5d5..14e79a0b 100644
--- a/object_collection_manager/qcd_operators.py
+++ b/object_collection_manager/qcd_operators.py
@@ -145,13 +145,25 @@ class QCDAllBase():
class EnableAllQCDSlotsMeta(Operator):
'''QCD All Meta Operator'''
bl_label = "Quick View Toggles"
- bl_description = (
- " * LMB - Enable all slots/Restore.\n"
- " * Alt+LMB - Select all objects in QCD slots.\n"
- " * LMB+Hold - Menu"
- )
bl_idname = "view3d.enable_all_qcd_slots_meta"
+ @classmethod
+ def description(cls, context, properties):
+ selection_hotkeys = ""
+
+ if context.mode == 'OBJECT':
+ selection_hotkeys = (
+ " * Alt+LMB - Select all objects in QCD slots.\n"
+ )
+
+ hotkey_string = (
+ " * LMB - Enable all slots/Restore.\n"
+ + selection_hotkeys +
+ " * LMB+Hold - Menu"
+ )
+
+ return hotkey_string
+
def invoke(self, context, event):
global qcd_slots
global layer_collections
@@ -574,16 +586,22 @@ class ViewMoveQCDSlot(Operator):
global qcd_slots
slot_name = qcd_slots.get_name(properties.slot)
-
slot_string = f"QCD Slot {properties.slot}: \"{slot_name}\"\n"
+ selection_hotkeys = ""
+
+ if context.mode == 'OBJECT':
+ selection_hotkeys = (
+ ".\n"
+ " * Alt+LMB - Select objects in slot.\n"
+ " * Alt+Shift+LMB - Toggle objects' selection for slot"
+ )
hotkey_string = (
" * LMB - Isolate slot.\n"
" * Shift+LMB - Toggle slot.\n"
" * Ctrl+LMB - Move objects to slot.\n"
- " * Ctrl+Shift+LMB - Toggle objects' slot.\n"
- " * Alt+LMB - Select objects in slot.\n"
- " * Alt+Shift+LMB - Toggle objects' selection for slot"
+ " * Ctrl+Shift+LMB - Toggle objects' slot"
+ + selection_hotkeys
)
return f"{slot_string}{hotkey_string}"