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:
authorJanne Karhu <jhkarh@gmail.com>2009-12-21 14:19:07 +0300
committerJanne Karhu <jhkarh@gmail.com>2009-12-21 14:19:07 +0300
commit5832f2fb7bd396e45690b1765103d4136694845a (patch)
tree588cc073378aac2f8b145921d89e31ecb32be64d /source/blender/makesrna/intern/rna_object_force.c
parent0c859f836ba0df60d19a23568c044f17807d227d (diff)
* Rest length parameter for harmonic force springs. Implementation is a slightly modified version of the patch provided by Raúl Fernández Hernández (Farsthary).
* Also added a "multiple springs" option to use every effector point as a harmonic spring instead of just one.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 9a57a24e1a7..67c7a9aa078 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -1109,6 +1109,12 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Size", "Size of the noise");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_size");
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
+ RNA_def_property_ui_text(prop, "Rest Length", "Rest length of the harmonic force");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "falloff_power", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_power");
@@ -1221,6 +1227,11 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_VISIBILITY);
RNA_def_property_ui_text(prop, "Absorption", "Force gets absorbed by collision objects");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "multiple_springs", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_MULTIPLE_SPRINGS);
+ RNA_def_property_ui_text(prop, "Multiple Springs", "Every point is effected by multiple springs");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Pointer */