Revision: 48997
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48997
Author:   nazgul
Date:     2012-07-17 11:10:40 +0000 (Tue, 17 Jul 2012)
Log Message:
-----------
Color management: fix missed color management settings for new created scenes

- Initialize color management settings if creating new scene
- Copy settings from active scene if creating with copying settings
  or if using other copy/link object settings

This also should fix issue with Export UV Layout operator

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c   
2012-07-17 10:46:32 UTC (rev 48996)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c   
2012-07-17 11:10:40 UTC (rev 48997)
@@ -57,6 +57,7 @@
 
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
+#include "BKE_colortools.h"
 #include "BKE_depsgraph.h"
 #include "BKE_global.h"
 #include "BKE_group.h"
@@ -132,6 +133,8 @@
                MEM_freeN(scen->toolsettings);
        }
        else {
+               ImageFormatData *im_format, *im_formatn;
+
                scen = BKE_libblock_copy(&sce->id);
                BLI_duplicatelist(&(scen->base), &(sce->base));
                
@@ -166,6 +169,13 @@
                        obase = obase->next;
                        base = base->next;
                }
+
+               /* copy color management settings */
+               im_format = &sce->r.im_format;
+               im_formatn = &scen->r.im_format;
+
+               
BKE_color_managed_display_settings_copy(&im_formatn->display_settings, 
&im_format->display_settings);
+               
BKE_color_managed_view_settings_copy(&im_formatn->view_settings, 
&im_format->view_settings);
        }
 
        /* tool settings */
@@ -545,6 +555,9 @@
 
        sound_create_scene(sce);
 
+       
BKE_color_managed_display_settings_init(&sce->r.im_format.display_settings);
+       BKE_color_managed_view_settings_init(&sce->r.im_format.view_settings);
+
        return sce;
 }
 

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

Reply via email to