add mjs_detachDefault to delete a default class from mjSpec

PiperOrigin-RevId: 738452369
Change-Id: I5a53a6dc8f89e1e8136aeefc09d7d9b7b7204e1f
This commit is contained in:
Tom Power
2025-03-19 10:30:08 -07:00
committed by Copybara-Service
parent a1b9ffd124
commit be64747166
18 changed files with 261 additions and 24 deletions
+1
View File
@@ -287,6 +287,7 @@ ENUMS: Mapping[str, EnumDecl] = dict([
('mjOBJ_PLUGIN', 25),
('mjNOBJECT', 26),
('mjOBJ_FRAME', 100),
('mjOBJ_DEFAULT', 101),
]),
)),
('mjtConstraint',
+22 -2
View File
@@ -9154,7 +9154,27 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
),
),
doc='Detach body from mjSpec, remove all references and delete the body, return 0 on success.', # pylint: disable=line-too-long
doc='Delete body and descendants from mjSpec, remove all references, return 0 on success.', # pylint: disable=line-too-long
)),
('mjs_detachDefault',
FunctionDecl(
name='mjs_detachDefault',
return_type=ValueType(name='int'),
parameters=(
FunctionParameterDecl(
name='s',
type=PointerType(
inner_type=ValueType(name='mjSpec'),
),
),
FunctionParameterDecl(
name='d',
type=PointerType(
inner_type=ValueType(name='mjsDefault'),
),
),
),
doc='Delete default class and descendants from mjSpec, remove all references, return 0 on success.', # pylint: disable=line-too-long
)),
('mjs_addBody',
FunctionDecl(
@@ -9954,7 +9974,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
FunctionDecl(
name='mjs_findDefault',
return_type=PointerType(
inner_type=ValueType(name='mjsDefault', is_const=True),
inner_type=ValueType(name='mjsDefault'),
),
parameters=(
FunctionParameterDecl(