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:
authorMatt Ebb <matt@mke3.net>2010-05-06 06:58:36 +0400
committerMatt Ebb <matt@mke3.net>2010-05-06 06:58:36 +0400
commit13efa685db362692b55af3bfb37bc45b5fbf4a3d (patch)
tree00e2f0cc506344f03895a81d6a86d5ffc634810a /source/blender/makesrna/intern/rna_actuator.c
parent7245d935eb3e297e87b57eab6f23a97eb07415d7 (diff)
rna float set function example for dfelinto
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 4254f4280f8..d86189141b0 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -109,6 +109,16 @@ static void rna_Actuator_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
init_actuator(act);
}
+static void rna_ObjectActuator_integralcoefficient_set(struct PointerRNA *ptr, float value)
+{
+ bActuator *act = (bActuator*)ptr->data;
+ bObjectActuator *oa = act->data;
+
+ oa->forcerot[1] = value;
+ oa->forcerot[0] = 60.0f*oa->forcerot[1];
+}
+
+
#else
void rna_def_actuator(BlenderRNA *brna)
@@ -181,6 +191,7 @@ static void rna_def_object_actuator(BlenderRNA *brna)
prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "forcerot[1]");
RNA_def_property_ui_range(prop, 0.0, 3.0, 0.1, 0.01);
+ RNA_def_property_float_funcs(prop, NULL, "rna_ObjectActuator_integralcoefficient_set", NULL);
RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response");
RNA_def_property_update(prop, NC_LOGIC, NULL);