diff options
author | Matt Ebb <matt@mke3.net> | 2009-05-21 11:40:43 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-05-21 11:40:43 +0400 |
commit | b495e544a82527092bd6c589c0d26b99dd673540 (patch) | |
tree | 73e7be8e039ecb90777aa262bc6bcd1aa22937fa /source/blender/makesrna/intern/rna_lamp.c | |
parent | 176a49d1abdac7aa20ef117eec28c55879e942e8 (diff) |
* removed some arbitrary range limits on property values
* turned some slider UI controls back into number fields
Note: Sliders should only be used when representing a property that's
conceptually a percentage or ratio. For arbitrary numbers, use a number field.
For example, a lamp's energy can theoretically be anything - 0.1, 3.5, 125.0, it
doesn't matter - it's just a number, not a percentage. So this should be a
number field.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lamp.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_lamp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index b3baac88702..4289376d3e2 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -270,12 +270,12 @@ static void rna_def_lamp(BlenderRNA *brna) prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dist"); - RNA_def_property_range(prop, 0.01f, 5000.0f); + RNA_def_property_ui_range(prop, 0, 1000, 1.0, 2); RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL); prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_range(prop, 0, 10.0, 0.1, 2); RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); @@ -408,14 +408,14 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ray_samp"); - RNA_def_property_range(prop, 1, 16); + RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples)."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); if(area) { prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ray_sampy"); - RNA_def_property_range(prop, 1, 16); + RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples)."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); } @@ -428,7 +428,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "soft"); - RNA_def_property_range(prop, 0.0f, 100.0f); + RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); @@ -489,19 +489,19 @@ static void rna_def_area_lamp(BlenderRNA *brna) prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "area_size"); - RNA_def_property_range(prop, 0.0f, 100.0f); + RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL); prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "area_sizey"); - RNA_def_property_range(prop, 0.0f, 100.0f); + RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL); prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k"); - RNA_def_property_range(prop, 0.001f, 2.0f); + RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3); RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL); } @@ -548,7 +548,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna) prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "haint"); - RNA_def_property_range(prop, 0.0f, 5.0f); + RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3); RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows)."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); |