HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BRAY::MaterialPtr Class Reference

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 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 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 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
 

Detailed Description

Interface to scene materials.

Definition at line 572 of file BRAY_Interface.h.

Constructor & Destructor Documentation

BRAY::MaterialPtr::MaterialPtr ( BRAY_VexMaterial *  mat = nullptr)
inline

Definition at line 575 of file BRAY_Interface.h.

BRAY::MaterialPtr::~MaterialPtr ( )
inline

Definition at line 579 of file BRAY_Interface.h.

Member Function Documentation

bool BRAY::MaterialPtr::isValid ( ) const
inline

Definition at line 581 of file BRAY_Interface.h.

const BRAY_VexMaterial* BRAY::MaterialPtr::materialPtr ( ) const
inline

Access to the underling material

Definition at line 586 of file BRAY_Interface.h.

SYS_SAFE_BOOL BRAY::MaterialPtr::operator bool ( ) const
inline

Access to the underling material

Definition at line 585 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::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.


The documentation for this class was generated from the following file: