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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-06 11:03:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-06 11:03:03 +0400
commitc001bd81a75b60a491ae30947736eea78260827a (patch)
tree8fbd95b09534a885600f9d4294149fd271d0e544 /source/blender/imbuf
parent950ac472507432339ac0d4b126ac48137bf39e9c (diff)
Color Management: fixed loading configuration from non-ascii paths
Used the same hack as BLI gzip is using -- calculate short path and send it to OCIO library.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index c7bdd532bb9..37510c10e9a 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -51,6 +51,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_fileops.h"
#include "BLI_math.h"
#include "BLI_math_color.h"
#include "BLI_path_util.h"
@@ -574,10 +575,20 @@ void colormanagement_init(void)
if (config == NULL) {
configdir = BLI_get_folder(BLENDER_DATAFILES, "colormanagement");
- if (configdir) {
+ if (configdir) {
BLI_join_dirfile(configfile, sizeof(configfile), configdir, BCM_CONFIG_FILE);
+#ifdef WIN32
+ {
+ /* quite a hack to support loading configuration from path with non-acii symbols */
+
+ char short_name[256];
+ BLI_get_short_name(short_name, configfile);
+ config = OCIO_configCreateFromFile(short_name);
+ }
+#else
config = OCIO_configCreateFromFile(configfile);
+#endif
}
}