lib_substance.h File Reference

Classes

struct  SubstanceShdGetBitmap
 

Enumerations

enum class  SUBSTANCE_MATERIAL_MODE {
  STANDARD ,
  METALLIC ,
  GLOSSY ,
  AUTO ,
  NONE
}
 
enum class  SUBSTANCE_IMPORT_RESULT {
  SUCCESS ,
  DOESNOTEXIST ,
  NOTANASSET ,
  UNKNOWNERROR
}
 
enum class  SUBSTANCE_IMPORT_COPY {
  YES ,
  NO ,
  ASK
}
 
enum class  SUBSTANCE_INPUT_TYPE {
  INTEGER ,
  INTEGER_2 ,
  INTEGER_3 ,
  INTEGER_4 ,
  BOOL ,
  FLOAT ,
  FLOAT_2 ,
  FLOAT_3 ,
  FLOAT_4 ,
  IMAGE ,
  STRING ,
  COLOR_RGB ,
  COLOR_RGBA ,
  RESOLUTION
}
 
enum class  SUBSTANCE_OUTPUT_TYPE {
  DIFFUSE ,
  BASECOLOR ,
  OPACITY ,
  EMISSIVE ,
  AMBIENT ,
  AMBIENTOCCLUSION ,
  MASK ,
  NORMAL ,
  BUMP ,
  HEIGHT ,
  DISPLACEMENT ,
  SPECULAR ,
  SPECULARLEVEL ,
  SPECULARCOLOR ,
  GLOSSINESS ,
  ROUGHNESS ,
  ANISOTROPYLEVEL ,
  ANISOTROPYANGLE ,
  TRANSMISSIVE ,
  REFLECTION ,
  REFRACTION ,
  ENVIRONMENT ,
  IOR ,
  SCATTERING0 ,
  SCATTERING1 ,
  SCATTERING2 ,
  SCATTERING3 ,
  METALLIC ,
  ANY ,
  UNKNOWN ,
  INTERNAL_COUNT
}
 

Functions

enum SUBSTANCE_MATERIAL_MODE MAXON_ENUM_LIST (SUBSTANCE_MATERIAL_MODE)
 
enum SUBSTANCE_IMPORT_RESULT MAXON_ENUM_LIST (SUBSTANCE_IMPORT_RESULT)
 
enum SUBSTANCE_IMPORT_COPY MAXON_ENUM_LIST (SUBSTANCE_IMPORT_COPY)
 
enum SUBSTANCE_INPUT_TYPE MAXON_ENUM_LIST (SUBSTANCE_INPUT_TYPE)
 
enum SUBSTANCE_OUTPUT_TYPE MAXON_ENUM_LIST (SUBSTANCE_OUTPUT_TYPE)
 

Variables

static const Int32 ID_SUBSTANCE_ASSET
 
static const Int32 ID_SUBSTANCE_SHADER
 
static const Int32 ID_SUBSTANCE_LIBRARY
 
static const Int32 ID_SUBSTANCE_PRESET
 
static const Int32 ID_SUBSTANCE_COMMAND_OPENMANAGER
 
static const Int32 ID_SUBSTANCE_COMMAND_SYNCTRCLIENTS
 
static const Int32 ID_SUBSTANCE_COMMAND_LOADASSET
 
static const Int32 ID_SUBSTANCE_COMMAND_LOADFOLDER
 
static const Int32 ID_SUBSTANCE_COMMAND_REIMPORT
 
static const Int32 ID_SUBSTANCE_COMMAND_CUT
 
static const Int32 ID_SUBSTANCE_COMMAND_COPY
 
static const Int32 ID_SUBSTANCE_COMMAND_PASTE
 
static const Int32 ID_SUBSTANCE_COMMAND_REMOVE
 
static const Int32 ID_SUBSTANCE_COMMAND_REMOVEUNUSED
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECT_ALL
 
static const Int32 ID_SUBSTANCE_COMMAND_DESELECT_ALL
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECTFROMMATERIAL
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECTFROMMARKEDMATERIAL
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECTFROMOBJECT
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECTMATERIALS
 
static const Int32 ID_SUBSTANCE_COMMAND_SELECTOBJECTS
 
static const Int32 ID_SUBSTANCE_COMMAND_ENABLEALL
 
static const Int32 ID_SUBSTANCE_COMMAND_DISABLEALL
 
static const Int32 ID_SUBSTANCE_COMMAND_OPENPREFS
 
