Remove all visual-only assets if discardvisual is selected, not only the geoms.
PiperOrigin-RevId: 598598250 Change-Id: I12e60ce41ad436d037b4877d197decf6bdce0fc8
This commit is contained in:
committed by
Copybara-Service
parent
acf698e2df
commit
1e2e0b3053
@@ -3019,12 +3019,6 @@ void mjXReader::Body(XMLElement* section, mjCBody* pbody, mjCFrame* frame) {
|
||||
mjCGeom* pgeom = pbody->AddGeom(def);
|
||||
OneGeom(elem, pgeom);
|
||||
pgeom->SetFrame(frame);
|
||||
|
||||
// discard visual
|
||||
if (!pgeom->contype && !pgeom->conaffinity && model->discardvisual) {
|
||||
delete pbody->geoms.back();
|
||||
pbody->geoms.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
// site sub-element
|
||||
|
||||
Reference in New Issue
Block a user