23 namespace SOP_FileEnums
36 using namespace UT::Literal;
55 using namespace UT::Literal;
77 using namespace UT::Literal;
103 using namespace UT::Literal;
104 switch (enum_value) {
127 using namespace UT::Literal;
128 switch (enum_value) {
149 using namespace UT::Literal;
150 switch (enum_value) {
170 myFile =
"default.bgeo"_UTsh;
171 raw_myFile =
"default.bgeo"_UTsh;
172 myObjpattern =
"*"_UTsh;
173 myGeodatapath =
""_UTsh;
176 myPackedviewedit = 0;
178 myPackexpanded =
true;
199 if (myFilemode != src.myFilemode)
return false;
200 if (myFile != src.myFile)
return false;
201 if (raw_myFile != src.raw_myFile)
return false;
202 if (myObjpattern != src.myObjpattern)
return false;
203 if (myGeodatapath != src.myGeodatapath)
return false;
204 if (myMissingframe != src.myMissingframe)
return false;
205 if (myLoadtype != src.myLoadtype)
return false;
206 if (myPackedviewedit != src.myPackedviewedit)
return false;
207 if (myViewportlod != src.myViewportlod)
return false;
208 if (myPackexpanded != src.myPackexpanded)
return false;
209 if (myDelayload != src.myDelayload)
return false;
210 if (myMkpath != src.myMkpath)
return false;
211 if (myCachesize != src.myCachesize)
return false;
212 if (myPrefetch != src.myPrefetch)
return false;
213 if (myF != src.myF)
return false;
214 if (myIndex != src.myIndex)
return false;
215 if (myWrap != src.myWrap)
return false;
216 if (myRetry != src.myRetry)
return false;
236 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
237 graph->
evalOpParm(myFilemode, nodeidx,
"filemode", time, 0);
238 myFile =
"default.bgeo"_UTsh;
240 graph->
evalOpParm(myFile, nodeidx,
"file", time, 0);
241 raw_myFile =
"default.bgeo"_UTsh;
244 myObjpattern =
"*"_UTsh;
245 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
246 graph->
evalOpParm(myObjpattern, nodeidx,
"objpattern", time, 0);
247 myGeodatapath =
""_UTsh;
248 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
249 graph->
evalOpParm(myGeodatapath, nodeidx,
"geodatapath", time, 0);
251 if (
true && ( (
true&&!(((
int64(getFilemode())!=1)&&((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
252 graph->
evalOpParm(myMissingframe, nodeidx,
"missingframe", time, 0);
254 if (
true && ( (
true&&!(((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
255 graph->
evalOpParm(myLoadtype, nodeidx,
"loadtype", time, 0);
256 myPackedviewedit = 0;
257 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
258 graph->
evalOpParm(myPackedviewedit, nodeidx,
"packedviewedit", time, 0);
260 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4)&&(
int64(getLoadtype())!=5)&&(
int64(getLoadtype())!=6))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
261 graph->
evalOpParm(myViewportlod, nodeidx,
"viewportlod", time, 0);
262 myPackexpanded =
true;
263 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
264 graph->
evalOpParm(myPackexpanded, nodeidx,
"packexpanded", time, 0);
266 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
267 graph->
evalOpParm(myDelayload, nodeidx,
"delayload", time, 0);
269 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=2)))) ) )
270 graph->
evalOpParm(myMkpath, nodeidx,
"mkpath", time, 0);
272 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0)))) ) )
273 graph->
evalOpParm(myCachesize, nodeidx,
"cachesize", time, 0);
275 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0))||((
int64(getCachesize())==0)))) ) )
276 graph->
evalOpParm(myPrefetch, nodeidx,
"prefetch", time, 0);
278 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
279 graph->
evalOpParm(myF, nodeidx,
"f", time, 0);
281 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
282 graph->
evalOpParm(myIndex, nodeidx,
"index", time, 0);
284 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
285 graph->
evalOpParm(myWrap, nodeidx,
"wrap", time, 0);
288 graph->
evalOpParm(myRetry, nodeidx,
"retry", time, 0);
304 template <
typename T>
311 if (idx.
size() != instance.
size()+1)
316 coerceValue(value, myFilemode);
319 coerceValue(value, myFile);
322 coerceValue(value, myObjpattern);
325 coerceValue(value, myGeodatapath);
328 coerceValue(value, myMissingframe);
331 coerceValue(value, myLoadtype);
334 coerceValue(value, myPackedviewedit);
337 coerceValue(value, myViewportlod);
340 coerceValue(value, myPackexpanded);
343 coerceValue(value, myDelayload);
346 coerceValue(value, myMkpath);
349 coerceValue(value, myCachesize);
352 coerceValue(value, myPrefetch);
355 coerceValue(value, myF);
358 coerceValue(value, myIndex);
361 coerceValue(value, myWrap);
364 coerceValue(value, myRetry);
380 { doGetParmValue(idx, instance, value); }
382 { doGetParmValue(idx, instance, value); }
384 { doGetParmValue(idx, instance, value); }
386 { doGetParmValue(idx, instance, value); }
388 { doGetParmValue(idx, instance, value); }
390 { doGetParmValue(idx, instance, value); }
392 { doGetParmValue(idx, instance, value); }
394 { doGetParmValue(idx, instance, value); }
396 { doGetParmValue(idx, instance, value); }
398 { doGetParmValue(idx, instance, value); }
400 { doGetParmValue(idx, instance, value); }
402 template <
typename T>
409 if (idx.
size() != instance.
size()+1)
414 coerceValue(myFilemode, clampMinValue(0, clampMaxValue(3, value ) ));
417 coerceValue(myFile, ( ( value ) ));
420 coerceValue(myObjpattern, ( ( value ) ));
423 coerceValue(myGeodatapath, ( ( value ) ));
426 coerceValue(myMissingframe, clampMinValue(0, clampMaxValue(1, value ) ));
429 coerceValue(myLoadtype, clampMinValue(0, clampMaxValue(6, value ) ));
432 coerceValue(myPackedviewedit, clampMinValue(0, clampMaxValue(5, value ) ));
435 coerceValue(myViewportlod, clampMinValue(0, clampMaxValue(4, value ) ));
438 coerceValue(myPackexpanded, ( ( value ) ));
441 coerceValue(myDelayload, ( ( value ) ));
444 coerceValue(myMkpath, ( ( value ) ));
447 coerceValue(myCachesize, clampMinValue(0, ( value ) ));
450 coerceValue(myPrefetch, ( ( value ) ));
453 coerceValue(myF, ( ( value ) ));
456 coerceValue(myIndex, ( ( value ) ));
459 coerceValue(myWrap, clampMinValue(0, clampMaxValue(3, value ) ));
462 coerceValue(myRetry, clampMinValue(0, ( value ) ));
469 { doSetParmValue(idx, instance, value); }
471 { doSetParmValue(idx, instance, value); }
473 { doSetParmValue(idx, instance, value); }
475 { doSetParmValue(idx, instance, value); }
477 { doSetParmValue(idx, instance, value); }
479 { doSetParmValue(idx, instance, value); }
481 { doSetParmValue(idx, instance, value); }
483 { doSetParmValue(idx, instance, value); }
485 { doSetParmValue(idx, instance, value); }
487 { doSetParmValue(idx, instance, value); }
489 { doSetParmValue(idx, instance, value); }
505 if (fieldnum.
size() < 1)
516 return "geodatapath";
518 return "missingframe";
522 return "packedviewedit";
524 return "viewportlod";
526 return "packexpanded";
550 if (fieldnum.
size() < 1)
551 return PARM_UNSUPPORTED;
590 return PARM_UNSUPPORTED;
626 loadData(is, rampdata);
644 int typelen = colon - data.
buffer();
658 {
int64 iv =
v; UTwrite(os, &iv); }
660 { UTwrite<fpreal64>(os, &
v); }
662 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
664 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
665 UTwrite<fpreal64>(os, &v.
z()); }
667 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
668 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
680 if (s) s->save(ostr);
682 saveData(os, result);
689 ostr << s->getDataTypeToken();
694 saveData(os, result);
698 void save(std::ostream &os)
const
702 saveData(os, myFilemode);
703 saveData(os, myFile);
704 saveData(os, raw_myFile);
705 saveData(os, myObjpattern);
706 saveData(os, myGeodatapath);
707 saveData(os, myMissingframe);
708 saveData(os, myLoadtype);
709 saveData(os, myPackedviewedit);
710 saveData(os, myViewportlod);
711 saveData(os, myPackexpanded);
712 saveData(os, myDelayload);
713 saveData(os, myMkpath);
714 saveData(os, myCachesize);
715 saveData(os, myPrefetch);
717 saveData(os, myIndex);
718 saveData(os, myWrap);
719 saveData(os, myRetry);
732 loadData(is, myFilemode);
733 loadData(is, myFile);
734 loadData(is, raw_myFile);
735 loadData(is, myObjpattern);
736 loadData(is, myGeodatapath);
737 loadData(is, myMissingframe);
738 loadData(is, myLoadtype);
739 loadData(is, myPackedviewedit);
740 loadData(is, myViewportlod);
741 loadData(is, myPackexpanded);
742 loadData(is, myDelayload);
743 loadData(is, myMkpath);
744 loadData(is, myCachesize);
745 loadData(is, myPrefetch);
747 loadData(is, myIndex);
748 loadData(is, myWrap);
749 loadData(is, myRetry);
759 if (!thissop)
return getFilemode();
761 OP_Utils::evalOpParm(result, thissop,
"filemode", cookparms.
getCookTime(), 0);
769 if (!thissop)
return getFile();
771 OP_Utils::evalOpParm(result, thissop,
"file", cookparms.
getCookTime(), 0);
779 if (!thissop)
return raw_getFile();
781 OP_Utils::evalOpParmRaw(result, thissop,
"file", cookparms.
getCookTime(), 0);
789 if (!thissop)
return getObjpattern();
791 OP_Utils::evalOpParm(result, thissop,
"objpattern", cookparms.
getCookTime(), 0);
799 if (!thissop)
return getGeodatapath();
801 OP_Utils::evalOpParm(result, thissop,
"geodatapath", cookparms.
getCookTime(), 0);
809 if (!thissop)
return getMissingframe();
811 OP_Utils::evalOpParm(result, thissop,
"missingframe", cookparms.
getCookTime(), 0);
819 if (!thissop)
return getLoadtype();
821 OP_Utils::evalOpParm(result, thissop,
"loadtype", cookparms.
getCookTime(), 0);
829 if (!thissop)
return getPackedviewedit();
831 OP_Utils::evalOpParm(result, thissop,
"packedviewedit", cookparms.
getCookTime(), 0);
839 if (!thissop)
return getViewportlod();
841 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
849 if (!thissop)
return getPackexpanded();
851 OP_Utils::evalOpParm(result, thissop,
"packexpanded", cookparms.
getCookTime(), 0);
859 if (!thissop)
return getDelayload();
861 OP_Utils::evalOpParm(result, thissop,
"delayload", cookparms.
getCookTime(), 0);
869 if (!thissop)
return getMkpath();
871 OP_Utils::evalOpParm(result, thissop,
"mkpath", cookparms.
getCookTime(), 0);
879 if (!thissop)
return getCachesize();
881 OP_Utils::evalOpParm(result, thissop,
"cachesize", cookparms.
getCookTime(), 0);
889 if (!thissop)
return getPrefetch();
891 OP_Utils::evalOpParm(result, thissop,
"prefetch", cookparms.
getCookTime(), 0);
899 if (!thissop)
return getF();
901 OP_Utils::evalOpParm(result, thissop,
"f", cookparms.
getCookTime(), 0);
909 if (!thissop)
return getIndex();
911 OP_Utils::evalOpParm(result, thissop,
"index", cookparms.
getCookTime(), 0);
919 if (!thissop)
return getWrap();
921 OP_Utils::evalOpParm(result, thissop,
"wrap", cookparms.
getCookTime(), 0);
929 if (!thissop)
return getRetry();
931 OP_Utils::evalOpParm(result, thissop,
"retry", cookparms.
getCookTime(), 0);
941 int64 myMissingframe;
943 int64 myPackedviewedit;
UT_Vector2T< int64 > UT_Vector2I
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_StringHolder opObjpattern(const SOP_NodeVerb::CookParms &cookparms) const
bool opDelayload(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SOP_Node * getNode() const
bool getDelayload() const
Packedviewedit getPackedviewedit() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setPackexpanded(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
int64 getCachesize() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opPrefetch(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Missingframe opMissingframe(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
virtual void evalOpParmRaw(UT_StringHolder &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
bool operator==(const SOP_FileParms &src) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setMissingframe(Missingframe val)
An output stream object that owns its own string buffer storage.
void setF(UT_Vector2I val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opGeodatapath(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
**But if you need a result
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setObjpattern(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint getNestNumParms(TempIndex idx) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool load(UT_IStream &is)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setFilemode(Filemode val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setViewportlod(Viewportlod val)
const UT_StringHolder & getFile() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDelayload(bool val)
UT_StringHolder raw_opFile(const SOP_NodeVerb::CookParms &cookparms) const
void setLoadtype(Loadtype val)
Wrap opWrap(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
const UT_StringHolder & raw_getFile() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator!=(const SOP_FileParms &src) const
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opFile(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opIndex(const SOP_NodeVerb::CookParms &cookparms) const
void setIndex(fpreal64 val)
int64 opCachesize(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool getPackexpanded() const
Loadtype getLoadtype() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getGeodatapath() const
void setPackedviewedit(Packedviewedit val)
static void saveData(std::ostream &os, UT_Vector2D v)
Packedviewedit opPackedviewedit(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getObjpattern() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_Vector4D v)
bool opPackexpanded(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
Viewportlod opViewportlod(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void setGeodatapath(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Viewportlod getViewportlod() const
void setFile(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
Filemode getFilemode() const
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector2I opF(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Missingframe getMissingframe() const
fpreal64 getIndex() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Filemode opFilemode(const SOP_NodeVerb::CookParms &cookparms) const
bool opMkpath(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE UT_StringHolder getToken(Filemode enum_value)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, bool &v)
void setPrefetch(bool val)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, int64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void raw_setFile(const UT_StringHolder &val)
void setCachesize(int64 val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
Loadtype opLoadtype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)