Vertex/weight paint: remove "Use All Faces" option.
This is now always enabled, when you want to paint on a individual faces you can use face selection masking instead. Fixes T37855.
This commit is contained in:
@@ -1155,7 +1155,6 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
|
|||||||
col = layout.column()
|
col = layout.column()
|
||||||
row = col.row()
|
row = col.row()
|
||||||
|
|
||||||
row.prop(wpaint, "use_all_faces")
|
|
||||||
row.prop(wpaint, "use_normal")
|
row.prop(wpaint, "use_normal")
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
row = col.row()
|
row = col.row()
|
||||||
@@ -1193,7 +1192,6 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel):
|
|||||||
col = layout.column()
|
col = layout.column()
|
||||||
row = col.row()
|
row = col.row()
|
||||||
#col.prop(vpaint, "mode", text="")
|
#col.prop(vpaint, "mode", text="")
|
||||||
row.prop(vpaint, "use_all_faces")
|
|
||||||
row.prop(vpaint, "use_normal")
|
row.prop(vpaint, "use_normal")
|
||||||
col.prop(vpaint, "use_spray")
|
col.prop(vpaint, "use_spray")
|
||||||
|
|
||||||
|
|||||||
@@ -188,10 +188,7 @@ static VPaint *new_vpaint(int wpaint)
|
|||||||
{
|
{
|
||||||
VPaint *vp = MEM_callocN(sizeof(VPaint), "VPaint");
|
VPaint *vp = MEM_callocN(sizeof(VPaint), "VPaint");
|
||||||
|
|
||||||
vp->flag = VP_AREA + VP_SPRAY;
|
vp->flag = (wpaint) ? 0 : VP_SPRAY;
|
||||||
|
|
||||||
if (wpaint)
|
|
||||||
vp->flag = VP_AREA;
|
|
||||||
|
|
||||||
return vp;
|
return vp;
|
||||||
}
|
}
|
||||||
@@ -2344,7 +2341,6 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
|
|||||||
|
|
||||||
/* which faces are involved */
|
/* which faces are involved */
|
||||||
if (use_depth) {
|
if (use_depth) {
|
||||||
if (wp->flag & VP_AREA) {
|
|
||||||
char editflag_prev = me->editflag;
|
char editflag_prev = me->editflag;
|
||||||
|
|
||||||
/* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
|
/* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
|
||||||
@@ -2355,12 +2351,6 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
|
|||||||
}
|
}
|
||||||
totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
|
totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
|
||||||
me->editflag = editflag_prev;
|
me->editflag = editflag_prev;
|
||||||
}
|
|
||||||
else {
|
|
||||||
indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]);
|
|
||||||
if (indexar[0]) totindex = 1;
|
|
||||||
else totindex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (use_face_sel && me->totpoly) {
|
if (use_face_sel && me->totpoly) {
|
||||||
MPoly *mpoly = me->mpoly;
|
MPoly *mpoly = me->mpoly;
|
||||||
@@ -2996,14 +2986,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
|
|||||||
mul_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
|
mul_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
|
||||||
|
|
||||||
/* which faces are involved */
|
/* which faces are involved */
|
||||||
if (vp->flag & VP_AREA) {
|
|
||||||
totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
|
totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
|
||||||
}
|
|
||||||
else {
|
|
||||||
indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]);
|
|
||||||
if (indexar[0]) totindex = 1;
|
|
||||||
else totindex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((me->editflag & ME_EDIT_PAINT_FACE_SEL) && me->mpoly) {
|
if ((me->editflag & ME_EDIT_PAINT_FACE_SEL) && me->mpoly) {
|
||||||
for (index = 0; index < totindex; index++) {
|
for (index = 0; index < totindex; index++) {
|
||||||
|
|||||||
@@ -880,7 +880,7 @@ typedef struct VPaint {
|
|||||||
/* VPaint.flag */
|
/* VPaint.flag */
|
||||||
enum {
|
enum {
|
||||||
// VP_COLINDEX = (1 << 0), /* only paint onto active material*/ /* deprecated since before 2.49 */
|
// VP_COLINDEX = (1 << 0), /* only paint onto active material*/ /* deprecated since before 2.49 */
|
||||||
VP_AREA = (1 << 1),
|
// VP_AREA = (1 << 1), /* deprecated since 2.70 */
|
||||||
VP_NORMALS = (1 << 3),
|
VP_NORMALS = (1 << 3),
|
||||||
VP_SPRAY = (1 << 4),
|
VP_SPRAY = (1 << 4),
|
||||||
// VP_MIRROR_X = (1 << 5), /* deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) */
|
// VP_MIRROR_X = (1 << 5), /* deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) */
|
||||||
|
|||||||
@@ -464,11 +464,6 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
|
|||||||
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 */
|
/* vertex paint only */
|
||||||
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_ui_text(prop, "All Faces", "Paint on all faces inside brush");
|
|
||||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
|
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
|
||||||
RNA_def_property_ui_text(prop, "Normals", "Apply the vertex normal before painting");
|
RNA_def_property_ui_text(prop, "Normals", "Apply the vertex normal before painting");
|
||||||
|
|||||||
Reference in New Issue
Block a user