deprecated_function#
- omni.graph.tools.deprecated_function(
- deprecation_message: str,
- is_property: bool = False,
Decorator to deprecate a function.
- Parameters:
deprecation_message – A description of the action the user is to take to avoid the deprecated function.
is_property – Set this True if the function is a property getter or setter.
A deprecation message will only be shown once, the first time the deprecated function is called.
@deprecated_function("After version 1.5.0 use og.newer_function() instead") def older_function(): pass
For property getters/setters use this decorator after the property decorator.
@property @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self): return self.your_prop @my_prop.setter @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self, value): self.your_prop = value