diff --git a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/MeshSpringForceField.inl b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/MeshSpringForceField.inl index fc872ab8089..2cc8a242b2d 100644 --- a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/MeshSpringForceField.inl +++ b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/MeshSpringForceField.inl @@ -102,7 +102,13 @@ void MeshSpringForceField::addSpring(std::set void MeshSpringForceField::init() { + if(this->d_springsIndices[0].getValue().size() || this->d_springsIndices[1].getValue().size()) + { + msg_warning(this) << "Setting springs of MeshSpringForcefield through datas \'indices1\' and \'indices2\' has been disabled since v24.12. The input indices will be overridden by the mesh."; + } + SpringForceField::clear(); + if(!(mstate1) || !(mstate2)) mstate2 = mstate1 = dynamic_cast *>(this->getContext()->getMechanicalState());