Skip to content
Snippets Groups Projects
Commit a45df153 authored by Damien Picard's avatar Damien Picard
Browse files

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.
parent 52a2a761
No related branches found
Tags
No related merge requests found
...@@ -5,7 +5,10 @@ from bpy.types import Operator ...@@ -5,7 +5,10 @@ from bpy.types import Operator
def get_rig_and_cam(obj): 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 cam = None
for child in obj.children: for child in obj.children:
if child.type == 'CAMERA': if child.type == 'CAMERA':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment