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:
authorJoshua Leung <aligorith@gmail.com>2012-01-22 07:42:49 +0400
committerJoshua Leung <aligorith@gmail.com>2012-01-22 07:42:49 +0400
commitcfab40b65235a4cf55f74af1da45a9bc4511a3fd (patch)
tree733c7822fe68821e7bc4ad757720666e732305bd /source/blender/makesrna/intern/rna_fluidsim.c
parentb1667911ef88e067817cb1702695a0d1e350dd78 (diff)
Fluidsim - Restoring simulation speed control (ZanQdo request)
This commit restores support for freezing or speeding up physics sims. Animate the "Speed" parameter under Domain->Time, which controls a multiplier factor for the rate at which the sim proceeds (i.e. the old "Fac-Tim" setting). Notes: * Subversion bumped to 4 to patch up defaults for new value so that old sim files will still run correctly * Names/descriptions could do with some tweaking * Porting this across was not that obvious since quite a bit of stuff had changed (as in, been cleaned up). However, from tests so far, it seems to work well.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluidsim.c')
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index f853e7b8dd9..99a84fc8b39 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -340,6 +340,11 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_range(prop, 0.001, 10);
RNA_def_property_ui_text(prop, "Real World Size", "Size of the simulation domain in metres");
+ prop= RNA_def_property(srna, "simulation_rate", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "animRate");
+ RNA_def_property_range(prop, 0.0, 100.0);
+ RNA_def_property_ui_text(prop, "Simulation Speed", "Fluid motion rate (0 = stationary, 1 = normal speed)");
+
prop= RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viscosityMode");
RNA_def_property_enum_items(prop, viscosity_items);