[Bf-blender-cvs] [781cf304a48] greasepencil-object: Compile Fix: Use proper flag for tagging temporary datablocks created for drawing only
Joshua Leung
noreply at git.blender.org
Thu Feb 8 15:26:03 CET 2018
Commit: 781cf304a48e5d3a857c9545798209a9a14cdad5
Author: Joshua Leung
Date: Fri Feb 9 00:20:04 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rB781cf304a48e5d3a857c9545798209a9a14cdad5
Compile Fix: Use proper flag for tagging temporary datablocks created for drawing only
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 29b8b77df92..2579b71a58b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -1279,7 +1279,7 @@ static void gp_array_modifier_make_instances(GPENCIL_StorageList *stl, Object *o
/* add object to cache */
newob = MEM_dupallocN(ob);
- newob->mode = -1; /* use this mark to delete later */
+ newob->id.tag |= LIB_TAG_NO_MAIN; /* use this mark to delete later */
mul_m4_m4m4(newob->obmat, ob->obmat, mat);
/* apply scale */
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 5b98d15da6f..0159c70837a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -673,7 +673,7 @@ static void gpencil_free_obj_list(GPENCIL_StorageList *stl)
/* clear temp objects created for display only */
for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
Object *ob = stl->g_data->gp_object_cache[i].ob;
- if (ob->mode == -1) {
+ if (ob->id.tag & LIB_TAG_NO_MAIN) {
MEM_SAFE_FREE(ob);
}
}
More information about the Bf-blender-cvs
mailing list