[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43054] trunk/blender/release/scripts: use `props` all over for operator properties vars

Campbell Barton ideasman42 at gmail.com
Sun Jan 1 14:10:07 CET 2012


Revision: 43054
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43054
Author:   campbellbarton
Date:     2012-01-01 13:09:58 +0000 (Sun, 01 Jan 2012)
Log Message:
-----------
use `props` all over for operator properties vars

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/rna_prop_ui.py
    trunk/blender/release/scripts/startup/bl_operators/wm.py
    trunk/blender/release/scripts/startup/bl_ui/properties_object.py
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/modules/rna_prop_ui.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_prop_ui.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/modules/rna_prop_ui.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -145,11 +145,11 @@
 
         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():

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -502,9 +502,9 @@
         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):

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -181,9 +181,9 @@
                 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
 
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -298,34 +298,34 @@
         # 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):

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -1523,17 +1523,17 @@
 
         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):

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2012-01-01 10:27:53 UTC (rev 43053)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2012-01-01 13:09:58 UTC (rev 43054)
@@ -1198,9 +1198,9 @@
     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 @@
     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):




More information about the Bf-blender-cvs mailing list