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