Move color management check stuff from blo_read_file_internal to setup_app_data

This commit is contained in:
Sergey Sharybin 2012-06-28 10:05:22 +00:00
parent 41ff120e65
commit 53bb66e291
2 changed files with 7 additions and 8 deletions

@ -91,6 +91,8 @@
#include "WM_api.h" // XXXXX BAD, very BAD dependency (bad level call) - remove asap, elubie
#include "IMB_colormanagement.h"
#ifdef WITH_PYTHON
#include "BPY_extern.h"
#endif
@ -324,7 +326,11 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* baseflags, groups, make depsgraph, etc */
BKE_scene_set_background(G.main, CTX_data_scene(C));
if (mode != 'u') {
IMB_colormanagement_check_file_config(G.main);
}
MEM_freeN(bfd);
(void)curscene; /* quiet warning */

@ -144,7 +144,6 @@
#include "BKE_sound.h"
#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
#include "IMB_colormanagement.h"
#include "NOD_socket.h"
@ -8009,12 +8008,6 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
link_global(fd, bfd); /* as last */
/* OCIO_TODO: is there nicer place for this? */
/* ... no its not, perhaps setup_app_data? - campbell */
if (fd->memfile == NULL) { /* don't do this for UNDO */
IMB_colormanagement_check_file_config(bfd->main);
}
return bfd;
}