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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-28 06:34:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-28 06:34:55 +0400
commitac1cb5ee055840ba3481b8ad490e3be2a6a49cf2 (patch)
treea24cd7905f6ab5e90d2926b822f9753598198e8f /source/blender/makesrna/intern/rna_lamp.c
parentcf40220e54e32cf52931e461b928f26571fc2f4f (diff)
- quiet new warnings with gcc 4.6
- use BLI math funcs for normal float/short conversion. - correct some un-intentional float/double promotions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lamp.c')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 5f274a09f5d..c689c4ae90a 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -138,13 +138,13 @@ static void rna_Lamp_sky_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static float rna_Lamp_spot_size_get(PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
- return la->spotsize * (M_PI / 180.0);
+ return DEG2RADF(la->spotsize);
}
static void rna_Lamp_spot_size_set(PointerRNA *ptr, float value)
{
Lamp *la= ptr->id.data;
- la->spotsize= value * (180.0 / M_PI);
+ la->spotsize= RAD2DEGF(value);
}
@@ -649,7 +649,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
// RNA_def_property_float_sdna(prop, NULL, "spotsize");
- RNA_def_property_range(prop, M_PI/180.0f, M_PI);
+ RNA_def_property_range(prop, M_PI/180.0, M_PI);
RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees");
RNA_def_property_float_funcs(prop, "rna_Lamp_spot_size_get", "rna_Lamp_spot_size_set", NULL); /* only for deg/rad conversion */
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");