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>2019-12-21 10:43:15 +0300
committerRyan Inch <mythologylover75@gmail.com>2019-12-21 10:43:15 +0300
commit4d6d1f7eed8bbeb9f439e4294a58568f9c13317b (patch)
treed4ea94236a1694a2770abeafb78e367ddc6c9e0b
parentbd8d060d0be318bceb3bbcde6991ee6b2b3c513b (diff)
Collection Manager: Fix popup sizing. Task: T69577
Fix bug with automatic window sizing based on the maximum number of sub-levels present.
-rw-r--r--object_collection_manager/__init__.py2
-rw-r--r--object_collection_manager/internals.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index 828682a5..0c4dcca7 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": (1,8,2),
+ "version": (1,8,3),
"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/internals.py b/object_collection_manager/internals.py
index fc186684..5deadece 100644
--- a/object_collection_manager/internals.py
+++ b/object_collection_manager/internals.py
@@ -78,6 +78,10 @@ def update_collection_tree(context):
def get_all_collections(context, collections, parent, tree, level=0, visible=False):
global row_index
+ global max_lvl
+
+ if level > max_lvl:
+ max_lvl = level
for item in collections:
laycol = {"id": len(layer_collections) +1,
@@ -98,8 +102,6 @@ def get_all_collections(context, collections, parent, tree, level=0, visible=Fal
tree.append(laycol)
if len(item.children) > 0:
- global max_lvl
- max_lvl += 1
laycol["has_children"] = True
if item.name in expanded and laycol["visible"]: