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