use standard name for operator properties - 'props'.

This commit is contained in:
Campbell Barton 2013-05-09 13:05:36 +00:00
parent 4c042f2145
commit 675f845116
3 changed files with 26 additions and 26 deletions

@ -66,12 +66,12 @@ def register_node_categories(identifier, cat_list):
col = layout.column()
default_context = bpy.app.translations.contexts.default
for item in self.category.items(context):
op = col.operator("node.add_node", text=item.label, text_ctxt=default_context)
op.type = item.nodetype
op.use_transform = True
props = col.operator("node.add_node", text=item.label, text_ctxt=default_context)
props.type = item.nodetype
props.use_transform = True
for setting in item.settings.items():
ops = op.settings.add()
ops = props.settings.add()
ops.name = setting[0]
ops.value = setting[1]

@ -116,8 +116,8 @@ class NODE_MT_add(bpy.types.Menu):
layout = self.layout
layout.operator_context = 'INVOKE_DEFAULT'
op = layout.operator("node.add_search", text="Search ...")
op.use_transform = True
props = layout.operator("node.add_search", text="Search ...")
props.use_transform = True
# actual node submenus are added by draw functions from node categories

@ -1363,34 +1363,34 @@ class VIEW3D_MT_hide_mask(Menu):
def draw(self, context):
layout = self.layout
op = layout.operator("paint.hide_show", text="Show All")
op.action = 'SHOW'
op.area = 'ALL'
props = layout.operator("paint.hide_show", text="Show All")
props.action = 'SHOW'
props.area = 'ALL'
op = layout.operator("paint.hide_show", text="Hide Bounding Box")
op.action = 'HIDE'
op.area = 'INSIDE'
props = layout.operator("paint.hide_show", text="Hide Bounding Box")
props.action = 'HIDE'
props.area = 'INSIDE'
op = layout.operator("paint.hide_show", text="Show Bounding Box")
op.action = 'SHOW'
op.area = 'INSIDE'
props = layout.operator("paint.hide_show", text="Show Bounding Box")
props.action = 'SHOW'
props.area = 'INSIDE'
op = layout.operator("paint.hide_show", text="Hide Masked")
op.area = 'MASKED'
op.action = 'HIDE'
props = layout.operator("paint.hide_show", text="Hide Masked")
props.area = 'MASKED'
props.action = 'HIDE'
layout.separator()
op = layout.operator("paint.mask_flood_fill", text="Invert Mask")
op.mode = 'INVERT'
props = layout.operator("paint.mask_flood_fill", text="Invert Mask")
props.mode = 'INVERT'
op = layout.operator("paint.mask_flood_fill", text="Fill Mask")
op.mode = 'VALUE'
op.value = 1
props = layout.operator("paint.mask_flood_fill", text="Fill Mask")
props.mode = 'VALUE'
props.value = 1
op = layout.operator("paint.mask_flood_fill", text="Clear Mask")
op.mode = 'VALUE'
op.value = 0
props = layout.operator("paint.mask_flood_fill", text="Clear Mask")
props.mode = 'VALUE'
props.value = 0
# ********** Particle menu **********