[Bf-blender-cvs] [13b1374497b] master: Fix crash when using Mask by Color in Multires
Pablo Dobarro
noreply at git.blender.org
Thu Jul 9 17:41:42 CEST 2020
Commit: 13b1374497bfa3bd1eca401daab89164da50f747
Author: Pablo Dobarro
Date: Thu Jul 9 17:41:04 2020 +0200
Branches: master
https://developer.blender.org/rB13b1374497bfa3bd1eca401daab89164da50f747
Fix crash when using Mask by Color in Multires
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8207
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2f8d17055f4..245014d5027 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -8681,6 +8681,11 @@ static int sculpt_mask_by_color_invoke(bContext *C, wmOperator *op, const wmEven
BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false);
+ /* Color data is not available in Multires. */
+ if (BKE_pbvh_type(ss->pbvh) != PBVH_FACES) {
+ return OPERATOR_CANCELLED;
+ }
+
if (!ss->vcol) {
return OPERATOR_CANCELLED;
}
More information about the Bf-blender-cvs
mailing list