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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-05-11 13:54:18 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-05-15 03:32:43 +0300
commit4707c8617951cd3f68847216f8de8aa1029c3348 (patch)
treeb12b910d20b88c12642432e242cfbc87fd4ed1e2 /source/blender/makesrna/intern/rna_cloth.c
parentbaf7f78f9fd854556d5cf07d293c2c5b7c7e183e (diff)
Fix T88188: Keyframing Vertex Mass in Cloth Simulation doesn't have any
effect The way it is now, `ClothVertex->mass` is setup once for the clothObject and then reused if it already exists [so does not change across frames/ steps] which happens in`cloth_from_object` / `do_init_cloth`, where `SIM_cloth_solver_init` / `SIM_mass_spring_set_vertex_mass` are called and set up masses in `Implicit_Data`. Seems possible to update `ClothVertex->mass` every step in `do_step_cloth`, however it seems more involved to update the masses in `Implicit_Data` there as well. The masses from `Implicit_Data` are accessed in many places, so it would be mandatory to have these masses kept up-to-date (and even then it is unclear if the solver was designed to work with these animated or if there are assumptions about this being stable across the sim). So propose to remove the (broken/not implemented) animation capabilities on the property instead. Maniphest Tasks: T88188 Differential Revision: https://developer.blender.org/D11225
Diffstat (limited to 'source/blender/makesrna/intern/rna_cloth.c')
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 2bc00dd5af5..9e57368f8f9 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -652,6 +652,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_UNIT_MASS);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Vertex Mass", "The mass of each vertex on the cloth material");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop = RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);