static const Int32 ID_SUBSTANCE_COMMAND_CREATEMATERIAL
 
static const Int32 ID_SUBSTANCE_COMMAND_CREATEMATERIALMETALLIC
 
static const Int32 ID_SUBSTANCE_COMMAND_CREATEMATERIALGLOSSY
 
static const Int32 ID_SUBSTANCE_COMMAND_DUPLICATE
 
static const Int32 ID_SUBSTANCE_COMMAND_DUPLICATEWITHMATERIAL
 
static const Int32 ID_SUBSTANCE_COMMAND_IMPORTPRESET
 
static const Int32 ID_SUBSTANCE_COMMAND_IMPORTPRESETMERGE
 
static const Int32 ID_SUBSTANCE_COMMAND_EXPORTPRESET
 
static const Int32 ID_SUBSTANCE_COMMAND_DISKCACHESELECTED
 
static const Int32 ID_SUBSTANCE_COMMAND_DISKCACHECHANGED
 
static const Int32 ID_SUBSTANCE_COMMAND_DISKCACHEALL
 
static const Int32 ID_SUBSTANCE_COMMAND_DISKCACHECLEARSELECTED
 
static const Int32 ID_SUBSTANCE_COMMAND_DISKCACHECLEARALL
 
static const Int32 MSG_SUBSTANCE_SHD_GETBITMAP
 
 STANDARD
 
 METALLIC
 
 GLOSSY
 
 AUTO
 
 NONE
 
 SUCCESS
 
 DOESNOTEXIST
 
 NOTANASSET
 
 UNKNOWNERROR
 
 YES
 
 NO
 
 ASK
 
 INTEGER
 
 INTEGER_2
 
 INTEGER_3
 
 INTEGER_4
 
 BOOL
 
 FLOAT
 
 FLOAT_2
 
 FLOAT_3
 
 FLOAT_4
 
 IMAGE
 
 STRING
 
 COLOR_RGB
 
 COLOR_RGBA
 
 RESOLUTION
 
 DIFFUSE
 
 BASECOLOR
 
 OPACITY
 
 EMISSIVE
 
 AMBIENT
 
 AMBIENTOCCLUSION
 
 MASK
 
 NORMAL
 
 BUMP
 
 HEIGHT
 
 DISPLACEMENT
 
 SPECULAR
 
 SPECULARLEVEL
 
 SPECULARCOLOR
 
 GLOSSINESS
 
 ROUGHNESS
 
 ANISOTROPYLEVEL
 
 ANISOTROPYANGLE
 
 TRANSMISSIVE
 
 REFLECTION
 
 REFRACTION
 
 ENVIRONMENT
 
 IOR
 
 SCATTERING0
 
 SCATTERING1
 
 SCATTERING2
 
 SCATTERING3
 
 ANY
 
 UNKNOWN
 
 INTERNAL_COUNT
 

Create

SUBSTANCE_IMPORT_RESULT ImportSubstance (BaseDocument *const doc, const Filename &fn, SUBSTANCE_IMPORT_COPY &copyFile, Bool errPopup, Bool addUndo, Bool createMaterial, BaseList2D **assetPtr)
 
BaseMaterialCreateMaterial (BaseList2D *const asset, Int32 graphIndex, SUBSTANCE_MATERIAL_MODE mode)
 
BaseShaderCreateSubstanceShader (BaseList2D *const asset)
 
Bool AssignChannelToMaterial (BaseList2D *const asset, Material *const c4dMaterial, Int32 channelId, Int32 outputUid, Bool addUndo)
 

Get and Insert

BaseList2DGetFirstSubstance (BaseDocument *const doc)
 
void GetSubstances (BaseDocument *const doc, AtomArray *arr, Bool onlySelected)
 
Bool InsertLastSubstance (BaseDocument *const doc, BaseList2D *asset)
 

Graphs, Inputs, Outputs

void * GetSubstanceGraph (BaseList2D *const asset, void *const prevGraph, String &name)
 
void * GetSubstanceInput (BaseList2D *const asset, void *const graph, void *const prevInput, UInt32 &inputUid, Int32 &firstId, Int32 &numElements, SUBSTANCE_INPUT_TYPE &type, String &name)
 
void * GetSubstanceOutput (BaseList2D *const asset, void *const graph, void *const prevOutput, UInt32 &outputUid, SUBSTANCE_OUTPUT_TYPE &type, String &name, BaseBitmap **bmpPtr)
 

Preferences

