I want to make in my addon PIE like that (next GIF PIE's made by PME addon), when PIE menu item call another PIE menu.
I have no ideas how PME do this and dig inside not the best option - ton of stuff going on under the hood. I can't find such examples across the internet - 100 500 tutorials for just PIE, but not PIE inside PIE.
When I try to put just menu it gives me menu like this. Not what I looking for.
class FRP_MT_PIE_Menu(bpy.types.Menu):
bl_idname = 'FRP_MT_PIE_Menu'
bl_label = 'FRP_MT_PIE_Menu'
def draw(self, context):
layout = self.layout
pie = layout.menu_pie()
sc_frp = context.scene.frp_props
an_a = sc_frp.frp_angle_a
an_b = sc_frp.frp_angle_b
to = sc_frp.frp_transform
#LT
pie.operator("fgt.frp_rotator", text="- 90", icon='LOOP_FORWARDS').R_Angle = -90.0
#RT
pie.operator("fgt.frp_rotator", text="90", icon='LOOP_BACK').R_Angle = 90.0
#TO
pie.operator("fgt.frp_rotator", text="180", icon='FILE_REFRESH').R_Angle = 180.0
#BO
pie.menu("FRP_MT_PIE_SMenu_TO", text="TO - " + to, icon='NONE')
#LTTO
pie.operator("fgt.frp_rotator", text='- ' + an_a, icon='LOOP_FORWARDS').R_Angle = -1 * float(an_a)
#RTTO
pie.operator("fgt.frp_rotator", text= an_a, icon='LOOP_BACK').R_Angle = float(an_a)
#LTBO
pie.operator("fgt.frp_rotator", text='- ' + an_b, icon='LOOP_FORWARDS').R_Angle = -1 * float(an_b)
#RTBO
pie.operator("fgt.frp_rotator", text= an_b, icon='LOOP_BACK').R_Angle = float(an_b)
Using some menu_pie
or pie
instead of just menu give error like this:
layout.menu_pie("FRP_MT_PIE_SMenu_TO", text="TO - " + to, icon='NONE')
TypeError: UILayout.menu_pie(): takes at most 0 arguments, got 3"
Any ideas guys how to make it work as on first GIF - PIE menu inside PIE menu?
pie.menu
) Added an answer of how to do this withbpy.ops.wm.call_menu_pie
$\endgroup$