23 namespace SOP_FileEnums
82 myFile =
"default.bgeo"_UTsh;
83 raw_myFile =
"default.bgeo"_UTsh;
84 myObjpattern =
"*"_UTsh;
85 myGeodatapath =
""_UTsh;
90 myPackexpanded =
true;
111 if (myFilemode != src.myFilemode)
return false;
112 if (myFile != src.myFile)
return false;
113 if (raw_myFile != src.raw_myFile)
return false;
114 if (myObjpattern != src.myObjpattern)
return false;
115 if (myGeodatapath != src.myGeodatapath)
return false;
116 if (myMissingframe != src.myMissingframe)
return false;
117 if (myLoadtype != src.myLoadtype)
return false;
118 if (myPackedviewedit != src.myPackedviewedit)
return false;
119 if (myViewportlod != src.myViewportlod)
return false;
120 if (myPackexpanded != src.myPackexpanded)
return false;
121 if (myDelayload != src.myDelayload)
return false;
122 if (myMkpath != src.myMkpath)
return false;
123 if (myCachesize != src.myCachesize)
return false;
124 if (myPrefetch != src.myPrefetch)
return false;
125 if (myF != src.myF)
return false;
126 if (myIndex != src.myIndex)
return false;
127 if (myWrap != src.myWrap)
return false;
128 if (myRetry != src.myRetry)
return false;
148 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
149 graph->
evalOpParm(myFilemode, nodeidx,
"filemode", time, 0);
150 myFile =
"default.bgeo"_UTsh;
152 graph->
evalOpParm(myFile, nodeidx,
"file", time, 0);
153 raw_myFile =
"default.bgeo"_UTsh;
156 myObjpattern =
"*"_UTsh;
157 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
158 graph->
evalOpParm(myObjpattern, nodeidx,
"objpattern", time, 0);
159 myGeodatapath =
""_UTsh;
160 if (
true && ( (
true&&!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
161 graph->
evalOpParm(myGeodatapath, nodeidx,
"geodatapath", time, 0);
163 if (
true && ( (
true&&!(((
int64(getFilemode())!=1)&&((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
164 graph->
evalOpParm(myMissingframe, nodeidx,
"missingframe", time, 0);
166 if (
true && ( (
true&&!(((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
167 graph->
evalOpParm(myLoadtype, nodeidx,
"loadtype", time, 0);
168 myPackedviewedit = 0;
169 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
170 graph->
evalOpParm(myPackedviewedit, nodeidx,
"packedviewedit", time, 0);
172 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4)&&(
int64(getLoadtype())!=5)&&(
int64(getLoadtype())!=6))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
173 graph->
evalOpParm(myViewportlod, nodeidx,
"viewportlod", time, 0);
174 myPackexpanded =
true;
175 if (
true && ( (
true&&!(((
int64(getLoadtype())!=4))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
176 graph->
evalOpParm(myPackexpanded, nodeidx,
"packexpanded", time, 0);
178 if (
true && ( (
true&&!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
179 graph->
evalOpParm(myDelayload, nodeidx,
"delayload", time, 0);
181 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=2)))) ) )
182 graph->
evalOpParm(myMkpath, nodeidx,
"mkpath", time, 0);
184 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0)))) ) )
185 graph->
evalOpParm(myCachesize, nodeidx,
"cachesize", time, 0);
187 if (
true && ( (
true&&!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0))||((
int64(getCachesize())==0)))) ) )
188 graph->
evalOpParm(myPrefetch, nodeidx,
"prefetch", time, 0);
190 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
191 graph->
evalOpParm(myF, nodeidx,
"f", time, 0);
193 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
194 graph->
evalOpParm(myIndex, nodeidx,
"index", time, 0);
196 if (
true && ( (
true&&!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
197 graph->
evalOpParm(myWrap, nodeidx,
"wrap", time, 0);
200 graph->
evalOpParm(myRetry, nodeidx,
"retry", time, 0);
216 template <
typename T>
223 if (idx.
size() != instance.
size()+1)
292 { doGetParmValue(idx, instance, value); }
294 { doGetParmValue(idx, instance, value); }
296 { doGetParmValue(idx, instance, value); }
298 { doGetParmValue(idx, instance, value); }
300 { doGetParmValue(idx, instance, value); }
302 { doGetParmValue(idx, instance, value); }
304 { doGetParmValue(idx, instance, value); }
306 { doGetParmValue(idx, instance, value); }
308 { doGetParmValue(idx, instance, value); }
310 { doGetParmValue(idx, instance, value); }
312 { doGetParmValue(idx, instance, value); }
314 template <
typename T>
321 if (idx.
size() != instance.
size()+1)
381 { doSetParmValue(idx, instance, value); }
383 { doSetParmValue(idx, instance, value); }
385 { doSetParmValue(idx, instance, value); }
387 { doSetParmValue(idx, instance, value); }
389 { doSetParmValue(idx, instance, value); }
391 { doSetParmValue(idx, instance, value); }
393 { doSetParmValue(idx, instance, value); }
395 { doSetParmValue(idx, instance, value); }
397 { doSetParmValue(idx, instance, value); }
399 { doSetParmValue(idx, instance, value); }
401 { doSetParmValue(idx, instance, value); }
417 if (fieldnum.
size() < 1)
428 return "geodatapath";
430 return "missingframe";
434 return "packedviewedit";
436 return "viewportlod";
438 return "packexpanded";
462 if (fieldnum.
size() < 1)
463 return PARM_UNSUPPORTED;
521 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
523 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
525 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
538 loadData(is, rampdata);
556 int typelen = colon - data.
buffer();
570 {
int64 iv =
v; UTwrite(os, &iv); }
572 { UTwrite<fpreal64>(os, &
v); }
574 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
576 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
577 UTwrite<fpreal64>(os, &v.
z()); }
579 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
580 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
592 if (s) s->save(ostr);
594 saveData(os, result);
601 ostr << s->getDataTypeToken();
606 saveData(os, result);
610 void save(std::ostream &os)
const
614 saveData(os, myFilemode);
615 saveData(os, myFile);
616 saveData(os, raw_myFile);
617 saveData(os, myObjpattern);
618 saveData(os, myGeodatapath);
619 saveData(os, myMissingframe);
620 saveData(os, myLoadtype);
621 saveData(os, myPackedviewedit);
622 saveData(os, myViewportlod);
623 saveData(os, myPackexpanded);
624 saveData(os, myDelayload);
625 saveData(os, myMkpath);
626 saveData(os, myCachesize);
627 saveData(os, myPrefetch);
629 saveData(os, myIndex);
630 saveData(os, myWrap);
631 saveData(os, myRetry);
644 loadData(is, myFilemode);
645 loadData(is, myFile);
646 loadData(is, raw_myFile);
647 loadData(is, myObjpattern);
648 loadData(is, myGeodatapath);
649 loadData(is, myMissingframe);
650 loadData(is, myLoadtype);
651 loadData(is, myPackedviewedit);
652 loadData(is, myViewportlod);
653 loadData(is, myPackexpanded);
654 loadData(is, myDelayload);
655 loadData(is, myMkpath);
656 loadData(is, myCachesize);
657 loadData(is, myPrefetch);
659 loadData(is, myIndex);
660 loadData(is, myWrap);
661 loadData(is, myRetry);
671 if (!thissop)
return getFilemode();
673 OP_Utils::evalOpParm(result, thissop,
"filemode", cookparms.
getCookTime(), 0);
681 if (!thissop)
return getFile();
683 OP_Utils::evalOpParm(result, thissop,
"file", cookparms.
getCookTime(), 0);
691 if (!thissop)
return raw_getFile();
693 OP_Utils::evalOpParmRaw(result, thissop,
"file", cookparms.
getCookTime(), 0);
701 if (!thissop)
return getObjpattern();
703 OP_Utils::evalOpParm(result, thissop,
"objpattern", cookparms.
getCookTime(), 0);
711 if (!thissop)
return getGeodatapath();
713 OP_Utils::evalOpParm(result, thissop,
"geodatapath", cookparms.
getCookTime(), 0);
721 if (!thissop)
return getMissingframe();
723 OP_Utils::evalOpParm(result, thissop,
"missingframe", cookparms.
getCookTime(), 0);
731 if (!thissop)
return getLoadtype();
733 OP_Utils::evalOpParm(result, thissop,
"loadtype", cookparms.
getCookTime(), 0);
741 if (!thissop)
return getPackedviewedit();
743 OP_Utils::evalOpParm(result, thissop,
"packedviewedit", cookparms.
getCookTime(), 0);
751 if (!thissop)
return getViewportlod();
753 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
761 if (!thissop)
return getPackexpanded();
763 OP_Utils::evalOpParm(result, thissop,
"packexpanded", cookparms.
getCookTime(), 0);
771 if (!thissop)
return getDelayload();
773 OP_Utils::evalOpParm(result, thissop,
"delayload", cookparms.
getCookTime(), 0);
781 if (!thissop)
return getMkpath();
783 OP_Utils::evalOpParm(result, thissop,
"mkpath", cookparms.
getCookTime(), 0);
791 if (!thissop)
return getCachesize();
793 OP_Utils::evalOpParm(result, thissop,
"cachesize", cookparms.
getCookTime(), 0);
801 if (!thissop)
return getPrefetch();
803 OP_Utils::evalOpParm(result, thissop,
"prefetch", cookparms.
getCookTime(), 0);
811 if (!thissop)
return getF();
813 OP_Utils::evalOpParm(result, thissop,
"f", cookparms.
getCookTime(), 0);
821 if (!thissop)
return getIndex();
823 OP_Utils::evalOpParm(result, thissop,
"index", cookparms.
getCookTime(), 0);
831 if (!thissop)
return getWrap();
833 OP_Utils::evalOpParm(result, thissop,
"wrap", cookparms.
getCookTime(), 0);
841 if (!thissop)
return getRetry();
843 OP_Utils::evalOpParm(result, thissop,
"retry", cookparms.
getCookTime(), 0);
853 int64 myMissingframe;
855 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
T clampMaxValue(fpreal maxvalue, const T &src) const
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
T clampMinValue(fpreal minvalue, const T &src) const
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)
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
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
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)
OP_NodeParms & operator=(const OP_NodeParms &)=default
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)