HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PointGenerate.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_UTsh;
32  myKeep = false;
33  myPtsperpt = false;
34  myNpts = 5000;
35  myNptsperpt = 10;
36  myDoattrib = false;
37  myAttrib = ""_UTsh;
38  mySeed = 0;
39  myDogroup = false;
40  myGgroup = "generated"_UTsh;
41  myDopointnum = false;
42  mySpointnum = "pointnum"_UTsh;
43  myDopointidx = false;
44  mySpointidx = "pointidx"_UTsh;
45  myDocopyattribs = false;
46  myAttribstocopy = "*"_UTsh;
47  myDetailstocopy = ""_UTsh;
48 
49  }
50 
51  explicit SOP_PointGenerateParms(const SOP_PointGenerateParms &) = default;
53  SOP_PointGenerateParms(SOP_PointGenerateParms &&) noexcept = default;
54  SOP_PointGenerateParms &operator=(SOP_PointGenerateParms &&) noexcept = default;
55 
56  ~SOP_PointGenerateParms() override {}
57 
59  {
60  if (myGroup != src.myGroup) return false;
61  if (myKeep != src.myKeep) return false;
62  if (myPtsperpt != src.myPtsperpt) return false;
63  if (myNpts != src.myNpts) return false;
64  if (myNptsperpt != src.myNptsperpt) return false;
65  if (myDoattrib != src.myDoattrib) return false;
66  if (myAttrib != src.myAttrib) return false;
67  if (mySeed != src.mySeed) return false;
68  if (myDogroup != src.myDogroup) return false;
69  if (myGgroup != src.myGgroup) return false;
70  if (myDopointnum != src.myDopointnum) return false;
71  if (mySpointnum != src.mySpointnum) return false;
72  if (myDopointidx != src.myDopointidx) return false;
73  if (mySpointidx != src.mySpointidx) return false;
74  if (myDocopyattribs != src.myDocopyattribs) return false;
75  if (myAttribstocopy != src.myAttribstocopy) return false;
76  if (myDetailstocopy != src.myDetailstocopy) return false;
77 
78 
79  if (baseGetSignature() != src.baseGetSignature()) return false;
80 
81  return true;
82  }
84  {
85  return !operator==(src);
86  }
87 
88 
89 
90  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
91  {
92  myGroup = ""_UTsh;
93  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
94  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
95  myKeep = false;
96  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
97  graph->evalOpParm(myKeep, nodeidx, "keep", time, graph->isDirect()?nullptr:depnode);
98  myPtsperpt = false;
99  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
100  graph->evalOpParm(myPtsperpt, nodeidx, "ptsperpt", time, graph->isDirect()?nullptr:depnode);
101  myNpts = 5000;
102  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==1)&&(getPtsperpt()==1)))) ) )
103  graph->evalOpParm(myNpts, nodeidx, "npts", time, graph->isDirect()?nullptr:depnode);
104  myNptsperpt = 10;
105  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((getPtsperpt()==0)))) ) )
106  graph->evalOpParm(myNptsperpt, nodeidx, "nptsperpt", time, graph->isDirect()?nullptr:depnode);
107  myDoattrib = false;
108  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
109  graph->evalOpParm(myDoattrib, nodeidx, "doattrib", time, graph->isDirect()?nullptr:depnode);
110  myAttrib = ""_UTsh;
111  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((getDoattrib()==0)))) ) )
112  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, graph->isDirect()?nullptr:depnode);
113  mySeed = 0;
114  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
115  graph->evalOpParm(mySeed, nodeidx, "seed", time, graph->isDirect()?nullptr:depnode);
116  myDogroup = false;
117  if (true)
118  graph->evalOpParm(myDogroup, nodeidx, "dogroup", time, graph->isDirect()?nullptr:depnode);
119  myGgroup = "generated"_UTsh;
120  if (true && ( (true&&!(((getDogroup()==0)))) ) )
121  graph->evalOpParm(myGgroup, nodeidx, "ggroup", time, graph->isDirect()?nullptr:depnode);
122  myDopointnum = false;
123  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
124  graph->evalOpParm(myDopointnum, nodeidx, "dopointnum", time, graph->isDirect()?nullptr:depnode);
125  mySpointnum = "pointnum"_UTsh;
126  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((getDopointnum()==0)))) ) )
127  graph->evalOpParm(mySpointnum, nodeidx, "spointnum", time, graph->isDirect()?nullptr:depnode);
128  myDopointidx = false;
129  if (true)
130  graph->evalOpParm(myDopointidx, nodeidx, "dopointidx", time, graph->isDirect()?nullptr:depnode);
131  mySpointidx = "pointidx"_UTsh;
132  if (true && ( (true&&!(((getDopointidx()==0)))) ) )
133  graph->evalOpParm(mySpointidx, nodeidx, "spointidx", time, graph->isDirect()?nullptr:depnode);
134  myDocopyattribs = false;
135  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
136  graph->evalOpParm(myDocopyattribs, nodeidx, "docopyattribs", time, graph->isDirect()?nullptr:depnode);
137  myAttribstocopy = "*"_UTsh;
138  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((getDocopyattribs()==0)))) ) )
139  graph->evalOpParm(myAttribstocopy, nodeidx, "attribstocopy", time, graph->isDirect()?nullptr:depnode);
140  myDetailstocopy = ""_UTsh;
141  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||((getDocopyattribs()==0)))) ) )
142  graph->evalOpParm(myDetailstocopy, nodeidx, "detailstocopy", time, graph->isDirect()?nullptr:depnode);
143 
144  }
145 
146 
147  void loadFromOpSubclass(const LoadParms &loadparms) override
148  {
149  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
150  }
151 
152 
153  void copyFrom(const OP_NodeParms *src) override
154  {
155  *this = *((const SOP_PointGenerateParms *)src);
156  }
157 
158  template <typename T>
159  void
160  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
161  {
162  if (idx.size() < 1)
163  return;
164  UT_ASSERT(idx.size() == instance.size()+1);
165  if (idx.size() != instance.size()+1)
166  return;
167  switch (idx[0])
168  {
169  case 0:
170  coerceValue(value, myGroup);
171  break;
172  case 1:
173  coerceValue(value, myKeep);
174  break;
175  case 2:
176  coerceValue(value, myPtsperpt);
177  break;
178  case 3:
179  coerceValue(value, myNpts);
180  break;
181  case 4:
182  coerceValue(value, myNptsperpt);
183  break;
184  case 5:
185  coerceValue(value, myDoattrib);
186  break;
187  case 6:
188  coerceValue(value, myAttrib);
189  break;
190  case 7:
191  coerceValue(value, mySeed);
192  break;
193  case 8:
194  coerceValue(value, myDogroup);
195  break;
196  case 9:
197  coerceValue(value, myGgroup);
198  break;
199  case 10:
200  coerceValue(value, myDopointnum);
201  break;
202  case 11:
203  coerceValue(value, mySpointnum);
204  break;
205  case 12:
206  coerceValue(value, myDopointidx);
207  break;
208  case 13:
209  coerceValue(value, mySpointidx);
210  break;
211  case 14:
212  coerceValue(value, myDocopyattribs);
213  break;
214  case 15:
215  coerceValue(value, myAttribstocopy);
216  break;
217  case 16:
218  coerceValue(value, myDetailstocopy);
219  break;
220 
221  }
222  }
223 
224  bool isParmColorRamp(exint idx) const override
225  {
226  switch (idx)
227  {
228 
229  }
230  return false;
231  }
232 
233  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
254  { doGetParmValue(idx, instance, value); }
255 
256  template <typename T>
257  void
258  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
259  {
260  if (idx.size() < 1)
261  return;
262  UT_ASSERT(idx.size() == instance.size()+1);
263  if (idx.size() != instance.size()+1)
264  return;
265  switch (idx[0])
266  {
267  case 0:
268  coerceValue(myGroup, ( ( value ) ));
269  break;
270  case 1:
271  coerceValue(myKeep, ( ( value ) ));
272  break;
273  case 2:
274  coerceValue(myPtsperpt, ( ( value ) ));
275  break;
276  case 3:
277  coerceValue(myNpts, clampMinValue(0, ( value ) ));
278  break;
279  case 4:
280  coerceValue(myNptsperpt, clampMinValue(0, ( value ) ));
281  break;
282  case 5:
283  coerceValue(myDoattrib, ( ( value ) ));
284  break;
285  case 6:
286  coerceValue(myAttrib, ( ( value ) ));
287  break;
288  case 7:
289  coerceValue(mySeed, ( ( value ) ));
290  break;
291  case 8:
292  coerceValue(myDogroup, ( ( value ) ));
293  break;
294  case 9:
295  coerceValue(myGgroup, ( ( value ) ));
296  break;
297  case 10:
298  coerceValue(myDopointnum, ( ( value ) ));
299  break;
300  case 11:
301  coerceValue(mySpointnum, ( ( value ) ));
302  break;
303  case 12:
304  coerceValue(myDopointidx, ( ( value ) ));
305  break;
306  case 13:
307  coerceValue(mySpointidx, ( ( value ) ));
308  break;
309  case 14:
310  coerceValue(myDocopyattribs, ( ( value ) ));
311  break;
312  case 15:
313  coerceValue(myAttribstocopy, ( ( value ) ));
314  break;
315  case 16:
316  coerceValue(myDetailstocopy, ( ( value ) ));
317  break;
318 
319  }
320  }
321 
322  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
343  { doSetParmValue(idx, instance, value); }
344 
345  exint getNestNumParms(TempIndex idx) const override
346  {
347  if (idx.size() == 0)
348  return 17;
349  switch (idx[0])
350  {
351 
352  }
353  // Invalid
354  return 0;
355  }
356 
357  const char *getNestParmName(TempIndex fieldnum) const override
358  {
359  if (fieldnum.size() < 1)
360  return 0;
361  switch (fieldnum[0])
362  {
363  case 0:
364  return "group";
365  case 1:
366  return "keep";
367  case 2:
368  return "ptsperpt";
369  case 3:
370  return "npts";
371  case 4:
372  return "nptsperpt";
373  case 5:
374  return "doattrib";
375  case 6:
376  return "attrib";
377  case 7:
378  return "seed";
379  case 8:
380  return "dogroup";
381  case 9:
382  return "ggroup";
383  case 10:
384  return "dopointnum";
385  case 11:
386  return "spointnum";
387  case 12:
388  return "dopointidx";
389  case 13:
390  return "spointidx";
391  case 14:
392  return "docopyattribs";
393  case 15:
394  return "attribstocopy";
395  case 16:
396  return "detailstocopy";
397 
398  }
399  return 0;
400  }
401 
402  ParmType getNestParmType(TempIndex fieldnum) const override
403  {
404  if (fieldnum.size() < 1)
405  return PARM_UNSUPPORTED;
406  switch (fieldnum[0])
407  {
408  case 0:
409  return PARM_STRING;
410  case 1:
411  return PARM_INTEGER;
412  case 2:
413  return PARM_INTEGER;
414  case 3:
415  return PARM_INTEGER;
416  case 4:
417  return PARM_FLOAT;
418  case 5:
419  return PARM_INTEGER;
420  case 6:
421  return PARM_STRING;
422  case 7:
423  return PARM_FLOAT;
424  case 8:
425  return PARM_INTEGER;
426  case 9:
427  return PARM_STRING;
428  case 10:
429  return PARM_INTEGER;
430  case 11:
431  return PARM_STRING;
432  case 12:
433  return PARM_INTEGER;
434  case 13:
435  return PARM_STRING;
436  case 14:
437  return PARM_INTEGER;
438  case 15:
439  return PARM_STRING;
440  case 16:
441  return PARM_STRING;
442 
443  }
444  return PARM_UNSUPPORTED;
445  }
446 
447  // Boiler plate to load individual types.
448  static void loadData(UT_IStream &is, int64 &v)
449  { is.bread(&v, 1); }
450  static void loadData(UT_IStream &is, bool &v)
451  { int64 iv; is.bread(&iv, 1); v = iv; }
452  static void loadData(UT_IStream &is, fpreal64 &v)
453  { is.bread<fpreal64>(&v, 1); }
454  static void loadData(UT_IStream &is, UT_Vector2D &v)
455  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
456  static void loadData(UT_IStream &is, UT_Vector3D &v)
457  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
458  is.bread<fpreal64>(&v.z(), 1); }
459  static void loadData(UT_IStream &is, UT_Vector4D &v)
460  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
461  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
462  static void loadData(UT_IStream &is, UT_Matrix2D &v)
463  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
464  static void loadData(UT_IStream &is, UT_Matrix3D &v)
465  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
466  static void loadData(UT_IStream &is, UT_Matrix4D &v)
467  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
468  static void loadData(UT_IStream &is, UT_Vector2I &v)
469  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
470  static void loadData(UT_IStream &is, UT_Vector3I &v)
471  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
472  is.bread<int64>(&v.z(), 1); }
473  static void loadData(UT_IStream &is, UT_Vector4I &v)
474  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
475  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
477  { is.bread(v); }
479  { UT_StringHolder rampdata;
480  loadData(is, rampdata);
481  if (rampdata.isstring())
482  {
483  v.reset(new UT_Ramp());
484  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
485  v->load(istr);
486  }
487  else v.reset();
488  }
491  loadData(is, data);
492  if (data.isstring())
493  {
494  // Find the data type.
495  const char *colon = UT_StringWrap(data).findChar(':');
496  if (colon)
497  {
498  int typelen = colon - data.buffer();
500  type.strncpy(data.buffer(), typelen);
501  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
502 
503  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
504  }
505  }
506  else v.reset();
507  }
508 
509  static void saveData(std::ostream &os, int64 v)
510  { UTwrite(os, &v); }
511  static void saveData(std::ostream &os, bool v)
512  { int64 iv = v; UTwrite(os, &iv); }
513  static void saveData(std::ostream &os, fpreal64 v)
514  { UTwrite<fpreal64>(os, &v); }
515  static void saveData(std::ostream &os, UT_Vector2D v)
516  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
517  static void saveData(std::ostream &os, UT_Vector3D v)
518  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
519  UTwrite<fpreal64>(os, &v.z()); }
520  static void saveData(std::ostream &os, UT_Vector4D v)
521  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
522  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
523  static void saveData(std::ostream &os, UT_Matrix2D v)
525  static void saveData(std::ostream &os, UT_Matrix3D v)
527  static void saveData(std::ostream &os, UT_Matrix4D v)
529  static void saveData(std::ostream &os, UT_StringHolder s)
530  { UT_StringWrap(s).saveBinary(os); }
531  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
533  UT_OStringStream ostr;
534  if (s) s->save(ostr);
535  result = ostr.str();
536  saveData(os, result);
537  }
538  static void saveData(std::ostream &os, PRM_DataItemHandle s)
540  UT_OStringStream ostr;
541  if (s)
542  {
543  ostr << s->getDataTypeToken();
544  ostr << ":";
545  s->saveBinary(ostr);
546  }
547  result = ostr.str();
548  saveData(os, result);
549  }
550 
551 
552  void save(std::ostream &os) const
553  {
554  int32 v = version();
555  UTwrite(os, &v);
556  saveData(os, myGroup);
557  saveData(os, myKeep);
558  saveData(os, myPtsperpt);
559  saveData(os, myNpts);
560  saveData(os, myNptsperpt);
561  saveData(os, myDoattrib);
562  saveData(os, myAttrib);
563  saveData(os, mySeed);
564  saveData(os, myDogroup);
565  saveData(os, myGgroup);
566  saveData(os, myDopointnum);
567  saveData(os, mySpointnum);
568  saveData(os, myDopointidx);
569  saveData(os, mySpointidx);
570  saveData(os, myDocopyattribs);
571  saveData(os, myAttribstocopy);
572  saveData(os, myDetailstocopy);
573 
574  }
575 
576  bool load(UT_IStream &is)
577  {
578  int32 v;
579  is.bread(&v, 1);
580  if (version() != v)
581  {
582  // Fail incompatible versions
583  return false;
584  }
585  loadData(is, myGroup);
586  loadData(is, myKeep);
587  loadData(is, myPtsperpt);
588  loadData(is, myNpts);
589  loadData(is, myNptsperpt);
590  loadData(is, myDoattrib);
591  loadData(is, myAttrib);
592  loadData(is, mySeed);
593  loadData(is, myDogroup);
594  loadData(is, myGgroup);
595  loadData(is, myDopointnum);
596  loadData(is, mySpointnum);
597  loadData(is, myDopointidx);
598  loadData(is, mySpointidx);
599  loadData(is, myDocopyattribs);
600  loadData(is, myAttribstocopy);
601  loadData(is, myDetailstocopy);
602 
603  return true;
604  }
605 
606  const UT_StringHolder & getGroup() const { return myGroup; }
607  void setGroup(const UT_StringHolder & val) { myGroup = val; }
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getGroup();
613  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
614  return result;
615  }
616  bool getKeep() const { return myKeep; }
617  void setKeep(bool val) { myKeep = val; }
618  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getKeep();
622  bool result;
623  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
624  return result;
625  }
626  bool getPtsperpt() const { return myPtsperpt; }
627  void setPtsperpt(bool val) { myPtsperpt = val; }
628  bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getPtsperpt();
632  bool result;
633  OP_Utils::evalOpParm(result, thissop, "ptsperpt", cookparms.getCookTime(), 0);
634  return result;
635  }
636  int64 getNpts() const { return myNpts; }
637  void setNpts(int64 val) { myNpts = val; }
638  int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getNpts();
642  int64 result;
643  OP_Utils::evalOpParm(result, thissop, "npts", cookparms.getCookTime(), 0);
644  return result;
645  }
646  fpreal64 getNptsperpt() const { return myNptsperpt; }
647  void setNptsperpt(fpreal64 val) { myNptsperpt = val; }
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getNptsperpt();
653  OP_Utils::evalOpParm(result, thissop, "nptsperpt", cookparms.getCookTime(), 0);
654  return result;
655  }
656  bool getDoattrib() const { return myDoattrib; }
657  void setDoattrib(bool val) { myDoattrib = val; }
658  bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getDoattrib();
662  bool result;
663  OP_Utils::evalOpParm(result, thissop, "doattrib", cookparms.getCookTime(), 0);
664  return result;
665  }
666  const UT_StringHolder & getAttrib() const { return myAttrib; }
667  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getAttrib();
673  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
674  return result;
675  }
676  fpreal64 getSeed() const { return mySeed; }
677  void setSeed(fpreal64 val) { mySeed = val; }
678  fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getSeed();
683  OP_Utils::evalOpParm(result, thissop, "seed", cookparms.getCookTime(), 0);
684  return result;
685  }
686  bool getDogroup() const { return myDogroup; }
687  void setDogroup(bool val) { myDogroup = val; }
688  bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getDogroup();
692  bool result;
693  OP_Utils::evalOpParm(result, thissop, "dogroup", cookparms.getCookTime(), 0);
694  return result;
695  }
696  const UT_StringHolder & getGgroup() const { return myGgroup; }
697  void setGgroup(const UT_StringHolder & val) { myGgroup = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getGgroup();
703  OP_Utils::evalOpParm(result, thissop, "ggroup", cookparms.getCookTime(), 0);
704  return result;
705  }
706  bool getDopointnum() const { return myDopointnum; }
707  void setDopointnum(bool val) { myDopointnum = val; }
708  bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getDopointnum();
712  bool result;
713  OP_Utils::evalOpParm(result, thissop, "dopointnum", cookparms.getCookTime(), 0);
714  return result;
715  }
716  const UT_StringHolder & getSpointnum() const { return mySpointnum; }
717  void setSpointnum(const UT_StringHolder & val) { mySpointnum = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getSpointnum();
723  OP_Utils::evalOpParm(result, thissop, "spointnum", cookparms.getCookTime(), 0);
724  return result;
725  }
726  bool getDopointidx() const { return myDopointidx; }
727  void setDopointidx(bool val) { myDopointidx = val; }
728  bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getDopointidx();
732  bool result;
733  OP_Utils::evalOpParm(result, thissop, "dopointidx", cookparms.getCookTime(), 0);
734  return result;
735  }
736  const UT_StringHolder & getSpointidx() const { return mySpointidx; }
737  void setSpointidx(const UT_StringHolder & val) { mySpointidx = val; }
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getSpointidx();
743  OP_Utils::evalOpParm(result, thissop, "spointidx", cookparms.getCookTime(), 0);
744  return result;
745  }
746  bool getDocopyattribs() const { return myDocopyattribs; }
747  void setDocopyattribs(bool val) { myDocopyattribs = val; }
748  bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getDocopyattribs();
752  bool result;
753  OP_Utils::evalOpParm(result, thissop, "docopyattribs", cookparms.getCookTime(), 0);
754  return result;
755  }
756  const UT_StringHolder & getAttribstocopy() const { return myAttribstocopy; }
757  void setAttribstocopy(const UT_StringHolder & val) { myAttribstocopy = val; }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getAttribstocopy();
763  OP_Utils::evalOpParm(result, thissop, "attribstocopy", cookparms.getCookTime(), 0);
764  return result;
765  }
766  const UT_StringHolder & getDetailstocopy() const { return myDetailstocopy; }
767  void setDetailstocopy(const UT_StringHolder & val) { myDetailstocopy = val; }
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getDetailstocopy();
773  OP_Utils::evalOpParm(result, thissop, "detailstocopy", cookparms.getCookTime(), 0);
774  return result;
775  }
776 
777 private:
778  UT_StringHolder myGroup;
779  bool myKeep;
780  bool myPtsperpt;
781  int64 myNpts;
782  fpreal64 myNptsperpt;
783  bool myDoattrib;
784  UT_StringHolder myAttrib;
785  fpreal64 mySeed;
786  bool myDogroup;
787  UT_StringHolder myGgroup;
788  bool myDopointnum;
789  UT_StringHolder mySpointnum;
790  bool myDopointidx;
791  UT_StringHolder mySpointidx;
792  bool myDocopyattribs;
793  UT_StringHolder myAttribstocopy;
794  UT_StringHolder myDetailstocopy;
795 
796 };
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
type
Definition: core.h:556
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opSpointidx(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector3D v)
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
bool operator==(const SOP_PointGenerateParms &src) const
fpreal getTime() const
Definition: OP_Context.h:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opGgroup(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, int64 v)
const UT_StringHolder & getGroup() const
**But if you need a result
Definition: thread.h:622
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:317
const UT_StringHolder & getAttrib() 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.
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, bool v)
UT_StringHolder opDetailstocopy(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAttrib(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
const UT_StringHolder & getGgroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
exint getNestNumParms(TempIndex idx) const override
bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opNptsperpt(const SOP_NodeVerb::CookParms &cookparms) const
bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getDetailstocopy() const
fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_PointGenerateParms &src) const
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getAttribstocopy() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
UT_StringHolder opSpointnum(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setGgroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:310
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 fpreal
Definition: SYS_Types.h:278
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
const UT_StringHolder & getSpointidx() const
const UT_StringHolder & getSpointnum() const
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setDetailstocopy(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
void setSpointnum(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setSpointidx(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void saveData(std::ostream &os, UT_Matrix3D v)
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setAttribstocopy(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribstocopy(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const char * getNestParmName(TempIndex fieldnum) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, fpreal64 v)
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663