#include <VOP_ScriptMaterialInfo.h>
|
| VOP_ScriptMaterialInfo (OP_Network *owner) |
|
virtual | ~VOP_ScriptMaterialInfo () |
|
bool | loadInfo (UT_IStream &is) |
|
bool | providesVopType (VOP_Type shader_type) |
|
bool | getCodeSectionName (UT_String §ion_name, VOP_Type shader_type) |
|
void | getExportParmInfos (UT_Array< VOP_FunctionArgInfo > &arg_infos, VOP_Type shader_type) const |
| Returns all known export parameters of a shader. More...
|
|
virtual bool | getParameterOrProperty (const UT_StringRef &name, fpreal now, OP_Node *&op, PRM_Parm *&parm, bool create_missing_multiparms, PRM_ParmList *obsolete) |
| Track down the parameter associated with a given property. More...
|
|
virtual bool | getParameterOrPropertyByChannel (const UT_StringRef &chname, fpreal now, OP_Node *&op, PRM_Parm *&parm, int &vector_index, PRM_ParmList *obsolete) |
| Track down the parameter associated with a given a channel name. More...
|
|
virtual int | findParametersOrProperties (fpreal now, OP_PropertyLookupList &list) |
|
virtual VOP_Node * | getProcedural (VOP_Type type) |
|
virtual OP_Node * | getChild (const char *name, int *hint=NULL) const |
| Returns the phantom node of a given name or NULL if no such child found. More...
|
|
|
UT_IntArray | getShaderLayerExportsInputsToCopy (const char *out_name, VOP_Type shader_type) const |
|
UT_StringHolder | getShaderLayerExportsToAdd (const char *out_name, VOP_Type shader_type) const |
|
Definition at line 65 of file VOP_ScriptMaterialInfo.h.
VOP_ScriptMaterialInfo::VOP_ScriptMaterialInfo |
( |
OP_Network * |
owner | ) |
|
Constructor. Takes an 'owner' as an argument, to make it possible for phantom nodes to report their full path and shader code section to be picked based on parameter value of the switch indices (top level parameters on owner).
virtual VOP_ScriptMaterialInfo::~VOP_ScriptMaterialInfo |
( |
| ) |
|
|
virtual |
Static function for encoding the relevant child nodes of the material vopnet into a serialized stream, parsable by the instantiation methods of this class. Returns true if there was some relevant info to encode and there were no errors while encoding that info.
- Parameters
-
buffer | Outgoing argument that will contain the encoded info in an XML form. |
material | Vopnet material node whose metadata needs to be saved. The metadata is in the form of child nodes that don't participate in the vex shader generation (such as properties nodes and procedurals). However information about such nodes is necessary for proper functioning of the compiled material HDAs. |
mapper | Maps the operator paths of encapsulated shaders found in the material node into the HDA section names that contain vex code for these shader nodes. |
Track down the parameters or properties in the given list. Fill out the property lookup list with parameters. Returns the total of found and resolved parameters in the list (whether they were resolved by previous calls or this particular call).
virtual OP_Node* VOP_ScriptMaterialInfo::getChild |
( |
const char * |
name, |
|
|
int * |
hint = NULL |
|
) |
| const |
|
virtual |
Returns the phantom node of a given name or NULL if no such child found.
bool VOP_ScriptMaterialInfo::getCodeSectionName |
( |
UT_String & |
section_name, |
|
|
VOP_Type |
shader_type |
|
) |
| |
Returns a name of the HDA section that has the vex code that should be used for the shader of a given type. HDA materials may have several code sections for the same shader type if the original node had several Output VOP nodes connected to the Collect VOP node via Switch VOPs. This method mimics the switch vop hierarchy to make a decision as to which shader code to use.
Returns all known export parameters of a shader.
Track down the parameter associated with a given property.
Track down the parameter associated with a given a channel name.
Returns a procedural shader node of a given type if it has one, otherwise returns NULL.
Obtains the names of the HDA code sections that are used by this info.
UT_IntArray VOP_ScriptMaterialInfo::getShaderLayerExportsInputsToCopy |
( |
const char * |
out_name, |
|
|
VOP_Type |
shader_type |
|
) |
| const |
Returns info needed for constructing output variable tags for describing shader layer exports.
UT_StringHolder VOP_ScriptMaterialInfo::getShaderLayerExportsToAdd |
( |
const char * |
out_name, |
|
|
VOP_Type |
shader_type |
|
) |
| const |
Returns info needed for constructing output variable tags for describing shader layer exports.
bool VOP_ScriptMaterialInfo::loadInfo |
( |
UT_IStream & |
is | ) |
|
This method parses and loads information from the stream (created with encodeInfo()). It initializes the internal data structures so that it can properly handle all the other requests and queries from other methods.
It creates phantom nodes within an owner network. Phantom nodes represent render properties, procedural shaders, and encapsulated shaders that were part of the original material node, but which cannot be part of the HDA since it is a compiled code (ie, childless) node type. Houdini still considers myParentNode as a childless node so users cannot dive it and see them, but the phantom nodes are still present. Namely, when knowing their exact node paths and searching for them with findNode(). So, the 'parent' argument is necessary so that phantom nodes can report a valid full path.
It also parses the information about the code sections that are present in the HDA. This info is used to pick a correct shader code from a correct section, in case there are a few versions of the shader, each corresponding to an Output VOP node, which are picked by Switch VOPs connected as inputs to the Collect VOP.
bool VOP_ScriptMaterialInfo::providesVopType |
( |
VOP_Type |
shader_type | ) |
|
Returns true if the instance of this class contains relevant information for the given shader type and can answer the queries for this type.
The documentation for this class was generated from the following file: