utils
get_last_versions_for_instances(project_name, instances, use_value_for_missing=False)
Get last versions for instances by their folder path and product name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Project name. | required |
instances | list[CreatedInstance] | Instances to get next versions for. | required |
use_value_for_missing | Optional[bool] | Missing values are replaced with negative value if True. Otherwise None is used. -2 is used for instances without filled folder or product name. -1 is used for missing entities. | False |
Returns:
Type | Description |
---|---|
dict[str, Union[int, None]]: Last versions by instance id. |
Source code in client/ayon_core/pipeline/create/utils.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
get_next_versions_for_instances(project_name, instances)
Get next versions for instances by their folder path and product name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Project name. | required |
instances | list[CreatedInstance] | Instances to get next versions for. | required |
Returns:
Type | Description |
---|---|
dict[str, Union[int, None]]: Next versions by instance id. Version is 'None' if instance has no folder path or product name. |
Source code in client/ayon_core/pipeline/create/utils.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|