HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_File.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_FileEnums
24 {
25  enum class Filemode
26  {
27  AUTO = 0,
28  READ,
29  WRITE,
30  NONE
31  };
32  enum class Missingframe
33  {
34  ERROR = 0,
35  EMPTY
36  };
37  enum class Loadtype
38  {
39  FULL = 0,
40  INFOBBOX,
41  INFO,
42  POINTS,
43  DELAYED,
44  PACKEDSEQ
45  };
46  enum class Packedviewedit
47  {
48  UNCHANGED = 0,
49  FULL,
50  POINTS,
51  BOX,
52  CENTROID,
53  HIDDEN
54  };
55  enum class Viewportlod
56  {
57  FULL = 0,
58  POINTS,
59  BOX,
60  CENTROID,
61  HIDDEN
62  };
63  enum class Wrap
64  {
65  CYCLE = 0,
66  CLAMP,
67  STRICK,
68  MIRROR
69  };
70 }
71 
72 
74 {
75 public:
76  static int version() { return 1; }
77 
79  {
80  myFilemode = 1;
81  myFile = "default.bgeo"_sh;
82  raw_myFile = "default.bgeo"_sh;
83  myObjpattern = "*"_sh;
84  myGeodatapath = ""_sh;
85  myMissingframe = 0;
86  myLoadtype = 0;
87  myPackedviewedit = 0;
88  myViewportlod = 2;
89  myPackexpanded = true;
90  myDelayload = false;
91  myMkpath = true;
92  myCachesize = 0;
93  myPrefetch = false;
94  myF = UT_Vector2I(1,24);
95  myIndex = 0;
96  myWrap = 0;
97  myRetry = 0;
98 
99  }
100 
101  explicit SOP_FileParms(const SOP_FileParms &) = default;
102 
103  ~SOP_FileParms() override {}
104 
105  bool operator==(const SOP_FileParms &src) const
106  {
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;
125 
126  return true;
127  }
128  bool operator!=(const SOP_FileParms &src) const
129  {
130  return !operator==(src);
131  }
138 
139 
140 
141  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
142  {
143  myFilemode = 1;
144  if (true && ( (!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
145  graph->evalOpParm(myFilemode, nodeidx, "filemode", time, 0);
146  myFile = "default.bgeo"_sh;
147  if (true)
148  graph->evalOpParm(myFile, nodeidx, "file", time, 0);
149  raw_myFile = "default.bgeo"_sh;
150  if (true)
151  graph->evalOpParmRaw(raw_myFile, nodeidx, "file", time, 0);
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);
158  myMissingframe = 0;
159  if (true && ( (!(((int64(getFilemode())!=1)&&((graph->getInput(nodeidx,0)>=0)==1)))) ) )
160  graph->evalOpParm(myMissingframe, nodeidx, "missingframe", time, 0);
161  myLoadtype = 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);
167  myViewportlod = 2;
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);
173  myDelayload = false;
174  if (true && ( (!(((int64(getLoadtype())!=0))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
175  graph->evalOpParm(myDelayload, nodeidx, "delayload", time, 0);
176  myMkpath = true;
177  if (true && ( (!((((graph->getInput(nodeidx,0)>=0)==0))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=2)))) ) )
178  graph->evalOpParm(myMkpath, nodeidx, "mkpath", time, 0);
179  myCachesize = 0;
180  if (true && ( (!(((int64(getFilemode())!=1))||((int64(getLoadtype())!=0))||((int64(getPackedviewedit())!=0)))) ) )
181  graph->evalOpParm(myCachesize, nodeidx, "cachesize", time, 0);
182  myPrefetch = false;
183  if (true && ( (!(((int64(getFilemode())!=1))||((int64(getLoadtype())!=0))||((int64(getPackedviewedit())!=0))||((int64(getCachesize())==0)))) ) )
184  graph->evalOpParm(myPrefetch, nodeidx, "prefetch", time, 0);
185  myF = UT_Vector2I(1,24);
186  if (true && ( (!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
187  graph->evalOpParm(myF, nodeidx, "f", time, 0);
188  myIndex = 0;
189  if (true && ( (!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
190  graph->evalOpParm(myIndex, nodeidx, "index", time, 0);
191  myWrap = 0;
192  if (true && ( (!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
193  graph->evalOpParm(myWrap, nodeidx, "wrap", time, 0);
194  myRetry = 0;
195  if (true)
196  graph->evalOpParm(myRetry, nodeidx, "retry", time, 0);
197 
198  }
199 
200 
201  void loadFromOpSubclass(const LoadParms &loadparms) override
202  {
203  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
204  }
205 
206 
207  void copyFrom(const SOP_NodeParms *src) override
208  {
209  *this = *((const SOP_FileParms *)src);
210  }
211 
212  template <typename T>
213  void
214  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
215  {
216  if (idx.size() < 1)
217  return;
218  UT_ASSERT(idx.size() == instance.size()+1);
219  if (idx.size() != instance.size()+1)
220  return;
221  switch (idx[0])
222  {
223  case 0:
224  coerceValue(value, myFilemode);
225  break;
226  case 1:
227  coerceValue(value, myFile);
228  break;
229  case 2:
230  coerceValue(value, myObjpattern);
231  break;
232  case 3:
233  coerceValue(value, myGeodatapath);
234  break;
235  case 4:
236  coerceValue(value, myMissingframe);
237  break;
238  case 5:
239  coerceValue(value, myLoadtype);
240  break;
241  case 6:
242  coerceValue(value, myPackedviewedit);
243  break;
244  case 7:
245  coerceValue(value, myViewportlod);
246  break;
247  case 8:
248  coerceValue(value, myPackexpanded);
249  break;
250  case 9:
251  coerceValue(value, myDelayload);
252  break;
253  case 10:
254  coerceValue(value, myMkpath);
255  break;
256  case 11:
257  coerceValue(value, myCachesize);
258  break;
259  case 12:
260  coerceValue(value, myPrefetch);
261  break;
262  case 13:
263  coerceValue(value, myF);
264  break;
265  case 14:
266  coerceValue(value, myIndex);
267  break;
268  case 15:
269  coerceValue(value, myWrap);
270  break;
271  case 16:
272  coerceValue(value, myRetry);
273  break;
274 
275  }
276  }
277 
278  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
299  { doGetParmValue(idx, instance, value); }
300 
301  template <typename T>
302  void
303  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
304  {
305  if (idx.size() < 1)
306  return;
307  UT_ASSERT(idx.size() == instance.size()+1);
308  if (idx.size() != instance.size()+1)
309  return;
310  switch (idx[0])
311  {
312  case 0:
313  coerceValue(myFilemode, value);
314  break;
315  case 1:
316  coerceValue(myFile, value);
317  break;
318  case 2:
319  coerceValue(myObjpattern, value);
320  break;
321  case 3:
322  coerceValue(myGeodatapath, value);
323  break;
324  case 4:
325  coerceValue(myMissingframe, value);
326  break;
327  case 5:
328  coerceValue(myLoadtype, value);
329  break;
330  case 6:
331  coerceValue(myPackedviewedit, value);
332  break;
333  case 7:
334  coerceValue(myViewportlod, value);
335  break;
336  case 8:
337  coerceValue(myPackexpanded, value);
338  break;
339  case 9:
340  coerceValue(myDelayload, value);
341  break;
342  case 10:
343  coerceValue(myMkpath, value);
344  break;
345  case 11:
346  coerceValue(myCachesize, value);
347  break;
348  case 12:
349  coerceValue(myPrefetch, value);
350  break;
351  case 13:
352  coerceValue(myF, value);
353  break;
354  case 14:
355  coerceValue(myIndex, value);
356  break;
357  case 15:
358  coerceValue(myWrap, value);
359  break;
360  case 16:
361  coerceValue(myRetry, value);
362  break;
363 
364  }
365  }
366 
367  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
388  { doSetParmValue(idx, instance, value); }
389 
390  exint getNestNumParms(TempIndex idx) const override
391  {
392  if (idx.size() == 0)
393  return 17;
394  switch (idx[0])
395  {
396 
397  }
398  // Invalid
399  return 0;
400  }
401 
402  const char *getNestParmName(TempIndex fieldnum) const override
403  {
404  if (fieldnum.size() < 1)
405  return 0;
406  switch (fieldnum[0])
407  {
408  case 0:
409  return "filemode";
410  case 1:
411  return "file";
412  case 2:
413  return "objpattern";
414  case 3:
415  return "geodatapath";
416  case 4:
417  return "missingframe";
418  case 5:
419  return "loadtype";
420  case 6:
421  return "packedviewedit";
422  case 7:
423  return "viewportlod";
424  case 8:
425  return "packexpanded";
426  case 9:
427  return "delayload";
428  case 10:
429  return "mkpath";
430  case 11:
431  return "cachesize";
432  case 12:
433  return "prefetch";
434  case 13:
435  return "f";
436  case 14:
437  return "index";
438  case 15:
439  return "wrap";
440  case 16:
441  return "retry";
442 
443  }
444  return 0;
445  }
446 
447  ParmType getNestParmType(TempIndex fieldnum) const override
448  {
449  if (fieldnum.size() < 1)
450  return PARM_UNSUPPORTED;
451  switch (fieldnum[0])
452  {
453  case 0:
454  return PARM_INTEGER;
455  case 1:
456  return PARM_STRING;
457  case 2:
458  return PARM_STRING;
459  case 3:
460  return PARM_STRING;
461  case 4:
462  return PARM_INTEGER;
463  case 5:
464  return PARM_INTEGER;
465  case 6:
466  return PARM_INTEGER;
467  case 7:
468  return PARM_INTEGER;
469  case 8:
470  return PARM_INTEGER;
471  case 9:
472  return PARM_INTEGER;
473  case 10:
474  return PARM_INTEGER;
475  case 11:
476  return PARM_INTEGER;
477  case 12:
478  return PARM_INTEGER;
479  case 13:
480  return PARM_VECTOR2;
481  case 14:
482  return PARM_FLOAT;
483  case 15:
484  return PARM_INTEGER;
485  case 16:
486  return PARM_INTEGER;
487 
488  }
489  return PARM_UNSUPPORTED;
490  }
491 
492  // Boiler plate to load individual types.
493  static void loadData(UT_IStream &is, int64 &v)
494  { is.bread(&v, 1); }
495  static void loadData(UT_IStream &is, bool &v)
496  { int64 iv; is.bread(&iv, 1); v = iv; }
497  static void loadData(UT_IStream &is, fpreal64 &v)
498  { is.bread<fpreal64>(&v, 1); }
499  static void loadData(UT_IStream &is, UT_Vector2D &v)
500  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector3D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
503  is.bread<fpreal64>(&v.z(), 1); }
504  static void loadData(UT_IStream &is, UT_Vector4D &v)
505  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
506  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
507  static void loadData(UT_IStream &is, UT_Matrix2D &v)
508  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
509  static void loadData(UT_IStream &is, UT_Matrix3D &v)
510  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
511  static void loadData(UT_IStream &is, UT_Matrix4D &v)
512  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
513  static void loadData(UT_IStream &is, UT_Vector2I &v)
514  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector3I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
517  is.bread<int64>(&v.z(), 1); }
518  static void loadData(UT_IStream &is, UT_Vector4I &v)
519  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
520  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
522  { is.bread(v); }
524  { UT_StringHolder rampdata;
525  loadData(is, rampdata);
526  if (rampdata.isstring())
527  {
528  v.reset(new UT_Ramp());
529  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
530  v->load(istr);
531  }
532  else v.reset();
533  }
536  loadData(is, data);
537  if (data.isstring())
538  {
539  // Find the data type.
540  const char *colon = UT_StringWrap(data).findChar(':');
541  if (colon)
542  {
543  int typelen = colon - data.buffer();
545  type.strncpy(data.buffer(), typelen);
546  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
547 
548  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
549  }
550  }
551  else v.reset();
552  }
553 
554  static void saveData(std::ostream &os, int64 v)
555  { UTwrite(os, &v); }
556  static void saveData(std::ostream &os, bool v)
557  { int64 iv = v; UTwrite(os, &iv); }
558  static void saveData(std::ostream &os, fpreal64 v)
559  { UTwrite<fpreal64>(os, &v); }
560  static void saveData(std::ostream &os, UT_Vector2D v)
561  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
562  static void saveData(std::ostream &os, UT_Vector3D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
564  UTwrite<fpreal64>(os, &v.z()); }
565  static void saveData(std::ostream &os, UT_Vector4D v)
566  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
567  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
568  static void saveData(std::ostream &os, UT_Matrix2D v)
570  static void saveData(std::ostream &os, UT_Matrix3D v)
572  static void saveData(std::ostream &os, UT_Matrix4D v)
574  static void saveData(std::ostream &os, UT_StringHolder s)
575  { UT_StringWrap(s).saveBinary(os); }
576  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
578  UT_OStringStream ostr;
579  if (s) s->save(ostr);
580  result = ostr.str();
581  saveData(os, result);
582  }
583  static void saveData(std::ostream &os, PRM_DataItemHandle s)
585  UT_OStringStream ostr;
586  if (s)
587  {
588  ostr << s->getDataTypeToken();
589  ostr << ":";
590  s->saveBinary(ostr);
591  }
592  result = ostr.str();
593  saveData(os, result);
594  }
595 
596 
597  void save(std::ostream &os) const
598  {
599  int32 v = version();
600  UTwrite(os, &v);
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);
615  saveData(os, myF);
616  saveData(os, myIndex);
617  saveData(os, myWrap);
618  saveData(os, myRetry);
619 
620  }
621 
622  bool load(UT_IStream &is)
623  {
624  int32 v;
625  is.bread(&v, 1);
626  if (version() != v)
627  {
628  // Fail incompatible versions
629  return false;
630  }
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);
645  loadData(is, myF);
646  loadData(is, myIndex);
647  loadData(is, myWrap);
648  loadData(is, myRetry);
649 
650  return true;
651  }
652 
653  Filemode getFilemode() const { return Filemode(myFilemode); }
654  void setFilemode(Filemode val) { myFilemode = int64(val); }
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getFilemode();
659  int64 result;
660  OP_Utils::evalOpParm(result, thissop, "filemode", cookparms.getCookTime(), 0);
661  return Filemode(result);
662  }
663  const UT_StringHolder & getFile() const { return myFile; }
664  void setFile(const UT_StringHolder & val) { myFile = val; }
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getFile();
670  OP_Utils::evalOpParm(result, thissop, "file", cookparms.getCookTime(), 0);
671  return result;
672  }
673  const UT_StringHolder & raw_getFile() const { return raw_myFile; }
674  void raw_setFile(const UT_StringHolder & val) { raw_myFile = val; }
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return raw_getFile();
680  OP_Utils::evalOpParmRaw(result, thissop, "file", cookparms.getCookTime(), 0);
681  return result;
682  }
683  const UT_StringHolder & getObjpattern() const { return myObjpattern; }
684  void setObjpattern(const UT_StringHolder & val) { myObjpattern = val; }
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getObjpattern();
690  OP_Utils::evalOpParm(result, thissop, "objpattern", cookparms.getCookTime(), 0);
691  return result;
692  }
693  const UT_StringHolder & getGeodatapath() const { return myGeodatapath; }
694  void setGeodatapath(const UT_StringHolder & val) { myGeodatapath = val; }
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getGeodatapath();
700  OP_Utils::evalOpParm(result, thissop, "geodatapath", cookparms.getCookTime(), 0);
701  return result;
702  }
703  Missingframe getMissingframe() const { return Missingframe(myMissingframe); }
704  void setMissingframe(Missingframe val) { myMissingframe = int64(val); }
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getMissingframe();
709  int64 result;
710  OP_Utils::evalOpParm(result, thissop, "missingframe", cookparms.getCookTime(), 0);
711  return Missingframe(result);
712  }
713  Loadtype getLoadtype() const { return Loadtype(myLoadtype); }
714  void setLoadtype(Loadtype val) { myLoadtype = int64(val); }
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getLoadtype();
719  int64 result;
720  OP_Utils::evalOpParm(result, thissop, "loadtype", cookparms.getCookTime(), 0);
721  return Loadtype(result);
722  }
723  Packedviewedit getPackedviewedit() const { return Packedviewedit(myPackedviewedit); }
724  void setPackedviewedit(Packedviewedit val) { myPackedviewedit = int64(val); }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getPackedviewedit();
729  int64 result;
730  OP_Utils::evalOpParm(result, thissop, "packedviewedit", cookparms.getCookTime(), 0);
731  return Packedviewedit(result);
732  }
733  Viewportlod getViewportlod() const { return Viewportlod(myViewportlod); }
734  void setViewportlod(Viewportlod val) { myViewportlod = int64(val); }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getViewportlod();
739  int64 result;
740  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
741  return Viewportlod(result);
742  }
743  bool getPackexpanded() const { return myPackexpanded; }
744  void setPackexpanded(bool val) { myPackexpanded = val; }
745  bool opPackexpanded(const SOP_NodeVerb::CookParms &cookparms) const
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getPackexpanded();
749  bool result;
750  OP_Utils::evalOpParm(result, thissop, "packexpanded", cookparms.getCookTime(), 0);
751  return result;
752  }
753  bool getDelayload() const { return myDelayload; }
754  void setDelayload(bool val) { myDelayload = val; }
755  bool opDelayload(const SOP_NodeVerb::CookParms &cookparms) const
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getDelayload();
759  bool result;
760  OP_Utils::evalOpParm(result, thissop, "delayload", cookparms.getCookTime(), 0);
761  return result;
762  }
763  bool getMkpath() const { return myMkpath; }
764  void setMkpath(bool val) { myMkpath = val; }
765  bool opMkpath(const SOP_NodeVerb::CookParms &cookparms) const
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getMkpath();
769  bool result;
770  OP_Utils::evalOpParm(result, thissop, "mkpath", cookparms.getCookTime(), 0);
771  return result;
772  }
773  int64 getCachesize() const { return myCachesize; }
774  void setCachesize(int64 val) { myCachesize = val; }
775  int64 opCachesize(const SOP_NodeVerb::CookParms &cookparms) const
776  {
777  SOP_Node *thissop = cookparms.getNode();
778  if (!thissop) return getCachesize();
779  int64 result;
780  OP_Utils::evalOpParm(result, thissop, "cachesize", cookparms.getCookTime(), 0);
781  return result;
782  }
783  bool getPrefetch() const { return myPrefetch; }
784  void setPrefetch(bool val) { myPrefetch = val; }
785  bool opPrefetch(const SOP_NodeVerb::CookParms &cookparms) const
786  {
787  SOP_Node *thissop = cookparms.getNode();
788  if (!thissop) return getPrefetch();
789  bool result;
790  OP_Utils::evalOpParm(result, thissop, "prefetch", cookparms.getCookTime(), 0);
791  return result;
792  }
793  UT_Vector2I getF() const { return myF; }
794  void setF(UT_Vector2I val) { myF = val; }
795  UT_Vector2I opF(const SOP_NodeVerb::CookParms &cookparms) const
796  {
797  SOP_Node *thissop = cookparms.getNode();
798  if (!thissop) return getF();
800  OP_Utils::evalOpParm(result, thissop, "f", cookparms.getCookTime(), 0);
801  return result;
802  }
803  fpreal64 getIndex() const { return myIndex; }
804  void setIndex(fpreal64 val) { myIndex = val; }
805  fpreal64 opIndex(const SOP_NodeVerb::CookParms &cookparms) const
806  {
807  SOP_Node *thissop = cookparms.getNode();
808  if (!thissop) return getIndex();
810  OP_Utils::evalOpParm(result, thissop, "index", cookparms.getCookTime(), 0);
811  return result;
812  }
813  Wrap getWrap() const { return Wrap(myWrap); }
814  void setWrap(Wrap val) { myWrap = int64(val); }
815  Wrap opWrap(const SOP_NodeVerb::CookParms &cookparms) const
816  {
817  SOP_Node *thissop = cookparms.getNode();
818  if (!thissop) return getWrap();
819  int64 result;
820  OP_Utils::evalOpParm(result, thissop, "wrap", cookparms.getCookTime(), 0);
821  return Wrap(result);
822  }
823  int64 getRetry() const { return myRetry; }
824  void setRetry(int64 val) { myRetry = val; }
825  int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
826  {
827  SOP_Node *thissop = cookparms.getNode();
828  if (!thissop) return getRetry();
829  int64 result;
830  OP_Utils::evalOpParm(result, thissop, "retry", cookparms.getCookTime(), 0);
831  return result;
832  }
833 
834 private:
835  int64 myFilemode;
836  UT_StringHolder myFile;
837  UT_StringHolder raw_myFile;
838  UT_StringHolder myObjpattern;
839  UT_StringHolder myGeodatapath;
840  int64 myMissingframe;
841  int64 myLoadtype;
842  int64 myPackedviewedit;
843  int64 myViewportlod;
844  bool myPackexpanded;
845  bool myDelayload;
846  bool myMkpath;
847  int64 myCachesize;
848  bool myPrefetch;
849  UT_Vector2I myF;
850  fpreal64 myIndex;
851  int64 myWrap;
852  int64 myRetry;
853 
854 };
GLdouble s
Definition: glew.h:1390
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 setRetry(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
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
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
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
int64 exint
Definition: SYS_Types.h:125
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
Definition: SOP_NodeVerb.h:113
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setMkpath(bool val)
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
const GLdouble * v
Definition: glew.h:1391
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)
bool getMkpath() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool getPrefetch() const
double fpreal64
Definition: SYS_Types.h:201
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)
Definition: Dimensions.h:137
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)
static int version()
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setDelayload(bool val)
Wrap getWrap() const
void copyFrom(const SOP_NodeParms *src) override
UT_StringHolder raw_opFile(const SOP_NodeVerb::CookParms &cookparms) const
exint length() 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.
Definition: UT_SharedPtr.h:28
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
Definition: glew.h:1379
bool operator!=(const SOP_FileParms &src) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const GLfloat * c
Definition: glew.h:16296
UT_StringHolder opFile(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
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.
Definition: UT_String.h:294
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
Definition: SOP_NodeVerb.h:121
Viewportlod opViewportlod(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
UT_Vector2I getF() const
void setGeodatapath(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
int64 getRetry() const
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setWrap(Wrap val)
int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
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)
#define SOP_API
Definition: SOP_API.h:10
Filemode getFilemode() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint64EXT * result
Definition: glew.h:14007
UT_Vector2I opF(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
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
Definition: glew.h:1849
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
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
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)
type
Definition: core.h:528
Loadtype opLoadtype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)