HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribPromote.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 <OP/OP_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_AttribPromoteEnums
24 {
25  enum class Inclass
26  {
27  DETAIL = 0,
28  PRIMITIVE,
29  POINT,
30  VERTEX
31  };
32 
34  getToken(Inclass enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Inclass::DETAIL: return "detail"_sh;
39  case Inclass::PRIMITIVE: return "primitive"_sh;
40  case Inclass::POINT: return "point"_sh;
41  case Inclass::VERTEX: return "vertex"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Outclass
47  {
48  DETAIL = 0,
49  PRIMITIVE,
50  POINT,
51  VERTEX
52  };
53 
55  getToken(Outclass enum_value)
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case Outclass::DETAIL: return "detail"_sh;
60  case Outclass::PRIMITIVE: return "primitive"_sh;
61  case Outclass::POINT: return "point"_sh;
62  case Outclass::VERTEX: return "vertex"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67  enum class Method
68  {
69  MAX = 0,
70  MIN,
71  MEAN,
72  MODE,
73  MEDIAN,
74  SUM,
75  SUMSQUARE,
76  RMS,
77  FIRST,
78  LAST,
79  ARRAY,
80  UNIQUE
81  };
82 
84  getToken(Method enum_value)
85  {
86  using namespace UT::Literal;
87  switch (enum_value) {
88  case Method::MAX: return "max"_sh;
89  case Method::MIN: return "min"_sh;
90  case Method::MEAN: return "mean"_sh;
91  case Method::MODE: return "mode"_sh;
92  case Method::MEDIAN: return "median"_sh;
93  case Method::SUM: return "sum"_sh;
94  case Method::SUMSQUARE: return "sumsquare"_sh;
95  case Method::RMS: return "rms"_sh;
96  case Method::FIRST: return "first"_sh;
97  case Method::LAST: return "last"_sh;
98  case Method::ARRAY: return "array"_sh;
99  case Method::UNIQUE: return "unique"_sh;
100  default: UT_ASSERT(false); return ""_sh;
101  }
102  }
103 
104 }
105 
106 
108 {
109 public:
110  static int version() { return 1; }
111 
113  {
114  myInname = ""_UTsh;
115  myInclass = 2;
116  myOutclass = 2;
117  myUsePieceAttrib = false;
118  myPieceAttrib = "name"_UTsh;
119  myMethod = 2;
120  myDoindexattrib = false;
121  myIndexattrib = "sourceindex"_UTsh;
122  myUseoutname = false;
123  myOutname = ""_UTsh;
124  myDeletein = true;
125 
126  }
127 
128  explicit SOP_AttribPromoteParms(const SOP_AttribPromoteParms &) = default;
130  SOP_AttribPromoteParms(SOP_AttribPromoteParms &&) noexcept = default;
131  SOP_AttribPromoteParms &operator=(SOP_AttribPromoteParms &&) noexcept = default;
132 
133  ~SOP_AttribPromoteParms() override {}
134 
136  {
137  if (myInname != src.myInname) return false;
138  if (myInclass != src.myInclass) return false;
139  if (myOutclass != src.myOutclass) return false;
140  if (myUsePieceAttrib != src.myUsePieceAttrib) return false;
141  if (myPieceAttrib != src.myPieceAttrib) return false;
142  if (myMethod != src.myMethod) return false;
143  if (myDoindexattrib != src.myDoindexattrib) return false;
144  if (myIndexattrib != src.myIndexattrib) return false;
145  if (myUseoutname != src.myUseoutname) return false;
146  if (myOutname != src.myOutname) return false;
147  if (myDeletein != src.myDeletein) return false;
148 
149 
150  if (baseGetSignature() != src.baseGetSignature()) return false;
151 
152  return true;
153  }
155  {
156  return !operator==(src);
157  }
161 
162 
163 
164  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
165  {
166  myInname = ""_UTsh;
167  if (true)
168  graph->evalOpParm(myInname, nodeidx, "inname", time, graph->isDirect()?nullptr:depnode);
169  myInclass = 2;
170  if (true)
171  graph->evalOpParm(myInclass, nodeidx, "inclass", time, graph->isDirect()?nullptr:depnode);
172  myOutclass = 2;
173  if (true)
174  graph->evalOpParm(myOutclass, nodeidx, "outclass", time, graph->isDirect()?nullptr:depnode);
175  myUsePieceAttrib = false;
176  if (true && ( (true&&!(((int64(getOutclass())==0))||((int64(getInclass())==0)))) ) )
177  graph->evalOpParm(myUsePieceAttrib, nodeidx, "usepieceattrib", time, graph->isDirect()?nullptr:depnode);
178  myPieceAttrib = "name"_UTsh;
179  if (true && ( (true&&!(((getUsePieceAttrib()==0))||((int64(getOutclass())==0))||((int64(getInclass())==0)))) ) )
180  graph->evalOpParm(myPieceAttrib, nodeidx, "pieceattrib", time, graph->isDirect()?nullptr:depnode);
181  myMethod = 2;
182  if (true)
183  graph->evalOpParm(myMethod, nodeidx, "method", time, graph->isDirect()?nullptr:depnode);
184  myDoindexattrib = false;
185  if (true && ( (true&&!(((int64(getMethod())!=0)&&(int64(getMethod())!=1)&&(int64(getMethod())!=4)&&(int64(getMethod())!=8)&&(int64(getMethod())!=9)))) ) )
186  graph->evalOpParm(myDoindexattrib, nodeidx, "doindexattrib", time, graph->isDirect()?nullptr:depnode);
187  myIndexattrib = "sourceindex"_UTsh;
188  if (true && ( (true&&!(((int64(getMethod())!=0)&&(int64(getMethod())!=1)&&(int64(getMethod())!=4)&&(int64(getMethod())!=8)&&(int64(getMethod())!=9))||((getDoindexattrib()!=1)))) ) )
189  graph->evalOpParm(myIndexattrib, nodeidx, "indexattrib", time, graph->isDirect()?nullptr:depnode);
190  myUseoutname = false;
191  if (true)
192  graph->evalOpParm(myUseoutname, nodeidx, "useoutname", time, graph->isDirect()?nullptr:depnode);
193  myOutname = ""_UTsh;
194  if (true && ( (true&&!(((getUseoutname()==0)))) ) )
195  graph->evalOpParm(myOutname, nodeidx, "outname", time, graph->isDirect()?nullptr:depnode);
196  myDeletein = true;
197  if (true && ( (true&&!(((getUseoutname()==0)&&(int64(getInclass())==2)&&(int64(getOutclass())==3))||((getUseoutname()==0)&&(int64(getInclass())==3)&&(int64(getOutclass())==2)))) ) )
198  graph->evalOpParm(myDeletein, nodeidx, "deletein", time, graph->isDirect()?nullptr:depnode);
199 
200  }
201 
202 
203  void loadFromOpSubclass(const LoadParms &loadparms) override
204  {
205  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
206  }
207 
208 
209  void copyFrom(const OP_NodeParms *src) override
210  {
211  *this = *((const SOP_AttribPromoteParms *)src);
212  }
213 
214  template <typename T>
215  void
216  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
217  {
218  if (idx.size() < 1)
219  return;
220  UT_ASSERT(idx.size() == instance.size()+1);
221  if (idx.size() != instance.size()+1)
222  return;
223  switch (idx[0])
224  {
225  case 0:
226  coerceValue(value, myInname);
227  break;
228  case 1:
229  coerceValue(value, myInclass);
230  break;
231  case 2:
232  coerceValue(value, myOutclass);
233  break;
234  case 3:
235  coerceValue(value, myUsePieceAttrib);
236  break;
237  case 4:
238  coerceValue(value, myPieceAttrib);
239  break;
240  case 5:
241  coerceValue(value, myMethod);
242  break;
243  case 6:
244  coerceValue(value, myDoindexattrib);
245  break;
246  case 7:
247  coerceValue(value, myIndexattrib);
248  break;
249  case 8:
250  coerceValue(value, myUseoutname);
251  break;
252  case 9:
253  coerceValue(value, myOutname);
254  break;
255  case 10:
256  coerceValue(value, myDeletein);
257  break;
258 
259  }
260  }
261 
262  bool isParmColorRamp(exint idx) const override
263  {
264  switch (idx)
265  {
266 
267  }
268  return false;
269  }
270 
271  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
292  { doGetParmValue(idx, instance, value); }
293 
294  template <typename T>
295  void
296  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
297  {
298  if (idx.size() < 1)
299  return;
300  UT_ASSERT(idx.size() == instance.size()+1);
301  if (idx.size() != instance.size()+1)
302  return;
303  switch (idx[0])
304  {
305  case 0:
306  coerceValue(myInname, ( ( value ) ));
307  break;
308  case 1:
309  coerceValue(myInclass, clampMinValue(0, clampMaxValue(3, value ) ));
310  break;
311  case 2:
312  coerceValue(myOutclass, clampMinValue(0, clampMaxValue(3, value ) ));
313  break;
314  case 3:
315  coerceValue(myUsePieceAttrib, ( ( value ) ));
316  break;
317  case 4:
318  coerceValue(myPieceAttrib, ( ( value ) ));
319  break;
320  case 5:
321  coerceValue(myMethod, clampMinValue(0, clampMaxValue(11, value ) ));
322  break;
323  case 6:
324  coerceValue(myDoindexattrib, ( ( value ) ));
325  break;
326  case 7:
327  coerceValue(myIndexattrib, ( ( value ) ));
328  break;
329  case 8:
330  coerceValue(myUseoutname, ( ( value ) ));
331  break;
332  case 9:
333  coerceValue(myOutname, ( ( value ) ));
334  break;
335  case 10:
336  coerceValue(myDeletein, ( ( value ) ));
337  break;
338 
339  }
340  }
341 
342  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
363  { doSetParmValue(idx, instance, value); }
364 
365  exint getNestNumParms(TempIndex idx) const override
366  {
367  if (idx.size() == 0)
368  return 11;
369  switch (idx[0])
370  {
371 
372  }
373  // Invalid
374  return 0;
375  }
376 
377  const char *getNestParmName(TempIndex fieldnum) const override
378  {
379  if (fieldnum.size() < 1)
380  return 0;
381  switch (fieldnum[0])
382  {
383  case 0:
384  return "inname";
385  case 1:
386  return "inclass";
387  case 2:
388  return "outclass";
389  case 3:
390  return "usepieceattrib";
391  case 4:
392  return "pieceattrib";
393  case 5:
394  return "method";
395  case 6:
396  return "doindexattrib";
397  case 7:
398  return "indexattrib";
399  case 8:
400  return "useoutname";
401  case 9:
402  return "outname";
403  case 10:
404  return "deletein";
405 
406  }
407  return 0;
408  }
409 
410  ParmType getNestParmType(TempIndex fieldnum) const override
411  {
412  if (fieldnum.size() < 1)
413  return PARM_UNSUPPORTED;
414  switch (fieldnum[0])
415  {
416  case 0:
417  return PARM_STRING;
418  case 1:
419  return PARM_INTEGER;
420  case 2:
421  return PARM_INTEGER;
422  case 3:
423  return PARM_INTEGER;
424  case 4:
425  return PARM_STRING;
426  case 5:
427  return PARM_INTEGER;
428  case 6:
429  return PARM_INTEGER;
430  case 7:
431  return PARM_STRING;
432  case 8:
433  return PARM_INTEGER;
434  case 9:
435  return PARM_STRING;
436  case 10:
437  return PARM_INTEGER;
438 
439  }
440  return PARM_UNSUPPORTED;
441  }
442 
443  // Boiler plate to load individual types.
444  static void loadData(UT_IStream &is, int64 &v)
445  { is.bread(&v, 1); }
446  static void loadData(UT_IStream &is, bool &v)
447  { int64 iv; is.bread(&iv, 1); v = iv; }
448  static void loadData(UT_IStream &is, fpreal64 &v)
449  { is.bread<fpreal64>(&v, 1); }
450  static void loadData(UT_IStream &is, UT_Vector2D &v)
451  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
452  static void loadData(UT_IStream &is, UT_Vector3D &v)
453  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
454  is.bread<fpreal64>(&v.z(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector4D &v)
456  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
457  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
458  static void loadData(UT_IStream &is, UT_Matrix2D &v)
459  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
460  static void loadData(UT_IStream &is, UT_Matrix3D &v)
461  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
462  static void loadData(UT_IStream &is, UT_Matrix4D &v)
463  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
464  static void loadData(UT_IStream &is, UT_Vector2I &v)
465  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
466  static void loadData(UT_IStream &is, UT_Vector3I &v)
467  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
468  is.bread<int64>(&v.z(), 1); }
469  static void loadData(UT_IStream &is, UT_Vector4I &v)
470  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
471  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
473  { is.bread(v); }
475  { UT_StringHolder rampdata;
476  loadData(is, rampdata);
477  if (rampdata.isstring())
478  {
479  v.reset(new UT_Ramp());
480  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
481  v->load(istr);
482  }
483  else v.reset();
484  }
487  loadData(is, data);
488  if (data.isstring())
489  {
490  // Find the data type.
491  const char *colon = UT_StringWrap(data).findChar(':');
492  if (colon)
493  {
494  int typelen = colon - data.buffer();
496  type.strncpy(data.buffer(), typelen);
497  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
498 
499  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
500  }
501  }
502  else v.reset();
503  }
504 
505  static void saveData(std::ostream &os, int64 v)
506  { UTwrite(os, &v); }
507  static void saveData(std::ostream &os, bool v)
508  { int64 iv = v; UTwrite(os, &iv); }
509  static void saveData(std::ostream &os, fpreal64 v)
510  { UTwrite<fpreal64>(os, &v); }
511  static void saveData(std::ostream &os, UT_Vector2D v)
512  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
513  static void saveData(std::ostream &os, UT_Vector3D v)
514  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
515  UTwrite<fpreal64>(os, &v.z()); }
516  static void saveData(std::ostream &os, UT_Vector4D v)
517  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
518  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
519  static void saveData(std::ostream &os, UT_Matrix2D v)
521  static void saveData(std::ostream &os, UT_Matrix3D v)
523  static void saveData(std::ostream &os, UT_Matrix4D v)
525  static void saveData(std::ostream &os, UT_StringHolder s)
526  { UT_StringWrap(s).saveBinary(os); }
527  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
529  UT_OStringStream ostr;
530  if (s) s->save(ostr);
531  result = ostr.str();
532  saveData(os, result);
533  }
534  static void saveData(std::ostream &os, PRM_DataItemHandle s)
536  UT_OStringStream ostr;
537  if (s)
538  {
539  ostr << s->getDataTypeToken();
540  ostr << ":";
541  s->saveBinary(ostr);
542  }
543  result = ostr.str();
544  saveData(os, result);
545  }
546 
547 
548  void save(std::ostream &os) const
549  {
550  int32 v = version();
551  UTwrite(os, &v);
552  saveData(os, myInname);
553  saveData(os, myInclass);
554  saveData(os, myOutclass);
555  saveData(os, myUsePieceAttrib);
556  saveData(os, myPieceAttrib);
557  saveData(os, myMethod);
558  saveData(os, myDoindexattrib);
559  saveData(os, myIndexattrib);
560  saveData(os, myUseoutname);
561  saveData(os, myOutname);
562  saveData(os, myDeletein);
563 
564  }
565 
566  bool load(UT_IStream &is)
567  {
568  int32 v;
569  is.bread(&v, 1);
570  if (version() != v)
571  {
572  // Fail incompatible versions
573  return false;
574  }
575  loadData(is, myInname);
576  loadData(is, myInclass);
577  loadData(is, myOutclass);
578  loadData(is, myUsePieceAttrib);
579  loadData(is, myPieceAttrib);
580  loadData(is, myMethod);
581  loadData(is, myDoindexattrib);
582  loadData(is, myIndexattrib);
583  loadData(is, myUseoutname);
584  loadData(is, myOutname);
585  loadData(is, myDeletein);
586 
587  return true;
588  }
589 
590  const UT_StringHolder & getInname() const { return myInname; }
591  void setInname(const UT_StringHolder & val) { myInname = val; }
593  {
594  SOP_Node *thissop = cookparms.getNode();
595  if (!thissop) return getInname();
597  OP_Utils::evalOpParm(result, thissop, "inname", cookparms.getCookTime(), 0);
598  return result;
599  }
600  Inclass getInclass() const { return Inclass(myInclass); }
601  void setInclass(Inclass val) { myInclass = int64(val); }
602  Inclass opInclass(const SOP_NodeVerb::CookParms &cookparms) const
603  {
604  SOP_Node *thissop = cookparms.getNode();
605  if (!thissop) return getInclass();
606  int64 result;
607  OP_Utils::evalOpParm(result, thissop, "inclass", cookparms.getCookTime(), 0);
608  return Inclass(result);
609  }
610  Outclass getOutclass() const { return Outclass(myOutclass); }
611  void setOutclass(Outclass val) { myOutclass = int64(val); }
613  {
614  SOP_Node *thissop = cookparms.getNode();
615  if (!thissop) return getOutclass();
616  int64 result;
617  OP_Utils::evalOpParm(result, thissop, "outclass", cookparms.getCookTime(), 0);
618  return Outclass(result);
619  }
620  bool getUsePieceAttrib() const { return myUsePieceAttrib; }
621  void setUsePieceAttrib(bool val) { myUsePieceAttrib = val; }
622  bool opUsePieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getUsePieceAttrib();
626  bool result;
627  OP_Utils::evalOpParm(result, thissop, "usepieceattrib", cookparms.getCookTime(), 0);
628  return result;
629  }
630  const UT_StringHolder & getPieceAttrib() const { return myPieceAttrib; }
631  void setPieceAttrib(const UT_StringHolder & val) { myPieceAttrib = val; }
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getPieceAttrib();
637  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
638  return result;
639  }
640  Method getMethod() const { return Method(myMethod); }
641  void setMethod(Method val) { myMethod = int64(val); }
642  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getMethod();
646  int64 result;
647  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
648  return Method(result);
649  }
650  bool getDoindexattrib() const { return myDoindexattrib; }
651  void setDoindexattrib(bool val) { myDoindexattrib = val; }
652  bool opDoindexattrib(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getDoindexattrib();
656  bool result;
657  OP_Utils::evalOpParm(result, thissop, "doindexattrib", cookparms.getCookTime(), 0);
658  return result;
659  }
660  const UT_StringHolder & getIndexattrib() const { return myIndexattrib; }
661  void setIndexattrib(const UT_StringHolder & val) { myIndexattrib = val; }
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getIndexattrib();
667  OP_Utils::evalOpParm(result, thissop, "indexattrib", cookparms.getCookTime(), 0);
668  return result;
669  }
670  bool getUseoutname() const { return myUseoutname; }
671  void setUseoutname(bool val) { myUseoutname = val; }
672  bool opUseoutname(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getUseoutname();
676  bool result;
677  OP_Utils::evalOpParm(result, thissop, "useoutname", cookparms.getCookTime(), 0);
678  return result;
679  }
680  const UT_StringHolder & getOutname() const { return myOutname; }
681  void setOutname(const UT_StringHolder & val) { myOutname = val; }
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getOutname();
687  OP_Utils::evalOpParm(result, thissop, "outname", cookparms.getCookTime(), 0);
688  return result;
689  }
690  bool getDeletein() const { return myDeletein; }
691  void setDeletein(bool val) { myDeletein = val; }
692  bool opDeletein(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getDeletein();
696  bool result;
697  OP_Utils::evalOpParm(result, thissop, "deletein", cookparms.getCookTime(), 0);
698  return result;
699  }
700 
701 private:
702  UT_StringHolder myInname;
703  int64 myInclass;
704  int64 myOutclass;
705  bool myUsePieceAttrib;
706  UT_StringHolder myPieceAttrib;
707  int64 myMethod;
708  bool myDoindexattrib;
709  UT_StringHolder myIndexattrib;
710  bool myUseoutname;
711  UT_StringHolder myOutname;
712  bool myDeletein;
713 
714 };
static void saveData(std::ostream &os, int64 v)
type
Definition: core.h:556
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const SOP_AttribPromoteParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:403
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opDeletein(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const SOP_AttribPromoteParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void setOutname(const UT_StringHolder &val)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
UT_StringHolder opPieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Inclass enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setInname(const UT_StringHolder &val)
An output stream object that owns its own string buffer storage.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool opDoindexattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
**But if you need a result
Definition: thread.h:622
const UT_StringHolder & getPieceAttrib() const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
bool opUseoutname(const SOP_NodeVerb::CookParms &cookparms) const
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 loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:493
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:426
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
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:497
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getInname() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_StringHolder opOutname(const SOP_NodeVerb::CookParms &cookparms) const
bool opUsePieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
long long int64
Definition: SYS_Types.h:116
const UT_StringHolder & getIndexattrib() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, fpreal64 v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getOutname() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:306
static void saveData(std::ostream &os, UT_Matrix2D v)
GT_API const UT_StringHolder version
UT_StringHolder opInname(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:283
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
static void loadData(UT_IStream &is, bool &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
#define SOP_API
Definition: SOP_API.h:10
void save(std::ostream &os) const
UT_StringHolder opIndexattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:432
void setPieceAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool isParmColorRamp(exint idx) const override
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
const char * getNestParmName(TempIndex fieldnum) const override
void setIndexattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
GLboolean r
Definition: glcorearb.h:1222
void copyFrom(const OP_NodeParms *src) override
exint bread(uint8 *buffer, exint asize=1)
Outclass opOutclass(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Inclass opInclass(const SOP_NodeVerb::CookParms &cookparms) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:428
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:665
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)