From a90803d64395167e521722205487d56bf7c44e83 Mon Sep 17 00:00:00 2001 From: Kevin Zakka Date: Wed, 24 Aug 2022 16:08:12 -0700 Subject: [PATCH] "exactmeshinertia" is now only saved if its value is different than default. PiperOrigin-RevId: 469848032 Change-Id: I9abdeccbf764f5e4267753c0e2bfdd42b3bec723 --- src/xml/xml_native_writer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xml/xml_native_writer.cc b/src/xml/xml_native_writer.cc index 9f7245a4..59728467 100644 --- a/src/xml/xml_native_writer.cc +++ b/src/xml/xml_native_writer.cc @@ -690,7 +690,9 @@ void mjXWriter::Compiler(XMLElement* root) { if (!model->usethread) { WriteAttrTxt(section, "usethread", "false"); } - WriteAttrTxt(section, "exactmeshinertia", FindValue(bool_map, 2, model->exactmeshinertia)); + if (model->exactmeshinertia) { + WriteAttrTxt(section, "exactmeshinertia", "true"); + } }