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>2010-03-12 21:47:35 +0300
committerRobert Holcomb <bob_holcomb@hotmail.com>2010-03-12 21:47:35 +0300
commit85066b5e05c0a770db357b67682431f357c05ad4 (patch)
treeaeda4d3f4d2bc901df170afa1170d47bfa3d5d29 /source/blender/makesrna/intern/rna_nodetree.c
parent0249d26ca790b9b5a44c83313b0d2afb42931f3f (diff)
updated despill node to incorperate changes from Xavier Thomas's patch #18012
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c62
1 files changed, 54 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index d8c5c796fa3..c8b78b38b9a 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor(s): Blender Foundation (2008), Nathan Letwory, Robin Allen
+ * Contributor(s): Blender Foundation (2008), Nathan Letwory, Robin Allen, Bob Holcomb
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -1287,12 +1287,23 @@ static void def_cmp_distance_matte(StructRNA *srna)
static void def_cmp_color_spill(StructRNA *srna)
{
PropertyRNA *prop;
-
+
static EnumPropertyItem channel_items[] = {
{1, "R", 0, "R", "Red Spill Suppression"},
{2, "G", 0, "G", "Green Spill Suppression"},
{3, "B", 0, "B", "Blue Spill Suppression"},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem limit_channel_items[] = {
+ {1, "R", 0, "R", "Limit by Red"},
+ {2, "G", 0, "G", "Limit by Green"},
+ {3, "B", 0, "B", "Limit by Blue"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem algorithm_items[] = {
+ {0, "SIMPLE", 0, "Simple", "Simple Limit Algorithm"},
+ {1, "AVERAGE", 0, "Average", "Average Limit Algorithm"},
+ {0, NULL, 0, NULL, NULL}};
prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
@@ -1300,12 +1311,47 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_ui_text(prop, "Channel", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
-
- prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 0.5f);
- RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
+ prop = RNA_def_property(srna, "algorithm", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom2");
+ RNA_def_property_enum_items(prop, algorithm_items);
+ RNA_def_property_ui_text(prop, "Algorithm", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ RNA_def_struct_sdna_from(srna, "NodeColorspill", "storage");
+
+ prop = RNA_def_property(srna, "limit_channel", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "limchan");
+ RNA_def_property_enum_items(prop, limit_channel_items);
+ RNA_def_property_ui_text(prop, "Limit Channel", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "limscale");
+ RNA_def_property_range(prop, 0.5f, 1.5f);
+ RNA_def_property_ui_text(prop, "Ratio", "Scale limit by value");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "unspill", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "unspill", 0);
+ RNA_def_property_ui_text(prop, "Unspill", "Compensate all channels (diffenrently) by hand");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "unspill_red", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "uspillr");
+ RNA_def_property_range(prop, 0.0f, 1.5f);
+ RNA_def_property_ui_text(prop, "R", "Red spillmap scale");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "unspill_green", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "uspillg");
+ RNA_def_property_range(prop, 0.0f, 1.5f);
+ RNA_def_property_ui_text(prop, "G", "Green spillmap scale");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "unspill_blue", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "uspillb");
+ RNA_def_property_range(prop, 0.0f, 1.5f);
+ RNA_def_property_ui_text(prop, "B", "Blue spillmap scale");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}