Commit: 4e8bd537c3b7101d1166c70a820a319de215eb17
Author: Sergey Sharybin
Date:   Wed Feb 28 14:54:51 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB4e8bd537c3b7101d1166c70a820a319de215eb17

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/scene.c
index f263f23fb92,9b3299bdbc5..512ce79e21c
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@@ -296,8 -331,7 +339,7 @@@ Scene *BKE_scene_copy(Main *bmain, Scen
        /* TODO this should/could most likely be replaced by call to more 
generic code at some point...
         * But for now, let's keep it well isolated here. */
        if (type == SCE_COPY_EMPTY) {
-               ToolSettings *ts;
 -              ListBase rl, rv;
 +              ListBase rv;
  
                sce_copy = BKE_scene_add(bmain, sce->id.name + 2);
  
@@@ -489,43 -490,27 +492,14 @@@ void BKE_scene_free_ex(Scene *sce, cons
                sce->r.ffcodecdata.properties = NULL;
        }
  
 -      for (srl = sce->r.layers.first; srl; srl = srl->next) {
 -              if (srl->prop != NULL) {
 -                      IDP_FreeProperty(srl->prop);
 -                      MEM_freeN(srl->prop);
 -              }
 -              BKE_freestyle_config_free(&srl->freestyleConfig);
 -      }
 -
        BLI_freelistN(&sce->markers);
 -      BLI_freelistN(&sce->transform_spaces);
 -      BLI_freelistN(&sce->r.layers);
        BLI_freelistN(&sce->r.views);
        
-       if (sce->toolsettings) {
-               if (sce->toolsettings->vpaint) {
-                       BKE_paint_free(&sce->toolsettings->vpaint->paint);
-                       MEM_freeN(sce->toolsettings->vpaint);
-               }
-               if (sce->toolsettings->wpaint) {
-                       BKE_paint_free(&sce->toolsettings->wpaint->paint);
-                       MEM_freeN(sce->toolsettings->wpaint);
-               }
-               if (sce->toolsettings->sculpt) {
-                       BKE_paint_free(&sce->toolsettings->sculpt->paint);
-                       MEM_freeN(sce->toolsettings->sculpt);
-               }
-               if (sce->toolsettings->uvsculpt) {
-                       BKE_paint_free(&sce->toolsettings->uvsculpt->paint);
-                       MEM_freeN(sce->toolsettings->uvsculpt);
-               }
-               BKE_paint_free(&sce->toolsettings->imapaint.paint);
-               
-               /* free Grease Pencil Drawing Brushes */
-               BKE_gpencil_free_brushes(&sce->toolsettings->gp_brushes);
-               BLI_freelistN(&sce->toolsettings->gp_brushes);
-               
-               /* free Grease Pencil interpolation curve */
-               if (sce->toolsettings->gp_interpolate.custom_ipo) {
-                       
curvemapping_free(sce->toolsettings->gp_interpolate.custom_ipo);
-               }
-               
-               MEM_freeN(sce->toolsettings);
-               sce->toolsettings = NULL;
-       }
+       BKE_toolsettings_free(sce->toolsettings);
+       sce->toolsettings = NULL;
        
 -      DAG_scene_free(sce);
 -      if (sce->depsgraph)
 -              DEG_graph_free(sce->depsgraph);
 -      
 -      MEM_SAFE_FREE(sce->stats);
 +      BKE_scene_free_depsgraph_hash(sce);
 +
        MEM_SAFE_FREE(sce->fps_info);
  
        BKE_sound_destroy_scene(sce);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to