Enable procedural plugin activation in Python bindings.
PiperOrigin-RevId: 746055614 Change-Id: Idcc2f62fdfeccdca356e3d1acadf168b46a98881
This commit is contained in:
committed by
Copybara-Service
parent
b1f8d444f2
commit
a209134315
@@ -84,6 +84,7 @@ def _value_binding_code(
|
||||
fulltype = fulltype.replace('mjOption', 'raw::MjOption')
|
||||
fulltype = fulltype.replace('mjVisual', 'raw::MjVisual')
|
||||
fulltype = fulltype.replace('mjStatistic', 'raw::MjStatistic')
|
||||
element = '.element' if fullvarname == 'plugin' else ''
|
||||
|
||||
def_property_args = (
|
||||
f'"{varname}"',
|
||||
@@ -91,7 +92,7 @@ def _value_binding_code(
|
||||
return self.{fullvarname};
|
||||
}}""",
|
||||
f"""[]({rawclassname}& self, {fulltype} {varname}) {{
|
||||
self.{fullvarname} = {varname};
|
||||
self.{fullvarname}{element} = {varname}{element};
|
||||
}}""",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user