HDK
|
Interface to scene materials. More...
#include <BRAY_Interface.h>
Public Member Functions | |
MaterialPtr (BRAY_VexMaterial *mat=nullptr) | |
~MaterialPtr () | |
bool | isValid () const |
void | updateSurface (const ScenePtr &scene, const UT_StringArray &arguments) |
Update the surface shader and arguments. More... | |
bool | updateDisplace (ScenePtr &scene, const UT_StringArray &arguments) |
void | updateLens (const ScenePtr &scene, const UT_StringArray &arguments) |
Update the lens shader and arguments. More... | |
void | updateSurfaceCode (const ScenePtr &scene, const UT_StringHolder &name, const UT_StringRef &code, bool preload=false) |
bool | updateDisplaceCode (const ScenePtr &scene, const UT_StringHolder &name, const UT_StringRef &code, bool preload=false) |
void | updateLensCode (const ScenePtr &scene, const UT_StringHolder &name, const UT_StringRef &code, bool preload=false) |
void | updateSurfaceGraph (const ScenePtr &scene, const UT_StringHolder &name, const ShaderGraphPtr &graphptr) |
Update the surface shader graph. More... | |
bool | updateDisplaceGraph (ScenePtr &scene, const UT_StringHolder &name, const ShaderGraphPtr &graphptr) |
void | updateLensGraph (const ScenePtr &scene, const UT_StringHolder &name, const ShaderGraphPtr &graphptr) |
Update the lens shader graph. More... | |
void | setInputs (const ScenePtr &scene, const MaterialInputList &inputs, bool for_surface) |
Set the material input list. More... | |
void | setCoordSysAliases (const ScenePtr &scene, UT_UniquePtr< UT_Map< UT_StringHolder, UT_StringHolder >> map) |
SYS_SAFE_BOOL | operator bool () const |
const BRAY_VexMaterial * | materialPtr () const |
Interface to scene materials.
Definition at line 581 of file BRAY_Interface.h.
|
inline |
Definition at line 584 of file BRAY_Interface.h.
|
inline |
Definition at line 588 of file BRAY_Interface.h.
|
inline |
Definition at line 590 of file BRAY_Interface.h.
|
inline |
Access to the underling material
Definition at line 595 of file BRAY_Interface.h.
|
inline |
Access to the underling material
Definition at line 594 of file BRAY_Interface.h.
void BRAY::MaterialPtr::setCoordSysAliases | ( | const ScenePtr & | scene, |
UT_UniquePtr< UT_Map< UT_StringHolder, UT_StringHolder >> | map | ||
) |
Set the mapping for transform space aliases. This allows shaders to reference a simple space name rather than the fully qualified path to the space (e.g. "paintSpace" instead of "/World/Obj/PaintObj/Xform")
void BRAY::MaterialPtr::setInputs | ( | const ScenePtr & | scene, |
const MaterialInputList & | inputs, | ||
bool | for_surface | ||
) |
Set the material input list.
bool BRAY::MaterialPtr::updateDisplace | ( | ScenePtr & | scene, |
const UT_StringArray & | arguments | ||
) |
Update the displacement shader and arguments Returns true if arguments changed.
bool BRAY::MaterialPtr::updateDisplaceCode | ( | const ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const UT_StringRef & | code, | ||
bool | preload = false |
||
) |
Update displacement shader VEX code The preload
flag is used when other shaders in the network might depend on the code being updated. Returns true if the name or the code changed.
bool BRAY::MaterialPtr::updateDisplaceGraph | ( | ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const ShaderGraphPtr & | graphptr | ||
) |
Update the displacement shader graph Returns true if the name or the code changed.
void BRAY::MaterialPtr::updateLens | ( | const ScenePtr & | scene, |
const UT_StringArray & | arguments | ||
) |
Update the lens shader and arguments.
void BRAY::MaterialPtr::updateLensCode | ( | const ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const UT_StringRef & | code, | ||
bool | preload = false |
||
) |
Update surface shader VEX code. The preload
flag is used when other shaders in the network might depend on the code being updated.
void BRAY::MaterialPtr::updateLensGraph | ( | const ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const ShaderGraphPtr & | graphptr | ||
) |
Update the lens shader graph.
void BRAY::MaterialPtr::updateSurface | ( | const ScenePtr & | scene, |
const UT_StringArray & | arguments | ||
) |
Update the surface shader and arguments.
void BRAY::MaterialPtr::updateSurfaceCode | ( | const ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const UT_StringRef & | code, | ||
bool | preload = false |
||
) |
Update surface shader VEX code. The preload
flag is used when other shaders in the network might depend on the code being updated.
void BRAY::MaterialPtr::updateSurfaceGraph | ( | const ScenePtr & | scene, |
const UT_StringHolder & | name, | ||
const ShaderGraphPtr & | graphptr | ||
) |
Update the surface shader graph.