HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten Class Reference

#include <MaterialFlatten.h>

Classes

class  NetworkNode
 
struct  ParameterEntry
 

Public Types

typedef std::vector
< ParameterEntry
ParameterEntryVector
 
typedef std::map< std::string,
std::string
StringMap
 
typedef
Alembic::Util::shared_ptr
< StringMap
StringMapPtr
 
typedef std::vector
< IMaterialSchema
SchemaVector
 

Public Member Functions

 MaterialFlatten ()
 Create empty. Use append to add material schema manually. More...
 
 MaterialFlatten (IMaterialSchema iMaterialSchema)
 Create with a single materialSchema. More...
 
 MaterialFlatten (IMaterial iMaterialObject)
 
 MaterialFlatten (Abc::IObject iObject, Abc::IArchive iAlternateSearchArchive=Abc::IArchive())
 
void append (IMaterialSchema iMaterialSchema)
 Manually append a schema to the inheritance hierarchy. More...
 
void append (IMaterial iMaterialObject)
 Append the schemas of matching parent material objects. More...
 
bool empty ()
 Returns true is there are no schema in the inheritance path. More...
 
void getTargetNames (std::vector< std::string > &oTargetNames)
 
void getShaderTypesForTarget (const std::string &iTargetName, std::vector< std::string > &oShaderTypeNames)
 
bool getShader (const std::string &iTarget, const std::string &iShaderType, std::string &oResult)
 
void getShaderParameters (const std::string &iTarget, const std::string &iShaderType, ParameterEntryVector &oResult)
 
void getNetworkTerminalTargetNames (std::vector< std::string > &iTargetNames)
 network stuff More...
 
void getNetworkTerminalShaderTypesForTarget (const std::string &iTargetName, std::vector< std::string > &oShaderTypeNames)
 
bool getNetworkTerminal (const std::string &iTarget, const std::string &iShaderType, std::string &oNodeName, std::string &oOutputName)
 
size_t getNumNetworkNodes ()
 
NetworkNode getNetworkNode (size_t iIndex)
 
NetworkNode getNetworkNode (const std::string &iNodeName)
 

Detailed Description

Utility class for querying against flattened inheritance hierarchies or definitions.

Definition at line 49 of file MaterialFlatten.h.

Member Typedef Documentation

Definition at line 155 of file MaterialFlatten.h.

Constructor & Destructor Documentation

Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::MaterialFlatten ( )

Create empty. Use append to add material schema manually.

Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::MaterialFlatten ( IMaterialSchema  iMaterialSchema)

Create with a single materialSchema.

Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::MaterialFlatten ( IMaterial  iMaterialObject)

Create from a material object. The schemas of matching parent material objects are automatically append

Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::MaterialFlatten ( Abc::IObject  iObject,
Abc::IArchive  iAlternateSearchArchive = Abc::IArchive() 
)

Create from an IObject. This will interpret values for hasMaterial and getMaterialAssignmentPath to flatten the full assignment and inheritance chain. A locally present material is first in the inheritance path. A material assignment is then appended with IMaterial rules.

An alternate archive can be optionally specified. If provided, assigned material paths will be traversed within that archive instead of the archive of the object itself.

Member Function Documentation

void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::append ( IMaterialSchema  iMaterialSchema)

Manually append a schema to the inheritance hierarchy.

void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::append ( IMaterial  iMaterialObject)

Append the schemas of matching parent material objects.

bool Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::empty ( )

Returns true is there are no schema in the inheritance path.

NetworkNode Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNetworkNode ( size_t  iIndex)
NetworkNode Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNetworkNode ( const std::string iNodeName)
bool Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNetworkTerminal ( const std::string iTarget,
const std::string iShaderType,
std::string oNodeName,
std::string oOutputName 
)
void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNetworkTerminalShaderTypesForTarget ( const std::string iTargetName,
std::vector< std::string > &  oShaderTypeNames 
)
void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNetworkTerminalTargetNames ( std::vector< std::string > &  iTargetNames)

network stuff

size_t Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getNumNetworkNodes ( )
bool Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getShader ( const std::string iTarget,
const std::string iShaderType,
std::string oResult 
)

Returns true and fills result with the shader name of first defined for the target and shaderType within the inheritance hierarchy. False if not defined.

void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getShaderParameters ( const std::string iTarget,
const std::string iShaderType,
ParameterEntryVector oResult 
)

Fills result with the parent compound and property header for shader parameters defined for the target and shader type within the inheritance hierarchy. Shallower definitions mask deeper ones (i.e. you'll only get one entry for a given name)

void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getShaderTypesForTarget ( const std::string iTargetName,
std::vector< std::string > &  oShaderTypeNames 
)

Fill the list with a union of shader types define for the specified target within the inheritance hierarchy

void Alembic::AbcMaterial::ALEMBIC_VERSION_NS::MaterialFlatten::getTargetNames ( std::vector< std::string > &  oTargetNames)

Fill the list with a union of target names defined within the inheritance hierarchy


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