-
Notifications
You must be signed in to change notification settings - Fork 2
postCreateAsset
void postCreateAsset(
AssetTransaction* txn,
const std::string& assetType,
const StringMap& assetFields,
const StringMap& args,
std::string& assetId)
Finalize Katana's process of writing information to assetIds.
This function gets similar arguments to
createAssetAndPaths. Katana will call this after it has
finished writing files to the assetId resolved location. At minimum, this
function doesn't need to do anything. It can simply convert assetFields
into
assetId
using getAssetFields.
Katana will only call this after createAssetAndPaths
has completed successfully. Be aware that call could have happened in a
different process on an entirely different computer. The assetFields
this gets
will be the getAssetFields from the results of the create
call.
If the txn
argument is "NULL" then this function should operate immediately.
The transaction will be provided by [createTransaction] if provided by this
asset plugin. If a transaction is provided, this function is free to immediately
or defer creation of the asset until the commit
or cancel
method is called.
The assetType
is a string enumerated by Katana's asset type constants like
kFnAssetTyleLookFile
or kFnAssetTypeLiveGroup
.
The args
is a customizeable collection of information to control the asset
creation. Common arg values are "versionUp" and "fileExtension". Other values
are for specific types of output like "colorspace" used by the when creating
kFnAssetTypeImage
. Many of these args
will come from the hints provided by
properties. See createAssetAndPaths for more
information about this string map.
If an error occurs, set the assetId
to an empty string to indicate a problem.
There is no way to inform the caller of what went wrong or why. The code can
call FnLogError
to at least get information to where someone could see it.
Resolve
containsAssetId
getAssetVersions
isAssetId
resolveAsset
resolveAllAssets
resolvePath
resolveAssetVersion
Publish
Attributes
buildAssetId
getRelatedAssetId
getAssetAttributes
getAssetFields
getAssetIdForScope
setAssetAttributes
Nodegraph