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 <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 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  return true;
109  }
110  bool operator!=(const SOP_JoinParms &src) const
111  {
112  return !operator==(src);
113  }
116 
117 
118 
119  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
120  {
121  myGroup = ""_UTsh;
122  if (true)
123  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
124  myBlend = true;
125  if (true)
126  graph->evalOpParm(myBlend, nodeidx, "blend", time, 0);
127  myTolerance = 1;
128  if (true)
129  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, 0);
130  myBias = 0.5;
131  if (true && ( (true&&!(((getBlend()==0)))) ) )
132  graph->evalOpParm(myBias, nodeidx, "bias", time, 0);
133  myKnotmult = false;
134  if (true)
135  graph->evalOpParm(myKnotmult, nodeidx, "knotmult", time, 0);
136  myProximity = true;
137  if (true)
138  graph->evalOpParm(myProximity, nodeidx, "proximity", time, 0);
139  myDir = 0;
140  if (true)
141  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
142  myJoinop = 0;
143  if (true)
144  graph->evalOpParm(myJoinop, nodeidx, "joinop", time, 0);
145  myInc = 2;
146  if (true && ( (true&&!(((int64(getJoinop())==0)))) ) )
147  graph->evalOpParm(myInc, nodeidx, "inc", time, 0);
148  myLoop = false;
149  if (true)
150  graph->evalOpParm(myLoop, nodeidx, "loop", time, 0);
151  myPrim = false;
152  if (true)
153  graph->evalOpParm(myPrim, nodeidx, "prim", time, 0);
154  myOnlyconnected = false;
155  if (true)
156  graph->evalOpParm(myOnlyconnected, nodeidx, "onlyconnected", time, 0);
157 
158  }
159 
160 
161  void loadFromOpSubclass(const LoadParms &loadparms) override
162  {
163  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
164  }
165 
166 
167  void copyFrom(const OP_NodeParms *src) override
168  {
169  *this = *((const SOP_JoinParms *)src);
170  }
171 
172  template <typename T>
173  void
174  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
175  {
176  if (idx.size() < 1)
177  return;
178  UT_ASSERT(idx.size() == instance.size()+1);
179  if (idx.size() != instance.size()+1)
180  return;
181  switch (idx[0])
182  {
183  case 0:
184  coerceValue(value, myGroup);
185  break;
186  case 1:
187  coerceValue(value, myBlend);
188  break;
189  case 2:
190  coerceValue(value, myTolerance);
191  break;
192  case 3:
193  coerceValue(value, myBias);
194  break;
195  case 4:
196  coerceValue(value, myKnotmult);
197  break;
198  case 5:
199  coerceValue(value, myProximity);
200  break;
201  case 6:
202  coerceValue(value, myDir);
203  break;
204  case 7:
205  coerceValue(value, myJoinop);
206  break;
207  case 8:
208  coerceValue(value, myInc);
209  break;
210  case 9:
211  coerceValue(value, myLoop);
212  break;
213  case 10:
214  coerceValue(value, myPrim);
215  break;
216  case 11:
217  coerceValue(value, myOnlyconnected);
218  break;
219 
220  }
221  }
222 
223  bool isParmColorRamp(exint idx) const override
224  {
225  switch (idx)
226  {
227 
228  }
229  return false;
230  }
231 
232  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
253  { doGetParmValue(idx, instance, value); }
254 
255  template <typename T>
256  void
257  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
258  {
259  if (idx.size() < 1)
260  return;
261  UT_ASSERT(idx.size() == instance.size()+1);
262  if (idx.size() != instance.size()+1)
263  return;
264  switch (idx[0])
265  {
266  case 0:
267  coerceValue(myGroup, ( ( value ) ));
268  break;
269  case 1:
270  coerceValue(myBlend, ( ( value ) ));
271  break;
272  case 2:
273  coerceValue(myTolerance, clampMinValue(0, clampMaxValue(1, value ) ));
274  break;
275  case 3:
276  coerceValue(myBias, clampMinValue(0, clampMaxValue(1, value ) ));
277  break;
278  case 4:
279  coerceValue(myKnotmult, ( ( value ) ));
280  break;
281  case 5:
282  coerceValue(myProximity, ( ( value ) ));
283  break;
284  case 6:
285  coerceValue(myDir, clampMinValue(0, clampMaxValue(1, value ) ));
286  break;
287  case 7:
288  coerceValue(myJoinop, clampMinValue(0, clampMaxValue(2, value ) ));
289  break;
290  case 8:
291  coerceValue(myInc, clampMinValue(1, ( value ) ));
292  break;
293  case 9:
294  coerceValue(myLoop, ( ( value ) ));
295  break;
296  case 10:
297  coerceValue(myPrim, ( ( value ) ));
298  break;
299  case 11:
300  coerceValue(myOnlyconnected, ( ( value ) ));
301  break;
302 
303  }
304  }
305 
306  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
327  { doSetParmValue(idx, instance, value); }
328 
329  exint getNestNumParms(TempIndex idx) const override
330  {
331  if (idx.size() == 0)
332  return 12;
333  switch (idx[0])
334  {
335 
336  }
337  // Invalid
338  return 0;
339  }
340 
341  const char *getNestParmName(TempIndex fieldnum) const override
342  {
343  if (fieldnum.size() < 1)
344  return 0;
345  switch (fieldnum[0])
346  {
347  case 0:
348  return "group";
349  case 1:
350  return "blend";
351  case 2:
352  return "tolerance";
353  case 3:
354  return "bias";
355  case 4:
356  return "knotmult";
357  case 5:
358  return "proximity";
359  case 6:
360  return "dir";
361  case 7:
362  return "joinop";
363  case 8:
364  return "inc";
365  case 9:
366  return "loop";
367  case 10:
368  return "prim";
369  case 11:
370  return "onlyconnected";
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_FLOAT;
388  case 3:
389  return PARM_FLOAT;
390  case 4:
391  return PARM_INTEGER;
392  case 5:
393  return PARM_INTEGER;
394  case 6:
395  return PARM_INTEGER;
396  case 7:
397  return PARM_INTEGER;
398  case 8:
399  return PARM_INTEGER;
400  case 9:
401  return PARM_INTEGER;
402  case 10:
403  return PARM_INTEGER;
404  case 11:
405  return PARM_INTEGER;
406 
407  }
408  return PARM_UNSUPPORTED;
409  }
410 
411  // Boiler plate to load individual types.
412  static void loadData(UT_IStream &is, int64 &v)
413  { is.bread(&v, 1); }
414  static void loadData(UT_IStream &is, bool &v)
415  { int64 iv; is.bread(&iv, 1); v = iv; }
416  static void loadData(UT_IStream &is, fpreal64 &v)
417  { is.bread<fpreal64>(&v, 1); }
418  static void loadData(UT_IStream &is, UT_Vector2D &v)
419  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
420  static void loadData(UT_IStream &is, UT_Vector3D &v)
421  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
422  is.bread<fpreal64>(&v.z(), 1); }
423  static void loadData(UT_IStream &is, UT_Vector4D &v)
424  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
425  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix2D &v)
427  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Matrix3D &v)
429  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
430  static void loadData(UT_IStream &is, UT_Matrix4D &v)
431  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
432  static void loadData(UT_IStream &is, UT_Vector2I &v)
433  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
434  static void loadData(UT_IStream &is, UT_Vector3I &v)
435  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
436  is.bread<int64>(&v.z(), 1); }
437  static void loadData(UT_IStream &is, UT_Vector4I &v)
438  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
439  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
441  { is.bread(v); }
443  { UT_StringHolder rampdata;
444  loadData(is, rampdata);
445  if (rampdata.isstring())
446  {
447  v.reset(new UT_Ramp());
448  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
449  v->load(istr);
450  }
451  else v.reset();
452  }
455  loadData(is, data);
456  if (data.isstring())
457  {
458  // Find the data type.
459  const char *colon = UT_StringWrap(data).findChar(':');
460  if (colon)
461  {
462  int typelen = colon - data.buffer();
464  type.strncpy(data.buffer(), typelen);
465  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
466 
467  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
468  }
469  }
470  else v.reset();
471  }
472 
473  static void saveData(std::ostream &os, int64 v)
474  { UTwrite(os, &v); }
475  static void saveData(std::ostream &os, bool v)
476  { int64 iv = v; UTwrite(os, &iv); }
477  static void saveData(std::ostream &os, fpreal64 v)
478  { UTwrite<fpreal64>(os, &v); }
479  static void saveData(std::ostream &os, UT_Vector2D v)
480  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
481  static void saveData(std::ostream &os, UT_Vector3D v)
482  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
483  UTwrite<fpreal64>(os, &v.z()); }
484  static void saveData(std::ostream &os, UT_Vector4D v)
485  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
486  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
487  static void saveData(std::ostream &os, UT_Matrix2D v)
489  static void saveData(std::ostream &os, UT_Matrix3D v)
491  static void saveData(std::ostream &os, UT_Matrix4D v)
493  static void saveData(std::ostream &os, UT_StringHolder s)
494  { UT_StringWrap(s).saveBinary(os); }
495  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
497  UT_OStringStream ostr;
498  if (s) s->save(ostr);
499  result = ostr.str();
500  saveData(os, result);
501  }
502  static void saveData(std::ostream &os, PRM_DataItemHandle s)
504  UT_OStringStream ostr;
505  if (s)
506  {
507  ostr << s->getDataTypeToken();
508  ostr << ":";
509  s->saveBinary(ostr);
510  }
511  result = ostr.str();
512  saveData(os, result);
513  }
514 
515 
516  void save(std::ostream &os) const
517  {
518  int32 v = version();
519  UTwrite(os, &v);
520  saveData(os, myGroup);
521  saveData(os, myBlend);
522  saveData(os, myTolerance);
523  saveData(os, myBias);
524  saveData(os, myKnotmult);
525  saveData(os, myProximity);
526  saveData(os, myDir);
527  saveData(os, myJoinop);
528  saveData(os, myInc);
529  saveData(os, myLoop);
530  saveData(os, myPrim);
531  saveData(os, myOnlyconnected);
532 
533  }
534 
535  bool load(UT_IStream &is)
536  {
537  int32 v;
538  is.bread(&v, 1);
539  if (version() != v)
540  {
541  // Fail incompatible versions
542  return false;
543  }
544  loadData(is, myGroup);
545  loadData(is, myBlend);
546  loadData(is, myTolerance);
547  loadData(is, myBias);
548  loadData(is, myKnotmult);
549  loadData(is, myProximity);
550  loadData(is, myDir);
551  loadData(is, myJoinop);
552  loadData(is, myInc);
553  loadData(is, myLoop);
554  loadData(is, myPrim);
555  loadData(is, myOnlyconnected);
556 
557  return true;
558  }
559 
560  const UT_StringHolder & getGroup() const { return myGroup; }
561  void setGroup(const UT_StringHolder & val) { myGroup = val; }
563  {
564  SOP_Node *thissop = cookparms.getNode();
565  if (!thissop) return getGroup();
567  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
568  return result;
569  }
570  bool getBlend() const { return myBlend; }
571  void setBlend(bool val) { myBlend = val; }
572  bool opBlend(const SOP_NodeVerb::CookParms &cookparms) const
573  {
574  SOP_Node *thissop = cookparms.getNode();
575  if (!thissop) return getBlend();
576  bool result;
577  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
578  return result;
579  }
580  fpreal64 getTolerance() const { return myTolerance; }
581  void setTolerance(fpreal64 val) { myTolerance = val; }
583  {
584  SOP_Node *thissop = cookparms.getNode();
585  if (!thissop) return getTolerance();
587  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
588  return result;
589  }
590  fpreal64 getBias() const { return myBias; }
591  void setBias(fpreal64 val) { myBias = val; }
592  fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
593  {
594  SOP_Node *thissop = cookparms.getNode();
595  if (!thissop) return getBias();
597  OP_Utils::evalOpParm(result, thissop, "bias", cookparms.getCookTime(), 0);
598  return result;
599  }
600  bool getKnotmult() const { return myKnotmult; }
601  void setKnotmult(bool val) { myKnotmult = val; }
602  bool opKnotmult(const SOP_NodeVerb::CookParms &cookparms) const
603  {
604  SOP_Node *thissop = cookparms.getNode();
605  if (!thissop) return getKnotmult();
606  bool result;
607  OP_Utils::evalOpParm(result, thissop, "knotmult", cookparms.getCookTime(), 0);
608  return result;
609  }
610  bool getProximity() const { return myProximity; }
611  void setProximity(bool val) { myProximity = val; }
612  bool opProximity(const SOP_NodeVerb::CookParms &cookparms) const
613  {
614  SOP_Node *thissop = cookparms.getNode();
615  if (!thissop) return getProximity();
616  bool result;
617  OP_Utils::evalOpParm(result, thissop, "proximity", cookparms.getCookTime(), 0);
618  return result;
619  }
620  Dir getDir() const { return Dir(myDir); }
621  void setDir(Dir val) { myDir = int64(val); }
622  Dir opDir(const SOP_NodeVerb::CookParms &cookparms) const
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getDir();
626  int64 result;
627  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
628  return Dir(result);
629  }
630  Joinop getJoinop() const { return Joinop(myJoinop); }
631  void setJoinop(Joinop val) { myJoinop = int64(val); }
632  Joinop opJoinop(const SOP_NodeVerb::CookParms &cookparms) const
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getJoinop();
636  int64 result;
637  OP_Utils::evalOpParm(result, thissop, "joinop", cookparms.getCookTime(), 0);
638  return Joinop(result);
639  }
640  int64 getInc() const { return myInc; }
641  void setInc(int64 val) { myInc = val; }
642  int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getInc();
646  int64 result;
647  OP_Utils::evalOpParm(result, thissop, "inc", cookparms.getCookTime(), 0);
648  return result;
649  }
650  bool getLoop() const { return myLoop; }
651  void setLoop(bool val) { myLoop = val; }
652  bool opLoop(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getLoop();
656  bool result;
657  OP_Utils::evalOpParm(result, thissop, "loop", cookparms.getCookTime(), 0);
658  return result;
659  }
660  bool getPrim() const { return myPrim; }
661  void setPrim(bool val) { myPrim = val; }
662  bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getPrim();
666  bool result;
667  OP_Utils::evalOpParm(result, thissop, "prim", cookparms.getCookTime(), 0);
668  return result;
669  }
670  bool getOnlyconnected() const { return myOnlyconnected; }
671  void setOnlyconnected(bool val) { myOnlyconnected = val; }
672  bool opOnlyconnected(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getOnlyconnected();
676  bool result;
677  OP_Utils::evalOpParm(result, thissop, "onlyconnected", cookparms.getCookTime(), 0);
678  return result;
679  }
680 
681 private:
682  UT_StringHolder myGroup;
683  bool myBlend;
684  fpreal64 myTolerance;
685  fpreal64 myBias;
686  bool myKnotmult;
687  bool myProximity;
688  int64 myDir;
689  int64 myJoinop;
690  int64 myInc;
691  bool myLoop;
692  bool myPrim;
693  bool myOnlyconnected;
694 
695 };
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:62
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setBlend(bool val)
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:613
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
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:296
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:277
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:92
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
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:361
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Definition: core.h:1131
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)
type
Definition: core.h:1059
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 getInc() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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)