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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index a07a000dacb..ce5049c1a6e 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -33,6 +33,7 @@
#include "DNA_scene_types.h" /* for MAXFRAME */
#include "BLI_utildefines.h"
+#include "BLI_math.h"
#include "BLF_translation.h"
@@ -1051,15 +1052,15 @@ static void rna_def_sound_actuator(BlenderRNA *brna)
"between this value and the normal gain in the inner cone)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop = RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle");
- RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
+ RNA_def_property_ui_range(prop, 0.0, DEG2RADF(360.0f), 1, 2);
RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop = RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle");
- RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
+ RNA_def_property_ui_range(prop, 0.0, DEG2RADF(360.0f), 1, 2);
RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1259,21 +1260,19 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- /*XXX TODO - use radians internally then change to PROP_ANGLE */
- prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "minloc[0]");
- RNA_def_property_range(prop, 0.0, 180.0);
+ RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
RNA_def_property_ui_text(prop, "Min Angle",
- "Minimum angle (in degree) to maintain with target direction "
+ "Minimum angle to maintain with target direction "
"(no correction is done if angle with target direction is between min and max)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- /*XXX TODO - use radians internally then change to PROP_ANGLE */
- prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "maxloc[0]");
- RNA_def_property_range(prop, 0.0, 180.0);
+ RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
RNA_def_property_ui_text(prop, "Max Angle",
- "Maximum angle (in degree) allowed with target direction "
+ "Maximum angle allowed with target direction "
"(no correction is done if angle with target direction is between min and max)");
RNA_def_property_update(prop, NC_LOGIC, NULL);