Issue with Pie Menu Boxes Overlapping

Hello! I’ve been trying to clean up a pie menu I created. As you can see from the screenshot, my menus overlap. I’m not entirely sure what options are available to me, I’ve created this looking at other people’s code. Ideally I would love to be able to control the width of them as well. Any help would be greatly appreciated. Thanks! :smiley:


class EditorSwitcherMenu(bpy.types.Menu):
    bl_idname = "editor_switcher_pie_menu"
    bl_label = "Ian's Tools"

    def draw(self, context):

        layout = self.layout
        pie = layout.menu_pie()

        box = pie.box().column()

        box.operator("ian.recalc", text="Recalc Normals", icon='TIME')
        box.operator("ian.flip", text="Flip Normals", icon='TIME')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.operator("ian.ngon", text="ngon convert", icon='GO_LEFT')
        box.operator("ian.tri", text="tri convert", icon='ACTION')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.operator("ian.cpiv", text="Set Pivot Curve", icon='POSE_HLT')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.operator("ian.cpipe", text="Curve Wire 1", icon='IPO')
        box.operator("ian.cpipe2", text="Curve Wire 2", icon='IPO')
        box.operator("ian.cpipe3", text="Curve Wire 3", icon='IPO')
        box.operator("ian.cpipe4", text="Curve Wire 4", icon='IPO')
        box.operator("ian.cpipe4", text="Curve Wire 5", icon='IPO')

        box = pie.box().column()

        box.operator("mesh.primitive_cube_add", text="", icon='DOT')

        box = pie.box().column()

        box.operator("ian.modelprep", text="Ian's Obj Prep", icon='VPAINT_HLT')
        box.operator("ian.modelprepnv", text="Ian's Obj Prep NO VPaint", icon='WPAINT_HLT')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.operator("ian.batch_export", text="Export to Substance", icon='RECOVER_LAST')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')

        box = pie.box().column()

        box.operator("ian.exddo", text="Export to DDO", icon='RECOVER_LAST')
        box.operator("mesh.primitive_cube_add", text="", icon='DOT')

So I think I found a work around. I went ahead and used “column_flow” and just broke it into 4 menus.
[ATTACH=CONFIG]469478[/ATTACH]

here is the code example…


class EditorSwitcherMenu(bpy.types.Menu):
    bl_idname = "editor_switcher_pie_menu"
    bl_label = "Ian's Tools"
    
    def draw(self, context):

        layout = self.layout
        #layout.scale_x = 50
        #layout.scale_y = 50
        pie = layout.menu_pie()
        #pie.scale_y = 1

        box = pie.split().box().row().column().column_flow(2)
        box.scale_x = 2
        #box.scale_y = .6

        box.operator("ian.recalc", text="Recalc Normals", icon='TIME')
        box.operator("ian.flip", text="Flip Normals", icon='TIME')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.separator()
        box.operator("ian.ngon", text="ngon convert", icon='GO_LEFT')
        box.operator("ian.tri", text="tri convert", icon='ACTION')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        #row = box.row(align=True).column_flow(2)
        box.separator()
        box.operator("ian.cpiv", text="Set Pivot Curve", icon='POSE_HLT')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.operator("ian.cpipe", text="Curve Wire 1", icon='IPO')
        box.operator("ian.cpipe2", text="Curve Wire 2", icon='IPO')
        box.operator("ian.cpipe3", text="Curve Wire 3", icon='IPO')
        box.operator("ian.cpipe4", text="Curve Wire 4", icon='IPO')
        box.operator("ian.cpipe4", text="Curve Wire 5", icon='IPO')

        #box = pie.split(percentage=.80).box().row(align=True).column()
        box = pie.split().box().row().column().column_flow(2)
        box.scale_x = 2


        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        #box = pie.split(percentage=.80).box().row(align=True).column()
        box.operator("ian.modelprep", text="Ian's Obj Prep", icon='VPAINT_HLT')
        box.operator("ian.modelprepnv", text="Ian's Obj Prep NO VPaint", icon='WPAINT_HLT')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.separator()

        box.operator("ian.batch_export", text="Export to Substance", icon='RECOVER_LAST')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')

        #box = pie.split(percentage=.80).box().row(align=True).column()

        box.operator("ian.exddo", text="Export to DDO", icon='RECOVER_LAST')
        #box.operator("mesh.primitive_cube_add", text="", icon='DOT')
        box.separator()
        box.operator("ian.pbrmap", text="PBR Map", icon='COLOR')