Separate image input and sequencer's color spaces in the UI
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Dec 2012 15:51:27 +0000 (15:51 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Dec 2012 15:51:27 +0000 (15:51 +0000)
This two things were using the same DNA and RNA structures because
internally they're completely the same. However, that was confusing
from the interface point of view.

Now it should be much more clear what's going on there.

source/blender/editors/interface/interface_templates.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sequencer.c

index 4e0776ee5390d171e5130153775ff58e53fef7b1..5145c28a2cd7d4e75f3802486c245e9a62cc509d 100644 (file)
@@ -3080,7 +3080,7 @@ void uiTemplateColorspaceSettings(uiLayout *layout, PointerRNA *ptr, const char
 
        colorspace_settings_ptr = RNA_property_pointer_get(ptr, prop);
 
-       uiItemL(layout, "Color Space:", ICON_NONE);
+       uiItemL(layout, "Input Color Space:", ICON_NONE);
        uiItemR(layout, &colorspace_settings_ptr, "name", 0, "", ICON_NONE);
 }
 
index 5f4e4ce4259424a785280d3afb0b13e4ca1a3bd3..7625605c5fbba45e38677c99e5b58ba69ece4716 100644 (file)
@@ -104,7 +104,8 @@ extern StructRNA RNA_CollectionProperty;
 extern StructRNA RNA_CollisionModifier;
 extern StructRNA RNA_CollisionSensor;
 extern StructRNA RNA_CollisionSettings;
-extern StructRNA RNA_ColorManagedColorspaceSettings;
+extern StructRNA RNA_ColorManagedInputColorspaceSettings;
+extern StructRNA RNA_ColorManagedSequencerColorspaceSettings;
 extern StructRNA RNA_ColorManagedDisplaySettings;
 extern StructRNA RNA_ColorManagedViewSettings;
 extern StructRNA RNA_ColorRamp;
index 5752fd318c701cc3fa8fc1bbd838aa071d6d14b2..21bd55e0137c00132b4de7446eb05516dfac0ac9 100644 (file)
@@ -973,15 +973,26 @@ static void rna_def_colormanage(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
 
        /* ** Colorspace **  */
-       srna = RNA_def_struct(brna, "ColorManagedColorspaceSettings", NULL);
-       RNA_def_struct_ui_text(srna, "ColorManagedColorspaceSettings", "Input color space settings");
+       srna = RNA_def_struct(brna, "ColorManagedInputColorspaceSettings", NULL);
+       RNA_def_struct_ui_text(srna, "ColorManagedInputColorspaceSettings", "Input color space settings");
 
        prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_items(prop, color_space_items);
        RNA_def_property_enum_funcs(prop, "rna_ColorManagedColorspaceSettings_colorspace_get",
                                          "rna_ColorManagedColorspaceSettings_colorspace_set",
                                          "rna_ColorManagedColorspaceSettings_colorspace_itemf");
-       RNA_def_property_ui_text(prop, "Color Space", "Input color space name");
+       RNA_def_property_ui_text(prop, "Input Color Space", "Color space of the image or movie on disk");
+       RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagedColorspaceSettings_reload_update");
+
+       srna = RNA_def_struct(brna, "ColorManagedSequencerColorspaceSettings", NULL);
+       RNA_def_struct_ui_text(srna, "ColorManagedSequencerColorspaceSettings", "Input color space settings");
+
+       prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_items(prop, color_space_items);
+       RNA_def_property_enum_funcs(prop, "rna_ColorManagedColorspaceSettings_colorspace_get",
+                                         "rna_ColorManagedColorspaceSettings_colorspace_set",
+                                         "rna_ColorManagedColorspaceSettings_colorspace_itemf");
+       RNA_def_property_ui_text(prop, "Color Space", "Color space that the sequencer operates in");
        RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagedColorspaceSettings_reload_update");
 }
 
index 9fedbee41ff3689e006ea47306ba7f3e661e6c9e..ad7682b3af5c4afb3c54a8f6ac106e9ad8d5cf89 100644 (file)
@@ -674,7 +674,7 @@ static void rna_def_image(BlenderRNA *brna)
 
        prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings");
-       RNA_def_property_struct_type(prop, "ColorManagedColorspaceSettings");
+       RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
        RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
 
        RNA_api_image(srna);
index 99effc990a85ceed1172411a8be939dd903cda10..3b018591455e2b3cf885c6dfa0e5162b9cef35bd 100644 (file)
@@ -308,7 +308,7 @@ static void rna_def_movieclip(BlenderRNA *brna)
        /* color management */
        prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings");
-       RNA_def_property_struct_type(prop, "ColorManagedColorspaceSettings");
+       RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
        RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
 }
 
index 8a295e883e1c4b57c458cb533e48206aee5f595d..cdf123bf62114b1d39bcde2d8ae68fd3ab608242 100644 (file)
@@ -4670,7 +4670,7 @@ void RNA_def_scene(BlenderRNA *brna)
 
        prop = RNA_def_property(srna, "sequencer_colorspace_settings", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "sequencer_colorspace_settings");
-       RNA_def_property_struct_type(prop, "ColorManagedColorspaceSettings");
+       RNA_def_property_struct_type(prop, "ColorManagedSequencerColorspaceSettings");
        RNA_def_property_ui_text(prop, "Sequencer Color Space Settings", "Settings of color space sequencer is working in");
 
        /* Nestled Data  */
index 18a9b9683f89ec4fc34ec0fdc9e0a69b889f6a4f..5c51f871ac8702d813e733c485dc74f48472dc23 100644 (file)
@@ -1694,7 +1694,7 @@ static void rna_def_color_management(StructRNA *srna)
 
        prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "strip->colorspace_settings");
-       RNA_def_property_struct_type(prop, "ColorManagedColorspaceSettings");
+       RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
        RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
 }