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