Add "cameraid" attribute to visual/global specifying the default camera to use at model load.

PiperOrigin-RevId: 773783069
Change-Id: I2fff2abdceedc982d89cee8d14b95abceea1c113
This commit is contained in:
Yuval Tassa
2025-06-20 11:39:59 -07:00
committed by Copybara-Service
parent 7dc7a349c5
commit 14dc7c2a60
15 changed files with 58 additions and 16 deletions
+1
View File
@@ -1130,6 +1130,7 @@ void mjXWriter::Visual(XMLElement* root) {
// global
elem = InsertEnd(section, "global");
WriteAttrInt(elem, "cameraid", vis->global.cameraid, visdef.global.cameraid);
WriteAttrKey(elem, "orthographic",
bool_map, 2, vis->global.orthographic, visdef.global.orthographic);
WriteAttr(elem, "fovy", 1, &vis->global.fovy, &visdef.global.fovy);