Add support for binding to arrays of mjs element.
Fixes #2402. PiperOrigin-RevId: 726449592 Change-Id: I0cde44889837a71a222b20cf91fa56568b4af689
This commit is contained in:
committed by
Copybara-Service
parent
1b4258d274
commit
5b924fec98
@@ -1720,7 +1720,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
|
||||
#define XGROUP(spectype, field) \
|
||||
mjModel.def( \
|
||||
"bind", \
|
||||
"bind_scalar", \
|
||||
[](MjModelWrapper& m, spectype& spec) -> auto& { \
|
||||
return m.indexer().field##_by_name(mjs_getString(spec.name)); \
|
||||
}, \
|
||||
@@ -2066,7 +2066,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
|
||||
#define XGROUP(spectype, field) \
|
||||
mjData.def( \
|
||||
"bind", \
|
||||
"bind_scalar", \
|
||||
[](MjDataWrapper& d, spectype& spec) -> auto& { \
|
||||
return d.indexer().field##_by_name(mjs_getString(spec.name)); \
|
||||
}, \
|
||||
|
||||
Reference in New Issue
Block a user