Retrieve and Publish
Accessing assets through the UI is performed using the asset browser provided by your plug-in. The browsers used for retrieve and publish can be different. For example, when retrieving assets PyMockAsset shows a browser that only allows selection of existing locations.
Retrieving
To retrieve an asset through the File menu:
1. | With an asset plug-in enabled, choose File > Open... |
The asset browser opens.
2. | In the asset browser, select the asset you want to retrieve and click Accept. |
The information you enter is resolved into an Asset ID, and that scene is loaded.
Retrieving through a supported node parameter works in the same way. For example, to bring in an asset-managed Alembic file using an Alembic_In node:
1. | Add an Alembic_In node to your Katana recipe. |
2. | Select the Alembic_In node and press Alt+E to edit it. |
Assuming you have an asset plug-in selected in the Project Settings tab, the abcAsset parameter shows the asset widget, and choosing abcAsset > Browse... opens the asset browser for your selected plug-in.
Supported Nodes and UI Locations
You can retrieve assets through the following nodes and UI locations:
• The File menu
To retrieve Katana scenes or macros.
• Alembic_In
• AttributeFile_In
• LookFileAssign
• LookFileGlobalsAssign
• LookFileMaterialIn
• LiveGroup
• ImageRead
• Importomatic
• PrmanGlobalSettings
• PrmanObjectSettings
Assets imported through the ribInclude parameter are supported.
• ArnoldGlobalSettings
Assets imported through the assInclude parameter are supported.
• PrimitiveCreate - for the following asset types:
• rib archive
• coordinate system sphere
• coordinate system plane
• Material
Shaders and their Args files can be asset-managed
Note: When you select a shader from the asset browser, the asset plug-in checks for a related asset-managed Args file. If one is not found, it looks up the Args file in the usual fashion, relative to the .so file location.
For more on the locations Katana searches for Args files, see Args Files for Shaders in the Dev Guide.
• RenderProceduralArgs.
Note: When you select a render procedural from the asset browser, the asset plug-in checks for a related asset-managed Args file. If one is not found, it looks for an Args file with the same name as the render procedural .so file, in the same directory. For example, an .so file under /tmp/proc.so expects an Args file at /tmp/proc.so.args.
Publishing
When publishing through an Asset plug-in, information entered in the asset browser is used to build an Asset ID. For example, to publish from the file menu:
1. | Choose File > Save As... |
The asset browser opens.
2. | In the asset browser, enter the information required to identify the asset to publish, then click Accept. |
The asset plug-in performs the Pre-Publish step described in the The Asset Publishing Process, and if that passes, Katana performs the Publish step to write the asset. Finally the Post-Publish step returns the Asset ID of the published asset.
Publishing from a node works in the same way. For example, to publish a light rig from a GafferThree node:
1. | In a Katana scene containing a GafferThree node with a rig, select the GafferThree node and press Alt+E to edit it. |
2. | Select the rig you want to publish, right-click on the rig and choose Export Rig. |
The Export Rig dialog opens for you to enter the required identification information. In the case of PyMockAsset, the browser has fields for Show, Shot, Asset, and Version.
Supported Nodes and Use Cases
You can publish assets through the following nodes and use cases:
• Render
• ImageWrite.
Note: When performing a Disk Render from a Render node or an ImageWrite node, the Pre-Publish and Post-Publish steps are not performed. To manually perform those steps, go to the Parameters tab of a Render or ImageWrite node and choose Action > Pre-Render Publish Asset and Action > Post-Render Publish Asset.
• LookFileBake
• LookFileMultiBake