📋 Metadata
- Author: roaoao
- Date: 2017-06-19 09:54:04
- Type:
answer - Reply to: post_00739
- Replies (2): post_00741, post_00743
💬 Content
draguu:
i want to add pie menus import function to a operator
Try this script:
bpy.ops.wm.pm_import(mode='REPLACE', files=[dict(name='my_pie_menus.json')], directory=path)
TeaCrab:
I have a pie menu for creating frequent shader node in the node editor.
I set the poll to:
return C.space_data.tree_type == ‘ShaderNodeTree’
C.space_data.tree_type is available only in Node Editor area _.
_Try this script:
C.area.type == 'NODE_EDITOR' and <i>C.space_data.tree_type == 'ShaderNodeTree'</i>
TeaCrab:
Does the single quote/double quote affect Python’s interpretation of a string?
No, afaik.