Allow MJB and XML content to be loaded directly.

PiperOrigin-RevId: 843180720
Change-Id: Id4f2bf81507b971dfbbf250d775d7fdfc76517df
This commit is contained in:
Haroon Qureshi
2025-12-11 05:40:36 -08:00
committed by Copybara-Service
parent 1ff74ba810
commit 87d333c64a
3 changed files with 62 additions and 40 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ int main(int argc, char** argv, char** envp) {
// If the model file is not specified, try to load it from the first argument
std::string model_file = absl::GetFlag(FLAGS_model_file);
if (model_file.empty() && argc > 1 && argv[1][0] != '-') model_file = argv[1];
app.LoadModel(model_file);
app.LoadModel(model_file, mujoco::studio::App::ContentType::kFilepath);
while (app.Update()) {
app.BuildGui();
app.Render();