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

BaseDocument_doc
 
RootTextureString * _rs
 
ASSETDATA_FLAG _flags
 
BaseOverride_override
 
Int32 _channelId
 

Constructor & Destructor Documentation

◆ AssetData()

AssetData ( BaseDocument doc,
RootTextureString *  rs,
ASSETDATA_FLAG  flags 
)

Constructor.

Parameters
[in]docThe document.
[in]rsPrivate.
[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::GetZeroRef< maxon::CString >(),
const maxon::Id nodeSpace = maxon::GetZeroRef< maxon::Id >() 
)

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

Parameters
[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.
Note
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.
Parameters
[in]channelIndexPrivate.
[in]nodePathThe node path of the port in case of a node material.
[in]nodeSpaceThe node space in case of a node material.
Returns
true if successful, otherwise false.

◆ Find()

Bool Find ( const Filename fn,
BaseList2D bl 
)

Returns whether a filename has already been added before.

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

Member Data Documentation

◆ _doc

BaseDocument* _doc

The document.

◆ _rs

RootTextureString* _rs

Private.

◆ _flags

The asset data flags: ASSETDATA_FLAG.

◆ _override

BaseOverride* _override

Private.

◆ _channelId

Int32 _channelId

Private.