How do I add the sliders (radius, strength)in texpaint to a pie menu ?
-
$\begingroup$ You might try looking at Pitiwazou's pie menus, and consider this post as a clue blenderartists.org/forum/… $\endgroup$– Craig D JonesJul 3, 2017 at 4:49
-
$\begingroup$ Possibly answer your question here then with an example of working code? $\endgroup$– Craig D JonesJul 3, 2017 at 13:11
2 Answers
From the link as it may help others to see it directly - borrowed from Pitiwazou's post on Blenderartists.org:
def draw(self, context):
layout = self.layout
pie = layout.menu_pie()
ups = context.tool_settings.unified_paint_settings
sculpt = context.tool_settings.sculpt
col = pie.column(align=True)
col.prop(ups, "size", text="Radius", slider=False)
col = pie.column(align=True)
col.operator("sculpt.sample_detail_size", text="", icon='EYEDROPPER')
col.prop(sculpt, "constant_detail")
-
$\begingroup$ Thank you, I was going to answer with the code but I was away for some time. $\endgroup$– RetraxJul 7, 2017 at 23:49
After thinking about it, this is an opportunity to tell the best way to go: shortcuts exist on the keyboard by default for Radius and Strength already. F key to toggle mouse movement to adjust the radius, and Shift-F to adjust the strength - and if using a texture in the brush, use Ctrl-F to rotate the texture brush and Ctrl-Alt-F to rotate the texture mask. Using these, you get a direct on screen feedback that you don't get just from adjusting a slider even in a pie menu in 3d view.