[Bf-extensions-cvs] [7d785fb1] master: Fix rigify Python errors when there is no active object
Brecht Van Lommel
noreply at git.blender.org
Fri Jun 28 13:01:40 CEST 2019
Commit: 7d785fb156826a54ff58764988b30659ac1f5ba2
Author: Brecht Van Lommel
Date: Fri Jun 28 13:00:53 2019 +0200
Branches: master
https://developer.blender.org/rBA7d785fb156826a54ff58764988b30659ac1f5ba2
Fix rigify Python errors when there is no active object
===================================================================
M rigify/ui.py
===================================================================
diff --git a/rigify/ui.py b/rigify/ui.py
index 35b9c847..933aec71 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -662,7 +662,8 @@ class VIEW3D_PT_rigify_animation_tools(bpy.types.Panel):
@classmethod
def poll(cls, context):
- return context.object.type == 'ARMATURE' and context.active_object.data.get("rig_id") is not None
+ return context.object and context.object.type == 'ARMATURE'\
+ and context.active_object.data.get("rig_id") is not None
def draw(self, context):
obj = context.active_object
More information about the Bf-extensions-cvs
mailing list