HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SHOP_Util Class Reference

Contains shader utility functions. More...

#include <SHOP_Util.h>

Static Public Member Functions

static const char * getShaderType (SHOP_TYPE type)
 Returns shader type name token for the given shader type. More...
 
static const char * getShaderLabel (SHOP_TYPE type)
 Returns shader label for the given shader type. More...
 
static const char * getIconName (SHOP_TYPE type)
 Return the icon name for the given shader type. More...
 
static const char * getBundleFilter (SHOP_TYPE type)
 Return the name of internal bundle filter for shader of a given type. More...
 
static const char * getShaderParmPath (SHOP_TYPE type)
 
static const char * getShaderSpaceParm (SHOP_TYPE type)
 Return the parameter name that specifies the space for the shader. More...
 
static SHOP_TYPE getShaderType (const char *name)
 Return the shader type given the shader type name. More...
 
static SHOP_TYPE getTypeFromParm (const char *parmname)
 Return the shader type given the shader parameter name. More...
 
static SHOP_TYPE getTypeFromSpaceParm (const char *parmname)
 Return the shader type from the space parameter name. More...
 
static bool isValidShaderType (int i)
 Return true if the given integer representation of SHOP_TYPE is valid. More...
 
static bool convertStringToOptions (UT_Options &options, const char *str)
 Convert a string like "{'foo':'bar','fum':(1,2,3)}' to a UT_Options. More...
 
static bool hasParmRiType (OP_Node *node, const char *parmname)
 Returns true if the parmeter of the node has a RiType tag. More...
 
static bool hasConnectedInput (OP_Node *node, PRM_Parm *parm)
 
static bool isCoShaderParm (const PRM_Parm *parm)
 Returns true if the parameter corresponds to a co-shader parameter. More...
 
static bool isCoShaderArray (const PRM_Parm *parm)
 Returns true if the parameter corresponds to a coshader array parameter. More...
 
static const UT_PropertyTablegetPropertyDefaults ()
 
static void setPropertyDefaults (const UT_PropertyTable *table)
 
static bool isParmDefaultValue (OP_Node *node, PRM_Parm *parm, fpreal now, const UT_Options *options, bool check_input=false)
 
static bool isParmDefaultValue (OP_Node *node, const char *parmname, fpreal now, const UT_Options *options, bool check_input=false)
 

Detailed Description

Contains shader utility functions.

Definition at line 24 of file SHOP_Util.h.

Member Function Documentation

static bool SHOP_Util::convertStringToOptions ( UT_Options options,
const char *  str 
)
static

Convert a string like "{'foo':'bar','fum':(1,2,3)}' to a UT_Options.

static const char* SHOP_Util::getBundleFilter ( SHOP_TYPE  type)
static

Return the name of internal bundle filter for shader of a given type.

static const char* SHOP_Util::getIconName ( SHOP_TYPE  type)
static

Return the icon name for the given shader type.

static const UT_PropertyTable* SHOP_Util::getPropertyDefaults ( )
static

Get/set property table for defaults. If a parameter exists in the property table, then that default value is used rather than the parameter's default value.

static const char* SHOP_Util::getShaderLabel ( SHOP_TYPE  type)
static

Returns shader label for the given shader type.

static const char* SHOP_Util::getShaderParmPath ( SHOP_TYPE  type)
static

Return the parameter name that specifies the shader of a given type (i.e. "shop_materialpath")

static const char* SHOP_Util::getShaderSpaceParm ( SHOP_TYPE  type)
static

Return the parameter name that specifies the space for the shader.

static const char* SHOP_Util::getShaderType ( SHOP_TYPE  type)
static

Returns shader type name token for the given shader type.

static SHOP_TYPE SHOP_Util::getShaderType ( const char *  name)
static

Return the shader type given the shader type name.

static SHOP_TYPE SHOP_Util::getTypeFromParm ( const char *  parmname)
static

Return the shader type given the shader parameter name.

static SHOP_TYPE SHOP_Util::getTypeFromSpaceParm ( const char *  parmname)
static

Return the shader type from the space parameter name.

static bool SHOP_Util::hasConnectedInput ( OP_Node node,
PRM_Parm parm 
)
static

Returns ture if the parm has a corresponding input on the node and that input is wired in.

static bool SHOP_Util::hasParmRiType ( OP_Node node,
const char *  parmname 
)
static

Returns true if the parmeter of the node has a RiType tag.

static bool SHOP_Util::isCoShaderArray ( const PRM_Parm parm)
static

Returns true if the parameter corresponds to a coshader array parameter.

static bool SHOP_Util::isCoShaderParm ( const PRM_Parm parm)
static

Returns true if the parameter corresponds to a co-shader parameter.

static bool SHOP_Util::isParmDefaultValue ( OP_Node node,
PRM_Parm parm,
fpreal  now,
const UT_Options options,
bool  check_input = false 
)
static

Returns true if the paramter is at a default value. If check_input is true, will also return true if parameter has a corresponding input that is wired in.

static bool SHOP_Util::isParmDefaultValue ( OP_Node node,
const char *  parmname,
fpreal  now,
const UT_Options options,
bool  check_input = false 
)
static

Returns true if the paramter is at a default value. If check_input is true, will also return true if parameter has a corresponding input that is wired in.

static bool SHOP_Util::isValidShaderType ( int  i)
static

Return true if the given integer representation of SHOP_TYPE is valid.

static void SHOP_Util::setPropertyDefaults ( const UT_PropertyTable table)
static

Get/set property table for defaults. If a parameter exists in the property table, then that default value is used rather than the parameter's default value.


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