diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-04 14:28:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-04 14:28:16 +0300 |
commit | 1179ce6f11a6fe4a4b6a32b6ddad50c94cd54a59 (patch) | |
tree | 74be0a1398d61e8be8f9ec1ab6cd2c75e29e7261 /source/blender/makesrna | |
parent | ffbd9448c80e3ee6770612280c5534ba24aabe47 (diff) |
Code cleanup: Replace magic constants with defines
From quich search didn't see where the flags are used apart from
RNA currently, but i might have missed something.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index e90de3631d6..9ced016611f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3051,7 +3051,7 @@ static void def_math(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_MATH_CLAMP); RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0..1 range"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -3132,12 +3132,12 @@ static void def_mix_rgb(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_MIXRGB_USE_ALPHA); RNA_def_property_ui_text(prop, "Alpha", "Include alpha of second input in this operation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "custom2", 2); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_MIXRGB_CLAMP); RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0..1 range"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } |