diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-04 17:39:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-04 17:39:08 +0400 |
commit | ef107d1a4d75ffc5645505867efec6b39b114d50 (patch) | |
tree | 618615b28006e4c8a6898d9f140ce37fc90bbb09 /intern/opencolorio/ocio_capi.h | |
parent | d8144ef0f57bfba6973b7de34fe8238ab88707cc (diff) |
Color Management: fallback to stub ocio implementation in cases when
ocio configuration file failed to load
This solves issues with infinite NULL-checks to prevent crashes in
such situations. Currently only happens if there's no configuration
file at all, but could be tweaked further to fallback if this file
isn't usable by blender.
Diffstat (limited to 'intern/opencolorio/ocio_capi.h')
-rw-r--r-- | intern/opencolorio/ocio_capi.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/intern/opencolorio/ocio_capi.h b/intern/opencolorio/ocio_capi.h index 0218ccfafcd..f924bffb8e0 100644 --- a/intern/opencolorio/ocio_capi.h +++ b/intern/opencolorio/ocio_capi.h @@ -28,8 +28,6 @@ #ifndef __OCIO_CAPI_H__ #define __OCIO_CAPI_H__ - - #ifdef __cplusplus using namespace OCIO_NAMESPACE; extern "C" { @@ -37,7 +35,6 @@ extern "C" { #define OCIO_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name - #ifndef OCIO_CAPI_IMPLEMENTATION #define OCIO_ROLE_SCENE_LINEAR "scene_linear" #define OCIO_ROLE_COLOR_PICKING "color_picking" @@ -57,13 +54,15 @@ extern "C" { OCIO_DECLARE_HANDLE(MatrixTransformRcPtr); #endif +void OCIO_init(void); +void OCIO_exit(void); ConstConfigRcPtr *OCIO_getCurrentConfig(void); -ConstConfigRcPtr *OCIO_getDefaultConfig(void); void OCIO_setCurrentConfig(const ConstConfigRcPtr *config); ConstConfigRcPtr *OCIO_configCreateFromEnv(void); ConstConfigRcPtr *OCIO_configCreateFromFile(const char* filename); +ConstConfigRcPtr *OCIO_configCreateFallback(void); void OCIO_configRelease(ConstConfigRcPtr *config); @@ -127,4 +126,4 @@ void OCIO_matrixTransformScale(float * m44, float * offset4, const float * scale } #endif -#endif //OCIO_CAPI_H +#endif /* OCIO_CAPI_H */ |