Asset API

Provide content as reusable assets served with the Cinema 4D Asset Browser.

Note
For information about the classic API Content Browser, see Content Browser [Deprecated]. For information on scene assets as reflected in the 'Save with Assets' command, see AssetData.

Overview

The Asset API is a collection of interfaces for the Asset Browser, replacing the older Content Browser. The API does provide only limited access to the graphical user interface of the Asset Browser and primarily exposes the underlying data structures that are represented by the Asset Browser.

Assets come natively in the form of scenes, objects, materials, media files, presets and other minor types as category and keyword assets. The Asset API provides means to implement custom asset interfaces wrapping around data defined by a third party developer. Such asset can then be loaded into a scene with the Asset Browser and is stored in databases. The wrapped data of an asset, e.g., a texture file, can either reside inside or outside of such database; but an asset database always stores metadata for all its assets. This asset metadata is accessible in its most tangible form in the Info Area of the Asset Browser, displaying for example an annotation which describes a single asset.

Fig I: The Asset Browser is the graphical user interface that exposes the data manged by the Asset API. But the Asset API offers only limited direct control over the Asset Browser window and its functionalities and instead provides access to the underlying data structures that are represented by the Asset Browser.

SDK Plugins

The following SDK plugin examples associated with the Asset API.

Asset API Examples

The 'Asset API Examples' plugin showcases basic Asset API operations as finding, loading and creating assets, reading and writing asset metadata and the handling of asset databases. The plugin is divided into categories of executable examples, with each category aligning with one of the three major Asset API articles Asset Databases, Asset Types, and Asset Metadata as code snippets. This plugin requires the SDK asset database to function correctly, you must either provide an internet connection on the machine where the plugin is being executed on or download and mount the database manually from developers.maxon.net

Fig II: The Asset API Examples plugin plugin reflects the three articles on asset databases, asset types, and asset metadata in the Asset API handbook. These categories can be selected with a drop down at the top and within each category the code snippets shown in the respective article can be found as executable examples. The example 'Add User Database' shown in the screen shot reflects for example the code snippet Add User Databases in the article Asset Databases.

Dots Preset Asset Implementation

The Dots Preset Asset Implementation is a plugin which implements a preset asset type, the dots preset asset type. Preset assets are a special form of asset type that wraps a dedicated data type used as a parameter in objects. Data of this type can then be loaded and stored with its custom GUI from and into the asset databases that are exposed by the Asset Browser. The logic of implementing preset asset type plugins is covered in Implementing Preset Assets.

Fig III: The 'Dots' data type, custom GUI and asset type implementation working in conjunction to store dots assets into and load dots assets from an asset database exposed by the Asset Browser.

Related Topics

Articles Asset Databases Access and manage asset databases that contain assets which are exposed by the Asset Browser.
Asset Types Create and load assets for a wide range of content types exposed by the Asset Browser.
Asset Metadata

Read and write asset metadata to describe and organize assets.

Frameworks asset.framework Provides the functionalities of the Asset API.
cinema_hybrid.framework

Provides functionalities to bridge the classic API to the maxon API used by other frameworks.

SDK Plugins Asset API Examples Showcases basic interactions with the Asset API to modify asset databases and their content.
Dots Preset Asset Implementation

Showcases the implementation of a custom preset asset type in conjunction with a custom datatype and GUI.

Development Tools Copy Asset ID to 'Cache' Builtin feature of the Cinema 4D Asset Browser to copy the identifiers of assets. The feature is described in the Asset Browser documentation in more detail.
Show ID Builtin feature of the Cinema 4D Node Editor to discover the identifiers of nodes and ports. This can be useful in the context of node template assets, as the identifier of the node type is equal to its asset identifier. The 'Copy Asset ID to Cache' function is however the more versatile tool in the context of assets. The feature is described in the Node Editor Menu documentation in more detail.
g_console Command Line Argument for Cinema 4D which can take the values true or false and defaults to false. Enables or disables the Cinema 4D console (Windows only and only if no debugger is present).
g_consoleDebugger Command Line Argument for Cinema 4D which can take the values true or false and defaults to false. Enables or disables the Cinema 4D console (Windows only and even if a debugger is present).
g_developerNodeEditorFunctions Command Line Argument for Cinema 4D which can take the values true or false and defaults to false. Shows the versions of node asset in the Asset Browser and allows to create a specific versions of an asset by dragging it into the editor. Also makes the "Edit Description" and "Edit Port" commands available at all times.
g_generateAssetRepositoryGml Command Line Argument for Cinema 4D which can take the values true or false and defaults to false. Generates an asset repository dependency gml graph. The location will be printed to the debug console.