[Bf-blender-cvs] [7765277240c] master: Fix T60031: Joining two Grease Pencilobjects sometimes crashes
Antonioya
noreply at git.blender.org
Wed Jan 2 17:11:09 CET 2019
Commit: 7765277240c8d54ac290cf35c08f7f7d046e4ae2
Author: Antonioya
Date: Wed Jan 2 17:10:37 2019 +0100
Branches: master
https://developer.blender.org/rB7765277240c8d54ac290cf35c08f7f7d046e4ae2
Fix T60031: Joining two Grease Pencilobjects sometimes crashes
The drawing cache was not set as dirty and drawing engine used old data.
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 51046726e19..a8cfe91740c 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -2140,6 +2140,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
BKE_animdata_merge_copy(bmain, &gpd_dst->id, &gpd_src->id, ADT_MERGECOPY_KEEP_DST, false);
}
}
+ DEG_id_tag_update(&gpd_src->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
}
/* Free the old object */
@@ -2148,6 +2149,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
+ DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(bmain); /* because we removed object(s) */
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
More information about the Bf-blender-cvs
mailing list