Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-09 05:37:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-09 05:37:09 +0400
commita6f13f9d7bfef7020d43cb0a8058753e6d7a128d (patch)
tree09535f0341f93288fc492c3318ba2213291345d9 /release/scripts/ui/properties_data_armature_rigify.py
parent7fcbbad5a45acf5b4ef49d16cf6733afd1e481c7 (diff)
poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.
now rna functions that dont have a 'self' are automatically assumed '@classmethods'. de-duplicated poll functions and made some minor tweaks too.
Diffstat (limited to 'release/scripts/ui/properties_data_armature_rigify.py')
-rw-r--r--release/scripts/ui/properties_data_armature_rigify.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py
index d0a6821c16b..070f1fb7678 100644
--- a/release/scripts/ui/properties_data_armature_rigify.py
+++ b/release/scripts/ui/properties_data_armature_rigify.py
@@ -42,8 +42,8 @@ class DATA_PT_template(bpy.types.Panel):
templates = []
- @staticmethod
- def poll(context):
+ @classmethod
+ def poll(cls, context):
if not context.armature:
return False
obj = context.object
@@ -261,8 +261,8 @@ class ActiveAssign(bpy.types.Operator):
bl_idname = "pose.metarig_assign"
bl_label = "Assign to the active posebone"
- @staticmethod
- def poll(context):
+ @classmethod
+ def poll(cls, context):
bone = context.active_pose_bone
return bool(bone and bone.id_data.mode == 'POSE')
@@ -280,8 +280,8 @@ class ActiveClear(bpy.types.Operator):
bl_idname = "pose.metarig_clear"
bl_label = "Metarig Clear Type"
- @staticmethod
- def poll(context):
+ @classmethod
+ def poll(cls, context):
bone = context.active_pose_bone
return bool(bone and bone.id_data.mode == 'POSE')