Fix T102940: "Mask by Color" sculpt tool crash
We need to ensure the mask layer exists before running the operator. I made the order of function calls here the same as in newer code later on in this file for consistency. Differential Revision: https://developer.blender.org/D16696
This commit is contained in:
committed by
Harley Acheson
parent
16b6116b9d
commit
64541b242a
@@ -910,13 +910,15 @@ static int sculpt_mask_by_color_invoke(bContext *C, wmOperator *op, const wmEven
|
||||
v3d->shading.color_type = V3D_SHADING_VERTEX_COLOR;
|
||||
}
|
||||
|
||||
BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false);
|
||||
|
||||
/* Color data is not available in multi-resolution or dynamic topology. */
|
||||
if (!SCULPT_handles_colors_report(ss, op->reports)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
MultiresModifierData *mmd = BKE_sculpt_multires_active(CTX_data_scene(C), ob);
|
||||
BKE_sculpt_mask_layers_ensure(depsgraph, CTX_data_main(C), ob, mmd);
|
||||
|
||||
BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false);
|
||||
SCULPT_vertex_random_access_ensure(ss);
|
||||
|
||||
/* Tools that are not brushes do not have the brush gizmo to update the vertex as the mouse move,
|
||||
|
||||
Reference in New Issue
Block a user