Curves sculptmode: fix missing mode and tool in Brush Specials
For consistency with other brush based (paint) systems we should add these entries in the brushes context menu. For this, expose the brushes `ob_mode` to RNA and show this (along with the tool choice) to the appropriate menus. Differential Revision: https://developer.blender.org/D16287
This commit is contained in:
parent
4d185921f6
commit
4163c63def
|
@ -3018,6 +3018,7 @@ class VIEW3D_MT_brush_paint_modes(Menu):
|
|||
layout.prop(brush, "use_paint_vertex", text="Vertex Paint")
|
||||
layout.prop(brush, "use_paint_weight", text="Weight Paint")
|
||||
layout.prop(brush, "use_paint_image", text="Texture Paint")
|
||||
layout.prop(brush, "use_paint_sculpt_curves", text="Sculpt Curves")
|
||||
|
||||
|
||||
class VIEW3D_MT_paint_vertex(Menu):
|
||||
|
|
|
@ -52,6 +52,8 @@ class VIEW3D_MT_brush_context_menu(Menu):
|
|||
elif context.sculpt_object:
|
||||
layout.prop_menu_enum(brush, "sculpt_tool")
|
||||
layout.operator("brush.reset")
|
||||
elif context.tool_settings.curves_sculpt:
|
||||
layout.prop_menu_enum(brush, "curves_sculpt_tool")
|
||||
|
||||
|
||||
class VIEW3D_MT_brush_gpencil_context_menu(Menu):
|
||||
|
|
|
@ -3616,6 +3616,10 @@ static void rna_def_brush(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(
|
||||
prop, "Use Vertex", "Use this brush in grease pencil vertex color mode");
|
||||
|
||||
prop = RNA_def_property(srna, "use_paint_sculpt_curves", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_SCULPT_CURVES);
|
||||
RNA_def_property_ui_text(prop, "Use Sculpt", "Use this brush in sculpt curves mode");
|
||||
|
||||
/* texture */
|
||||
prop = RNA_def_property(srna, "texture_slot", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "BrushTextureSlot");
|
||||
|
|
Loading…
Reference in New Issue