(self, element, **kwargs)
Binds variations to attributes of an MJCF element.

    Args:
      element: An `mjcf.Element` object.
      **kwargs: Keyword arguments mapping attribute names to the corresponding
        variations. A variation is either a fixed value or a callable that
        optionally takes the original value of an attribute and returns a
        new value.
Binds variations to attributes of an MJCF element.
Binds variations to attributes of an MJCF element .
def bind_attributes(self, element, **kwargs):
    """Binds variations to attributes of an MJCF element.

    Args:
      element: An `mjcf.Element` object.
      **kwargs: Keyword arguments mapping attribute names to the corresponding
        variations. A variation is either a fixed value or a callable that
        optionally takes the original value of an attribute and returns a
        new value.
    """
    for attribute_name, variation in kwargs.items():
      if variation is None and attribute_name in self._variations[element]:
        del self._variations[element][attribute_name]
      else:
        initial_value = copy.copy(getattr(element, attribute_name))
        self._variations[element][attribute_name] = (
            _VariationInfo(initial_value, variation))
def bind_attributes ( self , element , * * kwargs ) : for attribute_name , variation in kwargs . items ( ) : if variation is None and attribute_name in self . _variations [ element ] : del self . _variations [ element ] [ attribute_name ] else : initial_value = copy . copy ( getattr ( element , attribute_name ) ) self . _variations [ element ] [ attribute_name ] = ( _VariationInfo ( initial_value , variation ) )