diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 15:33:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 15:33:51 +0400 |
commit | 5de818670cd1ea130dd10afc7f8b70e0d6d70f5f (patch) | |
tree | a8e0393a04bc60cc62ef0d3f951dc04fcefef034 | |
parent | 6e2e7c00c1ca2f5053ef989b4d1564c4a1b24e6f (diff) |
fix for crash in own recent color picker commit, store the hsv color in
block->_hsv, which is only accessed via a function so it can be moved to
a better place later.
also fix cineon define for scons/cmake.
4 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index e58095d9c54..91776b41817 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -303,15 +303,16 @@ struct uiBlock { short auto_open; double auto_open_last; - char active; // to keep blocks while drawing and free them afterwards - char tooltipdisabled; // to avoid tooltip after click - short lock; char *lockstr; + + char lock; + char active; // to keep blocks while drawing and free them afterwards + char tooltipdisabled; // to avoid tooltip after click + char endblock; // uiEndBlock done? float xofs, yofs; // offset to parent button int dobounds, mx, my; // for doing delayed int bounds, minbounds; // for doing delayed - int endblock; // uiEndBlock done? rctf safety; // pulldowns, to detect outside, can differ per case how it is created ListBase saferct; // uiSafetyRct list @@ -320,9 +321,10 @@ struct uiBlock { int puphash; // popup menu hash for memory - int color_profile; // color profile for correcting linear colors for display - void *evil_C; // XXX hack for dynamic operator enums + + float _hsv[3]; // XXX, only access via ui_block_hsv_get() + char color_profile; // color profile for correcting linear colors for display }; typedef struct uiSafetyRct { @@ -397,7 +399,7 @@ struct uiPopupBlockHandle { int butretval; int menuretval; float retvalue; - float retvec[8]; + float retvec[4]; }; uiBlock *ui_block_func_COL(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index c2b09750ee9..f6a13dae71c 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1940,9 +1940,7 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu VECCOPY(handle->retvec, but->editvec); - block->handle= handle; /* XXX, only for ui_block_hsv_get */ uiBlockPicker(block, handle->retvec, &but->rnapoin, but->rnaprop); - block->handle= NULL; block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN; uiBoundsBlock(block, 10); @@ -2440,5 +2438,5 @@ void uiPupBlockClose(bContext *C, uiBlock *block) float *ui_block_hsv_get(uiBlock *block) { - return block->handle->retvec+4; + return block->_hsv; } diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index d47f5a9820e..750c4b324d6 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -41,6 +41,10 @@ IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) ENDIF(WITH_IMAGE_TIFF) +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + IF(WITH_LCMS) SET(INC ${INC} ${LCMS_INCLUDE_DIR}) ADD_DEFINITIONS(-DWITH_LCMS) diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript index c7c31352185..15a7aeb828f 100644 --- a/source/blender/editors/space_image/SConscript +++ b/source/blender/editors/space_image/SConscript @@ -16,6 +16,8 @@ if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: defs.append('WITH_TIFF') +if env['WITH_BF_CINEON']: + defs.append('WITH_CINEON') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] |