Commit c4e727c0 authored by Ryan Inch's avatar Ryan Inch
Browse files

Collection Manager: Fix bug with sync selection. Task: T69577

Prevent syncing to the Master Collection when the popup is called.
parent 0e5b7c2b
......@@ -23,7 +23,7 @@ bl_info = {
"name": "Collection Manager",
"description": "Manage collections and their objects",
"author": "Ryan Inch",
"version": (1,2,1),
"version": (1,2,2),
"blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel
......
......@@ -117,9 +117,7 @@ class CollectionManager(Operator):
#hideall_history.clear()
#disableviewall_history.clear()
#disablerenderall_history.clear()
#context.scene.CMListIndex = 0
update_property_group(context)
lvl = get_max_lvl()
......@@ -130,9 +128,12 @@ class CollectionManager(Operator):
self.view_layer = context.view_layer.name
# sync selection in ui list with active layer collection
active_laycol_name = context.view_layer.active_layer_collection.name
active_laycol_row_index = layer_collections[active_laycol_name]["row_index"]
context.scene.CMListIndex = active_laycol_row_index
try:
active_laycol_name = context.view_layer.active_layer_collection.name
active_laycol_row_index = layer_collections[active_laycol_name]["row_index"]
context.scene.CMListIndex = active_laycol_row_index
except:
context.scene.CMListIndex = 0
return wm.invoke_popup(self, width=(400+(lvl*20)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment