I'm doing this pie menu to help me texturing without the T panel, I'm new in all that and i need some help:

Is there a way to split the right column in 2 or 3 or display it in horizontal?

every time I release the left button of the mouse the pie dissapear, is there a way to keep open the pie and close only when the key is released ? or only close the pie with the esc button ... ?

the color menu works in 2.79 and 2.8 but it doesn't display in 2.8

I would like to add the new brushes from the new T panel from blender 2.8 and the smooth stroke button, even if it has a shortcut that would be usefull to me, but I have no idea how

bl_info = {
"name": "Pie_Quick_Color_Brush",
"description": "Single line explaining what this script exactly does.",
"author": "John Doe, Jane Doe",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "View3D > Add > Mesh",
"warning": "", # used for warning icon and text in addons panel
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/My_Script",
"support": "COMMUNITY",
}

import bpy

bl_label = "Color Mode"
bl_idname = "mesh.mypie"

def draw(self, context):
ts = context.tool_settings
ups = ts.unified_paint_settings
ptr = ups if ups.use_unified_color else ts.image_paint.brush
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint

pie.operator_enum("mesh.paint_mode", "type")
box = pie.box()
box.template_color_picker(ptr, "color", value_slider=True)

box.template_palette(ts.image_paint, "palette", color=True)
box = pie.box()

box.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
box.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
box.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
box.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
box.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
box.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'

box = pie.box()
box.prop(ipaint, "use_symmetry_x", text="X", toggle=True)
box.prop(ipaint, "use_symmetry_y", text="Y", toggle=True)
box.prop(ipaint, "use_symmetry_z", text="Z", toggle=True)

def register():
bpy.utils.register_class(VIEW3D_PIE_COLORS)

def unregister():

if __name__ == "__main__":
register()


if you wanna try it, download the code, name it Pie_Quick_Color_Brush.py and install it just like all the addons, the script doesn't assign a hotkey so you have to do it manually, just add one in 3d View > Image Paint

name : mesh.mypie

I've find a solution for, is there a way to keep open the pie and close only when the key is released? and the color menu works in 2.79 and 2.8 but it doesn't display in 2.8, only works for the color selector and isn't exactly what I want, but works

bl_info = {
"name": "Pie_Quick_Color_Brush",
"description": "Single line explaining what this script exactly does.",
"author": "John Doe, Jane Doe",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "View3D > Add > Mesh",
"warning": "", # used for warning icon and text in addons panel
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/My_Script",
"support": "COMMUNITY",
}

import bpy
# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)
# label is displayed at the center of the pie menu.
bl_label = "Color Mode"
bl_idname = "mesh.mypie"

def draw(self, context):
ts = context.tool_settings
ups = ts.unified_paint_settings
ptr = ups if ups.use_unified_color else ts.image_paint.brush
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint

pie.operator_enum("mesh.paint_mode", "type")
box = pie.box()

box.template_palette(ts.image_paint, "palette", color=True)
box.prop(ptr, 'color')
box = pie.box()

box.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
box.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
box.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
box.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
box.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
box.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'

box = pie.box()
box.prop(ipaint, "use_symmetry_x", text="X", toggle=True)
box.prop(ipaint, "use_symmetry_y", text="Y", toggle=True)
box.prop(ipaint, "use_symmetry_z", text="Z", toggle=True)

def register():
bpy.utils.register_class(VIEW3D_PIE_COLORS)

def unregister():

if __name__ == "__main__":
register()


Firstly blender v2.80 is currently in early development and not everything is working, so leave that until it is ready for release.

We are not able to alter the behaviour of a pie menu, it will always go away after we click on an item like any menu is expected to do. To keep your things constantly visible you need to make a panel instead of a pie menu. A panel still offers a benefit as you can show just the items you want all in one place, you can even place it on the opposite side to the toolbar (although you can also make the toolbar switch sides).

You can have your addon assign a hotkey to your menu by setting the idname as wm.call_menu_pie and the name as mesh.mypie - which is the bl_idname of your menu class.

Pie menus use the same layout techniques as panels, to show items in a row, you ask for a row() from the layout.

box = pie.box()
row = box.row()
row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
row = box.row()
row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'


To learn how the brushes menu is setup (and most other UI bits), right click on it and choose edit source to have the script open in blenders text editor and the cursor on the line used.

This menu is a little trickier than others, you need to have your pie menu a subclass of UnifiedPaintPanel.

import bpy
from bl_ui.properties_paint_common import UnifiedPaintPanel

bl_label = "Color Mode"
bl_idname = "mesh.mypie"


Then in draw() add

settings = self.paint_settings(context)
box = pie.box()