mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
add attribute to the function to be able to detect if new version should be used
This commit is contained in:
parent
f11800f1e7
commit
b665bf3f79
1 changed files with 5 additions and 0 deletions
|
|
@ -725,6 +725,11 @@ def get_representation_path_with_roots(
|
|||
|
||||
|
||||
def _get_representation_path_decorator(func):
|
||||
# Add an attribute to the function so addons can check if the new variant
|
||||
# of the function is available.
|
||||
# >>> getattr(get_representation_path, "version", None) == 2
|
||||
# >>> True
|
||||
setattr(func, "version", 2)
|
||||
@wraps(func)
|
||||
def inner(*args, **kwargs):
|
||||
from ayon_core.pipeline import get_current_project_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue