UI operator Help

Hay i need some help is there a way to use the brackets with a operator when using them in blenders UI Like this

row.operator("wm.append(filepath="")",icon='MOD_SMOKE', text='Smoke')



Thanks

You probably wanna do this:

props = row.operator("wm.append", icon='MOD_SMOKE', text='Smoke')
props.filepath = "..."

Or are you looking for the equivalent of bpy.ops.wm.append(‘INVOKE_DEFAULT’)?
That would be:

row.operator_context = 'INVOKE_DEFAULT'
row.operator("wm.append", icon='MOD_SMOKE', text='Smoke')

Note that INVOKE_DEFAULT will be used for all operators in row. If that’s not desired, create a sub-element:

col = row.column()
col.operator_context = '...'
col.operator(...)

www.blender.org/api/blender_python_api_2_75_release/bpy.types.UILayout.html?highlight=operator_context#bpy.types.UILayout.operator_context

hay thanks for the help i found out how to do it

row.operator("wm.append", icon='MOD_SMOKE', text='Smoke').filepath=""

That’s the abbreviated form of mine using a variable props. It will only work if you need to set a single attribute.