SubstanceReference Struct Reference

#include <materialparameter.h>

Detailed Description

Defines a reference to a substance asset (.sbsar) to represent a material parameter. This object does not have ownership over an asset and instead loosely couples with assets as they are available through the API defined in "lib_substance.h".

Public Member Functions

Bool IsPopulated () const
 

Public Attributes

Url _absolutePath
 
String _assetName
 
String _outputChannelName
 

Member Function Documentation

◆ IsPopulated()

Bool IsPopulated ( ) const

Checks whether an absolute path has been assigned to the substance reference.

Returns
True if the absolute path is populated.

Member Data Documentation

◆ _absolutePath

Url _absolutePath

The absolute path to a substance file (.sbsar). An absolute path allows us to interpret this reference to a substance asset without knowing about the embedding into a particular BaseDocument. A relative path can be constructed with respect to the BaseDocument::GetDocumentPath().

◆ _assetName

String _assetName

The name of the substance according to the C4D Substance API, e.g.

_assetName = static_cast<BaseList2D*>((substanceAsset))->GetName();
Definition: c4d_baselist.h:2377
String GetName() const
Definition: c4d_baselist.h:2544
String _assetName
Definition: materialparameter.h:90

◆ _outputChannelName

String _outputChannelName

The name of the substance output according to the GetSubstanceOutput query of the C4D Substance API.