utils
Utility functions for traits.
get_available_traits(addons_manager=None)
Get available traits from active addons.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
addons_manager | Optional[AddonsManager] | Addons manager instance. If not provided, a new one will be created. Within pyblish plugins, you can use an already collected instance of AddonsManager from context | None |
Returns:
Type | Description |
---|---|
Optional[list[TraitBase]] | list[TraitBase]: List of available traits. |
Source code in client/ayon_core/pipeline/traits/utils.py
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 |
|
get_sequence_from_files(paths)
Get the original frame range from files.
Note that this cannot guess frame rate, so it's set to 25. This will also fail on paths that cannot be assembled into one collection without any reminders.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paths | list[Path] | List of file paths. | required |
Returns:
Name | Type | Description |
---|---|---|
FrameRanged | FrameRanged | FrameRanged trait. |
Raises:
Type | Description |
---|---|
ValueError | If paths cannot be assembled into one collection |
Source code in client/ayon_core/pipeline/traits/utils.py
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 |
|