AssetData Struct Reference

#include <c4d_baselist.h>

Public Member Functions

 AssetData (BaseDocument *doc, RootTextureString *rs, ASSETDATA_FLAG flags)
Bool Add (const Filename &fn, BaseList2D *bl, Int32 parameterId=-1, Bool netRequestOnDemand=false, Int32 channelIndex=-1, const maxon::CString &nodePath=maxon::GetZeroRef< maxon::CString >(), const maxon::Id &nodeSpace=maxon::GetZeroRef< maxon::Id >())
Bool Find (const Filename &fn, BaseList2D *bl)

Public Attributes

RootTextureString * _rs
Int32 _channelId

Constructor & Destructor Documentation

◆ AssetData()

AssetData ( BaseDocument doc,
RootTextureString *  rs,


[in]docThe document.
[in]flagsThe asset data flags: ASSETDATA_FLAG

Member Function Documentation

◆ Add()

Bool Add ( const Filename fn,
BaseList2D bl,
Int32  parameterId = -1,
Bool  netRequestOnDemand = false,
Int32  channelIndex = -1,
const maxon::CString nodePath = maxon::GetZeroRefmaxon::CString >(),
const maxon::Id nodeSpace = maxon::GetZeroRefmaxon::Id >() 

Call this function from MSG_GETALLASSETS to add missing textures or file strings, if you have additional references in a shader.

[in]fnThe filename to add.
[in]blThe shader reporting the missing name.
[in]parameterIdThe ID of the parameter in the BaseContainer the asset is assigned to.
[in]netRequestOnDemandNET request on demand.
When MSG_GETALLASSETS is send around all assets will be collected from a scene. So every node in the scene will be asked if there is an external file.
This happens with Save project or when the Team Render asks for all assets to send it to all clients.
In case the message is sent from Team Render, AssetEntry::_netRequestOnDemand means that the file can be requested from the client to the server when needed or if the client must download this asset before it starts rendering.
For instance, the scene itself is set with false as it must always exist before it starts rendering and for the most standard textures it is set to true.
[in]nodePathThe node path of the port in case of a node material.
[in]nodeSpaceThe node space in case of a node material.
true if successful, otherwise false.

◆ Find()

Bool Find ( const Filename fn,
BaseList2D bl 

Returns whether a filename has already been added before.

[in]fnThe filename to add.
[in]blThe shader containing the filename.
True if it has been added before.

Member Data Documentation

◆ _doc

BaseDocument* _doc

The document.

◆ _rs

RootTextureString* _rs


◆ _flags

The asset data flags: ASSETDATA_FLAG.

◆ _override

BaseOverride* _override


◆ _channelId

Int32 _channelId