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:
authorSybren A. Stüvel <sybren@stuvel.eu>2015-07-07 12:59:24 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2015-07-07 12:59:28 +0300
commit23aa425cd9097e0279035c47f1d9071e57a7bde0 (patch)
tree38c0b54c8008e369a3734179e91b008b8908575a
parentafa25b11363d8f95bf110b9c7193cad9136aeaab (diff)
Using proper subtype in game object velocity clamping properties.
The game.velocity_{min,max} and game.angular_velocity_{min,max} object RNA properties did not use a subtype, and thus velocity was always displayed as radians or blender units instead of the configured units. Reviewed by: campbellbarton
-rw-r--r--source/blender/makesrna/intern/rna_object.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f433c2c36a8..de39c7bc554 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1727,26 +1727,30 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_float_default(prop, 0.1f);
RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping");
- prop = RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "min_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still)");
+ RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still), "
+ "in distance per second");
- prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "max_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed");
+ RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed, "
+ "in distance per second");
- prop = RNA_def_property(srna, "angular_velocity_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_min", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "min_angvel");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Angular Velocity Min",
- "Clamp angular velocity to this minimum speed (except when totally still)");
+ "Clamp angular velocity to this minimum speed (except when totally still), "
+ "in angle per second");
- prop = RNA_def_property(srna, "angular_velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "max_angvel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Angular Velocity Max", "Clamp angular velocity to this maximum speed");
+ RNA_def_property_ui_text(prop, "Angular Velocity Max", "Clamp angular velocity to this maximum speed, "
+ "in angle per second");
/* Character physics */
prop = RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE);