[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1186] trunk/py/scripts/addons/ animation_rotobezier.py: Request by Gez, adding pass index to rotobezier

Daniel Salazar zanqdo at gmail.com
Mon Nov 22 19:24:45 CET 2010


Revision: 1186
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1186
Author:   zanqdo
Date:     2010-11-22 19:24:44 +0100 (Mon, 22 Nov 2010)

Log Message:
-----------
Request by Gez, adding pass index to rotobezier

Modified Paths:
--------------
    trunk/py/scripts/addons/animation_rotobezier.py

Modified: trunk/py/scripts/addons/animation_rotobezier.py
===================================================================
--- trunk/py/scripts/addons/animation_rotobezier.py	2010-11-22 16:09:36 UTC (rev 1185)
+++ trunk/py/scripts/addons/animation_rotobezier.py	2010-11-22 18:24:44 UTC (rev 1186)
@@ -25,12 +25,13 @@
 Rev 0.2 new make matte object tools and convenient display toggles
 Rev 0.3 tool to clear all animation from the curve
 Rev 0.4 moved from curve properties to toolbar
+Rev 0.5 added pass index property
 -------------------------------------------------------------------------'''
 
 bl_addon_info = {
     'name': 'RotoBezier',
     'author': 'Daniel Salazar <zanqdo at gmail.com>',
-    'version': (0,4),
+    'version': (0,5),
     'blender': (2, 5, 5),
     'api': 33232,
     'location': 'Select a Curve > Properties > Curve > RotoBezier',
@@ -55,7 +56,7 @@
     # show this add-on only in the Camera-Data-Panel
     @classmethod
     def poll(self, context):
-        if bpy.context.active_object:
+        if context.active_object:
             return context.active_object.type  == 'CURVE'
 
     # draw the gui
@@ -63,23 +64,26 @@
         layout = self.layout
         
         row = layout.row()
-        row.label(text="Keyframing:")
+        row.label(text="Keyframing")
         row = layout.row()
         row.operator('curve.insert_keyframe_rotobezier')
         row.operator('curve.delete_keyframe_rotobezier')
         row = layout.row()
         row.operator('curve.clear_animation_rotobezier')
         row = layout.row()
-        row.label(text="Display:")
+        row.label(text="Display")
         row = layout.row()
         row.operator('curve.toggle_draw_rotobezier')
         if context.mode == 'EDIT_CURVE':
             row.operator('curve.toggle_handles_rotobezier')
         row = layout.row()
-        row.label(text="Tools:")
+        row.label(text="Tools")
         row = layout.row()
         row.operator('curve.make_white_matte_rotobezier')
         row.operator('curve.make_black_matte_rotobezier')
+        row = layout.row()
+        ob = context.active_object
+        row.prop(ob, "pass_index")
 
 
 class CURVE_OT_insert_keyframe_rotobezier(bpy.types.Operator):
@@ -97,9 +101,8 @@
 
 
     def execute(op, context):
-        
-        import bpy
 
+
         Obj = context.active_object
 
         if Obj.type == 'CURVE':
@@ -119,7 +122,7 @@
                 bpy.ops.object.editmode_toggle()
 
 
-        return {'FINISHED'} 
+        return {'FINISHED'}
 
 
 class CURVE_OT_delete_keyframe_rotobezier(bpy.types.Operator):
@@ -137,8 +140,6 @@
 
 
     def execute(op, context):
-        
-        import bpy
 
         Obj = context.active_object
 
@@ -158,9 +159,9 @@
             if Mode:
                 bpy.ops.object.editmode_toggle()
 
-
         return {'FINISHED'}
 
+
 class CURVE_OT_clear_animation_rotobezier(bpy.types.Operator):
     bl_label = 'Clear Animation'
     bl_idname = 'curve.clear_animation_rotobezier'




More information about the Bf-extensions-cvs mailing list