20 using namespace UT::Literal;
23 namespace SOP_FileEnums
81 myFile =
"default.bgeo"_sh;
82 raw_myFile =
"default.bgeo"_sh;
83 myObjpattern =
"*"_sh;
84 myGeodatapath =
""_sh;
89 myPackexpanded =
true;
107 if (myFilemode != src.myFilemode)
return false;
108 if (myFile != src.myFile)
return false;
109 if (raw_myFile != src.raw_myFile)
return false;
110 if (myObjpattern != src.myObjpattern)
return false;
111 if (myGeodatapath != src.myGeodatapath)
return false;
112 if (myMissingframe != src.myMissingframe)
return false;
113 if (myLoadtype != src.myLoadtype)
return false;
114 if (myPackedviewedit != src.myPackedviewedit)
return false;
115 if (myViewportlod != src.myViewportlod)
return false;
116 if (myPackexpanded != src.myPackexpanded)
return false;
117 if (myDelayload != src.myDelayload)
return false;
118 if (myMkpath != src.myMkpath)
return false;
119 if (myCachesize != src.myCachesize)
return false;
120 if (myPrefetch != src.myPrefetch)
return false;
121 if (myF != src.myF)
return false;
122 if (myIndex != src.myIndex)
return false;
123 if (myWrap != src.myWrap)
return false;
124 if (myRetry != src.myRetry)
return false;
144 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
145 graph->
evalOpParm(myFilemode, nodeidx,
"filemode", time, 0);
146 myFile =
"default.bgeo"_sh;
148 graph->
evalOpParm(myFile, nodeidx,
"file", time, 0);
149 raw_myFile =
"default.bgeo"_sh;
152 myObjpattern =
"*"_sh;
153 if (
true && ( (!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
154 graph->
evalOpParm(myObjpattern, nodeidx,
"objpattern", time, 0);
155 myGeodatapath =
""_sh;
156 if (
true && ( (!(((!getFile().matchRegex(
".*[.]sim"))))) ) )
157 graph->
evalOpParm(myGeodatapath, nodeidx,
"geodatapath", time, 0);
159 if (
true && ( (!(((
int64(getFilemode())!=1)&&((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
160 graph->
evalOpParm(myMissingframe, nodeidx,
"missingframe", time, 0);
162 if (
true && ( (!(((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
163 graph->
evalOpParm(myLoadtype, nodeidx,
"loadtype", time, 0);
164 myPackedviewedit = 0;
165 if (
true && ( (!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
166 graph->
evalOpParm(myPackedviewedit, nodeidx,
"packedviewedit", time, 0);
168 if (
true && ( (!(((
int64(getLoadtype())!=4)&&(
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
169 graph->
evalOpParm(myViewportlod, nodeidx,
"viewportlod", time, 0);
170 myPackexpanded =
true;
171 if (
true && ( (!(((
int64(getLoadtype())!=4))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
172 graph->
evalOpParm(myPackexpanded, nodeidx,
"packexpanded", time, 0);
174 if (
true && ( (!(((
int64(getLoadtype())!=0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
175 graph->
evalOpParm(myDelayload, nodeidx,
"delayload", time, 0);
177 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==0))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=2)))) ) )
178 graph->
evalOpParm(myMkpath, nodeidx,
"mkpath", time, 0);
180 if (
true && ( (!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0)))) ) )
181 graph->
evalOpParm(myCachesize, nodeidx,
"cachesize", time, 0);
183 if (
true && ( (!(((
int64(getFilemode())!=1))||((
int64(getLoadtype())!=0))||((
int64(getPackedviewedit())!=0))||((
int64(getCachesize())==0)))) ) )
184 graph->
evalOpParm(myPrefetch, nodeidx,
"prefetch", time, 0);
186 if (
true && ( (!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
187 graph->
evalOpParm(myF, nodeidx,
"f", time, 0);
189 if (
true && ( (!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
190 graph->
evalOpParm(myIndex, nodeidx,
"index", time, 0);
192 if (
true && ( (!(((
int64(getLoadtype())!=5))||((
int64(getFilemode())!=0)&&(
int64(getFilemode())!=1)))) ) )
193 graph->
evalOpParm(myWrap, nodeidx,
"wrap", time, 0);
196 graph->
evalOpParm(myRetry, nodeidx,
"retry", time, 0);
212 template <
typename T>
219 if (idx.
size() != instance.
size()+1)
224 coerceValue(value, myFilemode);
227 coerceValue(value, myFile);
230 coerceValue(value, myObjpattern);
233 coerceValue(value, myGeodatapath);
236 coerceValue(value, myMissingframe);
239 coerceValue(value, myLoadtype);
242 coerceValue(value, myPackedviewedit);
245 coerceValue(value, myViewportlod);
248 coerceValue(value, myPackexpanded);
251 coerceValue(value, myDelayload);
254 coerceValue(value, myMkpath);
257 coerceValue(value, myCachesize);
260 coerceValue(value, myPrefetch);
263 coerceValue(value, myF);
266 coerceValue(value, myIndex);
269 coerceValue(value, myWrap);
272 coerceValue(value, myRetry);
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 { doGetParmValue(idx, instance, value); }
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 { doGetParmValue(idx, instance, value); }
297 { doGetParmValue(idx, instance, value); }
299 { doGetParmValue(idx, instance, value); }
301 template <
typename T>
308 if (idx.
size() != instance.
size()+1)
313 coerceValue(myFilemode, value);
316 coerceValue(myFile, value);
319 coerceValue(myObjpattern, value);
322 coerceValue(myGeodatapath, value);
325 coerceValue(myMissingframe, value);
328 coerceValue(myLoadtype, value);
331 coerceValue(myPackedviewedit, value);
334 coerceValue(myViewportlod, value);
337 coerceValue(myPackexpanded, value);
340 coerceValue(myDelayload, value);
343 coerceValue(myMkpath, value);
346 coerceValue(myCachesize, value);
349 coerceValue(myPrefetch, value);
352 coerceValue(myF, value);
355 coerceValue(myIndex, value);
358 coerceValue(myWrap, value);
361 coerceValue(myRetry, value);
368 { doSetParmValue(idx, instance, value); }
370 { doSetParmValue(idx, instance, value); }
372 { doSetParmValue(idx, instance, value); }
374 { doSetParmValue(idx, instance, value); }
376 { doSetParmValue(idx, instance, value); }
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
384 { doSetParmValue(idx, instance, value); }
386 { doSetParmValue(idx, instance, value); }
388 { doSetParmValue(idx, instance, value); }
404 if (fieldnum.
size() < 1)
415 return "geodatapath";
417 return "missingframe";
421 return "packedviewedit";
423 return "viewportlod";
425 return "packexpanded";
449 if (fieldnum.
size() < 1)
450 return PARM_UNSUPPORTED;
489 return PARM_UNSUPPORTED;
525 loadData(is, rampdata);
543 int typelen = colon - data.
buffer();
557 {
int64 iv =
v; UTwrite(os, &iv); }
559 { UTwrite<fpreal64>(os, &
v); }
561 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
563 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
564 UTwrite<fpreal64>(os, &v.
z()); }
566 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
567 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
579 if (s) s->save(ostr);
581 saveData(os, result);
588 ostr << s->getDataTypeToken();
593 saveData(os, result);
597 void save(std::ostream &os)
const
601 saveData(os, myFilemode);
602 saveData(os, myFile);
603 saveData(os, raw_myFile);
604 saveData(os, myObjpattern);
605 saveData(os, myGeodatapath);
606 saveData(os, myMissingframe);
607 saveData(os, myLoadtype);
608 saveData(os, myPackedviewedit);
609 saveData(os, myViewportlod);
610 saveData(os, myPackexpanded);
611 saveData(os, myDelayload);
612 saveData(os, myMkpath);
613 saveData(os, myCachesize);
614 saveData(os, myPrefetch);
616 saveData(os, myIndex);
617 saveData(os, myWrap);
618 saveData(os, myRetry);
631 loadData(is, myFilemode);
632 loadData(is, myFile);
633 loadData(is, raw_myFile);
634 loadData(is, myObjpattern);
635 loadData(is, myGeodatapath);
636 loadData(is, myMissingframe);
637 loadData(is, myLoadtype);
638 loadData(is, myPackedviewedit);
639 loadData(is, myViewportlod);
640 loadData(is, myPackexpanded);
641 loadData(is, myDelayload);
642 loadData(is, myMkpath);
643 loadData(is, myCachesize);
644 loadData(is, myPrefetch);
646 loadData(is, myIndex);
647 loadData(is, myWrap);
648 loadData(is, myRetry);
658 if (!thissop)
return getFilemode();
660 OP_Utils::evalOpParm(result, thissop,
"filemode", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getFile();
670 OP_Utils::evalOpParm(result, thissop,
"file", cookparms.
getCookTime(), 0);
678 if (!thissop)
return raw_getFile();
680 OP_Utils::evalOpParmRaw(result, thissop,
"file", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getObjpattern();
690 OP_Utils::evalOpParm(result, thissop,
"objpattern", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getGeodatapath();
700 OP_Utils::evalOpParm(result, thissop,
"geodatapath", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getMissingframe();
710 OP_Utils::evalOpParm(result, thissop,
"missingframe", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getLoadtype();
720 OP_Utils::evalOpParm(result, thissop,
"loadtype", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getPackedviewedit();
730 OP_Utils::evalOpParm(result, thissop,
"packedviewedit", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getViewportlod();
740 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getPackexpanded();
750 OP_Utils::evalOpParm(result, thissop,
"packexpanded", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getDelayload();
760 OP_Utils::evalOpParm(result, thissop,
"delayload", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getMkpath();
770 OP_Utils::evalOpParm(result, thissop,
"mkpath", cookparms.
getCookTime(), 0);
778 if (!thissop)
return getCachesize();
780 OP_Utils::evalOpParm(result, thissop,
"cachesize", cookparms.
getCookTime(), 0);
788 if (!thissop)
return getPrefetch();
790 OP_Utils::evalOpParm(result, thissop,
"prefetch", cookparms.
getCookTime(), 0);
798 if (!thissop)
return getF();
800 OP_Utils::evalOpParm(result, thissop,
"f", cookparms.
getCookTime(), 0);
808 if (!thissop)
return getIndex();
810 OP_Utils::evalOpParm(result, thissop,
"index", cookparms.
getCookTime(), 0);
818 if (!thissop)
return getWrap();
820 OP_Utils::evalOpParm(result, thissop,
"wrap", cookparms.
getCookTime(), 0);
828 if (!thissop)
return getRetry();
830 OP_Utils::evalOpParm(result, thissop,
"retry", cookparms.
getCookTime(), 0);
840 int64 myMissingframe;
842 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)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
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
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opPrefetch(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
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
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
const SOP_GraphProxy * graph() 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)
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
~SOP_FileParms() 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)
void setFilemode(Filemode val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
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)
void copyFrom(const SOP_NodeParms *src) override
UT_StringHolder raw_opFile(const SOP_NodeVerb::CookParms &cookparms) const
void setLoadtype(Loadtype val)
Wrap opWrap(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & raw_getFile() const
virtual void evalOpParmRaw(UT_StringHolder &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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.
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
GLint GLenum GLsizei GLint GLsizei const void * data
bool operator!=(const SOP_FileParms &src) 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)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
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
DEP_MicroNode * depnode() const
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)
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble GLdouble GLdouble r
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
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
#define WRITE(z, n, data)
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
void loadFromOpSubclass(const LoadParms &loadparms) override
GLsizei const GLfloat * value
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)
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)