Post #185: fj

πŸ“‹ Metadata

🏷️ Tags

pie-menu popup-dialog scripting intermediate solved

  • Pie Menu Editor
  • Popup Dialog Editor
  • Custom scripting
  • Command tab
  • Property tab

πŸ’¬ Content

fjg3d:

Hi - Setting up some pies, but can’t get the split/join area commands to work. I’m grabbing them directly from the info window with the debug. Any suggestions on how to properly assign that command?

Hi, fjg3d. Good commands for pies. Yes you can use them.

To split area use this code in Command tab:

bpy.ops.screen.area_split('EXEC_DEFAULT', direction='HORIZONTAL', factor=0.5)

Or:

bpy.ops.screen.area_split('EXEC_DEFAULT', direction='VERTICAL', factor=0.5)

To join areas you have to use external script in Command tab. Download and extract it to pie_menu_editor/scripts folder.

execute_script("scripts/command_join_area.py")

fjg3d:

Also, the move to layer panel - can this be added to a pme panel?

Use this path in Property tab (works in Popup Dialogs only):

C.object.layers

If you want to use that command in pie menus use this code in Custom tab:

L.box().prop(C.object, "layers", "")

Attachments

command_join_area.zip (423 Bytes)


πŸ”— View on Blender Artists