From 62872fecd1a9c54b890480d9330f2cbaebb33630 Mon Sep 17 00:00:00 2001 From: Alessio Quaglino Date: Tue, 18 Nov 2025 04:47:55 -0800 Subject: [PATCH] Reduce size of `mjsTexture.gridlayout` (was 13, should be 12) PiperOrigin-RevId: 833764817 Change-Id: I2655a729d38a8871be2024492ce2a971fc8a0372 --- doc/includes/references.h | 2 +- include/mujoco/mjspec.h | 2 +- python/mujoco/introspect/structs.py | 2 +- wasm/codegen/generated/bindings.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/includes/references.h b/doc/includes/references.h index 00d9216d..8a54a54f 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -2265,7 +2265,7 @@ typedef struct mjsTexture_ { // texture specification mjString* content_type; // content type of file mjString* file; // png file to load; use for all sides of cube int gridsize[2]; // size of grid for composite file; (1,1)-repeat - char gridlayout[13]; // row-major: L,R,F,B,U,D for faces; . for unused + char gridlayout[12]; // row-major: L,R,F,B,U,D for faces; . for unused // method 3: separate files mjStringVec* cubefiles; // different file for each side of the cube diff --git a/include/mujoco/mjspec.h b/include/mujoco/mjspec.h index 170a1879..6c1ced28 100644 --- a/include/mujoco/mjspec.h +++ b/include/mujoco/mjspec.h @@ -549,7 +549,7 @@ typedef struct mjsTexture_ { // texture specification mjString* content_type; // content type of file mjString* file; // png file to load; use for all sides of cube int gridsize[2]; // size of grid for composite file; (1,1)-repeat - char gridlayout[13]; // row-major: L,R,F,B,U,D for faces; . for unused + char gridlayout[12]; // row-major: L,R,F,B,U,D for faces; . for unused // method 3: separate files mjStringVec* cubefiles; // different file for each side of the cube diff --git a/python/mujoco/introspect/structs.py b/python/mujoco/introspect/structs.py index d7ba4920..13ebbfce 100644 --- a/python/mujoco/introspect/structs.py +++ b/python/mujoco/introspect/structs.py @@ -8408,7 +8408,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ name='gridlayout', type=ArrayType( inner_type=ValueType(name='char'), - extents=(13,), + extents=(12,), ), doc='row-major: L,R,F,B,U,D for faces; . for unused', ), diff --git a/wasm/codegen/generated/bindings.cc b/wasm/codegen/generated/bindings.cc index 82c620df..00ffbcc2 100644 --- a/wasm/codegen/generated/bindings.cc +++ b/wasm/codegen/generated/bindings.cc @@ -2986,7 +2986,7 @@ struct MjsTexture { return emscripten::val(emscripten::typed_memory_view(2, ptr_->gridsize)); } emscripten::val gridlayout() const { - return emscripten::val(emscripten::typed_memory_view(13, ptr_->gridlayout)); + return emscripten::val(emscripten::typed_memory_view(12, ptr_->gridlayout)); } mjStringVec &cubefiles() const { return *(ptr_->cubefiles);