fix for crash in own recent color picker commit, store the hsv color in
authorCampbell Barton <ideasman42@gmail.com>
Thu, 14 Oct 2010 11:33:51 +0000 (11:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 14 Oct 2010 11:33:51 +0000 (11:33 +0000)
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.

source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_regions.c
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/SConscript

index e58095d9c549364b1220069185d1a67d76de3f0a..91776b418174143187e249715a71f4964ea4a2a2 100644 (file)
@@ -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);
index c2b09750ee9be65201008a3576b32521587b8d9a..f6a13dae71c332bbfa3817fa5622110be4db4bad 100644 (file)
@@ -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;
 }
index d47f5a9820eb6eefdd299d19629b6b017b4e1ed0..750c4b324d694188f8f02d616bfb1cd6dbbde325 100644 (file)
@@ -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)
index c7c31352185a09a850dca86c65bcde5adc949b8b..15a7aeb828fecb995b20d89c3428502d37b8a605 100644 (file)
@@ -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']