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 e2a8e1e..c372e12 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 c493ecb..10dc517 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 cd904bf..74d212f 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",