SUBSTANCE_MATERIAL_MODE PrefsGetMaterialModeSetting ()
 
Int32 PrefsGetPreviewSetting ()
 

Misc

Bool MaterialUsesSubstance (BaseMaterial *const mat)
 
BaseBitmapGetSubstanceMosaicPreview (BaseList2D *const asset, Int32 w, Int32 h)
 

Private

void UpdateImageInputPaths (BaseList2D *const asset, String &path)
 
void CloneReferencedSubstances (BaseDocument *const doc, BaseShader *const shd, BaseDocument *const ddoc, BaseShader *const dshd)
 
void CloneReferencedSubstancesObject (BaseDocument *const docSrc, BaseObject *const opSrc, BaseDocument *const docDst, BaseObject *const opDst)
 
void InsertSubstancePreviewScene (BaseDocument *const doc, BaseList2D *const asset)
 
const BaseBitmapGetContentBrowserOverlay ()
 

Variable Documentation

◆ STANDARD

STANDARD

Create standard material.

◆ METALLIC

METALLIC

Create metallic material.

◆ GLOSSY

GLOSSY

Create glossy material.

◆ AUTO

AUTO

Use heuristic to choose one of the three above (see Cinema 4D's user manual).

◆ NONE

NONE

Do not create material.

◆ SUCCESS

SUCCESS

Success.

◆ DOESNOTEXIST

DOESNOTEXIST

File not found.

◆ NOTANASSET

NOTANASSET

Wrong file format.

◆ UNKNOWNERROR

UNKNOWNERROR

On memory error or when invalid parameters were passed.

◆ YES

YES

Automatically copy file to project directory (relative file path).

◆ NO

NO

Do not copy file to project directory (absolute file path).

◆ ASK

ASK

Ask user.

◆ INTEGER

INTEGER

Int32 Integer, one DescID.

◆ INTEGER_2

INTEGER_2

Int32 Two component integer vector, two DescID.

◆ INTEGER_3

INTEGER_3

Int32 Three component integer vector, three DescID objects.

◆ INTEGER_4

INTEGER_4

Int32 Four component integer vector, four DescID objects.

◆ BOOL

BOOL

Bool Boolean, one DescID.

◆ FLOAT

FLOAT

Float Float, one DescID.

◆ FLOAT_2

FLOAT_2

Float Two component float vector, two DescID objects.

◆ FLOAT_3

FLOAT_3

Float Three component float vector, three DescID objects.

◆ FLOAT_4

FLOAT_4

Float Four component float vector, four DescID objects.

◆ IMAGE

IMAGE

Filename Image input, one DescID.

◆ STRING

STRING

◆ COLOR_RGB

COLOR_RGB

Vector RGB color vector, one DescID.

◆ COLOR_RGBA

COLOR_RGBA

Vector and Float RGBA color vector, two DescID objects.

◆ RESOLUTION

RESOLUTION

Int32 Substance output resolution, two DescID objects , integer, range 4 to 11, 2^n pixels (16 pixels to 2048 pixels)

◆ DIFFUSE

DIFFUSE

◆ BASECOLOR

BASECOLOR

◆ OPACITY

OPACITY

◆ EMISSIVE

EMISSIVE

◆ AMBIENT

AMBIENT

◆ AMBIENTOCCLUSION

AMBIENTOCCLUSION

◆ MASK

MASK

◆ NORMAL

NORMAL

◆ BUMP

BUMP

◆ HEIGHT

HEIGHT

◆ DISPLACEMENT

DISPLACEMENT

◆ SPECULAR

SPECULAR

◆ SPECULARLEVEL

SPECULARLEVEL

◆ SPECULARCOLOR

SPECULARCOLOR

◆ GLOSSINESS

GLOSSINESS

◆ ROUGHNESS

ROUGHNESS

◆ ANISOTROPYLEVEL

ANISOTROPYLEVEL

◆ ANISOTROPYANGLE

ANISOTROPYANGLE

◆ TRANSMISSIVE

TRANSMISSIVE

◆ REFLECTION

REFLECTION

◆ REFRACTION

REFRACTION

◆ ENVIRONMENT

ENVIRONMENT

◆ IOR

IOR

◆ SCATTERING0

SCATTERING0

◆ SCATTERING1

SCATTERING1

◆ SCATTERING2

SCATTERING2

◆ SCATTERING3

SCATTERING3

◆ ANY

ANY

◆ UNKNOWN

UNKNOWN

◆ INTERNAL_COUNT

INTERNAL_COUNT