Collection Manager: Fix phantom mode issue. Task: T69577

Fixes the add collection operators, undo operators, and specials menu
in the CM popup not being disabled when in phantom mode.
This commit is contained in:
Ryan Inch 2021-05-10 01:44:11 -04:00
parent 8ea89b89c7
commit 8619440331
2 changed files with 13 additions and 4 deletions

View File

@ -22,7 +22,7 @@ bl_info = {
"name": "Collection Manager",
"description": "Manage collections and their objects",
"author": "Ryan Inch",
"version": (2, 21, 2),
"version": (2, 21, 3),
"blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel

View File

@ -143,8 +143,13 @@ class CollectionManager(Operator):
right_sec = button_row_1.row()
right_sec.alignment = 'RIGHT'
right_sec.menu("VIEW3D_MT_CM_specials_menu")
right_sec.popover(panel="COLLECTIONMANAGER_PT_display_options",
specials_menu = right_sec.row()
specials_menu.alignment = 'RIGHT'
specials_menu.menu("VIEW3D_MT_CM_specials_menu")
display_options = right_sec.row()
display_options.alignment = 'RIGHT'
display_options.popover(panel="COLLECTIONMANAGER_PT_display_options",
text="", icon='FILTER')
mc_box = layout.box()
@ -449,12 +454,16 @@ class CollectionManager(Operator):
if cm.in_phantom_mode:
view.enabled = False
if prefs.enable_qcd:
renum_sec.enabled = False
undo_sec.enabled = False
specials_menu.enabled = False
c_icon.enabled = False
row_setcol.enabled = False
addcollec_row.enabled = False
button_row_2.enabled = False
def execute(self, context):