Fix T38051: Even if Color Management is disabled, it is still applied to the background
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Mar 2014 08:06:44 +0000 (14:06 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Mar 2014 08:06:44 +0000 (14:06 +0600)
source/gameengine/Converter/BlenderWorldInfo.cpp

index be85d89775fbb487638ba897d2421b2174152a6d..75beb5d0e0e7ac1325d3f90d7f8ed2e81b2d887b 100644 (file)
@@ -61,6 +61,7 @@
 #include "BLI_math.h"
 
 #include "BKE_global.h"
+#include "BKE_scene.h"
 /* end of blender include block */
 
 
@@ -86,7 +87,7 @@ BlenderWorldInfo::BlenderWorldInfo(struct Scene *blenderscene, struct World *ble
                copy_v3_v3(m_backgroundcolor, &blenderworld->horr);
                copy_v3_v3(m_ambientcolor, &blenderworld->ambr);
 
-               if (blenderscene->r.color_mgt_flag & R_COLOR_MANAGEMENT) {
+               if (BKE_scene_check_color_management_enabled(blenderscene)) {
                        linearrgb_to_srgb_v3_v3(m_mistcolor, m_mistcolor);
                        linearrgb_to_srgb_v3_v3(m_backgroundcolor, m_backgroundcolor);
                        linearrgb_to_srgb_v3_v3(m_ambientcolor, m_ambientcolor);