[Bf-blender-cvs] [c07f2bc8919] blender2.8: Fix T55628: Crash when creating new material slots
Dalai Felinto
noreply at git.blender.org
Tue Jun 26 16:00:09 CEST 2018
Commit: c07f2bc89196ea449a2875634eb85efa45733fb5
Author: Dalai Felinto
Date: Tue Jun 26 12:26:10 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBc07f2bc89196ea449a2875634eb85efa45733fb5
Fix T55628: Crash when creating new material slots
We need to update the geometry when resizing the object material slots.
===================================================================
M source/blender/blenkernel/intern/material.c
===================================================================
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 0d41385a39c..ab8c8695495 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -537,7 +537,7 @@ void BKE_material_resize_object(Main *bmain, Object *ob, const short totcol, boo
if (ob->totcol && ob->actcol == 0) ob->actcol = 1;
if (ob->actcol > ob->totcol) ob->actcol = ob->totcol;
- DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_GEOMETRY);
DEG_relations_tag_update(bmain);
}
More information about the Bf-blender-cvs
mailing list