RamItem

Base class for RamAsset and RamShot. An item of the project, either an asset or a shot.

Inherits: RamObject

Inherited by: RamShot, RamAsset

Static Methods

Method Arguments Description
fromPath
RamShot or RamAsset or RamItem or None
string: fileOrFolderPath
Returns either a RamShot, RamAsset or RamItem instance built using the given folder path. The path can be any file or folder path from the asset (a version file, a preview file, etc).
The type (shot, asset or general item) can be checked with RamItem.itemType()

Methods

Method Arguments Description
constructor string: itemName,
string: itemShortName,
string: itemFolder="",
ItemType: itemType=ItemType.GENERAL
currentStatus
RamStatus
RamStep or string: step="",
string: resource = ""
The current status for the given step
folderPath
string
The absolute path to the folder containing the item
isPublished
bool
RamStep or string: step="" Convenience function to check if there are published files in the publish folder. Equivalent to len(self.publishedVersionFolderPaths(step, resource)) > 0
itemType
ItemType
The type of this item. One of ItemType.SHOT, ItemType.ASSET, ItemType.GENERAL
latestPublishedVersionFolderPath
string
RamStep or string: step="",
string: fileName = "",
string: resource = undefined
Folder of the latest published version, for a specific file name and/or resource
latestVersion
integer
string: resource = "",
string: state = "",
RamStep or string: step*=""
Returns the highest version number for the given state (wip, pub…).
latestVersionFilePath
string
string: resource = "",
string: state = "",
RamStep or string: step=""
Latest version file path
previewFolderPath
string
RamStep or string: step="" Gets the path to the preview folder. Paths are relative to the root of the item folder.
previewFilePaths
list of string
string: resource = "",
RamStep or string: step=""
Gets the list of file paths in the preview folder. Paths are relative to the root of the item folder.
project
RamProject
Gets the project this item belongs too. To improve performance, if only the shortName is needed, prefer using projectShortName()
projectShortName
string
Gets the short name of the project this item belongs too.
publishedVersionFolderPaths
list of string
RamStep or string: step="",
string: fileName = "",
string: resource* = undefined
Gets the list of folder paths in the publish folder, optionally for a given specific file name and/or resource.
publishFolderPath
string
RamStep or string: step="" Gets the path to the publish folder. Paths are relative to the root of the item folder.
setStatus RamStatus: status,
RamStep or string: step
Sets the current status for the given step
status
RamStatus
RamStep: step Gets the current status for the given step
stepFilePath
string
string: resource = "",
string: extension="",
RamStep or string: step*=""
Gets the file used for this step with the given file extension.
stepFilePaths
list of string
RamStep or string: step*="" Gets the files used for this step (there may be several files, one per resource)
stepFolderPath
string
RamStep or string: step*="" The subfolder for the given step
steps
list of RamStep
Gets the list of steps concerning this item.
versionFilePaths
string
string: resource = "",
RamStep or string: step=""
Gets all version files for the given resource.
versionFolderPath
string
RamStep or string: step="" Path to the version folder relative to the item root folder

API Dev notes

Note

These section is for the development of the API only; you should not need these when developping your add-on using the API.

(Im)mutable data

The data returned by the methods can be either mutable or immutable.

Method Type of the returned data
currentStatus Immutable
folderPath Immutable
isPublished Mutable
latestVersion Mutable
previewFolderPath Immutable
previewFilePaths Mutable
publishedFolderPath Immutable
publishedFilePaths Mutable
status Mutable
versionFolderPath Immutable
versionFilePath Mutable
wipFolderPath Immutable
wipFilePath Mutable

META