From 7e419276ca12a42441351fb63b8f297ad395d850 Mon Sep 17 00:00:00 2001 From: Google DeepMind Date: Tue, 31 Oct 2023 12:35:43 -0700 Subject: [PATCH] Increase maximum number of UI elements per section in Simulate. PiperOrigin-RevId: 578268786 Change-Id: Ia584fb1782a6f20cdb64ec13bfa0bbcb211b1165 --- doc/changelog.rst | 1 + include/mujoco/mjui.h | 2 +- introspect/structs.py | 2 +- unity/Runtime/Bindings/MjBindings.cs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 25a57602..ab4bf146 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -10,6 +10,7 @@ General 1. Added sub-terms of total passive forces in ``mjData.qfrc_passive`` to :ref:`mjData`: ``qfrc_{spring, damper, gravcomp, fluid}``. The sum of these vectors equals ``qfrc_passive``. +2. Increased ``mjMAXUIITEM`` (maximum number of UI elements per section in Simulate) to 200. MJX ^^^ diff --git a/include/mujoco/mjui.h b/include/mujoco/mjui.h index 2f96d7e2..c6d4c34d 100644 --- a/include/mujoco/mjui.h +++ b/include/mujoco/mjui.h @@ -18,7 +18,7 @@ #include #define mjMAXUISECT 10 // maximum number of sections -#define mjMAXUIITEM 100 // maximum number of items per section +#define mjMAXUIITEM 200 // maximum number of items per section #define mjMAXUITEXT 300 // maximum number of chars in edittext and other #define mjMAXUINAME 40 // maximum number of chars in name #define mjMAXUIMULTI 35 // maximum number of radio/select items in group diff --git a/introspect/structs.py b/introspect/structs.py index 12dcfa39..81c50cf6 100644 --- a/introspect/structs.py +++ b/introspect/structs.py @@ -8458,7 +8458,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ name='item', type=ArrayType( inner_type=ValueType(name='mjuiItem'), - extents=(100,), + extents=(200,), ), doc='preallocated array of items', ), diff --git a/unity/Runtime/Bindings/MjBindings.cs b/unity/Runtime/Bindings/MjBindings.cs index ccf839ee..8de52a1c 100644 --- a/unity/Runtime/Bindings/MjBindings.cs +++ b/unity/Runtime/Bindings/MjBindings.cs @@ -64,7 +64,7 @@ public const bool mjUSEDOUBLE = true; public const double mjMINVAL = 1e-15; public const bool THIRD_PARTY_MUJOCO_MJUI_H_ = true; public const int mjMAXUISECT = 10; -public const int mjMAXUIITEM = 100; +public const int mjMAXUIITEM = 200; public const int mjMAXUITEXT = 300; public const int mjMAXUINAME = 40; public const int mjMAXUIMULTI = 35;