Colormanagement: Fix issue with colorspaces' description too short, and reduce usage...
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 11 Mar 2013 11:15:05 +0000 (11:15 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 11 Mar 2013 11:15:05 +0000 (11:15 +0000)
source/blender/imbuf/intern/IMB_colormanagement_intern.h
source/blender/imbuf/intern/colormanagement.c
source/blender/makesrna/intern/rna_color.c

index e2a8e1e34428e7592e2c0ff9bd46cc4f6c0e7c57..c372e125a6637adb02d6f2f8a699a0dfe4aecb5b 100644 (file)
 struct OCIO_ConstProcessorRcPtr;
 struct ImBuf;
 
+#define MAX_COLORSPACE_NAME          64
+#define MAX_COLORSPACE_DESCRIPTION  512
+
 typedef struct ColorSpace {
        struct ColorSpace *next, *prev;
        int index;
-       char name[64];
-       char description[64];
+       char name[MAX_COLORSPACE_NAME];
+       char description[MAX_COLORSPACE_DESCRIPTION];
 
        struct OCIO_ConstProcessorRcPtr *to_scene_linear;
        struct OCIO_ConstProcessorRcPtr *from_scene_linear;
@@ -52,7 +55,7 @@ typedef struct ColorSpace {
 typedef struct ColorManagedDisplay {
        struct ColorManagedDisplay *next, *prev;
        int index;
-       char name[64];
+       char name[MAX_COLORSPACE_NAME];
        ListBase views;
 
        struct OCIO_ConstProcessorRcPtr *to_scene_linear;
@@ -62,7 +65,7 @@ typedef struct ColorManagedDisplay {
 typedef struct ColorManagedView {
        struct ColorManagedView *next, *prev;
        int index;
-       char name[64];
+       char name[MAX_COLORSPACE_NAME];
 } ColorManagedView;
 
 /* ** Initialization / De-initialization ** */
index c493ecb7b44424847cd49423918dbf0f092fbcda..10dc517f56a0137313503076cd0c07d86b08183c 100644 (file)
@@ -71,7 +71,6 @@
 
 /*********************** Global declarations *************************/
 
-#define MAX_COLORSPACE_NAME     64
 #define DISPLAY_BUFFER_CHANNELS 4
 
 /* ** list of all supported color spaces, displays and views */
index cd904bf6c2528f29650783810a05e089b82bf727..74d212fae57a609e8b457f442af8db80bff22187 100644 (file)
@@ -993,6 +993,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
        RNA_def_struct_ui_text(srna, "ColorManagedSequencerColorspaceSettings", "Input color space settings");
 
        prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
+       RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
        RNA_def_property_enum_items(prop, color_space_items);
        RNA_def_property_enum_funcs(prop, "rna_ColorManagedColorspaceSettings_colorspace_get",
                                          "rna_ColorManagedColorspaceSettings_colorspace_set",