diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-24 22:50:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-24 22:50:43 +0300 |
commit | bbe13e7823d916523ed9434023dee34f34d6cb8e (patch) | |
tree | 5e2fe2c848337d59f028b12a5afc3ea989dfa43f /release/scripts/ui/properties_data_armature_rigify.py | |
parent | 4dd3e6c36070e64d8b1d784a34d9881ae2c3eed8 (diff) |
* register operators like other classes
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
Diffstat (limited to 'release/scripts/ui/properties_data_armature_rigify.py')
-rw-r--r-- | release/scripts/ui/properties_data_armature_rigify.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py index 9d04afe22b5..12f1b0ed5e5 100644 --- a/release/scripts/ui/properties_data_armature_rigify.py +++ b/release/scripts/ui/properties_data_armature_rigify.py @@ -138,7 +138,7 @@ class Reload(bpy.types.Operator): def execute(self, context): DATA_PT_template.templates[:] = metarig_templates() - return ('FINISHED',) + return {'FINISHED'} def rigify_report_exception(operator, exception): @@ -180,7 +180,7 @@ class Generate(bpy.types.Operator): except rigify.RigifyError as rig_exception: rigify_report_exception(self, rig_exception) - return ('FINISHED',) + return {'FINISHED'} class Validate(bpy.types.Operator): @@ -196,7 +196,7 @@ class Validate(bpy.types.Operator): rigify.validate_rig(context, context.object) except rigify.RigifyError as rig_exception: rigify_report_exception(self, rig_exception) - return ('FINISHED',) + return {'FINISHED'} class Sample(bpy.types.Operator): @@ -219,7 +219,7 @@ class Sample(bpy.types.Operator): if obj_gen: obj_gen.location.x = i * 1.0 - return ('FINISHED',) + return {'FINISHED'} class Graph(bpy.types.Operator): @@ -244,7 +244,7 @@ class Graph(bpy.types.Operator): os.system("dot -Tpng %s > %s; gnome-open %s &" % (path_dot, path_png, path_png)) #os.system("python /b/xdot.py '%s' &" % path_dot) - return ('FINISHED',) + return {'FINISHED'} class AsScript(bpy.types.Operator): @@ -267,7 +267,7 @@ class AsScript(bpy.types.Operator): file.write(code) file.close() - return ('FINISHED',) + return {'FINISHED'} def invoke(self, context, event): import os @@ -294,7 +294,7 @@ class ActiveAssign(bpy.types.Operator): pose_templates = scene.pose_templates template_name = DATA_PT_template.templates[pose_templates.active_template_index] context.active_pose_bone["type"] = template_name - return ('FINISHED',) + return {'FINISHED'} class ActiveClear(bpy.types.Operator): @@ -310,7 +310,7 @@ class ActiveClear(bpy.types.Operator): def execute(self, context): scene = context.scene del context.active_pose_bone["type"] - return ('FINISHED',) + return {'FINISHED'} import space_info @@ -336,15 +336,15 @@ bpy.types.register(DATA_PT_template) bpy.types.register(PoseTemplateSettings) bpy.types.register(PoseTemplate) -bpy.ops.add(Reload) -bpy.ops.add(Generate) -bpy.ops.add(Validate) -bpy.ops.add(Sample) -bpy.ops.add(Graph) -bpy.ops.add(AsScript) +bpy.types.register(Reload) +bpy.types.register(Generate) +bpy.types.register(Validate) +bpy.types.register(Sample) +bpy.types.register(Graph) +bpy.types.register(AsScript) -bpy.ops.add(ActiveAssign) -bpy.ops.add(ActiveClear) +bpy.types.register(ActiveAssign) +bpy.types.register(ActiveClear) bpy.types.register(INFO_MT_armature_metarig_add) |