MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / resolve_references

Method resolve_references

dm_control/mjcf/element.py:966–975  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

964 self_child._attach(other_child, exclude_worldbody, dry_run) # pylint: disable=protected-access
965
966 def resolve_references(self):
967 for attribute in self._attributes.values():
968 if isinstance(attribute, attribute_types.Reference):
969 if attribute.value and isinstance(attribute.value, str):
970 referred = self.root.find(
971 attribute.reference_namespace, attribute.value)
972 if referred:
973 attribute.value = referred
974 for child in self.all_children():
975 child.resolve_references()
976
977 def _update_references(self, reference_dict):
978 for attribute in self._attributes.values():

Callers

nothing calls this directly

Calls 3

all_childrenMethod · 0.95
valuesMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected