[Bf-extensions-cvs] [a45df153] master: Add camera rigs: fix poll method when not created with add-on

Damien Picard noreply at git.blender.org
Fri Jun 10 09:59:03 CEST 2022


Commit: a45df1532510c09ea5430a012f3ce5c48711f29c
Author: Damien Picard
Date:   Mon Mar 29 11:33:56 2021 +0200
Branches: master
https://developer.blender.org/rBAa45df1532510c09ea5430a012f3ce5c48711f29c

Add camera rigs: fix poll method when not created with add-on

When creating an armature containing a camera, without the add-on, the
UI panel tries to display, but the data is not set up to use it
properly.

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

M	add_camera_rigs/operators.py

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

diff --git a/add_camera_rigs/operators.py b/add_camera_rigs/operators.py
index 646566ae..18300e08 100644
--- a/add_camera_rigs/operators.py
+++ b/add_camera_rigs/operators.py
@@ -5,7 +5,10 @@ from bpy.types import Operator
 
 
 def get_rig_and_cam(obj):
-    if obj.type == 'ARMATURE':
+    if (obj.type == 'ARMATURE'
+            and "rig_id" in obj
+            and obj["rig_id"].lower() in {"dolly_rig",
+                                          "crane_rig", "2d_rig"}):
         cam = None
         for child in obj.children:
             if child.type == 'CAMERA':



More information about the Bf-extensions-cvs mailing list