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",
"tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
"support": "COMMUNITY",
"category": "Add Mesh"
}
import bpy
from bpy.types import Menu
class VIEW3D_PIE_COLORS(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 = self.layout.menu_pie()
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():
bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_COLORS")
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
identifier of operator : wm.call_menu_pie
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",
"tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
"support": "COMMUNITY",
"category": "Add Mesh"
}
import bpy
from bpy.types import Menu
# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)
class VIEW3D_PIE_COLORS(Menu):
# 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 = self.layout.menu_pie()
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():
bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_COLORS")
if __name__ == "__main__":
register()