tlc.common.pipeline.AssetFile
- class tlc.common.pipeline.AssetFile
Bases:
object
The AssetFile class represents a file for a version of an asset in a project in any of the departments and tasks defined in the pipeline
- __init__()
Methods
__init__
()Build the full path for the asset file from AssetFile object attributes
Constructor for currently open scene file
createFromFields
(asset, dptID, taskID, version)Constructor from the asset fields
createFromPath
(path)Constructor from an (hopefully) existing path
parsePath
(path)Parse asset file path to initialize AssetFile object
Check whether the asset path matches the pipeline constraints
Attributes
Asset object
Department ID
Task ID inside the department
Public version
Working version (-1 if this is a published version, not working)
Full path for the asset file
- asset
Asset object
- buildFullPath()
Build the full path for the asset file from AssetFile object attributes
- Returns:
Full path of the asset file
- Return type:
str
- createForOpenScene()
Constructor for currently open scene file
- createFromFields(asset, dptID, taskID, version, workingVersion=-1)
Constructor from the asset fields
- Parameters:
asset (Asset) – Asset object
dptID (str) – ID (key) of the department
taskID (str) – ID (key) of the task inside the department
version (int) – Public version of this asset file
workingVersion (int, optional) – Working version of the asset file (-1 if public version, not working version). Defaults to -1.
- createFromPath(path)
Constructor from an (hopefully) existing path
- Parameters:
path (str) – Full path of the asset file
- dptID
Department ID
- fullPath
Full path for the asset file
- parsePath(path)
Parse asset file path to initialize AssetFile object
- Parameters:
path (str) – Full path of the asset
- Raises:
Exception – File path is not well formatted (following the pipeline)
- taskID
Task ID inside the department
- verifyPath()
Check whether the asset path matches the pipeline constraints
- Returns:
Current path matches the pipeline constraints
- Return type:
bool
- version
Public version
- workingVersion
Working version (-1 if this is a published version, not working)