- class ftrack_api.structure.standard.StandardStructure(project_versions_prefix=None, illegal_character_substitute='_')
Project hierarchy based structure that only supports Components.
The resource identifier is generated from the project code, the name of objects in the project structure, asset name and version number:
If the component is a FileComponent then the name of the component and the file type are used as filename in the resource_identifier:
If the component is a SequenceComponent then a sequence expression, %04d, is used. E.g. a component with the name foo yields:
For the member components their index in the sequence is used:
The name of the component is added to the resource identifier if the component is a ContainerComponent. E.g. a container component with the name bar yields:
For a member of that container the file name is based on the component name and file type:
- __init__(project_versions_prefix=None, illegal_character_substitute='_')
If project_versions_prefix is defined, insert after the project code for versions published directly under the project:
Replace illegal characters with illegal_character_substitute if defined.
Nested component containers/sequences are not supported.
Return value with illegal filesystem characters replaced.
An illegal character is one that is not typically valid for filesystem usage, such as non ascii characters, or can be awkward to use in a filesystem, such as spaces. Replace these characters with the character specified by illegal_character_substitute on initialisation. If no character was specified as substitute then return value unmodified.
- get_resource_identifier(entity, context=None)
Return a resource identifier for supplied entity.
context can be a mapping that supplies additional information, but is unused in this implementation.
ftrack_api.exeption.StructureErrorif entity is not attached to a committed version and a committed asset with a parent context.