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
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')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c60
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h5
2 files changed, 44 insertions, 21 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;
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 47a7be163b1..be4f131a6d6 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -82,7 +82,7 @@ DefNode( CompositorNode, CMP_NODE_SEPYUVA, 0, "SEPYU
DefNode( CompositorNode, CMP_NODE_COMBYUVA, 0, "COMBYUVA", CombYUVA, "Combine YUVA", "" )
DefNode( CompositorNode, CMP_NODE_DIFF_MATTE, def_cmp_diff_matte, "DIFF_MATTE", DiffMatte, "Difference Key", "" )
DefNode( CompositorNode, CMP_NODE_COLOR_SPILL, def_cmp_color_spill, "COLOR_SPILL", ColorSpill, "Color Spill", "" )
-DefNode( CompositorNode, CMP_NODE_CHROMA, def_cmp_chroma, "CHROMA", Chroma, "Chroma Key", "" )
+DefNode( CompositorNode, CMP_NODE_CHROMA_MATTE, def_cmp_chroma_matte, "CHROMA_MATTE", ChromaMatte, "Chroma Key", "" )
DefNode( CompositorNode, CMP_NODE_CHANNEL_MATTE, def_cmp_channel_matte, "CHANNEL_MATTE", ChannelMatte, "Channel Key", "" )
DefNode( CompositorNode, CMP_NODE_FLIP, def_cmp_flip, "FLIP", Flip, "Flip", "" )
DefNode( CompositorNode, CMP_NODE_SPLITVIEWER, def_cmp_splitviewer, "SPLITVIEWER", SplitViewer, "Split Viewer", "" )
@@ -104,6 +104,9 @@ DefNode( CompositorNode, CMP_NODE_PREMULKEY, def_cmp_premul_key, "PREMU
DefNode( CompositorNode, CMP_NODE_GLARE, def_cmp_glare, "GLARE", Glare, "Glare", "" )
DefNode( CompositorNode, CMP_NODE_TONEMAP, def_cmp_tonemap, "TONEMAP", Tonemap, "Tonemap", "" )
DefNode( CompositorNode, CMP_NODE_LENSDIST, def_cmp_lensdist, "LENSDIST", Lensdist, "Lensdist", "" )
+DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, 0, "LEVELS", Levels, "Levels", "" )
+DefNode( CompositorNode, CMP_NODE_COLOR_MATTE, def_cmp_color_matte, "COLOR_MATTE", ColorMatte, "Color Matte", "" )
+DefNode( CompositorNode, CMP_NODE_DIST_MATTE, def_cmp_distance_matte, "DISTANCE_MATTE", DistanceMatte, "Distance Matte", "" )
DefNode( TextureNode, TEX_NODE_OUTPUT, def_tex_output, "OUTPUT", Output, "Output", "" )
DefNode( TextureNode, TEX_NODE_CHECKER, 0, "CHECKER", Checker, "Checker", "" )