[Bf-blender-cvs] [930f0ba7020] blender2.8: Fix passing object to BKE_mesh_batch_cache_dirty
Campbell Barton
noreply at git.blender.org
Thu May 4 11:24:58 CEST 2017
Commit: 930f0ba7020eca7a4211a488cbe9dff206c44129
Author: Campbell Barton
Date: Thu May 4 19:30:32 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB930f0ba7020eca7a4211a488cbe9dff206c44129
Fix passing object to BKE_mesh_batch_cache_dirty
===================================================================
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3758f3d1278..cb893cde6e3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2540,8 +2540,8 @@ static void rna_LayerCollectionEngineSettings_weight_wire_update(bContext *C, Po
SceneLayer *sl = CTX_data_scene_layer(C);
Object *ob = OBACT_NEW;
- if (ob != NULL) {
- BKE_mesh_batch_cache_dirty(ob, BKE_MESH_BATCH_DIRTY_WEIGHT);
+ if (ob != NULL && ob->type == OB_MESH) {
+ BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_WEIGHT);
}
/* TODO(sergey): Use proper flag for tagging here. */
More information about the Bf-blender-cvs
mailing list