[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35311] trunk/blender/source/blender/ makesrna/intern: Logic UI: reverting back the PROP_ANGLE props

Dalai Felinto dfelinto at gmail.com
Wed Mar 2 20:08:48 CET 2011


Revision: 35311
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35311
Author:   dfelinto
Date:     2011-03-02 19:08:48 +0000 (Wed, 02 Mar 2011)
Log Message:
-----------
Logic UI: reverting back the PROP_ANGLE props
The Logic Bricks that use angles (Radar Sensor and Constraint Actuator) do so in degree.
Reverting for the time being. Ideally we want to make them to use radians internally (that requires at least a doversion and a convert from radians to degree in BGE Converter routine).

If someone feels like helping on that, please go ahead.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_actuator.c
    trunk/blender/source/blender/makesrna/intern/rna_sensor.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_actuator.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2011-03-02 19:06:09 UTC (rev 35310)
+++ trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2011-03-02 19:08:48 UTC (rev 35311)
@@ -1214,16 +1214,18 @@
 	RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-	prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE);
+	//XXX TODO - use radians internally then change to PROP_ANGLE
+	prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "minloc[0]");
 	RNA_def_property_range(prop, 0.0, 180.0);
-	RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle to maintain with target direction. No correction is done if angle with target direction is between min and max");
+	RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle (in degree) 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);
 
-	prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE);
+	//XXX TODO - use radians internally then change to PROP_ANGLE
+	prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "maxloc[0]");
 	RNA_def_property_range(prop, 0.0, 180.0);
-	RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle allowed with target direction. No correction is done if angle with target direction is between min and max");
+	RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle (in degree) 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);
 
 	/* ACT_CONST_TYPE_FH */

Modified: trunk/blender/source/blender/makesrna/intern/rna_sensor.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sensor.c	2011-03-02 19:06:09 UTC (rev 35310)
+++ trunk/blender/source/blender/makesrna/intern/rna_sensor.c	2011-03-02 19:08:48 UTC (rev 35311)
@@ -634,9 +634,10 @@
 	RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the radar cone is cast");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-	prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+	//XXX TODO - use radians internally then change to PROP_ANGLE
+	prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_range(prop, 0.0, 179.9);
-	RNA_def_property_ui_text(prop, "Angle", "Opening angle of the radar cone");
+	RNA_def_property_ui_text(prop, "Angle", "Opening angle of the radar cone (in degrees)");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
 	prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);




More information about the Bf-blender-cvs mailing list