19 #ifndef __TIL_CopResolver__
20 #define __TIL_CopResolver__
33 #define TIL_DEFAULT_COLOR_PLANE "(Default Color)"
34 #define TIL_DEFAULT_ALPHA_PLANE "(Default Alpha)"
35 #define TIL_NO_PLANE "(None)"
77 myOldSeconds = getResolver()->getGlobalTime();
78 getResolver()->setGlobalTime(time);
85 getResolver()->setGlobalTime(myOldSeconds);
99 static bool enableThreadResolverCache(
bool enable);
102 static bool threadResolverCacheEnabled();
107 static exint threadResolverCacheWatermark();
114 static void clearResolverCache(
bool force_full_clear);
122 static TIL_Raster *getRaster(
const char *fullpath,
125 bool *specific_frame =
nullptr);
126 static fpreal getRasterTime(
int opid);
127 static size_t getRasterVersion(
int opid);
140 const char *fullpath,
143 bool *specific_frame =
nullptr);
147 static int getIdFrame(
const char *fullpath,
int &
id,
149 static void splitFile(
const char *fullpath,
156 static int getNodeId(
const char *net,
const char *node);
157 static void getNodeRes(
const char *net,
const char *node,
158 int &xres,
int &yres);
160 static int getNodeId(
const char *fullpath);
161 static void getNodeRes(
const char *fullpath,
162 int &xres,
int &yres);
164 static void getFileRes(
const char *file,
165 int &xres,
int &yres);
167 static int splitPath(
const char *cpath,
int &
id,
171 int &xres,
int &yres);
174 static void buildColorMenu(
const char *net,
178 static void buildAlphaMenu(
const char *net,
182 static bool canResolve(
const char *fullpath);
186 virtual int resolveId(
const char *fullpath) = 0;
188 virtual TIL_Raster *resolveRaster(
int id) = 0;
190 int xres=0,
int yres=0) = 0;
192 const char *
color,
int cindex,
193 const char *
alpha,
int aindex,
194 int xres=0,
int yres = 0,
206 virtual bool resolveIsPossible(
const char *fullpath) = 0;
209 virtual TIL_Raster *getFileRaster(
const char *file,
211 int xres = 0,
int yres = 0);
229 virtual TIL_Raster *getNodeRaster(
const char *fullpath,
230 const char *cmenu,
const char *amenu,
231 bool override_frame =
false,
235 int xres = 0,
int yres = 0);
237 virtual void getRes(
int id,
int &xres,
int &yres);
243 virtual bool resolveRasters(
int id,
250 virtual void buildPlaneMenu(
const char *net,
const char *node,
262 virtual int isOpBased();
264 virtual fpreal getTimeForRaster(
int id);
265 virtual size_t getVersionForRaster(
int id);
269 virtual void addAutoUnloadPrevention(
int id);
270 virtual void removeAutoUnloadPrevention(
int id);
276 int splitPath(
const char *fullpath,
280 virtual fpreal getGlobalTime();
289 : myRaster(
TIL_CopResolver::getRaster(filename, myOpId, 0, &mySpecificFrame))
310 bool isValid()
const {
return myRaster !=
nullptr; }
311 explicit operator bool()
const {
return isValid(); }
312 int opid()
const {
return myOpId; }
333 myRaster = ch.myRaster;
335 mySpecificFrame = ch.mySpecificFrame;
336 ch.myRaster =
nullptr;
341 bool mySpecificFrame =
false;
const TIL_Raster * operator->() const
GT_API const UT_StringHolder filename
autoEnableCache(bool enable)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
GT_API const UT_StringHolder time
const TIL_Raster * raster() const
static TIL_Raster * getRaster(const char *fullpath, int &opid, int udim_tile=0, bool *specific_frame=nullptr)
static TIL_CopResolver * getResolver()
bool resolve(const char *filename)
GLint GLint GLsizei GLint GLenum GLenum type
#define TILE_MAX_DATA_FORMAT
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static bool enableThreadResolverCache(bool enable)
GLint GLint GLsizei GLint GLenum format
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
HUSD_API const char * raster()
GLfloat GLfloat GLfloat alpha
GLuint const GLchar * name
Class to push/pop the enable state.
Class to push/pop the evaluate time.
LeafData & operator=(const LeafData &)=delete
autoEvaluateTime(fpreal time)
bool specificFrame() const
TIL_CopHandle(const char *filename)
virtual bool returnRaster(const TIL_Raster *raster)
TIL_CopHandle & operator=(TIL_CopHandle &&ch)
TIL_CopHandle(TIL_CopHandle &&ch)