From 2a5345ba8ca4508c1b32bcf20f55894ecfc678f1 Mon Sep 17 00:00:00 2001 From: Haroon Qureshi Date: Thu, 25 Jun 2026 05:59:54 -0700 Subject: [PATCH] Add type attributes to help codegen. PiperOrigin-RevId: 937935655 Change-Id: I14883a98b7b9b4bcc3dea8b60d839138c14ea444 --- doc/includes/references.h | 4 ++-- include/mujoco/mjrender.h | 4 ++-- python/mujoco/introspect/structs.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/includes/references.h b/doc/includes/references.h index af3e6271..6aaec67d 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -1378,8 +1378,8 @@ typedef struct mjrRect_ { // OpenGL rectangle } mjrRect; typedef struct mjrVertexAttribute_ { // vertex attribute format specification const void* bytes; // vertex data - int usage; // mjrVertexAttributeUsage; e.g. position, normal, etc. - int type; // mjrVertexAttributeType; e.g. float3, ubyte4, etc. + int usage; // position, normal, etc [mjrVertexAttributeUsage] + int type; // float3, ubyte4, etc. [mjrVertexAttributeType] } mjrVertexAttribute; typedef struct mjrContext_ { // custom OpenGL context // parameters copied from mjVisual diff --git a/include/mujoco/mjrender.h b/include/mujoco/mjrender.h index 5e1a0d3e..b3faf2d7 100644 --- a/include/mujoco/mjrender.h +++ b/include/mujoco/mjrender.h @@ -119,8 +119,8 @@ typedef struct mjrRect_ { // OpenGL rectangle typedef struct mjrVertexAttribute_ { // vertex attribute format specification const void* bytes; // vertex data - int usage; // mjrVertexAttributeUsage; e.g. position, normal, etc. - int type; // mjrVertexAttributeType; e.g. float3, ubyte4, etc. + int usage; // position, normal, etc [mjrVertexAttributeUsage] + int type; // float3, ubyte4, etc. [mjrVertexAttributeType] } mjrVertexAttribute; diff --git a/python/mujoco/introspect/structs.py b/python/mujoco/introspect/structs.py index 39dd1815..1fe6ce1f 100644 --- a/python/mujoco/introspect/structs.py +++ b/python/mujoco/introspect/structs.py @@ -11013,12 +11013,12 @@ STRUCTS: Mapping[str, StructDecl] = dict([ StructFieldDecl( name='usage', type=ValueType(name='int'), - doc='mjrVertexAttributeUsage; e.g. position, normal, etc.', + doc='position, normal, etc [mjrVertexAttributeUsage]', ), StructFieldDecl( name='type', type=ValueType(name='int'), - doc='mjrVertexAttributeType; e.g. float3, ubyte4, etc.', + doc='float3, ubyte4, etc. [mjrVertexAttributeType]', ), ), )),