35 #ifndef IECOREHOUDINI_SCENECACHENODE_H
36 #define IECOREHOUDINI_SCENECACHENODE_H
38 #include "boost/logic/tribool.hpp"
40 #include "tbb/mutex.h"
42 #include "OP/OP_Operator.h"
43 #include "PRM/PRM_Name.h"
45 #include "IECore/LRUCache.h"
46 #include "IECore/SceneCache.h"
53 template<
typename BaseType>
58 SceneCacheNode( OP_Network *net,
const char *name, OP_Operator *op );
61 static PRM_Name pFile;
62 static PRM_Name pRoot;
63 static PRM_Name pSpace;
64 static PRM_Name pReload;
65 static PRM_Name pGeometryType;
66 static PRM_Name pAttributeFilter;
67 static PRM_Name pAttributeCopy;
68 static PRM_Name pTagFilter;
69 static PRM_Name pTagGroups;
70 static PRM_Name pShapeFilter;
71 static PRM_Name pFullPathName;
73 static PRM_Default rootDefault;
74 static PRM_Default spaceDefault;
75 static PRM_Default filterDefault;
76 static PRM_Default geometryTypeDefault;
78 static PRM_ChoiceList rootMenu;
79 static PRM_ChoiceList spaceList;
80 static PRM_ChoiceList geometryTypeList;
81 static PRM_ChoiceList attributeCopyMenu;
82 static PRM_ChoiceList tagFilterMenu;
83 static PRM_ChoiceList shapeFilterMenu;
85 static int sceneParmChangedCallback(
void *data,
int index,
float time,
const PRM_Template *tplate );
86 static int reloadButtonCallback(
void *data,
int index,
float time,
const PRM_Template *tplate );
87 static void buildRootMenu(
void *data, PRM_Name *menu,
int maxSize,
const PRM_SpareData *,
const PRM_Parm * );
88 static void buildTagFilterMenu(
void *data, PRM_Name *menu,
int maxSize,
const PRM_SpareData *,
const PRM_Parm * );
89 static void buildShapeFilterMenu(
void *data, PRM_Name *menu,
int maxSize,
const PRM_SpareData *,
const PRM_Parm * );
109 void setFile( std::string file );
110 std::string getPath()
const;
112 Space getSpace()
const;
113 void setSpace( Space space );
114 GeometryType getGeometryType()
const;
115 void setGeometryType( GeometryType type );
116 void getAttributeFilter( UT_String &filter )
const;
117 void getAttributeFilter( UT_StringMMPattern &filter )
const;
118 void setAttributeFilter(
const UT_String &filter );
119 void getAttributeCopy( UT_String &value )
const;
120 void setAttributeCopy(
const UT_String &value );
121 void getTagFilter( UT_String &filter )
const;
122 void getTagFilter( UT_StringMMPattern &filter )
const;
123 void setTagFilter(
const UT_String &filter );
124 bool getTagGroups()
const;
125 void setTagGroups(
bool tagGroups );
126 void getShapeFilter( UT_String &filter )
const;
127 void getShapeFilter( UT_StringMMPattern &filter )
const;
128 void setShapeFilter(
const UT_String &filter );
129 void getFullPathName( UT_String &name )
const;
130 void setFullPathName(
const UT_String &name );
131 void referenceParent(
const char *parmName );
135 IECore::ConstSceneInterfacePtr
scene()
const;
142 double time( OP_Context context )
const;
151 static IECore::ConstSceneInterfacePtr
scene(
const std::string &fileName,
const std::string &path );
154 Imath::M44d
worldTransform(
const std::string &fileName,
const std::string &path,
double time );
169 void createMenu( PRM_Name *menu,
const std::vector<std::string> &values );
171 static OP_TemplatePair *buildMainParameters();
172 static OP_TemplatePair *buildOptionParameters();
175 boost::tribool m_static;
182 #endif // IECOREHOUDINI_SCENECACHENODE_H
void objectNames(const IECore::SceneInterface *scene, std::vector< std::string > &objects)
get a depth first list of all object names
void descendantNames(const IECore::SceneInterface *scene, std::vector< std::string > &descendants)
get a breadth first list of all descendant paths
virtual void sceneChanged()
The IECoreHoudini namespace holds all the functionality of libIECoreHoudini.
Definition: CoreHoudini.h:51
double time(OP_Context context) const
Definition: MurmurHash.h:64
static std::string getFullScenePath(const IECore::SceneInterface *scene)
get the full path to a scene including the name
Definition: SceneCacheNode.h:54
Definition: SceneInterface.h:69
Imath::M44d worldTransform(const std::string &fileName, const std::string &path, double time)
Computes the worldTransform for the specified path.
IECore::ConstSceneInterfacePtr scene() const
void createMenu(PRM_Name *menu, const std::vector< std::string > &values)
utility method to build a UI menu from one of the previous lists
static bool tagged(const IECore::SceneInterface *scene, const UT_StringMMPattern &filter)
Determine if the given scene has any tag matching the filter.
bool ensureFile(std::string &file)
get the file and ensure it is a valid SCC
std::string getFile() const
convenience methods for the common parameters;