Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-02-04 22:43:06 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-02-05 12:53:17 +0300
commit41a15b7d6dc9edd2403789e936eafa4323849223 (patch)
treebc1e5e42931494fc524aa3f839f3b1155afdb5ca /source
parentcfe8f7661602a1fd7cedecc074cdd1463096fce9 (diff)
Fix (unreported) linestyle/greasepencil actions not being duplicated by full scene copy.
Noted those as missing in XXX comments some time ago, running again on that code I still see no reason for this missing feature, so now when doing a full scene copy, including duplication of Freestyl's linestyles and scene's greasepencil data, their potential Actions will also be properly duplicated (like it was already the case for world, and scene itself).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/scene.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 0b071abbad6..1f6b414c690 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -399,8 +399,11 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
for (FreestyleLineSet *lineset = view_layer_dst->freestyle_config.linesets.first; lineset; lineset = lineset->next) {
if (lineset->linestyle) {
id_us_min(&lineset->linestyle->id);
- /* XXX Not copying actions here? */
- BKE_id_copy(bmain, (ID *)lineset->linestyle, (ID **)&lineset->linestyle);
+ BKE_id_copy_ex(
+ bmain,
+ (ID *)lineset->linestyle,
+ (ID **)&lineset->linestyle,
+ LIB_ID_COPY_ACTIONS);
}
}
}
@@ -415,10 +418,9 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
BKE_collection_copy_full(bmain, sce_copy->master_collection);
/* Full copy of GreasePencil. */
- /* XXX Not copying actions here? */
if (sce_copy->gpd) {
id_us_min(&sce_copy->gpd->id);
- BKE_id_copy(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd);
+ BKE_id_copy_ex(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd, LIB_ID_COPY_ACTIONS);
}
}
else {