forked from bartvdbraak/blender
weight paint UI
- added back 2.4x 'Vgroup' option to the UI, restricts painting to verts already in the group. - remove 'All Faces' button in weight paint mode. it doesn't do anything.
This commit is contained in:
parent
8c9c018c90
commit
174e58f6f2
@ -532,8 +532,6 @@ data_2_56_to_2_59 = (
|
|||||||
("ShaderNodeMapping", "minimum", "min"),
|
("ShaderNodeMapping", "minimum", "min"),
|
||||||
("ShaderNodeMapping", "clamp_maximum", "use_max"),
|
("ShaderNodeMapping", "clamp_maximum", "use_max"),
|
||||||
("ShaderNodeMapping", "clamp_minimum", "use_min"),
|
("ShaderNodeMapping", "clamp_minimum", "use_min"),
|
||||||
("VertexPaint", "all_faces", "use_all_faces"),
|
|
||||||
("VertexPaint", "spray", "use_spray"),
|
|
||||||
("ParticleEdit", "add_keys", "default_key_count"),
|
("ParticleEdit", "add_keys", "default_key_count"),
|
||||||
("ParticleEdit", "selection_mode", "select_mode"),
|
("ParticleEdit", "selection_mode", "select_mode"),
|
||||||
("ParticleEdit", "auto_velocity", "use_auto_velocity"),
|
("ParticleEdit", "auto_velocity", "use_auto_velocity"),
|
||||||
|
@ -1070,9 +1070,10 @@ class VIEW3D_PT_tools_weightpaint_options(PaintPanel, Panel):
|
|||||||
wpaint = tool_settings.weight_paint
|
wpaint = tool_settings.weight_paint
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.prop(wpaint, "use_all_faces")
|
|
||||||
col.prop(wpaint, "use_normal")
|
col.prop(wpaint, "use_normal")
|
||||||
col.prop(wpaint, "use_spray")
|
col.prop(wpaint, "use_spray")
|
||||||
|
col.prop(wpaint, "use_group_restrict")
|
||||||
|
|
||||||
obj = context.weight_paint_object
|
obj = context.weight_paint_object
|
||||||
if obj.type == 'MESH':
|
if obj.type == 'MESH':
|
||||||
|
@ -797,12 +797,12 @@ typedef struct VPaint {
|
|||||||
|
|
||||||
/* VPaint flag */
|
/* VPaint flag */
|
||||||
#define VP_COLINDEX 1
|
#define VP_COLINDEX 1
|
||||||
#define VP_AREA 2
|
#define VP_AREA 2 /* vertex paint only */
|
||||||
|
|
||||||
#define VP_NORMALS 8
|
#define VP_NORMALS 8
|
||||||
#define VP_SPRAY 16
|
#define VP_SPRAY 16
|
||||||
// #define VP_MIRROR_X 32 // deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
|
// #define VP_MIRROR_X 32 // deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
|
||||||
#define VP_ONLYVGROUP 128
|
#define VP_ONLYVGROUP 128 /* weight paint only */
|
||||||
|
|
||||||
/* *************************************************************** */
|
/* *************************************************************** */
|
||||||
/* Transform Orientations */
|
/* Transform Orientations */
|
||||||
|
@ -289,6 +289,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
|
|||||||
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Sculpt_update");
|
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Sculpt_update");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* use for weight paint too */
|
||||||
static void rna_def_vertex_paint(BlenderRNA *brna)
|
static void rna_def_vertex_paint(BlenderRNA *brna)
|
||||||
{
|
{
|
||||||
StructRNA *srna;
|
StructRNA *srna;
|
||||||
@ -298,6 +299,7 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
|
|||||||
RNA_def_struct_sdna(srna, "VPaint");
|
RNA_def_struct_sdna(srna, "VPaint");
|
||||||
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode");
|
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode");
|
||||||
|
|
||||||
|
/* vertex paint only */
|
||||||
prop= RNA_def_property(srna, "use_all_faces", PROP_BOOLEAN, PROP_NONE);
|
prop= RNA_def_property(srna, "use_all_faces", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_AREA);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_AREA);
|
||||||
RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush");
|
RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush");
|
||||||
@ -309,6 +311,11 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
|
|||||||
prop= RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
|
prop= RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
|
||||||
RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse");
|
RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse");
|
||||||
|
|
||||||
|
/* weight paint only */
|
||||||
|
prop= RNA_def_property(srna, "use_group_restrict", PROP_BOOLEAN, PROP_NONE);
|
||||||
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_ONLYVGROUP);
|
||||||
|
RNA_def_property_ui_text(prop, "Restrict", "Restrict painting to verts already apart of the vertex group");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_image_paint(BlenderRNA *brna)
|
static void rna_def_image_paint(BlenderRNA *brna)
|
||||||
|
Loading…
Reference in New Issue
Block a user