Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-04 13:48:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-04 14:15:07 +0300
commit9d30fade3ea9b03e0764ab5dc9a9263543a79a83 (patch)
tree52214c9206283db872d892146de24bc3fd719985 /source/creator
parent7456ac6e4b8d5294254421103f2dccb9b50909fb (diff)
Fix color-management ignoring the data-path command line value
Initialize ImBuf (and color-management) after passing arguments that set environment variables such as `--env-system-datapath` This also fixes a bug where BKE_appdir logging failed since it was called before the `--log` argument was passed. Add asserts so this doesn't happen again.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 9df0ece26b5..f7b0fa3a31f 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -377,7 +377,6 @@ int main(int argc,
BKE_blender_globals_init(); /* blender.c */
BKE_idtype_init();
- IMB_init();
BKE_cachefiles_init();
BKE_images_init();
BKE_modifier_init();
@@ -413,9 +412,16 @@ int main(int argc,
G.factory_startup = true;
#endif
+ /* After parsing the first level of arguments as `--env-*` impact BKE_appdir behavior. */
+ BKE_appdir_init();
+
/* After parsing number of threads argument. */
BLI_task_scheduler_init();
+ /* After parsing `--env-system-datafiles` which control where paths are searched
+ * (color-management) uses BKE_appdir to initialize. */
+ IMB_init();
+
#ifdef WITH_FFMPEG
IMB_ffmpeg_init();
#endif