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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
commitcbe53cc48d5e4460c2d04d1344bd30a882b2cadb (patch)
tree1756e0745264fa298165d003dc374e2635e5c2ed /source/blender/makesrna
parentf7595e98828c1e47db934f61cae6dfe65e1b950c (diff)
More options for the blur node filter size. This can now be pixel based or relative to both axes or just either width or height.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 8ce2489f286..7c8d57b3191 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1029,6 +1029,13 @@ static void def_cmp_blur(StructRNA *srna)
{R_FILTER_MITCH, "MITCH", 0, "Mitch", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem size_type_items[] = {
+ {CMP_NODE_BLUR_SIZE_PIXEL, "PIXEL", 0, "Pixel", ""},
+ {CMP_NODE_BLUR_SIZE_WIDTH, "WIDTH", 0, "Width", ""},
+ {CMP_NODE_BLUR_SIZE_HEIGHT, "HEIGHT", 0, "Height", ""},
+ {CMP_NODE_BLUR_SIZE_BOTH, "BOTH", 0, "Both", ""},
+ {0, NULL, 0, NULL, NULL}};
+
RNA_def_struct_sdna_from(srna, "NodeBlurData", "storage");
prop = RNA_def_property(srna, "size_x", PROP_INT, PROP_NONE);
@@ -1043,9 +1050,10 @@ static void def_cmp_blur(StructRNA *srna)
RNA_def_property_ui_text(prop, "Size Y", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
- RNA_def_property_ui_text(prop, "Relative", "Use relative (percent) values to define blur radius");
+ prop = RNA_def_property(srna, "size_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "size_type");
+ RNA_def_property_enum_items(prop, size_type_items);
+ RNA_def_property_ui_text(prop, "Size Type", "Mode of filter size calculation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
@@ -1054,15 +1062,15 @@ static void def_cmp_blur(StructRNA *srna)
RNA_def_property_ui_text(prop, "Factor", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "percentx");
- RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Relative Size X", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "percenty");
- RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Relative Size Y", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");