diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-14 19:33:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-14 19:33:04 +0300 |
commit | 73ea636abb6f9d4d25155f630ac606973e9bf335 (patch) | |
tree | 985d4378c9e7cb0efa675be904c89c1d4d939e77 /source/blender | |
parent | 2b537777454b402e997dc64559ca5e692675af81 (diff) |
clamp colors from 0-1 which are used for display only.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_text.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 05ee9f9c216..b3c5f74ab84 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1395,6 +1395,7 @@ static void rna_def_fcurve(BlenderRNA *brna) prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor"); RNA_def_property_update(prop, NC_ANIMATION, NULL); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index c03af99ccb0..a104ae9de5c 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -169,6 +169,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) /* Drawing Color */ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color for all strokes in this layer"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cb12c042298..02b05cb7073 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1655,6 +1655,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) prop= RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "framing.col"); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Framing Color", "Set color of the bars"); RNA_def_property_update(prop, NC_SCENE, NULL); diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 15e7ce525ba..c61f47b719c 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -165,6 +165,7 @@ static void rna_def_text_marker(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one"); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color to display the marker with"); } |