HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Join.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_JoinEnums
24 {
25  enum class Dir
26  {
27  UJOIN = 0,
28  VJOIN
29  };
30 
32  getToken(Dir enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Dir::UJOIN: return "ujoin"_sh;
37  case Dir::VJOIN: return "vjoin"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Joinop
43  {
44  ALL = 0,
45  GROUP,
46  SKIP
47  };
48 
50  getToken(Joinop enum_value)
51  {
52  using namespace UT::Literal;
53  switch (enum_value) {
54  case Joinop::ALL: return "all"_sh;
55  case Joinop::GROUP: return "group"_sh;
56  case Joinop::SKIP: return "skip"_sh;
57  default: UT_ASSERT(false); return ""_sh;
58  }
59  }
60 
61 }
62 
63 
65 {
66 public:
67  static int version() { return 1; }
68 
70  {
71  myGroup = ""_UTsh;
72  myBlend = true;
73  myTolerance = 1;
74  myBias = 0.5;
75  myKnotmult = false;
76  myProximity = true;
77  myDir = 0;
78  myJoinop = 0;
79  myInc = 2;
80  myLoop = false;
81  myPrim = false;
82  myOnlyconnected = false;
83 
84  }
85 
86  explicit SOP_JoinParms(const SOP_JoinParms &) = default;
87  SOP_JoinParms &operator=(const SOP_JoinParms &) = default;
88  SOP_JoinParms(SOP_JoinParms &&) noexcept = default;
89  SOP_JoinParms &operator=(SOP_JoinParms &&) noexcept = default;
90 
91  ~SOP_JoinParms() override {}
92 
93  bool operator==(const SOP_JoinParms &src) const
94  {
95  if (myGroup != src.myGroup) return false;
96  if (myBlend != src.myBlend) return false;
97  if (myTolerance != src.myTolerance) return false;
98  if (myBias != src.myBias) return false;
99  if (myKnotmult != src.myKnotmult) return false;
100  if (myProximity != src.myProximity) return false;
101  if (myDir != src.myDir) return false;
102  if (myJoinop != src.myJoinop) return false;
103  if (myInc != src.myInc) return false;
104  if (myLoop != src.myLoop) return false;
105  if (myPrim != src.myPrim) return false;
106  if (myOnlyconnected != src.myOnlyconnected) return false;
107 
108 
109  if (baseGetSignature() != src.baseGetSignature()) return false;
110 
111  return true;
112  }
113  bool operator!=(const SOP_JoinParms &src) const
114  {
115  return !operator==(src);
116  }
119 
120 
121 
122  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
123  {
124  myGroup = ""_UTsh;
125  if (true)
126  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
127  myBlend = true;
128  if (true)
129  graph->evalOpParm(myBlend, nodeidx, "blend", time, graph->isDirect()?nullptr:depnode);
130  myTolerance = 1;
131  if (true)
132  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, graph->isDirect()?nullptr:depnode);
133  myBias = 0.5;
134  if (true && ( (true&&!(((getBlend()==0)))) ) )
135  graph->evalOpParm(myBias, nodeidx, "bias", time, graph->isDirect()?nullptr:depnode);
136  myKnotmult = false;
137  if (true)
138  graph->evalOpParm(myKnotmult, nodeidx, "knotmult", time, graph->isDirect()?nullptr:depnode);
139  myProximity = true;
140  if (true)
141  graph->evalOpParm(myProximity, nodeidx, "proximity", time, graph->isDirect()?nullptr:depnode);
142  myDir = 0;
143  if (true)
144  graph->evalOpParm(myDir, nodeidx, "dir", time, graph->isDirect()?nullptr:depnode);
145  myJoinop = 0;
146  if (true)
147  graph->evalOpParm(myJoinop, nodeidx, "joinop", time, graph->isDirect()?nullptr:depnode);
148  myInc = 2;
149  if (true && ( (true&&!(((int64(getJoinop())==0)))) ) )
150  graph->evalOpParm(myInc, nodeidx, "inc", time, graph->isDirect()?nullptr:depnode);
151  myLoop = false;
152  if (true)
153  graph->evalOpParm(myLoop, nodeidx, "loop", time, graph->isDirect()?nullptr:depnode);
154  myPrim = false;
155  if (true)
156  graph->evalOpParm(myPrim, nodeidx, "prim", time, graph->isDirect()?nullptr:depnode);
157  myOnlyconnected = false;
158  if (true)
159  graph->evalOpParm(myOnlyconnected, nodeidx, "onlyconnected", time, graph->isDirect()?nullptr:depnode);
160 
161  }
162 
163 
164  void loadFromOpSubclass(const LoadParms &loadparms) override
165  {
166  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
167  }
168 
169 
170  void copyFrom(const OP_NodeParms *src) override
171  {
172  *this = *((const SOP_JoinParms *)src);
173  }
174 
175  template <typename T>
176  void
177  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
178  {
179  if (idx.size() < 1)
180  return;
181  UT_ASSERT(idx.size() == instance.size()+1);
182  if (idx.size() != instance.size()+1)
183  return;
184  switch (idx[0])
185  {
186  case 0:
187  coerceValue(value, myGroup);
188  break;
189  case 1:
190  coerceValue(value, myBlend);
191  break;
192  case 2:
193  coerceValue(value, myTolerance);
194  break;
195  case 3:
196  coerceValue(value, myBias);
197  break;
198  case 4:
199  coerceValue(value, myKnotmult);
200  break;
201  case 5:
202  coerceValue(value, myProximity);
203  break;
204  case 6:
205  coerceValue(value, myDir);
206  break;
207  case 7:
208  coerceValue(value, myJoinop);
209  break;
210  case 8:
211  coerceValue(value, myInc);
212  break;
213  case 9:
214  coerceValue(value, myLoop);
215  break;
216  case 10:
217  coerceValue(value, myPrim);
218  break;
219  case 11:
220  coerceValue(value, myOnlyconnected);
221  break;
222 
223  }
224  }
225 
226  bool isParmColorRamp(exint idx) const override
227  {
228  switch (idx)
229  {
230 
231  }
232  return false;
233  }
234 
235  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
256  { doGetParmValue(idx, instance, value); }
257 
258  template <typename T>
259  void
260  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
261  {
262  if (idx.size() < 1)
263  return;
264  UT_ASSERT(idx.size() == instance.size()+1);
265  if (idx.size() != instance.size()+1)
266  return;
267  switch (idx[0])
268  {
269  case 0:
270  coerceValue(myGroup, ( ( value ) ));
271  break;
272  case 1:
273  coerceValue(myBlend, ( ( value ) ));
274  break;
275  case 2:
276  coerceValue(myTolerance, clampMinValue(0, clampMaxValue(1, value ) ));
277  break;
278  case 3:
279  coerceValue(myBias, clampMinValue(0, clampMaxValue(1, value ) ));
280  break;
281  case 4:
282  coerceValue(myKnotmult, ( ( value ) ));
283  break;
284  case 5:
285  coerceValue(myProximity, ( ( value ) ));
286  break;
287  case 6:
288  coerceValue(myDir, clampMinValue(0, clampMaxValue(1, value ) ));
289  break;
290  case 7:
291  coerceValue(myJoinop, clampMinValue(0, clampMaxValue(2, value ) ));
292  break;
293  case 8:
294  coerceValue(myInc, clampMinValue(1, ( value ) ));
295  break;
296  case 9:
297  coerceValue(myLoop, ( ( value ) ));
298  break;
299  case 10:
300  coerceValue(myPrim, ( ( value ) ));
301  break;
302  case 11:
303  coerceValue(myOnlyconnected, ( ( value ) ));
304  break;
305 
306  }
307  }
308 
309  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
330  { doSetParmValue(idx, instance, value); }
331 
332  exint getNestNumParms(TempIndex idx) const override
333  {
334  if (idx.size() == 0)
335  return 12;
336  switch (idx[0])
337  {
338 
339  }
340  // Invalid
341  return 0;
342  }
343 
344  const char *getNestParmName(TempIndex fieldnum) const override
345  {
346  if (fieldnum.size() < 1)
347  return 0;
348  switch (fieldnum[0])
349  {
350  case 0:
351  return "group";
352  case 1:
353  return "blend";
354  case 2:
355  return "tolerance";
356  case 3:
357  return "bias";
358  case 4:
359  return "knotmult";
360  case 5:
361  return "proximity";
362  case 6:
363  return "dir";
364  case 7:
365  return "joinop";
366  case 8:
367  return "inc";
368  case 9:
369  return "loop";
370  case 10:
371  return "prim";
372  case 11:
373  return "onlyconnected";
374 
375  }
376  return 0;
377  }
378 
379  ParmType getNestParmType(TempIndex fieldnum) const override
380  {
381  if (fieldnum.size() < 1)
382  return PARM_UNSUPPORTED;
383  switch (fieldnum[0])
384  {
385  case 0:
386  return PARM_STRING;
387  case 1:
388  return PARM_INTEGER;
389  case 2:
390  return PARM_FLOAT;
391  case 3:
392  return PARM_FLOAT;
393  case 4:
394  return PARM_INTEGER;
395  case 5:
396  return PARM_INTEGER;
397  case 6:
398  return PARM_INTEGER;
399  case 7:
400  return PARM_INTEGER;
401  case 8:
402  return PARM_INTEGER;
403  case 9:
404  return PARM_INTEGER;
405  case 10:
406  return PARM_INTEGER;
407  case 11:
408  return PARM_INTEGER;
409 
410  }
411  return PARM_UNSUPPORTED;
412  }
413 
414  // Boiler plate to load individual types.
415  static void loadData(UT_IStream &is, int64 &v)
416  { is.bread(&v, 1); }
417  static void loadData(UT_IStream &is, bool &v)
418  { int64 iv; is.bread(&iv, 1); v = iv; }
419  static void loadData(UT_IStream &is, fpreal64 &v)
420  { is.bread<fpreal64>(&v, 1); }
421  static void loadData(UT_IStream &is, UT_Vector2D &v)
422  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
423  static void loadData(UT_IStream &is, UT_Vector3D &v)
424  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
425  is.bread<fpreal64>(&v.z(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector4D &v)
427  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
428  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
429  static void loadData(UT_IStream &is, UT_Matrix2D &v)
430  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
431  static void loadData(UT_IStream &is, UT_Matrix3D &v)
432  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
433  static void loadData(UT_IStream &is, UT_Matrix4D &v)
434  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
435  static void loadData(UT_IStream &is, UT_Vector2I &v)
436  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
437  static void loadData(UT_IStream &is, UT_Vector3I &v)
438  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
439  is.bread<int64>(&v.z(), 1); }
440  static void loadData(UT_IStream &is, UT_Vector4I &v)
441  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
442  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
444  { is.bread(v); }
446  { UT_StringHolder rampdata;
447  loadData(is, rampdata);
448  if (rampdata.isstring())
449  {
450  v.reset(new UT_Ramp());
451  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
452  v->load(istr);
453  }
454  else v.reset();
455  }
458  loadData(is, data);
459  if (data.isstring())
460  {
461  // Find the data type.
462  const char *colon = UT_StringWrap(data).findChar(':');
463  if (colon)
464  {
465  int typelen = colon - data.buffer();
467  type.strncpy(data.buffer(), typelen);
468  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
469 
470  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
471  }
472  }
473  else v.reset();
474  }
475 
476  static void saveData(std::ostream &os, int64 v)
477  { UTwrite(os, &v); }
478  static void saveData(std::ostream &os, bool v)
479  { int64 iv = v; UTwrite(os, &iv); }
480  static void saveData(std::ostream &os, fpreal64 v)
481  { UTwrite<fpreal64>(os, &v); }
482  static void saveData(std::ostream &os, UT_Vector2D v)
483  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
484  static void saveData(std::ostream &os, UT_Vector3D v)
485  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
486  UTwrite<fpreal64>(os, &v.z()); }
487  static void saveData(std::ostream &os, UT_Vector4D v)
488  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
489  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
490  static void saveData(std::ostream &os, UT_Matrix2D v)
492  static void saveData(std::ostream &os, UT_Matrix3D v)
494  static void saveData(std::ostream &os, UT_Matrix4D v)
496  static void saveData(std::ostream &os, UT_StringHolder s)
497  { UT_StringWrap(s).saveBinary(os); }
498  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
500  UT_OStringStream ostr;
501  if (s) s->save(ostr);
502  result = ostr.str();
503  saveData(os, result);
504  }
505  static void saveData(std::ostream &os, PRM_DataItemHandle s)
507  UT_OStringStream ostr;
508  if (s)
509  {
510  ostr << s->getDataTypeToken();
511  ostr << ":";
512  s->saveBinary(ostr);
513  }
514  result = ostr.str();
515  saveData(os, result);
516  }
517 
518 
519  void save(std::ostream &os) const
520  {
521  int32 v = version();
522  UTwrite(os, &v);
523  saveData(os, myGroup);
524  saveData(os, myBlend);
525  saveData(os, myTolerance);
526  saveData(os, myBias);
527  saveData(os, myKnotmult);
528  saveData(os, myProximity);
529  saveData(os, myDir);
530  saveData(os, myJoinop);
531  saveData(os, myInc);
532  saveData(os, myLoop);
533  saveData(os, myPrim);
534  saveData(os, myOnlyconnected);
535 
536  }
537 
538  bool load(UT_IStream &is)
539  {
540  int32 v;
541  is.bread(&v, 1);
542  if (version() != v)
543  {
544  // Fail incompatible versions
545  return false;
546  }
547  loadData(is, myGroup);
548  loadData(is, myBlend);
549  loadData(is, myTolerance);
550  loadData(is, myBias);
551  loadData(is, myKnotmult);
552  loadData(is, myProximity);
553  loadData(is, myDir);
554  loadData(is, myJoinop);
555  loadData(is, myInc);
556  loadData(is, myLoop);
557  loadData(is, myPrim);
558  loadData(is, myOnlyconnected);
559 
560  return true;
561  }
562 
563  const UT_StringHolder & getGroup() const { return myGroup; }
564  void setGroup(const UT_StringHolder & val) { myGroup = val; }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getGroup();
570  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
571  return result;
572  }
573  bool getBlend() const { return myBlend; }
574  void setBlend(bool val) { myBlend = val; }
575  bool opBlend(const SOP_NodeVerb::CookParms &cookparms) const
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getBlend();
579  bool result;
580  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
581  return result;
582  }
583  fpreal64 getTolerance() const { return myTolerance; }
584  void setTolerance(fpreal64 val) { myTolerance = val; }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getTolerance();
590  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
591  return result;
592  }
593  fpreal64 getBias() const { return myBias; }
594  void setBias(fpreal64 val) { myBias = val; }
595  fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getBias();
600  OP_Utils::evalOpParm(result, thissop, "bias", cookparms.getCookTime(), 0);
601  return result;
602  }
603  bool getKnotmult() const { return myKnotmult; }
604  void setKnotmult(bool val) { myKnotmult = val; }
605  bool opKnotmult(const SOP_NodeVerb::CookParms &cookparms) const
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getKnotmult();
609  bool result;
610  OP_Utils::evalOpParm(result, thissop, "knotmult", cookparms.getCookTime(), 0);
611  return result;
612  }
613  bool getProximity() const { return myProximity; }
614  void setProximity(bool val) { myProximity = val; }
615  bool opProximity(const SOP_NodeVerb::CookParms &cookparms) const
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getProximity();
619  bool result;
620  OP_Utils::evalOpParm(result, thissop, "proximity", cookparms.getCookTime(), 0);
621  return result;
622  }
623  Dir getDir() const { return Dir(myDir); }
624  void setDir(Dir val) { myDir = int64(val); }
625  Dir opDir(const SOP_NodeVerb::CookParms &cookparms) const
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getDir();
629  int64 result;
630  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
631  return Dir(result);
632  }
633  Joinop getJoinop() const { return Joinop(myJoinop); }
634  void setJoinop(Joinop val) { myJoinop = int64(val); }
635  Joinop opJoinop(const SOP_NodeVerb::CookParms &cookparms) const
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getJoinop();
639  int64 result;
640  OP_Utils::evalOpParm(result, thissop, "joinop", cookparms.getCookTime(), 0);
641  return Joinop(result);
642  }
643  int64 getInc() const { return myInc; }
644  void setInc(int64 val) { myInc = val; }
645  int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getInc();
649  int64 result;
650  OP_Utils::evalOpParm(result, thissop, "inc", cookparms.getCookTime(), 0);
651  return result;
652  }
653  bool getLoop() const { return myLoop; }
654  void setLoop(bool val) { myLoop = val; }
655  bool opLoop(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getLoop();
659  bool result;
660  OP_Utils::evalOpParm(result, thissop, "loop", cookparms.getCookTime(), 0);
661  return result;
662  }
663  bool getPrim() const { return myPrim; }
664  void setPrim(bool val) { myPrim = val; }
665  bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getPrim();
669  bool result;
670  OP_Utils::evalOpParm(result, thissop, "prim", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getOnlyconnected() const { return myOnlyconnected; }
674  void setOnlyconnected(bool val) { myOnlyconnected = val; }
675  bool opOnlyconnected(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getOnlyconnected();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "onlyconnected", cookparms.getCookTime(), 0);
681  return result;
682  }
683 
684 private:
685  UT_StringHolder myGroup;
686  bool myBlend;
687  fpreal64 myTolerance;
688  fpreal64 myBias;
689  bool myKnotmult;
690  bool myProximity;
691  int64 myDir;
692  int64 myJoinop;
693  int64 myInc;
694  bool myLoop;
695  bool myPrim;
696  bool myOnlyconnected;
697 
698 };
type
Definition: core.h:556
Dir opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator==(const SOP_JoinParms &src) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setProximity(bool val)
bool getPrim() const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setBlend(bool val)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setKnotmult(bool val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static int version()
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setLoop(bool val)
void save(std::ostream &os) const
SYS_FORCE_INLINE const char * buffer() const
bool getProximity() const
bool load(UT_IStream &is)
GLdouble s
Definition: glad.h:3009
static void saveData(std::ostream &os, bool v)
fpreal64 getTolerance() const
An output stream object that owns its own string buffer storage.
void setTolerance(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
void copyFrom(const OP_NodeParms *src) override
**But if you need a result
Definition: thread.h:622
void setJoinop(Joinop val)
bool getOnlyconnected() 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 setInc(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
double fpreal64
Definition: SYS_Types.h:201
bool operator!=(const SOP_JoinParms &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
fpreal64 getBias() const
bool getKnotmult() const
bool opBlend(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setOnlyconnected(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opLoop(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint length() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
SYS_FORCE_INLINE UT_StringHolder getToken(Dir enum_value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
Joinop getJoinop() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
long long int64
Definition: SYS_Types.h:116
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
Dir getDir() const
bool opKnotmult(const SOP_NodeVerb::CookParms &cookparms) const
bool opProximity(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setBias(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
Joinop opJoinop(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
LeafData & operator=(const LeafData &)=delete
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setPrim(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
bool opOnlyconnected(const SOP_NodeVerb::CookParms &cookparms) const
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setDir(Dir val)
static void loadData(UT_IStream &is, fpreal64 &v)
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLboolean r
Definition: glcorearb.h:1222
bool getBlend() const
bool getLoop() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 getInc() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void saveData(std::ostream &os, UT_Matrix4D v)