rename user interface operator properties from 'op' to 'props'

This commit is contained in:
Campbell Barton
2011-10-23 00:53:50 +00:00
parent 726fa61817
commit d541a200c2
6 changed files with 20 additions and 25 deletions

View 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="")

View 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:")

View 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):

View 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:

View 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':

View 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: