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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
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  PACKEDGEO
46  };
47  enum class Packedviewedit
48  {
49  UNCHANGED = 0,
50  FULL,
51  POINTS,
52  BOX,
53  CENTROID,
54  HIDDEN
55  };
56  enum class Viewportlod
57  {
58  FULL = 0,
59  POINTS,
60  BOX,
61  CENTROID,
62  HIDDEN
63  };
64  enum class Wrap
65  {
66  CYCLE = 0,
67  CLAMP,
68  STRICK,
69  MIRROR
70  };
71 }
72 
73 
75 {
76 public:
77  static int version() { return 1; }
78 
80  {
81  myFilemode = 1;
82  myFile = "default.bgeo"_UTsh;
83  raw_myFile = "default.bgeo"_UTsh;
84  myObjpattern = "*"_UTsh;
85  myGeodatapath = ""_UTsh;
86  myMissingframe = 0;
87  myLoadtype = 0;
88  myPackedviewedit = 0;
89  myViewportlod = 2;
90  myPackexpanded = true;
91  myDelayload = false;
92  myMkpath = true;
93  myCachesize = 0;
94  myPrefetch = false;
95  myF = UT_Vector2I(1,24);
96  myIndex = 0;
97  myWrap = 0;
98  myRetry = 0;
99 
100  }
101 
102  explicit SOP_FileParms(const SOP_FileParms &) = default;
103  SOP_FileParms &operator=(const SOP_FileParms &) = default;
104  SOP_FileParms(SOP_FileParms &&) noexcept = default;
105  SOP_FileParms &operator=(SOP_FileParms &&) noexcept = default;
106 
107  ~SOP_FileParms() override {}
108 
109  bool operator==(const SOP_FileParms &src) const
110  {
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;
129 
130  return true;
131  }
132  bool operator!=(const SOP_FileParms &src) const
133  {
134  return !operator==(src);
135  }
142 
143 
144 
145  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
146  {
147  myFilemode = 1;
148  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
149  graph->evalOpParm(myFilemode, nodeidx, "filemode", time, 0);
150  myFile = "default.bgeo"_UTsh;
151  if (true)
152  graph->evalOpParm(myFile, nodeidx, "file", time, 0);
153  raw_myFile = "default.bgeo"_UTsh;
154  if (true)
155  graph->evalOpParmRaw(raw_myFile, nodeidx, "file", time, 0);
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);
162  myMissingframe = 0;
163  if (true && ( (true&&!(((int64(getFilemode())!=1)&&((graph->getInput(nodeidx,0)>=0)==1)))) ) )
164  graph->evalOpParm(myMissingframe, nodeidx, "missingframe", time, 0);
165  myLoadtype = 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);
171  myViewportlod = 2;
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);
177  myDelayload = false;
178  if (true && ( (true&&!(((int64(getLoadtype())!=0))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
179  graph->evalOpParm(myDelayload, nodeidx, "delayload", time, 0);
180  myMkpath = true;
181  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=2)))) ) )
182  graph->evalOpParm(myMkpath, nodeidx, "mkpath", time, 0);
183  myCachesize = 0;
184  if (true && ( (true&&!(((int64(getFilemode())!=1))||((int64(getLoadtype())!=0))||((int64(getPackedviewedit())!=0)))) ) )
185  graph->evalOpParm(myCachesize, nodeidx, "cachesize", time, 0);
186  myPrefetch = false;
187  if (true && ( (true&&!(((int64(getFilemode())!=1))||((int64(getLoadtype())!=0))||((int64(getPackedviewedit())!=0))||((int64(getCachesize())==0)))) ) )
188  graph->evalOpParm(myPrefetch, nodeidx, "prefetch", time, 0);
189  myF = UT_Vector2I(1,24);
190  if (true && ( (true&&!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
191  graph->evalOpParm(myF, nodeidx, "f", time, 0);
192  myIndex = 0;
193  if (true && ( (true&&!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
194  graph->evalOpParm(myIndex, nodeidx, "index", time, 0);
195  myWrap = 0;
196  if (true && ( (true&&!(((int64(getLoadtype())!=5))||((int64(getFilemode())!=0)&&(int64(getFilemode())!=1)))) ) )
197  graph->evalOpParm(myWrap, nodeidx, "wrap", time, 0);
198  myRetry = 0;
199  if (true)
200  graph->evalOpParm(myRetry, nodeidx, "retry", time, 0);
201 
202  }
203 
204 
205  void loadFromOpSubclass(const LoadParms &loadparms) override
206  {
207  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
208  }
209 
210 
211  void copyFrom(const OP_NodeParms *src) override
212  {
213  *this = *((const SOP_FileParms *)src);
214  }
215 
216  template <typename T>
217  void
218  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
219  {
220  if (idx.size() < 1)
221  return;
222  UT_ASSERT(idx.size() == instance.size()+1);
223  if (idx.size() != instance.size()+1)
224  return;
225  switch (idx[0])
226  {
227  case 0:
228  coerceValue(value, myFilemode);
229  break;
230  case 1:
231  coerceValue(value, myFile);
232  break;
233  case 2:
234  coerceValue(value, myObjpattern);
235  break;
236  case 3:
237  coerceValue(value, myGeodatapath);
238  break;
239  case 4:
240  coerceValue(value, myMissingframe);
241  break;
242  case 5:
243  coerceValue(value, myLoadtype);
244  break;
245  case 6:
246  coerceValue(value, myPackedviewedit);
247  break;
248  case 7:
249  coerceValue(value, myViewportlod);
250  break;
251  case 8:
252  coerceValue(value, myPackexpanded);
253  break;
254  case 9:
255  coerceValue(value, myDelayload);
256  break;
257  case 10:
258  coerceValue(value, myMkpath);
259  break;
260  case 11:
261  coerceValue(value, myCachesize);
262  break;
263  case 12:
264  coerceValue(value, myPrefetch);
265  break;
266  case 13:
267  coerceValue(value, myF);
268  break;
269  case 14:
270  coerceValue(value, myIndex);
271  break;
272  case 15:
273  coerceValue(value, myWrap);
274  break;
275  case 16:
276  coerceValue(value, myRetry);
277  break;
278 
279  }
280  }
281 
282  bool isParmColorRamp(exint idx) const override
283  {
284  switch (idx)
285  {
286 
287  }
288  return false;
289  }
290 
291  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
304  { doGetParmValue(idx, instance, value); }
305  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
306  { doGetParmValue(idx, instance, value); }
307  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
308  { doGetParmValue(idx, instance, value); }
309  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
310  { doGetParmValue(idx, instance, value); }
311  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
312  { doGetParmValue(idx, instance, value); }
313 
314  template <typename T>
315  void
316  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
317  {
318  if (idx.size() < 1)
319  return;
320  UT_ASSERT(idx.size() == instance.size()+1);
321  if (idx.size() != instance.size()+1)
322  return;
323  switch (idx[0])
324  {
325  case 0:
326  coerceValue(myFilemode, clampMinValue(0, clampMaxValue(3, value ) ));
327  break;
328  case 1:
329  coerceValue(myFile, ( ( value ) ));
330  break;
331  case 2:
332  coerceValue(myObjpattern, ( ( value ) ));
333  break;
334  case 3:
335  coerceValue(myGeodatapath, ( ( value ) ));
336  break;
337  case 4:
338  coerceValue(myMissingframe, clampMinValue(0, clampMaxValue(1, value ) ));
339  break;
340  case 5:
341  coerceValue(myLoadtype, clampMinValue(0, clampMaxValue(6, value ) ));
342  break;
343  case 6:
344  coerceValue(myPackedviewedit, clampMinValue(0, clampMaxValue(5, value ) ));
345  break;
346  case 7:
347  coerceValue(myViewportlod, clampMinValue(0, clampMaxValue(4, value ) ));
348  break;
349  case 8:
350  coerceValue(myPackexpanded, ( ( value ) ));
351  break;
352  case 9:
353  coerceValue(myDelayload, ( ( value ) ));
354  break;
355  case 10:
356  coerceValue(myMkpath, ( ( value ) ));
357  break;
358  case 11:
359  coerceValue(myCachesize, clampMinValue(0, ( value ) ));
360  break;
361  case 12:
362  coerceValue(myPrefetch, ( ( value ) ));
363  break;
364  case 13:
365  coerceValue(myF, ( ( value ) ));
366  break;
367  case 14:
368  coerceValue(myIndex, ( ( value ) ));
369  break;
370  case 15:
371  coerceValue(myWrap, clampMinValue(0, clampMaxValue(3, value ) ));
372  break;
373  case 16:
374  coerceValue(myRetry, clampMinValue(0, ( value ) ));
375  break;
376 
377  }
378  }
379 
380  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
389  { doSetParmValue(idx, instance, value); }
390  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
391  { doSetParmValue(idx, instance, value); }
392  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
393  { doSetParmValue(idx, instance, value); }
394  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
395  { doSetParmValue(idx, instance, value); }
396  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
397  { doSetParmValue(idx, instance, value); }
398  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
399  { doSetParmValue(idx, instance, value); }
400  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
401  { doSetParmValue(idx, instance, value); }
402 
403  exint getNestNumParms(TempIndex idx) const override
404  {
405  if (idx.size() == 0)
406  return 17;
407  switch (idx[0])
408  {
409 
410  }
411  // Invalid
412  return 0;
413  }
414 
415  const char *getNestParmName(TempIndex fieldnum) const override
416  {
417  if (fieldnum.size() < 1)
418  return 0;
419  switch (fieldnum[0])
420  {
421  case 0:
422  return "filemode";
423  case 1:
424  return "file";
425  case 2:
426  return "objpattern";
427  case 3:
428  return "geodatapath";
429  case 4:
430  return "missingframe";
431  case 5:
432  return "loadtype";
433  case 6:
434  return "packedviewedit";
435  case 7:
436  return "viewportlod";
437  case 8:
438  return "packexpanded";
439  case 9:
440  return "delayload";
441  case 10:
442  return "mkpath";
443  case 11:
444  return "cachesize";
445  case 12:
446  return "prefetch";
447  case 13:
448  return "f";
449  case 14:
450  return "index";
451  case 15:
452  return "wrap";
453  case 16:
454  return "retry";
455 
456  }
457  return 0;
458  }
459 
460  ParmType getNestParmType(TempIndex fieldnum) const override
461  {
462  if (fieldnum.size() < 1)
463  return PARM_UNSUPPORTED;
464  switch (fieldnum[0])
465  {
466  case 0:
467  return PARM_INTEGER;
468  case 1:
469  return PARM_STRING;
470  case 2:
471  return PARM_STRING;
472  case 3:
473  return PARM_STRING;
474  case 4:
475  return PARM_INTEGER;
476  case 5:
477  return PARM_INTEGER;
478  case 6:
479  return PARM_INTEGER;
480  case 7:
481  return PARM_INTEGER;
482  case 8:
483  return PARM_INTEGER;
484  case 9:
485  return PARM_INTEGER;
486  case 10:
487  return PARM_INTEGER;
488  case 11:
489  return PARM_INTEGER;
490  case 12:
491  return PARM_INTEGER;
492  case 13:
493  return PARM_VECTOR2;
494  case 14:
495  return PARM_FLOAT;
496  case 15:
497  return PARM_INTEGER;
498  case 16:
499  return PARM_INTEGER;
500 
501  }
502  return PARM_UNSUPPORTED;
503  }
504 
505  // Boiler plate to load individual types.
506  static void loadData(UT_IStream &is, int64 &v)
507  { is.bread(&v, 1); }
508  static void loadData(UT_IStream &is, bool &v)
509  { int64 iv; is.bread(&iv, 1); v = iv; }
510  static void loadData(UT_IStream &is, fpreal64 &v)
511  { is.bread<fpreal64>(&v, 1); }
512  static void loadData(UT_IStream &is, UT_Vector2D &v)
513  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
514  static void loadData(UT_IStream &is, UT_Vector3D &v)
515  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
516  is.bread<fpreal64>(&v.z(), 1); }
517  static void loadData(UT_IStream &is, UT_Vector4D &v)
518  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
519  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
520  static void loadData(UT_IStream &is, UT_Matrix2D &v)
521  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
522  static void loadData(UT_IStream &is, UT_Matrix3D &v)
523  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
524  static void loadData(UT_IStream &is, UT_Matrix4D &v)
525  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
526  static void loadData(UT_IStream &is, UT_Vector2I &v)
527  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
528  static void loadData(UT_IStream &is, UT_Vector3I &v)
529  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
530  is.bread<int64>(&v.z(), 1); }
531  static void loadData(UT_IStream &is, UT_Vector4I &v)
532  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
533  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
535  { is.bread(v); }
537  { UT_StringHolder rampdata;
538  loadData(is, rampdata);
539  if (rampdata.isstring())
540  {
541  v.reset(new UT_Ramp());
542  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
543  v->load(istr);
544  }
545  else v.reset();
546  }
549  loadData(is, data);
550  if (data.isstring())
551  {
552  // Find the data type.
553  const char *colon = UT_StringWrap(data).findChar(':');
554  if (colon)
555  {
556  int typelen = colon - data.buffer();
558  type.strncpy(data.buffer(), typelen);
559  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
560 
561  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
562  }
563  }
564  else v.reset();
565  }
566 
567  static void saveData(std::ostream &os, int64 v)
568  { UTwrite(os, &v); }
569  static void saveData(std::ostream &os, bool v)
570  { int64 iv = v; UTwrite(os, &iv); }
571  static void saveData(std::ostream &os, fpreal64 v)
572  { UTwrite<fpreal64>(os, &v); }
573  static void saveData(std::ostream &os, UT_Vector2D v)
574  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
575  static void saveData(std::ostream &os, UT_Vector3D v)
576  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
577  UTwrite<fpreal64>(os, &v.z()); }
578  static void saveData(std::ostream &os, UT_Vector4D v)
579  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
580  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
581  static void saveData(std::ostream &os, UT_Matrix2D v)
583  static void saveData(std::ostream &os, UT_Matrix3D v)
585  static void saveData(std::ostream &os, UT_Matrix4D v)
587  static void saveData(std::ostream &os, UT_StringHolder s)
588  { UT_StringWrap(s).saveBinary(os); }
589  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
591  UT_OStringStream ostr;
592  if (s) s->save(ostr);
593  result = ostr.str();
594  saveData(os, result);
595  }
596  static void saveData(std::ostream &os, PRM_DataItemHandle s)
598  UT_OStringStream ostr;
599  if (s)
600  {
601  ostr << s->getDataTypeToken();
602  ostr << ":";
603  s->saveBinary(ostr);
604  }
605  result = ostr.str();
606  saveData(os, result);
607  }
608 
609 
610  void save(std::ostream &os) const
611  {
612  int32 v = version();
613  UTwrite(os, &v);
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);
628  saveData(os, myF);
629  saveData(os, myIndex);
630  saveData(os, myWrap);
631  saveData(os, myRetry);
632 
633  }
634 
635  bool load(UT_IStream &is)
636  {
637  int32 v;
638  is.bread(&v, 1);
639  if (version() != v)
640  {
641  // Fail incompatible versions
642  return false;
643  }
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);
658  loadData(is, myF);
659  loadData(is, myIndex);
660  loadData(is, myWrap);
661  loadData(is, myRetry);
662 
663  return true;
664  }
665 
666  Filemode getFilemode() const { return Filemode(myFilemode); }
667  void setFilemode(Filemode val) { myFilemode = int64(val); }
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getFilemode();
672  int64 result;
673  OP_Utils::evalOpParm(result, thissop, "filemode", cookparms.getCookTime(), 0);
674  return Filemode(result);
675  }
676  const UT_StringHolder & getFile() const { return myFile; }
677  void setFile(const UT_StringHolder & val) { myFile = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getFile();
683  OP_Utils::evalOpParm(result, thissop, "file", cookparms.getCookTime(), 0);
684  return result;
685  }
686  const UT_StringHolder & raw_getFile() const { return raw_myFile; }
687  void raw_setFile(const UT_StringHolder & val) { raw_myFile = val; }
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return raw_getFile();
693  OP_Utils::evalOpParmRaw(result, thissop, "file", cookparms.getCookTime(), 0);
694  return result;
695  }
696  const UT_StringHolder & getObjpattern() const { return myObjpattern; }
697  void setObjpattern(const UT_StringHolder & val) { myObjpattern = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getObjpattern();
703  OP_Utils::evalOpParm(result, thissop, "objpattern", cookparms.getCookTime(), 0);
704  return result;
705  }
706  const UT_StringHolder & getGeodatapath() const { return myGeodatapath; }
707  void setGeodatapath(const UT_StringHolder & val) { myGeodatapath = val; }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getGeodatapath();
713  OP_Utils::evalOpParm(result, thissop, "geodatapath", cookparms.getCookTime(), 0);
714  return result;
715  }
716  Missingframe getMissingframe() const { return Missingframe(myMissingframe); }
717  void setMissingframe(Missingframe val) { myMissingframe = int64(val); }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getMissingframe();
722  int64 result;
723  OP_Utils::evalOpParm(result, thissop, "missingframe", cookparms.getCookTime(), 0);
724  return Missingframe(result);
725  }
726  Loadtype getLoadtype() const { return Loadtype(myLoadtype); }
727  void setLoadtype(Loadtype val) { myLoadtype = int64(val); }
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getLoadtype();
732  int64 result;
733  OP_Utils::evalOpParm(result, thissop, "loadtype", cookparms.getCookTime(), 0);
734  return Loadtype(result);
735  }
736  Packedviewedit getPackedviewedit() const { return Packedviewedit(myPackedviewedit); }
737  void setPackedviewedit(Packedviewedit val) { myPackedviewedit = int64(val); }
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getPackedviewedit();
742  int64 result;
743  OP_Utils::evalOpParm(result, thissop, "packedviewedit", cookparms.getCookTime(), 0);
744  return Packedviewedit(result);
745  }
746  Viewportlod getViewportlod() const { return Viewportlod(myViewportlod); }
747  void setViewportlod(Viewportlod val) { myViewportlod = int64(val); }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getViewportlod();
752  int64 result;
753  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
754  return Viewportlod(result);
755  }
756  bool getPackexpanded() const { return myPackexpanded; }
757  void setPackexpanded(bool val) { myPackexpanded = val; }
758  bool opPackexpanded(const SOP_NodeVerb::CookParms &cookparms) const
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getPackexpanded();
762  bool result;
763  OP_Utils::evalOpParm(result, thissop, "packexpanded", cookparms.getCookTime(), 0);
764  return result;
765  }
766  bool getDelayload() const { return myDelayload; }
767  void setDelayload(bool val) { myDelayload = val; }
768  bool opDelayload(const SOP_NodeVerb::CookParms &cookparms) const
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getDelayload();
772  bool result;
773  OP_Utils::evalOpParm(result, thissop, "delayload", cookparms.getCookTime(), 0);
774  return result;
775  }
776  bool getMkpath() const { return myMkpath; }
777  void setMkpath(bool val) { myMkpath = val; }
778  bool opMkpath(const SOP_NodeVerb::CookParms &cookparms) const
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getMkpath();
782  bool result;
783  OP_Utils::evalOpParm(result, thissop, "mkpath", cookparms.getCookTime(), 0);
784  return result;
785  }
786  int64 getCachesize() const { return myCachesize; }
787  void setCachesize(int64 val) { myCachesize = val; }
788  int64 opCachesize(const SOP_NodeVerb::CookParms &cookparms) const
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getCachesize();
792  int64 result;
793  OP_Utils::evalOpParm(result, thissop, "cachesize", cookparms.getCookTime(), 0);
794  return result;
795  }
796  bool getPrefetch() const { return myPrefetch; }
797  void setPrefetch(bool val) { myPrefetch = val; }
798  bool opPrefetch(const SOP_NodeVerb::CookParms &cookparms) const
799  {
800  SOP_Node *thissop = cookparms.getNode();
801  if (!thissop) return getPrefetch();
802  bool result;
803  OP_Utils::evalOpParm(result, thissop, "prefetch", cookparms.getCookTime(), 0);
804  return result;
805  }
806  UT_Vector2I getF() const { return myF; }
807  void setF(UT_Vector2I val) { myF = val; }
808  UT_Vector2I opF(const SOP_NodeVerb::CookParms &cookparms) const
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return getF();
813  OP_Utils::evalOpParm(result, thissop, "f", cookparms.getCookTime(), 0);
814  return result;
815  }
816  fpreal64 getIndex() const { return myIndex; }
817  void setIndex(fpreal64 val) { myIndex = val; }
818  fpreal64 opIndex(const SOP_NodeVerb::CookParms &cookparms) const
819  {
820  SOP_Node *thissop = cookparms.getNode();
821  if (!thissop) return getIndex();
823  OP_Utils::evalOpParm(result, thissop, "index", cookparms.getCookTime(), 0);
824  return result;
825  }
826  Wrap getWrap() const { return Wrap(myWrap); }
827  void setWrap(Wrap val) { myWrap = int64(val); }
828  Wrap opWrap(const SOP_NodeVerb::CookParms &cookparms) const
829  {
830  SOP_Node *thissop = cookparms.getNode();
831  if (!thissop) return getWrap();
832  int64 result;
833  OP_Utils::evalOpParm(result, thissop, "wrap", cookparms.getCookTime(), 0);
834  return Wrap(result);
835  }
836  int64 getRetry() const { return myRetry; }
837  void setRetry(int64 val) { myRetry = val; }
838  int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
839  {
840  SOP_Node *thissop = cookparms.getNode();
841  if (!thissop) return getRetry();
842  int64 result;
843  OP_Utils::evalOpParm(result, thissop, "retry", cookparms.getCookTime(), 0);
844  return result;
845  }
846 
847 private:
848  int64 myFilemode;
849  UT_StringHolder myFile;
850  UT_StringHolder raw_myFile;
851  UT_StringHolder myObjpattern;
852  UT_StringHolder myGeodatapath;
853  int64 myMissingframe;
854  int64 myLoadtype;
855  int64 myPackedviewedit;
856  int64 myViewportlod;
857  bool myPackexpanded;
858  bool myDelayload;
859  bool myMkpath;
860  int64 myCachesize;
861  bool myPrefetch;
862  UT_Vector2I myF;
863  fpreal64 myIndex;
864  int64 myWrap;
865  int64 myRetry;
866 
867 };
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
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
Definition: OP_NodeParms.h:315
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)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opPrefetch(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
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
Definition: OP_NodeParms.h:97
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
Definition: UT_Vector3.h:667
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
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLdouble s
Definition: glad.h:3009
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
static void saveData(std::ostream &os, PRM_DataItemHandle s)
**But if you need a result
Definition: thread.h:613
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
Definition: OP_NodeParms.h:308
exint getNestNumParms(TempIndex idx) const override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
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
Definition: UT_Vector4.h:491
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
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()
void setDelayload(bool val)
Wrap getWrap() const
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
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.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
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
Definition: OP_NodeParms.h:94
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
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)
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.
Definition: UT_String.h:296
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
UT_Vector2I getF() const
void setGeodatapath(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
int64 getRetry() const
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
void setWrap(Wrap val)
int64 opRetry(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
Viewportlod getViewportlod() const
GLuint GLfloat * val
Definition: glcorearb.h:1608
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
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector2I opF(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
Missingframe getMissingframe() const
GLboolean r
Definition: glcorearb.h:1222
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
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
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
Definition: PRM_Parm.h:89
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
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
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)