In addition to the core methods that need to be implemented by an Asset plug-in there are additional methods, many of which are variants.
Triggered when the user requests that
Used for expanding Asset IDs in a string containing a mix of Asset IDs and arbitrary tokens, such as a command. It takes a single string parameter, which may contain one or more Asset IDs, and replaces them with resolved file paths. resolveAllAssets() is used by:
Python expressions, which have access to a function called assetResolve() that resolves a string of Asset IDs split by white space.
String parameters, which has a method called getFileSequenceValue() that returns the value of the string with automatic expansion of Asset IDs into file paths.
ImageWrite node postScripts. An ImageWrite node can execute post scripts commands. The Asset IDs in these commands are automatically expanded.
This resolves an Asset ID and frame number pair, where time is a factor in determining the asset resolution (such as a sequence of images). resolvePath() is called in place of resolveAsset() whenever time is a significant factor in asset resolution.
resolvePath() is used extensively for resolving procedural arguments in render plug-ins. It is used by the Material and RiProcedural resolvers, and the Look File Manager. It can be accessed in Attribute Scripts via the AssetResolve() function in an Attribute Script Util module.
This accepts an Asset ID that references a tag or meta version such as latest or lighting and returns the version number that it corresponds to. It also accepts an Asset ID that contains no version information and an optional versionTag parameter, and produces the version number that corresponds to the versionTag argument.
This is used by the LookFile resolver,
It allows
The transaction is passed by
For Python asset plug-ins, this method must be implemented but it may return None. In C++, this method may be implemented; where it is, it must return an asset transaction object.
Reports if a string contains an Asset ID.
The string parameter uses this method prior to expanding the Asset IDs it may contain, when getFileSequenceValue() is called.
Is used to produce a short name for an asset. For example, a name that can be used in the UI.
This is used by the Alembic Importomatic plug-in and the LookFileManager.
Lists the versions that are available for an asset as a sequence of strings.
This is used by the Importomatic, to allow users to choose an asset version in the Importomatic versions column and by the CastingSheet plug-in.
Provides a scene graph path for an asset, as a string, so that it can be placed easily in the Scene Graph tab, and is currently used by the LookFileManager.
Given an Asset ID and a string representing a relationship or connection, returns another Asset ID. For example, with a shader file that has an Args file getRelatedAssetId() can be used to get the Asset ID of the Args file from the Asset ID of the shader. The contexts listed in
If getRelatedAssetId() returns either None, or an empty string,
If getRelatedAssetId() returns anything other than None or an empty string,
This truncates an Asset ID to the given scope, where the scope is an asset field.
For example:
getAssetIdForScope( "mock://myShow/myShot/myName/myVersion", "shot" )
Produces:
mock://myShow/myShot
The returned Asset ID no longer contains the name and version components.
This is used by the assetAttr() built-in function that Python expressions have access to, and by
Allows users to set additional metadata on an asset.
This is not used by anything in the
Allows users to store additional metadata on an asset.
The casting sheet example plug-in uses this method and Python expressions have access to an assetAttr built-in method that retrieves asset attribute information.