From 3d82d2a40f304924b48251620473b83f569e758f Mon Sep 17 00:00:00 2001 From: Nimrod Gileadi Date: Wed, 3 May 2023 07:05:23 -0700 Subject: [PATCH] Increase maximum number of UI elements per section in Simulate. PiperOrigin-RevId: 529079121 Change-Id: Ia81418e45c855649e1d9654bbc522f7dffd7dfdc --- 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 adf5e2ac..cf34d0d9 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -25,6 +25,7 @@ General See :ref:`mju_cholFactorBand` documentation for details. - Added :ref:`mj_multiRay` function for intersecting multiple rays emanating from a single point. This is significantly faster than calling :ref:`mj_ray` multiple times. +- Increased ``mjMAXUIITEM`` (maximum number of UI elements per section in Simulate) to 100. Version 2.3.5 (April 25, 2023) ------------------------------ diff --git a/include/mujoco/mjui.h b/include/mujoco/mjui.h index 78eadc12..7246e5a8 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 80 // maximum number of items per section +#define mjMAXUIITEM 100 // 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 ed21de7a..7188886c 100644 --- a/introspect/structs.py +++ b/introspect/structs.py @@ -7199,7 +7199,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ name='item', type=ArrayType( inner_type=ValueType(name='mjuiItem'), - extents=(80,), + extents=(100,), ), doc='preallocated array of items', ), diff --git a/unity/Runtime/Bindings/MjBindings.cs b/unity/Runtime/Bindings/MjBindings.cs index cac3cd88..8280be3f 100644 --- a/unity/Runtime/Bindings/MjBindings.cs +++ b/unity/Runtime/Bindings/MjBindings.cs @@ -59,7 +59,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 = 80; +public const int mjMAXUIITEM = 100; public const int mjMAXUITEXT = 300; public const int mjMAXUINAME = 40; public const int mjMAXUIMULTI = 35;