Add option to mjspec for creating a texture directly from a buffer.
PiperOrigin-RevId: 662186527 Change-Id: I469c876681d52964ac971c0bb2ec3517224d3a3d
This commit is contained in:
committed by
Copybara-Service
parent
20cae556ee
commit
851bb6eef4
+7
-1
@@ -406,5 +406,11 @@ std::string WriteXML(const mjSpec* spec, char* error, int nerror) {
|
||||
|
||||
mjXWriter writer;
|
||||
writer.SetModel(spec);
|
||||
return writer.Write(error, nerror);
|
||||
|
||||
try {
|
||||
return writer.Write(error, nerror);
|
||||
} catch (mjXError err) {
|
||||
mjCopyError(error, err.message, nerror);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user