diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-30 07:46:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-30 08:14:26 +0300 |
commit | 362b3bbe58ae378d5e154dd1a27d55d913594a1a (patch) | |
tree | b3e9f3258623ed91abb11755f3808deff4d17323 /source/blender/makesrna | |
parent | 7a4353160cc5b5e71dde234c7db95302b4233918 (diff) |
Cloth Simulation: add time scale property
This setting can also be animated, to create a "time warp" effect.
D2122 by @LucaRood
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_cloth.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 41c08250f0e..781e44c9ed6 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -442,6 +442,13 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) "Quality of the simulation in steps per frame (higher is better quality but slower)"); RNA_def_property_update(prop, 0, "rna_cloth_update"); + prop = RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "time_scale"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 10.0f, 10, 3); + RNA_def_property_ui_text(prop, "Speed", "Cloth speed is multiplied by this value"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + prop = RNA_def_property(srna, "vertex_group_shrink", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_ClothSettings_shrink_vgroup_get", "rna_ClothSettings_shrink_vgroup_length", "rna_ClothSettings_shrink_vgroup_set"); |