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:
authorDamien Picard <dam.pic@free.fr>2021-03-29 12:33:56 +0300
committerDamien Picard <dam.pic@free.fr>2022-06-10 10:57:29 +0300
commita45df1532510c09ea5430a012f3ce5c48711f29c (patch)
tree00dcaa5665985c1cb0d3aec93e39c086ff901d8e /add_camera_rigs
parent52a2a761c49ab59842b440990a3b58bccfbb3dab (diff)
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.
Diffstat (limited to 'add_camera_rigs')
-rw-r--r--add_camera_rigs/operators.py5
1 files changed, 4 insertions, 1 deletions
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':