[Bf-blender-cvs] [bbd6ebf423a] master: Fix T70677: Annotation converted to grease pencil remains unselectable
Antonio Vazquez
noreply at git.blender.org
Wed Oct 9 19:09:06 CEST 2019
Commit: bbd6ebf423a709e272b1b4f825e70b70846a5352
Author: Antonio Vazquez
Date: Wed Oct 9 19:08:43 2019 +0200
Branches: master
https://developer.blender.org/rBbbd6ebf423a709e272b1b4f825e70b70846a5352
Fix T70677: Annotation converted to grease pencil remains unselectable
The problem was the new object was created byt the tag for update objects in depsgraph was not tagged.
===================================================================
M source/blender/editors/gpencil/gpencil_ops_versioning.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_ops_versioning.c b/source/blender/editors/gpencil/gpencil_ops_versioning.c
index af49587f9ad..3d56cb0fcb1 100644
--- a/source/blender/editors/gpencil/gpencil_ops_versioning.c
+++ b/source/blender/editors/gpencil/gpencil_ops_versioning.c
@@ -54,6 +54,9 @@
#include "ED_object.h"
#include "ED_gpencil.h"
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
+
#include "gpencil_intern.h"
/* Free all of a gp-colors */
@@ -111,6 +114,7 @@ static int gpencil_convert_old_files_exec(bContext *C, wmOperator *op)
ob = BKE_object_add_for_data(
bmain, view_layer, OB_GPENCIL, "GP_Scene", &scene->gpd->id, false);
zero_v3(ob->loc);
+ DEG_relations_tag_update(bmain); /* added object */
/* convert grease pencil palettes (version >= 2.78) to materials and weights */
for (const bGPDpalette *palette = gpd->palettes.first; palette; palette = palette->next) {
More information about the Bf-blender-cvs
mailing list