HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_InvokeGraph.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_InvokeGraphEnums
24 {
25  enum class Method
26  {
27  COMPILE = 0,
28  NETWORK
29  };
30 
32  getToken(Method enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Method::COMPILE: return "compile"_sh;
37  case Method::NETWORK: return "network"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class OutputType
43  {
44  LAST = 0,
45  FIRST,
46  GROUP,
47  PATH
48  };
49 
51  getToken(OutputType enum_value)
52  {
53  using namespace UT::Literal;
54  switch (enum_value) {
55  case OutputType::LAST: return "last"_sh;
56  case OutputType::FIRST: return "first"_sh;
57  case OutputType::GROUP: return "group"_sh;
58  case OutputType::PATH: return "path"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class Unload
64  {
65  NEVER = 0,
66  FLAG,
67  ALWAYS
68  };
69 
71  getToken(Unload enum_value)
72  {
73  using namespace UT::Literal;
74  switch (enum_value) {
75  case Unload::NEVER: return "never"_sh;
76  case Unload::FLAG: return "flag"_sh;
77  case Unload::ALWAYS: return "always"_sh;
78  default: UT_ASSERT(false); return ""_sh;
79  }
80  }
81 
82 }
83 
84 
86 {
87 public:
88  static int version() { return 1; }
89  struct Inputs
90  {
92 
93 
95  {
96  name = ""_UTsh;
97 
98  }
99 
100  bool operator==(const Inputs &src) const
101  {
102  if (name != src.name) return false;
103 
104  return true;
105  }
106  bool operator!=(const Inputs &src) const
107  {
108  return !operator==(src);
109  }
110 
111  };
112 
114  {
116 
117  buf.strcat("[ ");
118  for (int i = 0; i < list.entries(); i++)
119  {
120  if (i)
121  buf.strcat(", ");
122  buf.strcat("( ");
123  buf.append("");
124  { UT_String tmp; tmp = UT_StringWrap(list(i).name).makeQuotedString('"'); buf.strcat(tmp); }
125 
126  buf.strcat(" )");
127  }
128  buf.strcat(" ]");
129 
131  return result;
132  }
133 
135  {
136  myMethod = 0;
137  myOutputType = 0;
138  myOutputGroup = ""_UTsh;
139  myOutput = ""_UTsh;
140  myInputs.setSize(4);
141  myInputGroup = ""_UTsh;
142  myUnload = 2;
143 
144  }
145 
146  explicit SOP_InvokeGraphParms(const SOP_InvokeGraphParms &) = default;
148  SOP_InvokeGraphParms(SOP_InvokeGraphParms &&) noexcept = default;
149  SOP_InvokeGraphParms &operator=(SOP_InvokeGraphParms &&) noexcept = default;
150 
151  ~SOP_InvokeGraphParms() override {}
152 
154  {
155  if (myMethod != src.myMethod) return false;
156  if (myOutputType != src.myOutputType) return false;
157  if (myOutputGroup != src.myOutputGroup) return false;
158  if (myOutput != src.myOutput) return false;
159  if (myInputs != src.myInputs) return false;
160  if (myInputGroup != src.myInputGroup) return false;
161  if (myUnload != src.myUnload) return false;
162 
163  return true;
164  }
166  {
167  return !operator==(src);
168  }
172 
173 
174 
175  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
176  {
177  myMethod = 0;
178  if (true)
179  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
180  myOutputType = 0;
181  if (true)
182  graph->evalOpParm(myOutputType, nodeidx, "outputtype", time, 0);
183  myOutputGroup = ""_UTsh;
184  if (true && ( (true&&!(((int64(getOutputType())!=2)))) ) )
185  graph->evalOpParm(myOutputGroup, nodeidx, "outputgroup", time, 0);
186  myOutput = ""_UTsh;
187  if (true && ( (true&&!(((int64(getOutputType())!=3)))) ) )
188  graph->evalOpParm(myOutput, nodeidx, "output", time, 0);
189  if (true && ( (!(((int64(getMethod())!=0)))) ) )
190  {
191  int64 length = 0;
192  graph->evalOpParm(length, nodeidx, "inputs", time, 0);
193  if (length < 0) length = 0;
194  myInputs.setSize(length);
195  for (exint i = 0; i < length; i++)
196  {
197  int parmidx[1];
198  int offsets[1];
199  parmidx[0] = i+0;
200  offsets[0] = 0;
201  auto && _curentry = myInputs(i);
202  (void) _curentry;
203  _curentry.name = ""_UTsh;
204  if (true && ( (!(((int64(getMethod())!=0)))) ) && ( (true&&!(((int64(getMethod())!=0)))) ) )
205  graph->evalOpParmInst(_curentry.name, nodeidx, "name#", parmidx, offsets, time, 0, 2-1);
206 
207  }
208  }
209  else
210  myInputs.clear();
211  myInputGroup = ""_UTsh;
212  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
213  graph->evalOpParm(myInputGroup, nodeidx, "inputgroup", time, 0);
214  myUnload = 2;
215  if (true)
216  graph->evalOpParm(myUnload, nodeidx, "unload", time, 0);
217 
218  }
219 
220 
221  void loadFromOpSubclass(const LoadParms &loadparms) override
222  {
223  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
224  }
225 
226 
227  void copyFrom(const OP_NodeParms *src) override
228  {
229  *this = *((const SOP_InvokeGraphParms *)src);
230  }
231 
232  template <typename T>
233  void
234  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
235  {
236  if (idx.size() < 1)
237  return;
238  UT_ASSERT(idx.size() == instance.size()+1);
239  if (idx.size() != instance.size()+1)
240  return;
241  switch (idx[0])
242  {
243  case 0:
244  coerceValue(value, myMethod);
245  break;
246  case 1:
247  coerceValue(value, myOutputType);
248  break;
249  case 2:
250  coerceValue(value, myOutputGroup);
251  break;
252  case 3:
253  coerceValue(value, myOutput);
254  break;
255  case 4:
256  if (idx.size() == 1)
257  coerceValue(value, myInputs.entries());
258  else if (instance[0] < myInputs.entries())
259  {
260  auto && _data = myInputs(instance[0]);
261  switch (idx[1])
262  {
263  case 0:
264  coerceValue(value, _data.name);
265  break;
266 
267  }
268  }
269  break;
270  case 5:
271  coerceValue(value, myInputGroup);
272  break;
273  case 6:
274  coerceValue(value, myUnload);
275  break;
276 
277  }
278  }
279 
280  bool isParmColorRamp(exint idx) const override
281  {
282  switch (idx)
283  {
284 
285  }
286  return false;
287  }
288 
289  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
304  { doGetParmValue(idx, instance, value); }
305  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
306  { doGetParmValue(idx, instance, value); }
307  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
308  { doGetParmValue(idx, instance, value); }
309  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
310  { doGetParmValue(idx, instance, value); }
311 
312  template <typename T>
313  void
314  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
315  {
316  if (idx.size() < 1)
317  return;
318  UT_ASSERT(idx.size() == instance.size()+1);
319  if (idx.size() != instance.size()+1)
320  return;
321  switch (idx[0])
322  {
323  case 0:
324  coerceValue(myMethod, clampMinValue(0, clampMaxValue(1, value ) ));
325  break;
326  case 1:
327  coerceValue(myOutputType, clampMinValue(0, clampMaxValue(3, value ) ));
328  break;
329  case 2:
330  coerceValue(myOutputGroup, ( ( value ) ));
331  break;
332  case 3:
333  coerceValue(myOutput, ( ( value ) ));
334  break;
335  case 4:
336  if (idx.size() == 1)
337  {
338  exint newsize;
339  coerceValue(newsize, value);
340  if (newsize < 0) newsize = 0;
341  myInputs.setSize(newsize);
342  }
343  else
344  {
345  if (instance[0] < 0)
346  return;
347  myInputs.setSizeIfNeeded(instance[0]+1);
348  auto && _data = myInputs(instance[0]);
349  switch (idx[1])
350  {
351  case 0:
352  coerceValue(_data.name, value);
353  break;
354 
355  }
356  }
357  break;
358  case 5:
359  coerceValue(myInputGroup, ( ( value ) ));
360  break;
361  case 6:
362  coerceValue(myUnload, clampMinValue(0, clampMaxValue(2, value ) ));
363  break;
364 
365  }
366  }
367 
368  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
389  { doSetParmValue(idx, instance, value); }
390 
391  exint getNestNumParms(TempIndex idx) const override
392  {
393  if (idx.size() == 0)
394  return 7;
395  switch (idx[0])
396  {
397  case 4:
398  return 1;
399 
400  }
401  // Invalid
402  return 0;
403  }
404 
405  const char *getNestParmName(TempIndex fieldnum) const override
406  {
407  if (fieldnum.size() < 1)
408  return 0;
409  switch (fieldnum[0])
410  {
411  case 0:
412  return "method";
413  case 1:
414  return "outputtype";
415  case 2:
416  return "outputgroup";
417  case 3:
418  return "output";
419  case 4:
420  if (fieldnum.size() == 1)
421  return "inputs";
422  switch (fieldnum[1])
423  {
424  case 0:
425  return "name#";
426 
427  }
428  return 0;
429  case 5:
430  return "inputgroup";
431  case 6:
432  return "unload";
433 
434  }
435  return 0;
436  }
437 
438  ParmType getNestParmType(TempIndex fieldnum) const override
439  {
440  if (fieldnum.size() < 1)
441  return PARM_UNSUPPORTED;
442  switch (fieldnum[0])
443  {
444  case 0:
445  return PARM_INTEGER;
446  case 1:
447  return PARM_INTEGER;
448  case 2:
449  return PARM_STRING;
450  case 3:
451  return PARM_STRING;
452  case 4:
453  if (fieldnum.size() == 1)
454  return PARM_MULTIPARM;
455  switch (fieldnum[1])
456  {
457  case 0:
458  return PARM_STRING;
459 
460  }
461  return PARM_UNSUPPORTED;
462  case 5:
463  return PARM_STRING;
464  case 6:
465  return PARM_INTEGER;
466 
467  }
468  return PARM_UNSUPPORTED;
469  }
470 
471  // Boiler plate to load individual types.
472  static void loadData(UT_IStream &is, int64 &v)
473  { is.bread(&v, 1); }
474  static void loadData(UT_IStream &is, bool &v)
475  { int64 iv; is.bread(&iv, 1); v = iv; }
476  static void loadData(UT_IStream &is, fpreal64 &v)
477  { is.bread<fpreal64>(&v, 1); }
478  static void loadData(UT_IStream &is, UT_Vector2D &v)
479  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
480  static void loadData(UT_IStream &is, UT_Vector3D &v)
481  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
482  is.bread<fpreal64>(&v.z(), 1); }
483  static void loadData(UT_IStream &is, UT_Vector4D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
485  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
486  static void loadData(UT_IStream &is, UT_Matrix2D &v)
487  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
488  static void loadData(UT_IStream &is, UT_Matrix3D &v)
489  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
490  static void loadData(UT_IStream &is, UT_Matrix4D &v)
491  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
492  static void loadData(UT_IStream &is, UT_Vector2I &v)
493  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector3I &v)
495  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
496  is.bread<int64>(&v.z(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector4I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
499  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
501  { is.bread(v); }
503  { UT_StringHolder rampdata;
504  loadData(is, rampdata);
505  if (rampdata.isstring())
506  {
507  v.reset(new UT_Ramp());
508  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
509  v->load(istr);
510  }
511  else v.reset();
512  }
515  loadData(is, data);
516  if (data.isstring())
517  {
518  // Find the data type.
519  const char *colon = UT_StringWrap(data).findChar(':');
520  if (colon)
521  {
522  int typelen = colon - data.buffer();
524  type.strncpy(data.buffer(), typelen);
525  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
526 
527  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
528  }
529  }
530  else v.reset();
531  }
532 
533  static void saveData(std::ostream &os, int64 v)
534  { UTwrite(os, &v); }
535  static void saveData(std::ostream &os, bool v)
536  { int64 iv = v; UTwrite(os, &iv); }
537  static void saveData(std::ostream &os, fpreal64 v)
538  { UTwrite<fpreal64>(os, &v); }
539  static void saveData(std::ostream &os, UT_Vector2D v)
540  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
541  static void saveData(std::ostream &os, UT_Vector3D v)
542  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
543  UTwrite<fpreal64>(os, &v.z()); }
544  static void saveData(std::ostream &os, UT_Vector4D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
546  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
547  static void saveData(std::ostream &os, UT_Matrix2D v)
549  static void saveData(std::ostream &os, UT_Matrix3D v)
551  static void saveData(std::ostream &os, UT_Matrix4D v)
553  static void saveData(std::ostream &os, UT_StringHolder s)
554  { UT_StringWrap(s).saveBinary(os); }
555  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
557  UT_OStringStream ostr;
558  if (s) s->save(ostr);
559  result = ostr.str();
560  saveData(os, result);
561  }
562  static void saveData(std::ostream &os, PRM_DataItemHandle s)
564  UT_OStringStream ostr;
565  if (s)
566  {
567  ostr << s->getDataTypeToken();
568  ostr << ":";
569  s->saveBinary(ostr);
570  }
571  result = ostr.str();
572  saveData(os, result);
573  }
574 
575 
576  void save(std::ostream &os) const
577  {
578  int32 v = version();
579  UTwrite(os, &v);
580  saveData(os, myMethod);
581  saveData(os, myOutputType);
582  saveData(os, myOutputGroup);
583  saveData(os, myOutput);
584  {
585  int64 length = myInputs.entries();
586  UTwrite(os, &length);
587  for (exint i = 0; i < length; i++)
588  {
589  auto && _curentry = myInputs(i);
590  (void) _curentry;
591  saveData(os, _curentry.name);
592 
593  }
594  }
595  saveData(os, myInputGroup);
596  saveData(os, myUnload);
597 
598  }
599 
600  bool load(UT_IStream &is)
601  {
602  int32 v;
603  is.bread(&v, 1);
604  if (version() != v)
605  {
606  // Fail incompatible versions
607  return false;
608  }
609  loadData(is, myMethod);
610  loadData(is, myOutputType);
611  loadData(is, myOutputGroup);
612  loadData(is, myOutput);
613  {
614  int64 length;
615  is.read(&length, 1);
616  myInputs.setSize(length);
617  for (exint i = 0; i < length; i++)
618  {
619  auto && _curentry = myInputs(i);
620  (void) _curentry;
621  loadData(is, _curentry.name);
622 
623  }
624  }
625  loadData(is, myInputGroup);
626  loadData(is, myUnload);
627 
628  return true;
629  }
630 
631  Method getMethod() const { return Method(myMethod); }
632  void setMethod(Method val) { myMethod = int64(val); }
633  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getMethod();
637  int64 result;
638  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
639  return Method(result);
640  }
641  OutputType getOutputType() const { return OutputType(myOutputType); }
642  void setOutputType(OutputType val) { myOutputType = int64(val); }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getOutputType();
647  int64 result;
648  OP_Utils::evalOpParm(result, thissop, "outputtype", cookparms.getCookTime(), 0);
649  return OutputType(result);
650  }
651  const UT_StringHolder & getOutputGroup() const { return myOutputGroup; }
652  void setOutputGroup(const UT_StringHolder & val) { myOutputGroup = val; }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getOutputGroup();
658  OP_Utils::evalOpParm(result, thissop, "outputgroup", cookparms.getCookTime(), 0);
659  return result;
660  }
661  const UT_StringHolder & getOutput() const { return myOutput; }
662  void setOutput(const UT_StringHolder & val) { myOutput = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getOutput();
668  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
669  return result;
670  }
671  const UT_Array<Inputs> &getInputs() const { return myInputs; }
672 void setInputs(const UT_Array<Inputs> &val) { myInputs = val; }
673  exint opInputs(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getInputs().entries();
677  exint result;
678  OP_Utils::evalOpParm(result, thissop, "inputs", cookparms.getCookTime(), 0);
679  return result;
680  }
681  UT_StringHolder opInputs_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
682  { return opinstInputs_name(cookparms, &_idx); }
683  UT_StringHolder opinstInputs_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return (myInputs(_idx[0]).name);
687  int _parmidx[2-1];
688  _parmidx[1-1] = _idx[1-1] + 0;
689 
691  OP_Utils::evalOpParmInst(result, thissop, "name#", _parmidx, cookparms.getCookTime(), 0, 2-1);
692  return (result);
693  }
694 
695  const UT_StringHolder & getInputGroup() const { return myInputGroup; }
696  void setInputGroup(const UT_StringHolder & val) { myInputGroup = val; }
698  {
699  SOP_Node *thissop = cookparms.getNode();
700  if (!thissop) return getInputGroup();
702  OP_Utils::evalOpParm(result, thissop, "inputgroup", cookparms.getCookTime(), 0);
703  return result;
704  }
705  Unload getUnload() const { return Unload(myUnload); }
706  void setUnload(Unload val) { myUnload = int64(val); }
707  Unload opUnload(const SOP_NodeVerb::CookParms &cookparms) const
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getUnload();
711  int64 result;
712  OP_Utils::evalOpParm(result, thissop, "unload", cookparms.getCookTime(), 0);
713  return Unload(result);
714  }
715 
716 private:
717  int64 myMethod;
718  int64 myOutputType;
719  UT_StringHolder myOutputGroup;
720  UT_StringHolder myOutput;
721  UT_Array<Inputs> myInputs;
722  UT_StringHolder myInputGroup;
723  int64 myUnload;
724 
725 };
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
static void loadData(UT_IStream &is, UT_Vector4I &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opOutput(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
void setOutputGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal getTime() const
Definition: OP_Context.h:62
exint getNestNumParms(TempIndex idx) const override
const UT_Array< Inputs > & getInputs() const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
UT_StringHolder opInputs_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
bool operator!=(const Inputs &src) const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
const UT_StringHolder & getOutput() const
An output stream object that owns its own string buffer storage.
UT_StringHolder opOutputGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) 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.
static void saveData(std::ostream &os, int64 v)
void setInputGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
OutputType opOutputType(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, fpreal64 v)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setOutput(const UT_StringHolder &val)
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint opInputs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(Method enum_value)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
OutputType getOutputType() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setOutputType(OutputType val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, int64 &v)
Unload opUnload(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator==(const SOP_InvokeGraphParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE void strcat(const char *src)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
UT_StringHolder createString(const UT_Array< Inputs > &list) const
GT_API const UT_StringHolder version
void save(std::ostream &os) const
static void loadData(UT_IStream &is, fpreal64 &v)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
const UT_StringHolder & getOutputGroup() const
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const SOP_InvokeGraphParms &src) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setInputs(const UT_Array< Inputs > &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opInputGroup(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const Inputs &src) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
static void saveData(std::ostream &os, UT_Vector2D v)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getInputGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opinstInputs_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, UT_Matrix4D v)
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_Vector4D &value) const override
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2D &v)