Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 24 Oct 2018 07:00:13 +0000 (09:00 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 24 Oct 2018 07:00:13 +0000 (09:00 +0200)
Conflicts:
source/blender/blenkernel/intern/scene.c

1  2 
source/blender/blenkernel/intern/scene.c

index c16adabbc8c235efe469b4c2ef7f90d87f053e8f,3a067221aadd1fdcdff1656f155ed9b76c1c56aa..8fdf207ad687676359bad25913e56734d9fae35c
@@@ -400,9 -399,10 +400,10 @@@ Scene *BKE_scene_copy(Main *bmain, Scen
  
                if (type == SCE_COPY_FULL) {
                        /* Copy Freestyle LineStyle datablocks. */
 -                      for (SceneRenderLayer *srl_dst = sce_copy->r.layers.first; srl_dst; srl_dst = srl_dst->next) {
 -                              for (FreestyleLineSet *lineset = srl_dst->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
 +                      for (ViewLayer *view_layer_dst = sce_copy->view_layers.first; view_layer_dst; view_layer_dst = view_layer_dst->next) {
 +                              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 anim/actions here? */
                                                BKE_id_copy_ex(bmain, (ID *)lineset->linestyle, (ID **)&lineset->linestyle, 0, false);
                                        }
                }
  
                /* NOTE: part of SCE_COPY_LINK_DATA and SCE_COPY_FULL operations
 -               * are done outside of blenkernel with ED_objects_single_users! */
 +               * are done outside of blenkernel with ED_object_single_users! */
  
-               /*  camera   */
+               /*  camera */
+               /* XXX This is most certainly useless? Object have not yet been duplicated... */
                if (ELEM(type, SCE_COPY_LINK_DATA, SCE_COPY_FULL)) {
                        ID_NEW_REMAP(sce_copy->camera);
                }