When adding a muscle to a Bhargava2004SmoothMuscleMetabolics component, the muscle mass is calculated based on either the provided muscle mass or specific tension and stored in a member variable via Bhargava2004SmoothedMuscleMetabolics_MuscleParameters::setMuscleMass(). Example here.
However, during deserialization, setMuscleMass() is never called for all connected muscles leaving the muscle masses set to zero, which obviously produces incorrect metabolic cost values.
One solution: within Bhargava2004SmoothedMuscleMetabolics::extendFinalizeFromProperties() loop through all muscle parameters in the list property and for each call setMuscleMass().
When adding a muscle to a
Bhargava2004SmoothMuscleMetabolics
component, the muscle mass is calculated based on either the provided muscle mass or specific tension and stored in a member variable viaBhargava2004SmoothedMuscleMetabolics_MuscleParameters::setMuscleMass()
. Example here.However, during deserialization,
setMuscleMass()
is never called for all connected muscles leaving the muscle masses set to zero, which obviously produces incorrect metabolic cost values.One solution: within
Bhargava2004SmoothedMuscleMetabolics::extendFinalizeFromProperties()
loop through all muscle parameters in the list property and for each callsetMuscleMass()
.