[Bf-blender-cvs] [4707c861795] blender-v2.93-release: Fix T88188: Keyframing Vertex Mass in Cloth Simulation doesn't have any effect

Philipp Oeser noreply at git.blender.org
Sat May 15 02:34:12 CEST 2021


Commit: 4707c8617951cd3f68847216f8de8aa1029c3348
Author: Philipp Oeser
Date:   Tue May 11 12:54:18 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB4707c8617951cd3f68847216f8de8aa1029c3348

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

===================================================================

M	source/blender/makesrna/intern/rna_cloth.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list