HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Sort.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_SortEnums
24 {
25  enum class Ptsort
26  {
27  NONE = 0,
28  VTXORD,
29  BYX,
30  BYY,
31  BYZ,
32  REV,
33  SEED,
34  SHIF,
35  PROX,
36  VECTOR,
37  EXPRESSION,
38  SPATIAL,
39  ATTRIBUTE,
40  PRIMINDEX,
41  REORDER
42  };
43 
45  getToken(Ptsort enum_value)
46  {
47  using namespace UT::Literal;
48  switch (enum_value) {
49  case Ptsort::NONE: return "none"_sh;
50  case Ptsort::VTXORD: return "vtxord"_sh;
51  case Ptsort::BYX: return "byx"_sh;
52  case Ptsort::BYY: return "byy"_sh;
53  case Ptsort::BYZ: return "byz"_sh;
54  case Ptsort::REV: return "rev"_sh;
55  case Ptsort::SEED: return "seed"_sh;
56  case Ptsort::SHIF: return "shif"_sh;
57  case Ptsort::PROX: return "prox"_sh;
58  case Ptsort::VECTOR: return "vector"_sh;
59  case Ptsort::EXPRESSION: return "expression"_sh;
60  case Ptsort::SPATIAL: return "spatial"_sh;
61  case Ptsort::ATTRIBUTE: return "attribute"_sh;
62  case Ptsort::PRIMINDEX: return "primindex"_sh;
63  case Ptsort::REORDER: return "reorder"_sh;
64  default: UT_ASSERT(false); return ""_sh;
65  }
66  }
67 
68  enum class Primsort
69  {
70  NONE = 0,
71  BYX,
72  BYY,
73  BYZ,
74  REV,
75  SEED,
76  SHIF,
77  PROX,
78  VECTOR,
79  EXPRESSION,
80  SPATIAL,
81  ATTRIBUTE,
82  REORDER
83  };
84 
86  getToken(Primsort enum_value)
87  {
88  using namespace UT::Literal;
89  switch (enum_value) {
90  case Primsort::NONE: return "none"_sh;
91  case Primsort::BYX: return "byx"_sh;
92  case Primsort::BYY: return "byy"_sh;
93  case Primsort::BYZ: return "byz"_sh;
94  case Primsort::REV: return "rev"_sh;
95  case Primsort::SEED: return "seed"_sh;
96  case Primsort::SHIF: return "shif"_sh;
97  case Primsort::PROX: return "prox"_sh;
98  case Primsort::VECTOR: return "vector"_sh;
99  case Primsort::EXPRESSION: return "expression"_sh;
100  case Primsort::SPATIAL: return "spatial"_sh;
101  case Primsort::ATTRIBUTE: return "attribute"_sh;
102  case Primsort::REORDER: return "reorder"_sh;
103  default: UT_ASSERT(false); return ""_sh;
104  }
105  }
106 
107 }
108 
109 
111 {
112 public:
113  static int version() { return 1; }
114 
116  {
117  myPtgroup = ""_UTsh;
118  myPtsort = 0;
119  myPointseed = 0;
120  myPointoffset = 0;
121  myPointprox = UT_Vector3D(0,0,0);
122  myPointobjpath = ""_UTsh;
123  myPointdir = UT_Vector3D(0,1,0);
124  myPointexpr = 0;
125  myPointattrib = ""_UTsh;
126  myPointattribcomp = 0;
127  myPointorder = "indices"_UTsh;
128  myPointreverse = false;
129  myUsepointindices = false;
130  myPointindices = "indices"_UTsh;
131  myCombinepointindices = false;
132  myPrimgroup = ""_UTsh;
133  myPrimsort = 0;
134  myPrimseed = 0;
135  myPrimoffset = 0;
136  myPrimprox = UT_Vector3D(0,0,0);
137  myPrimobjpath = ""_UTsh;
138  myPrimdir = UT_Vector3D(0,1,0);
139  myPrimexpr = 0;
140  myPrimattrib = ""_UTsh;
141  myPrimattribcomp = 0;
142  myPrimorder = "indices"_UTsh;
143  myPrimreverse = false;
144  myUseprimindices = false;
145  myPrimindices = "indices"_UTsh;
146  myCombineprimindices = false;
147  myVertexPrimOrder = true;
148 
149  }
150 
151  explicit SOP_SortParms(const SOP_SortParms &) = default;
152  SOP_SortParms &operator=(const SOP_SortParms &) = default;
153  SOP_SortParms(SOP_SortParms &&) noexcept = default;
154  SOP_SortParms &operator=(SOP_SortParms &&) noexcept = default;
155 
156  ~SOP_SortParms() override {}
157 
158  bool operator==(const SOP_SortParms &src) const
159  {
160  if (myPtgroup != src.myPtgroup) return false;
161  if (myPtsort != src.myPtsort) return false;
162  if (myPointseed != src.myPointseed) return false;
163  if (myPointoffset != src.myPointoffset) return false;
164  if (myPointprox != src.myPointprox) return false;
165  if (myPointobjpath != src.myPointobjpath) return false;
166  if (myPointdir != src.myPointdir) return false;
167  if (myPointexpr != src.myPointexpr) return false;
168  if (myPointattrib != src.myPointattrib) return false;
169  if (myPointattribcomp != src.myPointattribcomp) return false;
170  if (myPointorder != src.myPointorder) return false;
171  if (myPointreverse != src.myPointreverse) return false;
172  if (myUsepointindices != src.myUsepointindices) return false;
173  if (myPointindices != src.myPointindices) return false;
174  if (myCombinepointindices != src.myCombinepointindices) return false;
175  if (myPrimgroup != src.myPrimgroup) return false;
176  if (myPrimsort != src.myPrimsort) return false;
177  if (myPrimseed != src.myPrimseed) return false;
178  if (myPrimoffset != src.myPrimoffset) return false;
179  if (myPrimprox != src.myPrimprox) return false;
180  if (myPrimobjpath != src.myPrimobjpath) return false;
181  if (myPrimdir != src.myPrimdir) return false;
182  if (myPrimexpr != src.myPrimexpr) return false;
183  if (myPrimattrib != src.myPrimattrib) return false;
184  if (myPrimattribcomp != src.myPrimattribcomp) return false;
185  if (myPrimorder != src.myPrimorder) return false;
186  if (myPrimreverse != src.myPrimreverse) return false;
187  if (myUseprimindices != src.myUseprimindices) return false;
188  if (myPrimindices != src.myPrimindices) return false;
189  if (myCombineprimindices != src.myCombineprimindices) return false;
190  if (myVertexPrimOrder != src.myVertexPrimOrder) return false;
191 
192 
193  if (baseGetSignature() != src.baseGetSignature()) return false;
194 
195  return true;
196  }
197  bool operator!=(const SOP_SortParms &src) const
198  {
199  return !operator==(src);
200  }
203 
204 
205 
206  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
207  {
208  myPtgroup = ""_UTsh;
209  if (true)
210  graph->evalOpParm(myPtgroup, nodeidx, "ptgroup", time, graph->isDirect()?nullptr:depnode);
211  myPtsort = 0;
212  if (true)
213  graph->evalOpParm(myPtsort, nodeidx, "ptsort", time, graph->isDirect()?nullptr:depnode);
214  myPointseed = 0;
215  if (true && ( (true&&!(((int64(getPtsort())!=6)))) ) )
216  graph->evalOpParm(myPointseed, nodeidx, "pointseed", time, graph->isDirect()?nullptr:depnode);
217  myPointoffset = 0;
218  if (true && ( (true&&!(((int64(getPtsort())!=7)))) ) )
219  graph->evalOpParm(myPointoffset, nodeidx, "pointoffset", time, graph->isDirect()?nullptr:depnode);
220  myPointprox = UT_Vector3D(0,0,0);
221  if (true && ( (true&&!(((int64(getPtsort())!=8)))) ) )
222  graph->evalOpParm(myPointprox, nodeidx, "pointprox", time, graph->isDirect()?nullptr:depnode);
223  myPointobjpath = ""_UTsh;
224  if (true && ( (true&&!(((int64(getPtsort())!=9)))) ) )
225  graph->evalOpParm(myPointobjpath, nodeidx, "pointobjpath", time, graph->isDirect()?nullptr:depnode);
226  myPointdir = UT_Vector3D(0,1,0);
227  if (true && ( (true&&!(((int64(getPtsort())!=9)))) ) )
228  graph->evalOpParm(myPointdir, nodeidx, "pointdir", time, graph->isDirect()?nullptr:depnode);
229  myPointexpr = 0;
230  if (true && ( (true&&!(((int64(getPtsort())!=10)))) ) )
231  graph->evalOpParm(myPointexpr, nodeidx, "pointexpr", time, graph->isDirect()?nullptr:depnode);
232  myPointattrib = ""_UTsh;
233  if (true && ( (true&&!(((int64(getPtsort())!=12)))) ) )
234  graph->evalOpParm(myPointattrib, nodeidx, "pointattrib", time, graph->isDirect()?nullptr:depnode);
235  myPointattribcomp = 0;
236  if (true && ( (true&&!(((int64(getPtsort())!=12)))) ) )
237  graph->evalOpParm(myPointattribcomp, nodeidx, "pointattribcomp", time, graph->isDirect()?nullptr:depnode);
238  myPointorder = "indices"_UTsh;
239  if (true && ( (true&&!(((int64(getPtsort())!=14)))) ) )
240  graph->evalOpParm(myPointorder, nodeidx, "pointorder", time, graph->isDirect()?nullptr:depnode);
241  myPointreverse = false;
242  if (true)
243  graph->evalOpParm(myPointreverse, nodeidx, "pointreverse", time, graph->isDirect()?nullptr:depnode);
244  myUsepointindices = false;
245  if (true && ( (true&&!(((int64(getPtsort())==14)))) ) )
246  graph->evalOpParm(myUsepointindices, nodeidx, "usepointindices", time, graph->isDirect()?nullptr:depnode);
247  myPointindices = "indices"_UTsh;
248  if (true && ( (true&&!(((getUsepointindices()==0))||((int64(getPtsort())==14))||((int64(getPtsort())==14)))) ) )
249  graph->evalOpParm(myPointindices, nodeidx, "pointindices", time, graph->isDirect()?nullptr:depnode);
250  myCombinepointindices = false;
251  if (true && ( (true&&!(((getUsepointindices()==0))||((int64(getPtsort())==14))||((int64(getPtsort())==14)))) ) )
252  graph->evalOpParm(myCombinepointindices, nodeidx, "combinepointindices", time, graph->isDirect()?nullptr:depnode);
253  myPrimgroup = ""_UTsh;
254  if (true)
255  graph->evalOpParm(myPrimgroup, nodeidx, "primgroup", time, graph->isDirect()?nullptr:depnode);
256  myPrimsort = 0;
257  if (true)
258  graph->evalOpParm(myPrimsort, nodeidx, "primsort", time, graph->isDirect()?nullptr:depnode);
259  myPrimseed = 0;
260  if (true && ( (true&&!(((int64(getPrimsort())!=5)))) ) )
261  graph->evalOpParm(myPrimseed, nodeidx, "primseed", time, graph->isDirect()?nullptr:depnode);
262  myPrimoffset = 0;
263  if (true && ( (true&&!(((int64(getPrimsort())!=6)))) ) )
264  graph->evalOpParm(myPrimoffset, nodeidx, "primoffset", time, graph->isDirect()?nullptr:depnode);
265  myPrimprox = UT_Vector3D(0,0,0);
266  if (true && ( (true&&!(((int64(getPrimsort())!=7)))) ) )
267  graph->evalOpParm(myPrimprox, nodeidx, "primprox", time, graph->isDirect()?nullptr:depnode);
268  myPrimobjpath = ""_UTsh;
269  if (true && ( (true&&!(((int64(getPrimsort())!=8)))) ) )
270  graph->evalOpParm(myPrimobjpath, nodeidx, "primobjpath", time, graph->isDirect()?nullptr:depnode);
271  myPrimdir = UT_Vector3D(0,1,0);
272  if (true && ( (true&&!(((int64(getPrimsort())!=8)))) ) )
273  graph->evalOpParm(myPrimdir, nodeidx, "primdir", time, graph->isDirect()?nullptr:depnode);
274  myPrimexpr = 0;
275  if (true && ( (true&&!(((int64(getPrimsort())!=9)))) ) )
276  graph->evalOpParm(myPrimexpr, nodeidx, "primexpr", time, graph->isDirect()?nullptr:depnode);
277  myPrimattrib = ""_UTsh;
278  if (true && ( (true&&!(((int64(getPrimsort())!=11)))) ) )
279  graph->evalOpParm(myPrimattrib, nodeidx, "primattrib", time, graph->isDirect()?nullptr:depnode);
280  myPrimattribcomp = 0;
281  if (true && ( (true&&!(((int64(getPrimsort())!=11)))) ) )
282  graph->evalOpParm(myPrimattribcomp, nodeidx, "primattribcomp", time, graph->isDirect()?nullptr:depnode);
283  myPrimorder = "indices"_UTsh;
284  if (true && ( (true&&!(((int64(getPrimsort())!=12)))) ) )
285  graph->evalOpParm(myPrimorder, nodeidx, "primorder", time, graph->isDirect()?nullptr:depnode);
286  myPrimreverse = false;
287  if (true)
288  graph->evalOpParm(myPrimreverse, nodeidx, "primreverse", time, graph->isDirect()?nullptr:depnode);
289  myUseprimindices = false;
290  if (true && ( (true&&!(((int64(getPrimsort())==12)))) ) )
291  graph->evalOpParm(myUseprimindices, nodeidx, "useprimindices", time, graph->isDirect()?nullptr:depnode);
292  myPrimindices = "indices"_UTsh;
293  if (true && ( (true&&!(((getUseprimindices()==0))||((int64(getPrimsort())==12))||((int64(getPrimsort())==12)))) ) )
294  graph->evalOpParm(myPrimindices, nodeidx, "primindices", time, graph->isDirect()?nullptr:depnode);
295  myCombineprimindices = false;
296  if (true && ( (true&&!(((getUseprimindices()==0))||((int64(getPrimsort())==12))||((int64(getPrimsort())==12)))) ) )
297  graph->evalOpParm(myCombineprimindices, nodeidx, "combineprimindices", time, graph->isDirect()?nullptr:depnode);
298  myVertexPrimOrder = true;
299  if (true)
300  graph->evalOpParm(myVertexPrimOrder, nodeidx, "vertexprimorder", time, graph->isDirect()?nullptr:depnode);
301 
302  }
303 
304 
305  void loadFromOpSubclass(const LoadParms &loadparms) override
306  {
307  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
308  }
309 
310 
311  void copyFrom(const OP_NodeParms *src) override
312  {
313  *this = *((const SOP_SortParms *)src);
314  }
315 
316  template <typename T>
317  void
318  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
319  {
320  if (idx.size() < 1)
321  return;
322  UT_ASSERT(idx.size() == instance.size()+1);
323  if (idx.size() != instance.size()+1)
324  return;
325  switch (idx[0])
326  {
327  case 0:
328  coerceValue(value, myPtgroup);
329  break;
330  case 1:
331  coerceValue(value, myPtsort);
332  break;
333  case 2:
334  coerceValue(value, myPointseed);
335  break;
336  case 3:
337  coerceValue(value, myPointoffset);
338  break;
339  case 4:
340  coerceValue(value, myPointprox);
341  break;
342  case 5:
343  coerceValue(value, myPointobjpath);
344  break;
345  case 6:
346  coerceValue(value, myPointdir);
347  break;
348  case 7:
349  coerceValue(value, myPointexpr);
350  break;
351  case 8:
352  coerceValue(value, myPointattrib);
353  break;
354  case 9:
355  coerceValue(value, myPointattribcomp);
356  break;
357  case 10:
358  coerceValue(value, myPointorder);
359  break;
360  case 11:
361  coerceValue(value, myPointreverse);
362  break;
363  case 12:
364  coerceValue(value, myUsepointindices);
365  break;
366  case 13:
367  coerceValue(value, myPointindices);
368  break;
369  case 14:
370  coerceValue(value, myCombinepointindices);
371  break;
372  case 15:
373  coerceValue(value, myPrimgroup);
374  break;
375  case 16:
376  coerceValue(value, myPrimsort);
377  break;
378  case 17:
379  coerceValue(value, myPrimseed);
380  break;
381  case 18:
382  coerceValue(value, myPrimoffset);
383  break;
384  case 19:
385  coerceValue(value, myPrimprox);
386  break;
387  case 20:
388  coerceValue(value, myPrimobjpath);
389  break;
390  case 21:
391  coerceValue(value, myPrimdir);
392  break;
393  case 22:
394  coerceValue(value, myPrimexpr);
395  break;
396  case 23:
397  coerceValue(value, myPrimattrib);
398  break;
399  case 24:
400  coerceValue(value, myPrimattribcomp);
401  break;
402  case 25:
403  coerceValue(value, myPrimorder);
404  break;
405  case 26:
406  coerceValue(value, myPrimreverse);
407  break;
408  case 27:
409  coerceValue(value, myUseprimindices);
410  break;
411  case 28:
412  coerceValue(value, myPrimindices);
413  break;
414  case 29:
415  coerceValue(value, myCombineprimindices);
416  break;
417  case 30:
418  coerceValue(value, myVertexPrimOrder);
419  break;
420 
421  }
422  }
423 
424  bool isParmColorRamp(exint idx) const override
425  {
426  switch (idx)
427  {
428 
429  }
430  return false;
431  }
432 
433  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
434  { doGetParmValue(idx, instance, value); }
435  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
436  { doGetParmValue(idx, instance, value); }
437  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
438  { doGetParmValue(idx, instance, value); }
439  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
440  { doGetParmValue(idx, instance, value); }
441  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
442  { doGetParmValue(idx, instance, value); }
443  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
444  { doGetParmValue(idx, instance, value); }
445  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
446  { doGetParmValue(idx, instance, value); }
447  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
448  { doGetParmValue(idx, instance, value); }
449  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
450  { doGetParmValue(idx, instance, value); }
451  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
452  { doGetParmValue(idx, instance, value); }
453  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
454  { doGetParmValue(idx, instance, value); }
455 
456  template <typename T>
457  void
458  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
459  {
460  if (idx.size() < 1)
461  return;
462  UT_ASSERT(idx.size() == instance.size()+1);
463  if (idx.size() != instance.size()+1)
464  return;
465  switch (idx[0])
466  {
467  case 0:
468  coerceValue(myPtgroup, ( ( value ) ));
469  break;
470  case 1:
471  coerceValue(myPtsort, clampMinValue(0, clampMaxValue(14, value ) ));
472  break;
473  case 2:
474  coerceValue(myPointseed, ( ( value ) ));
475  break;
476  case 3:
477  coerceValue(myPointoffset, ( ( value ) ));
478  break;
479  case 4:
480  coerceValue(myPointprox, ( ( value ) ));
481  break;
482  case 5:
483  coerceValue(myPointobjpath, ( ( value ) ));
484  break;
485  case 6:
486  coerceValue(myPointdir, ( ( value ) ));
487  break;
488  case 7:
489  coerceValue(myPointexpr, ( ( value ) ));
490  break;
491  case 8:
492  coerceValue(myPointattrib, ( ( value ) ));
493  break;
494  case 9:
495  coerceValue(myPointattribcomp, ( ( value ) ));
496  break;
497  case 10:
498  coerceValue(myPointorder, ( ( value ) ));
499  break;
500  case 11:
501  coerceValue(myPointreverse, ( ( value ) ));
502  break;
503  case 12:
504  coerceValue(myUsepointindices, ( ( value ) ));
505  break;
506  case 13:
507  coerceValue(myPointindices, ( ( value ) ));
508  break;
509  case 14:
510  coerceValue(myCombinepointindices, ( ( value ) ));
511  break;
512  case 15:
513  coerceValue(myPrimgroup, ( ( value ) ));
514  break;
515  case 16:
516  coerceValue(myPrimsort, clampMinValue(0, clampMaxValue(12, value ) ));
517  break;
518  case 17:
519  coerceValue(myPrimseed, ( ( value ) ));
520  break;
521  case 18:
522  coerceValue(myPrimoffset, ( ( value ) ));
523  break;
524  case 19:
525  coerceValue(myPrimprox, ( ( value ) ));
526  break;
527  case 20:
528  coerceValue(myPrimobjpath, ( ( value ) ));
529  break;
530  case 21:
531  coerceValue(myPrimdir, ( ( value ) ));
532  break;
533  case 22:
534  coerceValue(myPrimexpr, ( ( value ) ));
535  break;
536  case 23:
537  coerceValue(myPrimattrib, ( ( value ) ));
538  break;
539  case 24:
540  coerceValue(myPrimattribcomp, ( ( value ) ));
541  break;
542  case 25:
543  coerceValue(myPrimorder, ( ( value ) ));
544  break;
545  case 26:
546  coerceValue(myPrimreverse, ( ( value ) ));
547  break;
548  case 27:
549  coerceValue(myUseprimindices, ( ( value ) ));
550  break;
551  case 28:
552  coerceValue(myPrimindices, ( ( value ) ));
553  break;
554  case 29:
555  coerceValue(myCombineprimindices, ( ( value ) ));
556  break;
557  case 30:
558  coerceValue(myVertexPrimOrder, ( ( value ) ));
559  break;
560 
561  }
562  }
563 
564  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
565  { doSetParmValue(idx, instance, value); }
566  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
567  { doSetParmValue(idx, instance, value); }
568  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
569  { doSetParmValue(idx, instance, value); }
570  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
571  { doSetParmValue(idx, instance, value); }
572  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
573  { doSetParmValue(idx, instance, value); }
574  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
575  { doSetParmValue(idx, instance, value); }
576  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
577  { doSetParmValue(idx, instance, value); }
578  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
579  { doSetParmValue(idx, instance, value); }
580  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
581  { doSetParmValue(idx, instance, value); }
582  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
583  { doSetParmValue(idx, instance, value); }
584  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
585  { doSetParmValue(idx, instance, value); }
586 
587  exint getNestNumParms(TempIndex idx) const override
588  {
589  if (idx.size() == 0)
590  return 31;
591  switch (idx[0])
592  {
593 
594  }
595  // Invalid
596  return 0;
597  }
598 
599  const char *getNestParmName(TempIndex fieldnum) const override
600  {
601  if (fieldnum.size() < 1)
602  return 0;
603  switch (fieldnum[0])
604  {
605  case 0:
606  return "ptgroup";
607  case 1:
608  return "ptsort";
609  case 2:
610  return "pointseed";
611  case 3:
612  return "pointoffset";
613  case 4:
614  return "pointprox";
615  case 5:
616  return "pointobjpath";
617  case 6:
618  return "pointdir";
619  case 7:
620  return "pointexpr";
621  case 8:
622  return "pointattrib";
623  case 9:
624  return "pointattribcomp";
625  case 10:
626  return "pointorder";
627  case 11:
628  return "pointreverse";
629  case 12:
630  return "usepointindices";
631  case 13:
632  return "pointindices";
633  case 14:
634  return "combinepointindices";
635  case 15:
636  return "primgroup";
637  case 16:
638  return "primsort";
639  case 17:
640  return "primseed";
641  case 18:
642  return "primoffset";
643  case 19:
644  return "primprox";
645  case 20:
646  return "primobjpath";
647  case 21:
648  return "primdir";
649  case 22:
650  return "primexpr";
651  case 23:
652  return "primattrib";
653  case 24:
654  return "primattribcomp";
655  case 25:
656  return "primorder";
657  case 26:
658  return "primreverse";
659  case 27:
660  return "useprimindices";
661  case 28:
662  return "primindices";
663  case 29:
664  return "combineprimindices";
665  case 30:
666  return "vertexprimorder";
667 
668  }
669  return 0;
670  }
671 
672  ParmType getNestParmType(TempIndex fieldnum) const override
673  {
674  if (fieldnum.size() < 1)
675  return PARM_UNSUPPORTED;
676  switch (fieldnum[0])
677  {
678  case 0:
679  return PARM_STRING;
680  case 1:
681  return PARM_INTEGER;
682  case 2:
683  return PARM_INTEGER;
684  case 3:
685  return PARM_INTEGER;
686  case 4:
687  return PARM_VECTOR3;
688  case 5:
689  return PARM_STRING;
690  case 6:
691  return PARM_VECTOR3;
692  case 7:
693  return PARM_FLOAT;
694  case 8:
695  return PARM_STRING;
696  case 9:
697  return PARM_INTEGER;
698  case 10:
699  return PARM_STRING;
700  case 11:
701  return PARM_INTEGER;
702  case 12:
703  return PARM_INTEGER;
704  case 13:
705  return PARM_STRING;
706  case 14:
707  return PARM_INTEGER;
708  case 15:
709  return PARM_STRING;
710  case 16:
711  return PARM_INTEGER;
712  case 17:
713  return PARM_INTEGER;
714  case 18:
715  return PARM_INTEGER;
716  case 19:
717  return PARM_VECTOR3;
718  case 20:
719  return PARM_STRING;
720  case 21:
721  return PARM_VECTOR3;
722  case 22:
723  return PARM_FLOAT;
724  case 23:
725  return PARM_STRING;
726  case 24:
727  return PARM_INTEGER;
728  case 25:
729  return PARM_STRING;
730  case 26:
731  return PARM_INTEGER;
732  case 27:
733  return PARM_INTEGER;
734  case 28:
735  return PARM_STRING;
736  case 29:
737  return PARM_INTEGER;
738  case 30:
739  return PARM_INTEGER;
740 
741  }
742  return PARM_UNSUPPORTED;
743  }
744 
745  // Boiler plate to load individual types.
746  static void loadData(UT_IStream &is, int64 &v)
747  { is.bread(&v, 1); }
748  static void loadData(UT_IStream &is, bool &v)
749  { int64 iv; is.bread(&iv, 1); v = iv; }
750  static void loadData(UT_IStream &is, fpreal64 &v)
751  { is.bread<fpreal64>(&v, 1); }
752  static void loadData(UT_IStream &is, UT_Vector2D &v)
753  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
754  static void loadData(UT_IStream &is, UT_Vector3D &v)
755  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
756  is.bread<fpreal64>(&v.z(), 1); }
757  static void loadData(UT_IStream &is, UT_Vector4D &v)
758  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
759  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
760  static void loadData(UT_IStream &is, UT_Matrix2D &v)
761  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
762  static void loadData(UT_IStream &is, UT_Matrix3D &v)
763  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
764  static void loadData(UT_IStream &is, UT_Matrix4D &v)
765  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
766  static void loadData(UT_IStream &is, UT_Vector2I &v)
767  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
768  static void loadData(UT_IStream &is, UT_Vector3I &v)
769  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
770  is.bread<int64>(&v.z(), 1); }
771  static void loadData(UT_IStream &is, UT_Vector4I &v)
772  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
773  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
775  { is.bread(v); }
777  { UT_StringHolder rampdata;
778  loadData(is, rampdata);
779  if (rampdata.isstring())
780  {
781  v.reset(new UT_Ramp());
782  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
783  v->load(istr);
784  }
785  else v.reset();
786  }
789  loadData(is, data);
790  if (data.isstring())
791  {
792  // Find the data type.
793  const char *colon = UT_StringWrap(data).findChar(':');
794  if (colon)
795  {
796  int typelen = colon - data.buffer();
798  type.strncpy(data.buffer(), typelen);
799  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
800 
801  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
802  }
803  }
804  else v.reset();
805  }
806 
807  static void saveData(std::ostream &os, int64 v)
808  { UTwrite(os, &v); }
809  static void saveData(std::ostream &os, bool v)
810  { int64 iv = v; UTwrite(os, &iv); }
811  static void saveData(std::ostream &os, fpreal64 v)
812  { UTwrite<fpreal64>(os, &v); }
813  static void saveData(std::ostream &os, UT_Vector2D v)
814  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
815  static void saveData(std::ostream &os, UT_Vector3D v)
816  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
817  UTwrite<fpreal64>(os, &v.z()); }
818  static void saveData(std::ostream &os, UT_Vector4D v)
819  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
820  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
821  static void saveData(std::ostream &os, UT_Matrix2D v)
823  static void saveData(std::ostream &os, UT_Matrix3D v)
825  static void saveData(std::ostream &os, UT_Matrix4D v)
827  static void saveData(std::ostream &os, UT_StringHolder s)
828  { UT_StringWrap(s).saveBinary(os); }
829  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
831  UT_OStringStream ostr;
832  if (s) s->save(ostr);
833  result = ostr.str();
834  saveData(os, result);
835  }
836  static void saveData(std::ostream &os, PRM_DataItemHandle s)
838  UT_OStringStream ostr;
839  if (s)
840  {
841  ostr << s->getDataTypeToken();
842  ostr << ":";
843  s->saveBinary(ostr);
844  }
845  result = ostr.str();
846  saveData(os, result);
847  }
848 
849 
850  void save(std::ostream &os) const
851  {
852  int32 v = version();
853  UTwrite(os, &v);
854  saveData(os, myPtgroup);
855  saveData(os, myPtsort);
856  saveData(os, myPointseed);
857  saveData(os, myPointoffset);
858  saveData(os, myPointprox);
859  saveData(os, myPointobjpath);
860  saveData(os, myPointdir);
861  saveData(os, myPointexpr);
862  saveData(os, myPointattrib);
863  saveData(os, myPointattribcomp);
864  saveData(os, myPointorder);
865  saveData(os, myPointreverse);
866  saveData(os, myUsepointindices);
867  saveData(os, myPointindices);
868  saveData(os, myCombinepointindices);
869  saveData(os, myPrimgroup);
870  saveData(os, myPrimsort);
871  saveData(os, myPrimseed);
872  saveData(os, myPrimoffset);
873  saveData(os, myPrimprox);
874  saveData(os, myPrimobjpath);
875  saveData(os, myPrimdir);
876  saveData(os, myPrimexpr);
877  saveData(os, myPrimattrib);
878  saveData(os, myPrimattribcomp);
879  saveData(os, myPrimorder);
880  saveData(os, myPrimreverse);
881  saveData(os, myUseprimindices);
882  saveData(os, myPrimindices);
883  saveData(os, myCombineprimindices);
884  saveData(os, myVertexPrimOrder);
885 
886  }
887 
888  bool load(UT_IStream &is)
889  {
890  int32 v;
891  is.bread(&v, 1);
892  if (version() != v)
893  {
894  // Fail incompatible versions
895  return false;
896  }
897  loadData(is, myPtgroup);
898  loadData(is, myPtsort);
899  loadData(is, myPointseed);
900  loadData(is, myPointoffset);
901  loadData(is, myPointprox);
902  loadData(is, myPointobjpath);
903  loadData(is, myPointdir);
904  loadData(is, myPointexpr);
905  loadData(is, myPointattrib);
906  loadData(is, myPointattribcomp);
907  loadData(is, myPointorder);
908  loadData(is, myPointreverse);
909  loadData(is, myUsepointindices);
910  loadData(is, myPointindices);
911  loadData(is, myCombinepointindices);
912  loadData(is, myPrimgroup);
913  loadData(is, myPrimsort);
914  loadData(is, myPrimseed);
915  loadData(is, myPrimoffset);
916  loadData(is, myPrimprox);
917  loadData(is, myPrimobjpath);
918  loadData(is, myPrimdir);
919  loadData(is, myPrimexpr);
920  loadData(is, myPrimattrib);
921  loadData(is, myPrimattribcomp);
922  loadData(is, myPrimorder);
923  loadData(is, myPrimreverse);
924  loadData(is, myUseprimindices);
925  loadData(is, myPrimindices);
926  loadData(is, myCombineprimindices);
927  loadData(is, myVertexPrimOrder);
928 
929  return true;
930  }
931 
932  const UT_StringHolder & getPtgroup() const { return myPtgroup; }
933  void setPtgroup(const UT_StringHolder & val) { myPtgroup = val; }
935  {
936  SOP_Node *thissop = cookparms.getNode();
937  if (!thissop) return getPtgroup();
939  OP_Utils::evalOpParm(result, thissop, "ptgroup", cookparms.getCookTime(), 0);
940  return result;
941  }
942  Ptsort getPtsort() const { return Ptsort(myPtsort); }
943  void setPtsort(Ptsort val) { myPtsort = int64(val); }
944  Ptsort opPtsort(const SOP_NodeVerb::CookParms &cookparms) const
945  {
946  SOP_Node *thissop = cookparms.getNode();
947  if (!thissop) return getPtsort();
948  int64 result;
949  OP_Utils::evalOpParm(result, thissop, "ptsort", cookparms.getCookTime(), 0);
950  return Ptsort(result);
951  }
952  int64 getPointseed() const { return myPointseed; }
953  void setPointseed(int64 val) { myPointseed = val; }
954  int64 opPointseed(const SOP_NodeVerb::CookParms &cookparms) const
955  {
956  SOP_Node *thissop = cookparms.getNode();
957  if (!thissop) return getPointseed();
958  int64 result;
959  OP_Utils::evalOpParm(result, thissop, "pointseed", cookparms.getCookTime(), 0);
960  return result;
961  }
962  int64 getPointoffset() const { return myPointoffset; }
963  void setPointoffset(int64 val) { myPointoffset = val; }
965  {
966  SOP_Node *thissop = cookparms.getNode();
967  if (!thissop) return getPointoffset();
968  int64 result;
969  OP_Utils::evalOpParm(result, thissop, "pointoffset", cookparms.getCookTime(), 0);
970  return result;
971  }
972  UT_Vector3D getPointprox() const { return myPointprox; }
973  void setPointprox(UT_Vector3D val) { myPointprox = val; }
975  {
976  SOP_Node *thissop = cookparms.getNode();
977  if (!thissop) return getPointprox();
979  OP_Utils::evalOpParm(result, thissop, "pointprox", cookparms.getCookTime(), 0);
980  return result;
981  }
982  const UT_StringHolder & getPointobjpath() const { return myPointobjpath; }
983  void setPointobjpath(const UT_StringHolder & val) { myPointobjpath = val; }
985  {
986  SOP_Node *thissop = cookparms.getNode();
987  if (!thissop) return getPointobjpath();
989  OP_Utils::evalOpParm(result, thissop, "pointobjpath", cookparms.getCookTime(), 0);
990  return result;
991  }
992  UT_Vector3D getPointdir() const { return myPointdir; }
993  void setPointdir(UT_Vector3D val) { myPointdir = val; }
995  {
996  SOP_Node *thissop = cookparms.getNode();
997  if (!thissop) return getPointdir();
999  OP_Utils::evalOpParm(result, thissop, "pointdir", cookparms.getCookTime(), 0);
1000  return result;
1001  }
1002  fpreal64 getPointexpr() const { return myPointexpr; }
1003  void setPointexpr(fpreal64 val) { myPointexpr = val; }
1005  {
1006  SOP_Node *thissop = cookparms.getNode();
1007  if (!thissop) return getPointexpr();
1008  fpreal64 result;
1009  OP_Utils::evalOpParm(result, thissop, "pointexpr", cookparms.getCookTime(), 0);
1010  return result;
1011  }
1012  const UT_StringHolder & getPointattrib() const { return myPointattrib; }
1013  void setPointattrib(const UT_StringHolder & val) { myPointattrib = val; }
1015  {
1016  SOP_Node *thissop = cookparms.getNode();
1017  if (!thissop) return getPointattrib();
1019  OP_Utils::evalOpParm(result, thissop, "pointattrib", cookparms.getCookTime(), 0);
1020  return result;
1021  }
1022  int64 getPointattribcomp() const { return myPointattribcomp; }
1023  void setPointattribcomp(int64 val) { myPointattribcomp = val; }
1025  {
1026  SOP_Node *thissop = cookparms.getNode();
1027  if (!thissop) return getPointattribcomp();
1028  int64 result;
1029  OP_Utils::evalOpParm(result, thissop, "pointattribcomp", cookparms.getCookTime(), 0);
1030  return result;
1031  }
1032  const UT_StringHolder & getPointorder() const { return myPointorder; }
1033  void setPointorder(const UT_StringHolder & val) { myPointorder = val; }
1035  {
1036  SOP_Node *thissop = cookparms.getNode();
1037  if (!thissop) return getPointorder();
1039  OP_Utils::evalOpParm(result, thissop, "pointorder", cookparms.getCookTime(), 0);
1040  return result;
1041  }
1042  bool getPointreverse() const { return myPointreverse; }
1043  void setPointreverse(bool val) { myPointreverse = val; }
1044  bool opPointreverse(const SOP_NodeVerb::CookParms &cookparms) const
1045  {
1046  SOP_Node *thissop = cookparms.getNode();
1047  if (!thissop) return getPointreverse();
1048  bool result;
1049  OP_Utils::evalOpParm(result, thissop, "pointreverse", cookparms.getCookTime(), 0);
1050  return result;
1051  }
1052  bool getUsepointindices() const { return myUsepointindices; }
1053  void setUsepointindices(bool val) { myUsepointindices = val; }
1054  bool opUsepointindices(const SOP_NodeVerb::CookParms &cookparms) const
1055  {
1056  SOP_Node *thissop = cookparms.getNode();
1057  if (!thissop) return getUsepointindices();
1058  bool result;
1059  OP_Utils::evalOpParm(result, thissop, "usepointindices", cookparms.getCookTime(), 0);
1060  return result;
1061  }
1062  const UT_StringHolder & getPointindices() const { return myPointindices; }
1063  void setPointindices(const UT_StringHolder & val) { myPointindices = val; }
1065  {
1066  SOP_Node *thissop = cookparms.getNode();
1067  if (!thissop) return getPointindices();
1069  OP_Utils::evalOpParm(result, thissop, "pointindices", cookparms.getCookTime(), 0);
1070  return result;
1071  }
1072  bool getCombinepointindices() const { return myCombinepointindices; }
1073  void setCombinepointindices(bool val) { myCombinepointindices = val; }
1074  bool opCombinepointindices(const SOP_NodeVerb::CookParms &cookparms) const
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return getCombinepointindices();
1078  bool result;
1079  OP_Utils::evalOpParm(result, thissop, "combinepointindices", cookparms.getCookTime(), 0);
1080  return result;
1081  }
1082  const UT_StringHolder & getPrimgroup() const { return myPrimgroup; }
1083  void setPrimgroup(const UT_StringHolder & val) { myPrimgroup = val; }
1085  {
1086  SOP_Node *thissop = cookparms.getNode();
1087  if (!thissop) return getPrimgroup();
1089  OP_Utils::evalOpParm(result, thissop, "primgroup", cookparms.getCookTime(), 0);
1090  return result;
1091  }
1092  Primsort getPrimsort() const { return Primsort(myPrimsort); }
1093  void setPrimsort(Primsort val) { myPrimsort = int64(val); }
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return getPrimsort();
1098  int64 result;
1099  OP_Utils::evalOpParm(result, thissop, "primsort", cookparms.getCookTime(), 0);
1100  return Primsort(result);
1101  }
1102  int64 getPrimseed() const { return myPrimseed; }
1103  void setPrimseed(int64 val) { myPrimseed = val; }
1104  int64 opPrimseed(const SOP_NodeVerb::CookParms &cookparms) const
1105  {
1106  SOP_Node *thissop = cookparms.getNode();
1107  if (!thissop) return getPrimseed();
1108  int64 result;
1109  OP_Utils::evalOpParm(result, thissop, "primseed", cookparms.getCookTime(), 0);
1110  return result;
1111  }
1112  int64 getPrimoffset() const { return myPrimoffset; }
1113  void setPrimoffset(int64 val) { myPrimoffset = val; }
1115  {
1116  SOP_Node *thissop = cookparms.getNode();
1117  if (!thissop) return getPrimoffset();
1118  int64 result;
1119  OP_Utils::evalOpParm(result, thissop, "primoffset", cookparms.getCookTime(), 0);
1120  return result;
1121  }
1122  UT_Vector3D getPrimprox() const { return myPrimprox; }
1123  void setPrimprox(UT_Vector3D val) { myPrimprox = val; }
1125  {
1126  SOP_Node *thissop = cookparms.getNode();
1127  if (!thissop) return getPrimprox();
1129  OP_Utils::evalOpParm(result, thissop, "primprox", cookparms.getCookTime(), 0);
1130  return result;
1131  }
1132  const UT_StringHolder & getPrimobjpath() const { return myPrimobjpath; }
1133  void setPrimobjpath(const UT_StringHolder & val) { myPrimobjpath = val; }
1135  {
1136  SOP_Node *thissop = cookparms.getNode();
1137  if (!thissop) return getPrimobjpath();
1139  OP_Utils::evalOpParm(result, thissop, "primobjpath", cookparms.getCookTime(), 0);
1140  return result;
1141  }
1142  UT_Vector3D getPrimdir() const { return myPrimdir; }
1143  void setPrimdir(UT_Vector3D val) { myPrimdir = val; }
1145  {
1146  SOP_Node *thissop = cookparms.getNode();
1147  if (!thissop) return getPrimdir();
1149  OP_Utils::evalOpParm(result, thissop, "primdir", cookparms.getCookTime(), 0);
1150  return result;
1151  }
1152  fpreal64 getPrimexpr() const { return myPrimexpr; }
1153  void setPrimexpr(fpreal64 val) { myPrimexpr = val; }
1155  {
1156  SOP_Node *thissop = cookparms.getNode();
1157  if (!thissop) return getPrimexpr();
1158  fpreal64 result;
1159  OP_Utils::evalOpParm(result, thissop, "primexpr", cookparms.getCookTime(), 0);
1160  return result;
1161  }
1162  const UT_StringHolder & getPrimattrib() const { return myPrimattrib; }
1163  void setPrimattrib(const UT_StringHolder & val) { myPrimattrib = val; }
1165  {
1166  SOP_Node *thissop = cookparms.getNode();
1167  if (!thissop) return getPrimattrib();
1169  OP_Utils::evalOpParm(result, thissop, "primattrib", cookparms.getCookTime(), 0);
1170  return result;
1171  }
1172  int64 getPrimattribcomp() const { return myPrimattribcomp; }
1173  void setPrimattribcomp(int64 val) { myPrimattribcomp = val; }
1175  {
1176  SOP_Node *thissop = cookparms.getNode();
1177  if (!thissop) return getPrimattribcomp();
1178  int64 result;
1179  OP_Utils::evalOpParm(result, thissop, "primattribcomp", cookparms.getCookTime(), 0);
1180  return result;
1181  }
1182  const UT_StringHolder & getPrimorder() const { return myPrimorder; }
1183  void setPrimorder(const UT_StringHolder & val) { myPrimorder = val; }
1185  {
1186  SOP_Node *thissop = cookparms.getNode();
1187  if (!thissop) return getPrimorder();
1189  OP_Utils::evalOpParm(result, thissop, "primorder", cookparms.getCookTime(), 0);
1190  return result;
1191  }
1192  bool getPrimreverse() const { return myPrimreverse; }
1193  void setPrimreverse(bool val) { myPrimreverse = val; }
1194  bool opPrimreverse(const SOP_NodeVerb::CookParms &cookparms) const
1195  {
1196  SOP_Node *thissop = cookparms.getNode();
1197  if (!thissop) return getPrimreverse();
1198  bool result;
1199  OP_Utils::evalOpParm(result, thissop, "primreverse", cookparms.getCookTime(), 0);
1200  return result;
1201  }
1202  bool getUseprimindices() const { return myUseprimindices; }
1203  void setUseprimindices(bool val) { myUseprimindices = val; }
1204  bool opUseprimindices(const SOP_NodeVerb::CookParms &cookparms) const
1205  {
1206  SOP_Node *thissop = cookparms.getNode();
1207  if (!thissop) return getUseprimindices();
1208  bool result;
1209  OP_Utils::evalOpParm(result, thissop, "useprimindices", cookparms.getCookTime(), 0);
1210  return result;
1211  }
1212  const UT_StringHolder & getPrimindices() const { return myPrimindices; }
1213  void setPrimindices(const UT_StringHolder & val) { myPrimindices = val; }
1215  {
1216  SOP_Node *thissop = cookparms.getNode();
1217  if (!thissop) return getPrimindices();
1219  OP_Utils::evalOpParm(result, thissop, "primindices", cookparms.getCookTime(), 0);
1220  return result;
1221  }
1222  bool getCombineprimindices() const { return myCombineprimindices; }
1223  void setCombineprimindices(bool val) { myCombineprimindices = val; }
1224  bool opCombineprimindices(const SOP_NodeVerb::CookParms &cookparms) const
1225  {
1226  SOP_Node *thissop = cookparms.getNode();
1227  if (!thissop) return getCombineprimindices();
1228  bool result;
1229  OP_Utils::evalOpParm(result, thissop, "combineprimindices", cookparms.getCookTime(), 0);
1230  return result;
1231  }
1232  bool getVertexPrimOrder() const { return myVertexPrimOrder; }
1233  void setVertexPrimOrder(bool val) { myVertexPrimOrder = val; }
1234  bool opVertexPrimOrder(const SOP_NodeVerb::CookParms &cookparms) const
1235  {
1236  SOP_Node *thissop = cookparms.getNode();
1237  if (!thissop) return getVertexPrimOrder();
1238  bool result;
1239  OP_Utils::evalOpParm(result, thissop, "vertexprimorder", cookparms.getCookTime(), 0);
1240  return result;
1241  }
1242 
1243 private:
1244  UT_StringHolder myPtgroup;
1245  int64 myPtsort;
1246  int64 myPointseed;
1247  int64 myPointoffset;
1248  UT_Vector3D myPointprox;
1249  UT_StringHolder myPointobjpath;
1250  UT_Vector3D myPointdir;
1251  fpreal64 myPointexpr;
1252  UT_StringHolder myPointattrib;
1253  int64 myPointattribcomp;
1254  UT_StringHolder myPointorder;
1255  bool myPointreverse;
1256  bool myUsepointindices;
1257  UT_StringHolder myPointindices;
1258  bool myCombinepointindices;
1259  UT_StringHolder myPrimgroup;
1260  int64 myPrimsort;
1261  int64 myPrimseed;
1262  int64 myPrimoffset;
1263  UT_Vector3D myPrimprox;
1264  UT_StringHolder myPrimobjpath;
1265  UT_Vector3D myPrimdir;
1266  fpreal64 myPrimexpr;
1267  UT_StringHolder myPrimattrib;
1268  int64 myPrimattribcomp;
1269  UT_StringHolder myPrimorder;
1270  bool myPrimreverse;
1271  bool myUseprimindices;
1272  UT_StringHolder myPrimindices;
1273  bool myCombineprimindices;
1274  bool myVertexPrimOrder;
1275 
1276 };
void setPointreverse(bool val)
void setPointobjpath(const UT_StringHolder &val)
type
Definition: core.h:556
int64 opPrimattribcomp(const SOP_NodeVerb::CookParms &cookparms) const
bool getVertexPrimOrder() const
int64 getPointseed() const
void setPrimindices(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opPrimgroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
UT_Vector3D getPrimdir() const
void save(std::ostream &os) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setPrimreverse(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setPointexpr(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool opUsepointindices(const SOP_NodeVerb::CookParms &cookparms) const
void setPtgroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 opPointattribcomp(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_SortParms &src) const
const UT_StringHolder & getPointobjpath() 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
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, fpreal64 v)
bool opCombineprimindices(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getPrimexpr() const
Primsort opPrimsort(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPrimindices(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setPointoffset(int64 val)
SYS_FORCE_INLINE const char * buffer() const
int64 getPointattribcomp() const
bool getUsepointindices() const
UT_Vector3D opPointprox(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glad.h:3009
static void saveData(std::ostream &os, UT_Matrix3D v)
void setPrimexpr(fpreal64 val)
int64 opPrimoffset(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opPrimobjpath(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
**But if you need a result
Definition: thread.h:622
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool opPrimreverse(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Ptsort getPtsort() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool opUseprimindices(const SOP_NodeVerb::CookParms &cookparms) const
void setPointattribcomp(int64 val)
void setPrimattribcomp(int64 val)
fpreal64 opPointexpr(const SOP_NodeVerb::CookParms &cookparms) const
Primsort getPrimsort() const
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 loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_Vector3D opPointdir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector3I &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:423
bool opVertexPrimOrder(const SOP_NodeVerb::CookParms &cookparms) const
void setPointdir(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool getPointreverse() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
int64 opPointoffset(const SOP_NodeVerb::CookParms &cookparms) const
void setPrimseed(int64 val)
bool getUseprimindices() const
const UT_StringHolder & getPointindices() const
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector3D v)
exint length() const
UT_Vector3D getPointprox() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
const UT_StringHolder & getPrimattrib() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 getPrimattribcomp() const
void setCombineprimindices(bool val)
int64 getPrimseed() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setPrimorder(const UT_StringHolder &val)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
const UT_StringHolder & getPointorder() const
bool getCombinepointindices() const
static int version()
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
long long int64
Definition: SYS_Types.h:116
void setPrimdir(UT_Vector3D val)
int64 getPointoffset() const
UT_StringHolder opPointorder(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Ptsort opPtsort(const SOP_NodeVerb::CookParms &cookparms) const
void setPointattrib(const UT_StringHolder &val)
UT_StringHolder opPrimattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
bool load(UT_IStream &is)
bool opCombinepointindices(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getPrimreverse() const
UT_Vector3D getPointdir() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
void setPtsort(Ptsort val)
void setPointindices(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
int64 opPrimseed(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_StringHolder opPointindices(const SOP_NodeVerb::CookParms &cookparms) const
int64 getPrimoffset() const
UT_Vector3D opPrimprox(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getPointattrib() const
UT_StringHolder opPointattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPrimgroup() const
SYS_FORCE_INLINE UT_StringHolder getToken(Ptsort enum_value)
void setPrimobjpath(const UT_StringHolder &val)
bool getCombineprimindices() const
void setPrimoffset(int64 val)
void setPointorder(const UT_StringHolder &val)
UT_StringHolder opPtgroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPrimorder() const
void setPrimprox(UT_Vector3D val)
const UT_StringHolder & getPrimobjpath() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
int64 opPointseed(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
static void saveData(std::ostream &os, UT_Matrix2D v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setPrimsort(Primsort val)
void setVertexPrimOrder(bool val)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, int64 v)
fpreal64 opPrimexpr(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
bool opPointreverse(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void setPrimattrib(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_StringHolder s)
GLboolean r
Definition: glcorearb.h:1222
void setPrimgroup(const UT_StringHolder &val)
UT_Vector3D getPrimprox() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setPointseed(int64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setPointprox(UT_Vector3D val)
UT_StringHolder opPrimorder(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
bool operator!=(const SOP_SortParms &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_StringHolder opPointobjpath(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 getPointexpr() const
UT_Vector3D opPrimdir(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPrimindices() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
const UT_StringHolder & getPtgroup() const
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setUsepointindices(bool val)
void setCombinepointindices(bool val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setUseprimindices(bool val)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override