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;
239 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
240 graph->
evalOpParm(myFilemode, nodeidx,
"filemode", time, graph->
isDirect()?
nullptr:depnode);
241 myFile =
"default.bgeo"_UTsh;
244 raw_myFile =
"default.bgeo"_UTsh;
247 myObjpattern =
"*"_UTsh;
248 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
249 graph->
evalOpParm(myObjpattern, nodeidx,
"objpattern", time, graph->
isDirect()?
nullptr:depnode);
250 myGeodatapath =
""_UTsh;
251 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
252 graph->
evalOpParm(myGeodatapath, nodeidx,
"geodatapath", time, graph->
isDirect()?
nullptr:depnode);
254 if (
true && ( (
true&&!(((
int64(getFilemode())!=1)&&((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
255 graph->
evalOpParm(myMissingframe, nodeidx,
"missingframe", time, graph->
isDirect()?
nullptr:depnode);
257 if (
true && ( (
true&&!(((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
258 graph->
evalOpParm(myLoadtype, nodeidx,
"loadtype", time, graph->
isDirect()?
nullptr:depnode);
259 myPackedviewedit = 0;
260 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
261 graph->
evalOpParm(myPackedviewedit, nodeidx,
"packedviewedit", time, graph->
isDirect()?
nullptr:depnode);
263 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4)&&(
int64(getLoadtype())!=5)&&(
int64(getLoadtype())!=6))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
264 graph->
evalOpParm(myViewportlod, nodeidx,
"viewportlod", time, graph->
isDirect()?
nullptr:depnode);
265 myPackexpanded =
true;
266 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
267 graph->
evalOpParm(myPackexpanded, nodeidx,
"packexpanded", time, graph->
isDirect()?
nullptr:depnode);
269 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
270 graph->
evalOpParm(myDelayload, nodeidx,
"delayload", time, graph->
isDirect()?
nullptr:depnode);
272 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=2)))) ) )
273 graph->
evalOpParm(myMkpath, nodeidx,
"mkpath", time, graph->
isDirect()?
nullptr:depnode);
275 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0)))) ) )
276 graph->
evalOpParm(myCachesize, nodeidx,
"cachesize", time, graph->
isDirect()?
nullptr:depnode);
278 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0))||((
int64(getCachesize())==0)))) ) )
279 graph->
evalOpParm(myPrefetch, nodeidx,
"prefetch", time, graph->
isDirect()?
nullptr:depnode);
281 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
284 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
285 graph->
evalOpParm(myIndex, nodeidx,
"index", time, graph->
isDirect()?
nullptr:depnode);
287 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
291 graph->
evalOpParm(myRetry, nodeidx,
"retry", time, graph->
isDirect()?
nullptr:depnode);
307 template <
typename T>
314 if (idx.
size() != instance.
size()+1)
319 coerceValue(value, myFilemode);
322 coerceValue(value, myFile);
325 coerceValue(value, myObjpattern);
328 coerceValue(value, myGeodatapath);
331 coerceValue(value, myMissingframe);
334 coerceValue(value, myLoadtype);
337 coerceValue(value, myPackedviewedit);
340 coerceValue(value, myViewportlod);
343 coerceValue(value, myPackexpanded);
346 coerceValue(value, myDelayload);
349 coerceValue(value, myMkpath);
352 coerceValue(value, myCachesize);
355 coerceValue(value, myPrefetch);
358 coerceValue(value, myF);
361 coerceValue(value, myIndex);
364 coerceValue(value, myWrap);
367 coerceValue(value, myRetry);
383 { doGetParmValue(idx, instance, value); }
385 { doGetParmValue(idx, instance, value); }
387 { doGetParmValue(idx, instance, value); }
389 { doGetParmValue(idx, instance, value); }
391 { doGetParmValue(idx, instance, value); }
393 { doGetParmValue(idx, instance, value); }
395 { doGetParmValue(idx, instance, value); }
397 { doGetParmValue(idx, instance, value); }
399 { doGetParmValue(idx, instance, value); }
401 { doGetParmValue(idx, instance, value); }
403 { doGetParmValue(idx, instance, value); }
405 template <
typename T>
412 if (idx.
size() != instance.
size()+1)
417 coerceValue(myFilemode, clampMinValue(0, clampMaxValue(3, value ) ));
420 coerceValue(myFile, ( ( value ) ));
423 coerceValue(myObjpattern, ( ( value ) ));
426 coerceValue(myGeodatapath, ( ( value ) ));
429 coerceValue(myMissingframe, clampMinValue(0, clampMaxValue(1, value ) ));
432 coerceValue(myLoadtype, clampMinValue(0, clampMaxValue(6, value ) ));
435 coerceValue(myPackedviewedit, clampMinValue(0, clampMaxValue(5, value ) ));
438 coerceValue(myViewportlod, clampMinValue(0, clampMaxValue(4, value ) ));
441 coerceValue(myPackexpanded, ( ( value ) ));
444 coerceValue(myDelayload, ( ( value ) ));
447 coerceValue(myMkpath, ( ( value ) ));
450 coerceValue(myCachesize, clampMinValue(0, ( value ) ));
453 coerceValue(myPrefetch, ( ( value ) ));
456 coerceValue(myF, ( ( value ) ));
459 coerceValue(myIndex, ( ( value ) ));
462 coerceValue(myWrap, clampMinValue(0, clampMaxValue(3, value ) ));
465 coerceValue(myRetry, clampMinValue(0, ( value ) ));
472 { doSetParmValue(idx, instance, value); }
474 { doSetParmValue(idx, instance, value); }
476 { doSetParmValue(idx, instance, value); }
478 { doSetParmValue(idx, instance, value); }
480 { doSetParmValue(idx, instance, value); }
482 { doSetParmValue(idx, instance, value); }
484 { doSetParmValue(idx, instance, value); }
486 { doSetParmValue(idx, instance, value); }
488 { doSetParmValue(idx, instance, value); }
490 { doSetParmValue(idx, instance, value); }
492 { doSetParmValue(idx, instance, value); }
508 if (fieldnum.
size() < 1)
519 return "geodatapath";
521 return "missingframe";
525 return "packedviewedit";
527 return "viewportlod";
529 return "packexpanded";
553 if (fieldnum.
size() < 1)
554 return PARM_UNSUPPORTED;
593 return PARM_UNSUPPORTED;
629 loadData(is, rampdata);
647 int typelen = colon - data.
buffer();
661 {
int64 iv =
v; UTwrite(os, &iv); }
663 { UTwrite<fpreal64>(os, &
v); }
665 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
667 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
668 UTwrite<fpreal64>(os, &v.
z()); }
670 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
671 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
683 if (s) s->save(ostr);
685 saveData(os, result);
692 ostr << s->getDataTypeToken();
697 saveData(os, result);
701 void save(std::ostream &os)
const
705 saveData(os, myFilemode);
706 saveData(os, myFile);
707 saveData(os, raw_myFile);
708 saveData(os, myObjpattern);
709 saveData(os, myGeodatapath);
710 saveData(os, myMissingframe);
711 saveData(os, myLoadtype);
712 saveData(os, myPackedviewedit);
713 saveData(os, myViewportlod);
714 saveData(os, myPackexpanded);
715 saveData(os, myDelayload);
716 saveData(os, myMkpath);
717 saveData(os, myCachesize);
718 saveData(os, myPrefetch);
720 saveData(os, myIndex);
721 saveData(os, myWrap);
722 saveData(os, myRetry);
735 loadData(is, myFilemode);
736 loadData(is, myFile);
737 loadData(is, raw_myFile);
738 loadData(is, myObjpattern);
739 loadData(is, myGeodatapath);
740 loadData(is, myMissingframe);
741 loadData(is, myLoadtype);
742 loadData(is, myPackedviewedit);
743 loadData(is, myViewportlod);
744 loadData(is, myPackexpanded);
745 loadData(is, myDelayload);
746 loadData(is, myMkpath);
747 loadData(is, myCachesize);
748 loadData(is, myPrefetch);
750 loadData(is, myIndex);
751 loadData(is, myWrap);
752 loadData(is, myRetry);
762 if (!thissop)
return getFilemode();
764 OP_Utils::evalOpParm(result, thissop,
"filemode", cookparms.
getCookTime(), 0);
772 if (!thissop)
return getFile();
774 OP_Utils::evalOpParm(result, thissop,
"file", cookparms.
getCookTime(), 0);
782 if (!thissop)
return raw_getFile();
784 OP_Utils::evalOpParmRaw(result, thissop,
"file", cookparms.
getCookTime(), 0);
792 if (!thissop)
return getObjpattern();
794 OP_Utils::evalOpParm(result, thissop,
"objpattern", cookparms.
getCookTime(), 0);
802 if (!thissop)
return getGeodatapath();
804 OP_Utils::evalOpParm(result, thissop,
"geodatapath", cookparms.
getCookTime(), 0);
812 if (!thissop)
return getMissingframe();
814 OP_Utils::evalOpParm(result, thissop,
"missingframe", cookparms.
getCookTime(), 0);
822 if (!thissop)
return getLoadtype();
824 OP_Utils::evalOpParm(result, thissop,
"loadtype", cookparms.
getCookTime(), 0);
832 if (!thissop)
return getPackedviewedit();
834 OP_Utils::evalOpParm(result, thissop,
"packedviewedit", cookparms.
getCookTime(), 0);
842 if (!thissop)
return getViewportlod();
844 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
852 if (!thissop)
return getPackexpanded();
854 OP_Utils::evalOpParm(result, thissop,
"packexpanded", cookparms.
getCookTime(), 0);
862 if (!thissop)
return getDelayload();
864 OP_Utils::evalOpParm(result, thissop,
"delayload", cookparms.
getCookTime(), 0);
872 if (!thissop)
return getMkpath();
874 OP_Utils::evalOpParm(result, thissop,
"mkpath", cookparms.
getCookTime(), 0);
882 if (!thissop)
return getCachesize();
884 OP_Utils::evalOpParm(result, thissop,
"cachesize", cookparms.
getCookTime(), 0);
892 if (!thissop)
return getPrefetch();
894 OP_Utils::evalOpParm(result, thissop,
"prefetch", cookparms.
getCookTime(), 0);
902 if (!thissop)
return getF();
904 OP_Utils::evalOpParm(result, thissop,
"f", cookparms.
getCookTime(), 0);
912 if (!thissop)
return getIndex();
914 OP_Utils::evalOpParm(result, thissop,
"index", cookparms.
getCookTime(), 0);
922 if (!thissop)
return getWrap();
924 OP_Utils::evalOpParm(result, thissop,
"wrap", cookparms.
getCookTime(), 0);
932 if (!thissop)
return getRetry();
934 OP_Utils::evalOpParm(result, thissop,
"retry", cookparms.
getCookTime(), 0);
944 int64 myMissingframe;
946 int64 myPackedviewedit;
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
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
GLsizei const GLfloat * value
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)
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() 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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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)