From 0b1520821fd24ae8fd175b75abe3554df06472cc Mon Sep 17 00:00:00 2001 From: Ryan Inch <mythologylover75@gmail.com> Date: Thu, 2 Apr 2020 03:02:07 -0400 Subject: [PATCH] Collection Manager: Phantom Mode update. Task: T69577 Disabled QCD slot numeration fields and Re-numerate QCD Slots operator when in Phantom Mode --- object_collection_manager/__init__.py | 2 +- object_collection_manager/ui.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py index b1e11921e..2aa38c5bd 100644 --- a/object_collection_manager/__init__.py +++ b/object_collection_manager/__init__.py @@ -22,7 +22,7 @@ bl_info = { "name": "Collection Manager", "description": "Manage collections and their objects", "author": "Ryan Inch", - "version": (2,4,11), + "version": (2,4,12), "blender": (2, 80, 0), "location": "View3D - Object Mode (Shortcut - M)", "warning": '', # used for warning icon and text in addons panel diff --git a/object_collection_manager/ui.py b/object_collection_manager/ui.py index 5561da262..a90a619f1 100644 --- a/object_collection_manager/ui.py +++ b/object_collection_manager/ui.py @@ -109,16 +109,16 @@ class CollectionManager(Operator): sec1.operator("view3d.expand_all_items", text=text) - if context.preferences.addons[__package__].preferences.enable_qcd: - renum = toggle_row.row() - renum.alignment = 'LEFT' - renum.operator("view3d.renumerate_qcd_slots") - for laycol in collection_tree: if laycol["has_children"]: sec1.enabled = True break + if context.preferences.addons[__package__].preferences.enable_qcd: + renum = toggle_row.row() + renum.alignment = 'LEFT' + renum.operator("view3d.renumerate_qcd_slots") + sec2 = toggle_row.row() sec2.alignment = 'RIGHT' @@ -242,6 +242,9 @@ class CollectionManager(Operator): view.enabled = False addcollec_row.enabled = False + if context.preferences.addons[__package__].preferences.enable_qcd: + renum.enabled = False + def execute(self, context): wm = context.window_manager @@ -488,6 +491,9 @@ class CM_UL_items(UIList): row_setcol.enabled = False rm_op.enabled = False + if context.preferences.addons[__package__].preferences.enable_qcd: + QCD.enabled = False + def draw_filter(self, context, layout): row = layout.row() -- GitLab