Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Holcomb <bob_holcomb@hotmail.com>2009-09-10 08:12:22 +0400
committerRobert Holcomb <bob_holcomb@hotmail.com>2009-09-10 08:12:22 +0400
commitfa4ee2be849b6236d61e482106ed9e20f20f21de (patch)
tree9c1980eb115d6982da2b321f15b06f4c38dea62c /source/blender/makesrna/intern/rna_nodetree.c
parentdac27004b863da96c57b071fc0479680e06a9725 (diff)
Added Levels Node (histogram, with mean/std deviation outputs)
Added RGB space distance matte Node Added HSV color matte Node Fixed Image difference matte Node to use image differences instead of RGB space distance Fixed luminance node for low end values being read wrong Fixed CMP_util copy/swap functions not accounting for all channels Fixed UI for difference matte Node Added RNA for new nodes
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c60
1 files changed, 40 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index b3046ad1364..3fd358a1c16 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -747,43 +747,63 @@ static void def_cmp_scale(StructRNA *srna)
static void def_cmp_diff_matte(StructRNA *srna)
{
PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
+
+ /* TODO: nicer wrapping for tolerances */
- static EnumPropertyItem color_space_items[] = {
- {1, "RGB", 0, "RGB", ""},
- {2, "HSV", 0, "HSV", ""},
- {3, "YUV", 0, "YUV", ""},
- {4, "YCC", 0, "YCbCr", ""},
- {0, NULL, 0, NULL, NULL}
- };
+ prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "t1");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
- prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, color_space_items);
- RNA_def_property_ui_text(prop, "Color Space", "");
+ prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "t2");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
+}
+
+static void def_cmp_color_matte(StructRNA *srna)
+{
+ PropertyRNA *prop;
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
/* TODO: nicer wrapping for tolerances */
- prop = RNA_def_property(srna, "tolerance1", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "h", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Channel 1 Tolerance", "");
+ RNA_def_property_ui_text(prop, "H", "Hue tolerance for colors to be considered a keying color");
- prop = RNA_def_property(srna, "tolerance2", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "s", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Channel 2 Tolerance", "");
+ RNA_def_property_ui_text(prop, "S", "Saturation Tolerance for the color");
- prop = RNA_def_property(srna, "tolerance3", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "v", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Channel 3 Tolerance", "");
+ RNA_def_property_ui_text(prop, "V", "Value Tolerance for the color");
+}
+
+static void def_cmp_distance_matte(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
+
+ /* TODO: nicer wrapping for tolerances */
+
+ prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "t1");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fstrength");
+ RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "");
+ RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
}
static void def_cmp_color_spill(StructRNA *srna)
@@ -810,7 +830,7 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
}
-static void def_cmp_chroma(StructRNA *srna)
+static void def_cmp_chroma_matte(StructRNA *srna)
{
PropertyRNA *prop;