use `props` all over for operator properties vars
authorCampbell Barton <ideasman42@gmail.com>
Sun, 1 Jan 2012 13:09:58 +0000 (13:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 1 Jan 2012 13:09:58 +0000 (13:09 +0000)
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 388ae2b0e131f7e5a4c37984f5f17de02a2fa25c..32c8ed11bc5cfdd9d8298f9f1a1314f5522e46bb 100644 (file)
@@ -145,11 +145,11 @@ def draw(layout, context, context_member, property_type, use_edit=True):
 
         if use_edit:
             row = split.row(align=True)
-            prop = row.operator("wm.properties_edit", text="edit")
-            assign_props(prop, val_draw, key)
+            props = row.operator("wm.properties_edit", text="edit")
+            assign_props(props, val_draw, key)
 
-            prop = row.operator("wm.properties_remove", text="", icon='ZOOMOUT')
-            assign_props(prop, val_draw, key)
+            props = row.operator("wm.properties_remove", text="", icon='ZOOMOUT')
+            assign_props(props, val_draw, key)
 
 
 class PropertyPanel():
index fa3b84ed8d74643861576389f5b3d49c883ccfc1..11326377a79156d656ee006392025b1df8d6db7b 100644 (file)
@@ -502,9 +502,9 @@ class WM_MT_context_menu_enum(Menu):
         values = [(i.name, i.identifier) for i in value_base.bl_rna.properties[prop_string].enum_items]
 
         for name, identifier in values:
-            prop = self.layout.operator("wm.context_set_enum", text=name)
-            prop.data_path = data_path
-            prop.value = identifier
+            props = self.layout.operator("wm.context_set_enum", text=name)
+            props.data_path = data_path
+            props.value = identifier
 
 
 class WM_OT_context_menu_enum(Operator):
index 27b6aa721a4d6a81b4fe7a2274265b48c5f81b2e..f01c2ba45e0d8aa6a6e62984c1150c2ae1d63d4b 100644 (file)
@@ -181,9 +181,9 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
                 col = split.column()
                 col.prop(group, "dupli_offset", text="")
 
-                prop = col.operator("wm.context_set_value", text="From Cursor")
-                prop.data_path = "object.users_group[%d].dupli_offset" % index
-                prop.value = value
+                props = col.operator("wm.context_set_value", text="From Cursor")
+                props.data_path = "object.users_group[%d].dupli_offset" % index
+                props.value = value
                 index += 1
 
 
index 81526797109e4d2526a31a78ac22cdc424724d71..4ccdef747cebb1868c46622a49bf82f4ac9cdaf8 100644 (file)
@@ -298,34 +298,34 @@ class IMAGE_MT_uvs_select_mode(Menu):
         # do smart things depending on whether uv_select_sync is on
 
         if toolsettings.use_uv_select_sync:
-            prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
-            prop.value = "(True, False, False)"
-            prop.data_path = "tool_settings.mesh_select_mode"
+            props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
+            props.value = "(True, False, False)"
+            props.data_path = "tool_settings.mesh_select_mode"
 
-            prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
-            prop.value = "(False, True, False)"
-            prop.data_path = "tool_settings.mesh_select_mode"
+            props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
+            props.value = "(False, True, False)"
+            props.data_path = "tool_settings.mesh_select_mode"
 
-            prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
-            prop.value = "(False, False, True)"
-            prop.data_path = "tool_settings.mesh_select_mode"
+            props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
+            props.value = "(False, False, True)"
+            props.data_path = "tool_settings.mesh_select_mode"
 
         else:
-            prop = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
-            prop.value = 'VERTEX'
-            prop.data_path = "tool_settings.uv_select_mode"
+            props = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
+            props.value = 'VERTEX'
+            props.data_path = "tool_settings.uv_select_mode"
 
-            prop = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
-            prop.value = 'EDGE'
-            prop.data_path = "tool_settings.uv_select_mode"
+            props = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
+            props.value = 'EDGE'
+            props.data_path = "tool_settings.uv_select_mode"
 
-            prop = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
-            prop.value = 'FACE'
-            prop.data_path = "tool_settings.uv_select_mode"
+            props = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
+            props.value = 'FACE'
+            props.data_path = "tool_settings.uv_select_mode"
 
-            prop = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
-            prop.value = 'ISLAND'
-            prop.data_path = "tool_settings.uv_select_mode"
+            props = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
+            props.value = 'ISLAND'
+            props.data_path = "tool_settings.uv_select_mode"
 
 
 class IMAGE_HT_header(Header):
index 84d207f4e45b79c5a95bdc86916440aef05f29e8..22d0e39a54be6b9eb60fe564d5783a10b2c45fce 100644 (file)
@@ -1523,17 +1523,17 @@ class VIEW3D_MT_edit_mesh_select_mode(Menu):
 
         layout.operator_context = 'INVOKE_REGION_WIN'
 
-        prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
-        prop.value = "(True, False, False)"
-        prop.data_path = "tool_settings.mesh_select_mode"
+        props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
+        props.value = "(True, False, False)"
+        props.data_path = "tool_settings.mesh_select_mode"
 
-        prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
-        prop.value = "(False, True, False)"
-        prop.data_path = "tool_settings.mesh_select_mode"
+        props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
+        props.value = "(False, True, False)"
+        props.data_path = "tool_settings.mesh_select_mode"
 
-        prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
-        prop.value = "(False, False, True)"
-        prop.data_path = "tool_settings.mesh_select_mode"
+        props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
+        props.value = "(False, False, True)"
+        props.data_path = "tool_settings.mesh_select_mode"
 
 
 class VIEW3D_MT_edit_mesh_extrude(Menu):
index 9644f57d6cd56281afd18b61004ae41427b8d415..25f81f2cde125939017cf68c39c24fd52cb0ec6a 100644 (file)
@@ -1198,9 +1198,9 @@ class VIEW3D_MT_tools_projectpaint_clone(Menu):
     def draw(self, context):
         layout = self.layout
         for i, tex in enumerate(context.active_object.data.uv_textures):
-            prop = layout.operator("wm.context_set_int", text=tex.name)
-            prop.data_path = "active_object.data.uv_texture_clone_index"
-            prop.value = i
+            props = layout.operator("wm.context_set_int", text=tex.name)
+            props.data_path = "active_object.data.uv_texture_clone_index"
+            props.value = i
 
 
 class VIEW3D_MT_tools_projectpaint_stencil(Menu):
@@ -1209,9 +1209,9 @@ class VIEW3D_MT_tools_projectpaint_stencil(Menu):
     def draw(self, context):
         layout = self.layout
         for i, tex in enumerate(context.active_object.data.uv_textures):
-            prop = layout.operator("wm.context_set_int", text=tex.name)
-            prop.data_path = "active_object.data.uv_texture_stencil_index"
-            prop.value = i
+            props = layout.operator("wm.context_set_int", text=tex.name)
+            props.data_path = "active_object.data.uv_texture_stencil_index"
+            props.value = i
 
 
 class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):