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

#include <SOP_LightLink.h>

Classes

class  Node
 
struct  VisibleInfo
 

Public Types

typedef UT_Pair< std::string,
std::string
SetOp
 
typedef UT_Pair< std::string,
VisibleInfo
VisibleOp
 

Public Member Functions

 SOP_LightLink ()
 
 ~SOP_LightLink ()
 
void addPath (const char *path)
 Add a node to the tree. This will create all intermediate nodes. More...
 
bool setMaterial (const char *path, const std::string &value)
 
bool setVisible (const char *path, int visible)
 Set the visibility for a given subtree. More...
 
bool setViewportLOD (const char *path, GEO_ViewportLOD lod)
 Set the viewport LOD for a given subtree. More...
 
bool setExpr (const char *path, const std::string &tag_expression)
 Set the expression string for a given subtree. More...
 
bool addTag (UT_TagManager &m, const char *path, const UT_TagList &t)
 
bool rmTag (UT_TagManager &m, const char *path, const UT_TagList &t)
 
void clearTagExpressions ()
 
void clearValues ()
 Restore tree to default values. More...
 
bool extractLeafPaths (UT_StringArray &paths) const
 Return a string array of all the unique paths. More...
 
void getMaterialOps (UT_Array< SetOp > &ops)
 Find out which operations will set the appropriate materials. More...
 
void getExprOps (UT_Array< SetOp > &ops)
 Find out which operations will set the proper light expressions. More...
 
void getVisibleOps (UT_Array< VisibleOp > &ops)
 Find out which operations will set the proper visibility operations. More...
 
bool getMaterial (const char *path, std::string &expr) const
 Get the material for the given path. More...
 
bool getExpr (const char *path, std::string &expr) const
 Get the expression for the given path. More...
 
bool getMatchingExpr (UT_TagManager &tags, const std::string &prepend, UT_Set< std::string > &selection, const UT_TagList &t) const
 
void dump (const char *msg)
 

Static Public Attributes

static std::string theAsterisk
 

Detailed Description

Class to manage visibility/material/light linking for packed primitives.

This class represents the paths for the SOP as a full tree. Operations can be performed on branches (including light linking operations). After the tree has been edited, you can get the operations by calling one of:

Definition at line 31 of file SOP_LightLink.h.

Member Typedef Documentation

Definition at line 47 of file SOP_LightLink.h.

Constructor & Destructor Documentation

SOP_LightLink::SOP_LightLink ( )
SOP_LightLink::~SOP_LightLink ( )

Member Function Documentation

void SOP_LightLink::addPath ( const char *  path)

Add a node to the tree. This will create all intermediate nodes.

bool SOP_LightLink::addTag ( UT_TagManager m,
const char *  path,
const UT_TagList t 
)

Add a light tag to the subtree specified by the given path. This will convert a node's expression to a compiled form. Please call clearTagExpressions() when you're finshed editing the tree.

void SOP_LightLink::clearTagExpressions ( )
inline

Convert any tag expressions to their string values. You must call this when you're finished calling addTag()/rmTag().

Definition at line 318 of file SOP_LightLink.h.

void SOP_LightLink::clearValues ( )
inline

Restore tree to default values.

Definition at line 320 of file SOP_LightLink.h.

void SOP_LightLink::dump ( const char *  msg)
bool SOP_LightLink::extractLeafPaths ( UT_StringArray paths) const

Return a string array of all the unique paths.

bool SOP_LightLink::getExpr ( const char *  path,
std::string expr 
) const

Get the expression for the given path.

void SOP_LightLink::getExprOps ( UT_Array< SetOp > &  ops)

Find out which operations will set the proper light expressions.

bool SOP_LightLink::getMatchingExpr ( UT_TagManager tags,
const std::string prepend,
UT_Set< std::string > &  selection,
const UT_TagList t 
) const

Match all node expressions against the given tags. The matching nodes will have their path's added to the selection. Each path will be prefixed with the prepend text.

bool SOP_LightLink::getMaterial ( const char *  path,
std::string expr 
) const

Get the material for the given path.

void SOP_LightLink::getMaterialOps ( UT_Array< SetOp > &  ops)

Find out which operations will set the appropriate materials.

void SOP_LightLink::getVisibleOps ( UT_Array< VisibleOp > &  ops)

Find out which operations will set the proper visibility operations.

bool SOP_LightLink::rmTag ( UT_TagManager m,
const char *  path,
const UT_TagList t 
)

Remove a light tag from the entire subtree specified by the given path. This will convert a node's expression to a compiled form. Please call clearTagExpressions() when you're finshed editing the tree.

bool SOP_LightLink::setExpr ( const char *  path,
const std::string tag_expression 
)

Set the expression string for a given subtree.

bool SOP_LightLink::setMaterial ( const char *  path,
const std::string value 
)

Set the material for a given subtree. The node specified by the path (and all its children) will be set to use the specified material.

bool SOP_LightLink::setViewportLOD ( const char *  path,
GEO_ViewportLOD  lod 
)

Set the viewport LOD for a given subtree.

bool SOP_LightLink::setVisible ( const char *  path,
int  visible 
)

Set the visibility for a given subtree.

Member Data Documentation

std::string SOP_LightLink::theAsterisk
static

Definition at line 50 of file SOP_LightLink.h.


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