[Bf-extensions-cvs] [7084d19e] master: Collection Manager: Fix regression. Task: T69577

Ryan Inch noreply at git.blender.org
Mon Aug 10 08:44:23 CEST 2020


Commit: 7084d19ef5886b740b65ba6a4234849859e0e5b8
Author: Ryan Inch
Date:   Mon Aug 10 02:39:43 2020 -0400
Branches: master
https://developer.blender.org/rBA7084d19ef5886b740b65ba6a4234849859e0e5b8

Collection Manager: Fix regression. Task: T69577

Fix error when adding/removing objects caused by a regression from
rBAadac42a46334 (improve performance for large numbers of selected
objects)

===================================================================

M	object_collection_manager/__init__.py
M	object_collection_manager/operators.py
M	object_collection_manager/qcd_operators.py

===================================================================

diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index 4fe792bb..09cb1c2c 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, 12, 4),
+    "version": (2, 12, 5),
     "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/operators.py b/object_collection_manager/operators.py
index 08c90224..46e83023 100644
--- a/object_collection_manager/operators.py
+++ b/object_collection_manager/operators.py
@@ -248,7 +248,7 @@ class CMSetCollectionOperator(Operator):
 
             # make sure there is an active object
             if not active_object:
-                active_object = selected_objects[0]
+                active_object = tuple(selected_objects)[0]
 
             # check if in collection
             if not active_object.name in target_collection.objects:
diff --git a/object_collection_manager/qcd_operators.py b/object_collection_manager/qcd_operators.py
index 56df1501..4f5f555a 100644
--- a/object_collection_manager/qcd_operators.py
+++ b/object_collection_manager/qcd_operators.py
@@ -81,7 +81,7 @@ class MoveToQCDSlot(Operator):
         # adds object to slot
         if self.toggle:
             if not active_object:
-                active_object = selected_objects[0]
+                active_object = tuple(selected_objects)[0]
 
             if not active_object.name in qcd_laycol.collection.objects:
                 for obj in selected_objects:



More information about the Bf-extensions-cvs mailing list