rename user interface operator properties from 'op' to 'props'
authorCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 00:53:50 +0000 (00:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 00:53:50 +0000 (00:53 +0000)
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/templates/driver_functions.py

index ff19ece8f94a773a9047c931e0c889e09d0bf2e9..425b7a601c8190bf02876e8d22612d6ebb48b299 100644 (file)
@@ -51,8 +51,7 @@ class MESH_MT_shape_key_specials(Menu):
         layout.operator("object.shape_key_transfer", icon='COPY_ID')  # icon is not ideal
         layout.operator("object.join_shapes", icon='COPY_ID')  # icon is not ideal
         layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
-        op = layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix")
-        op.from_mix = True
+        layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix").from_mix = True
 
 
 class MeshButtonsPanel():
@@ -207,8 +206,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
         col = row.column()
 
         sub = col.column(align=True)
-        op = sub.operator("object.shape_key_add", icon='ZOOMIN', text="")
-        op.from_mix = False
+        sub.operator("object.shape_key_add", icon='ZOOMIN', text="").from_mix = False
         sub.operator("object.shape_key_remove", icon='ZOOMOUT', text="")
         sub.menu("MESH_MT_shape_key_specials", icon='DOWNARROW_HLT', text="")
 
index 167cead9a3bb5912ab76dab56d49bff7887e4967..d3859a78bea35c00ee4e291681f0b6927a051c75 100644 (file)
@@ -115,8 +115,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
 
             subcol = col.column()
             subcol.operator_context = 'INVOKE_DEFAULT'
-            op = subcol.operator("anim.keying_set_export", text="Export to File")
-            op.filepath = "keyingset.py"
+            subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py"
 
             col = row.column()
             col.label(text="Keyframing Settings:")
index 051854a28f1f8c4dc33df5be15634740c3f3cbd9..50db989a2e20fd6f9a0d538b7a9e52f96c8291d7 100644 (file)
@@ -157,24 +157,24 @@ class IMAGE_MT_image_invert(Menu):
     def draw(self, context):
         layout = self.layout
 
-        op = layout.operator("image.invert", text="Invert Image Colors")
-        op.invert_r = True
-        op.invert_g = True
-        op.invert_b = True
+        props = layout.operator("image.invert", text="Invert Image Colors")
+        props.invert_r = True
+        props.invert_g = True
+        props.invert_b = True
 
         layout.separator()
 
-        op = layout.operator("image.invert", text="Invert Red Channel")
-        op.invert_r = True
+        props = layout.operator("image.invert", text="Invert Red Channel")
+        props.invert_r = True
 
-        op = layout.operator("image.invert", text="Invert Green Channel")
-        op.invert_g = True
+        props = layout.operator("image.invert", text="Invert Green Channel")
+        props.invert_g = True
 
-        op = layout.operator("image.invert", text="Invert Blue Channel")
-        op.invert_b = True
+        props = layout.operator("image.invert", text="Invert Blue Channel")
+        props.invert_b = True
 
-        op = layout.operator("image.invert", text="Invert Alpha Channel")
-        op.invert_a = True
+        props = layout.operator("image.invert", text="Invert Alpha Channel")
+        props.invert_a = True
 
 
 class IMAGE_MT_uvs_showhide(Menu):
index 2c537efa61bbc4660012c2e557cdd481678be4b6..5e5ce462da9cfcbafa0cef062cc1abda58e6330b 100644 (file)
@@ -164,11 +164,9 @@ class InputKeyMapPanel:
             row.label()
 
         if (not kmi.is_user_defined) and kmi.is_user_modified:
-            op = row.operator("wm.keyitem_restore", text="", icon='BACK')
-            op.item_id = kmi.id
+            row.operator("wm.keyitem_restore", text="", icon='BACK').item_id = kmi.id
         else:
-            op = row.operator("wm.keyitem_remove", text="", icon='X')
-            op.item_id = kmi.id
+            row.operator("wm.keyitem_remove", text="", icon='X').item_id = kmi.id
 
         # Expanded, additional event settings
         if kmi.show_expanded:
index c6a26cd9bbf79c5492aba2c507c837d90ed13d3b..1170bce2c14323e873e8a7d5e9601b916ad05a59 100644 (file)
@@ -54,11 +54,10 @@ class VIEW3D_HT_header(Header):
             else:
                 sub.menu("VIEW3D_MT_object")
 
-        
         # Contains buttons like Mode, Pivot, Manipulator, Layer, Mesh Select Mode...
-        row = layout.row() #XXX Narrowed down vert/edge/face selector in edit mode/solid drawmode. -DingTo 
+        row = layout.row()  # XXX Narrowed down vert/edge/face selector in edit mode/solid drawmode. -DingTo
         row.template_header_3D()
-        
+
         if obj:
             # Particle edit
             if obj.mode == 'PARTICLE_EDIT':
index db9d4fb4678ecbb690deb214fe46e62301b6d84a..1c6af0e574ffff717223abc2b036af99554ee7ba 100644 (file)
@@ -16,6 +16,7 @@ def invert(f):
 
 uuid_store = {}
 
+
 def slow_value(value, fac, uuid):
     """ Delay the value by a factor, use a unique string to allow
         use in multiple drivers without conflict: