HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribTransfer.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 namespace SOP_AttribTransferEnums
26 {
27  enum class Srcgrouptype
28  {
29  PRIMITIVE = 0,
30  POINT
31  };
32  enum class Dstgrouptype
33  {
34  PRIMITIVE = 0,
35  POINT
36  };
37 }
38 
39 
41 {
42 public:
43  static int version() { return 1; }
44 
46  {
47  mySrcgroups = ""_sh;
48  mySrcgrouptype = 0;
49  myDstgroups = ""_sh;
50  myDstgrouptype = 0;
51  myDetailattribs = false;
52  myDetailattriblist = ""_sh;
53  myPrimitiveattribs = true;
54  myPrimattriblist = ""_sh;
55  myPointattribs = true;
56  myPointattriblist = ""_sh;
57  myVertexattribs = false;
58  myVertexattriblist = ""_sh;
59  myCopyvariable = true;
60  myMatchpattrib = false;
61  myKernel = "elendt"_sh;
62  myKernelradius = 10;
63  myMaxsamplecount = 1;
64  myThreshold = true;
65  myThresholddist = 10;
66  myBlendwidth = 0;
67  myUniformbias = 0.5;
68 
69  }
70 
71  explicit SOP_AttribTransferParms(const SOP_AttribTransferParms &) = default;
72 
74 
76  {
77  if (mySrcgroups != src.mySrcgroups) return false;
78  if (mySrcgrouptype != src.mySrcgrouptype) return false;
79  if (myDstgroups != src.myDstgroups) return false;
80  if (myDstgrouptype != src.myDstgrouptype) return false;
81  if (myDetailattribs != src.myDetailattribs) return false;
82  if (myDetailattriblist != src.myDetailattriblist) return false;
83  if (myPrimitiveattribs != src.myPrimitiveattribs) return false;
84  if (myPrimattriblist != src.myPrimattriblist) return false;
85  if (myPointattribs != src.myPointattribs) return false;
86  if (myPointattriblist != src.myPointattriblist) return false;
87  if (myVertexattribs != src.myVertexattribs) return false;
88  if (myVertexattriblist != src.myVertexattriblist) return false;
89  if (myCopyvariable != src.myCopyvariable) return false;
90  if (myMatchpattrib != src.myMatchpattrib) return false;
91  if (myKernel != src.myKernel) return false;
92  if (myKernelradius != src.myKernelradius) return false;
93  if (myMaxsamplecount != src.myMaxsamplecount) return false;
94  if (myThreshold != src.myThreshold) return false;
95  if (myThresholddist != src.myThresholddist) return false;
96  if (myBlendwidth != src.myBlendwidth) return false;
97  if (myUniformbias != src.myUniformbias) return false;
98 
99  return true;
100  }
102  {
103  return !operator==(src);
104  }
107 
108 
109 
110  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
111  {
112  mySrcgroups = ""_sh;
113  if (true)
114  graph->evalOpParm(mySrcgroups, nodeidx, "srcgroups", time, 0);
115  mySrcgrouptype = 0;
116  if (true)
117  graph->evalOpParm(mySrcgrouptype, nodeidx, "srcgrouptype", time, 0);
118  myDstgroups = ""_sh;
119  if (true)
120  graph->evalOpParm(myDstgroups, nodeidx, "dstgroups", time, 0);
121  myDstgrouptype = 0;
122  if (true)
123  graph->evalOpParm(myDstgrouptype, nodeidx, "dstgrouptype", time, 0);
124  myDetailattribs = false;
125  if (true)
126  graph->evalOpParm(myDetailattribs, nodeidx, "detailattribs", time, 0);
127  myDetailattriblist = ""_sh;
128  if (true && ( (true&&!(((getDetailattribs()==0)))) ) )
129  graph->evalOpParm(myDetailattriblist, nodeidx, "detailattriblist", time, 0);
130  myPrimitiveattribs = true;
131  if (true)
132  graph->evalOpParm(myPrimitiveattribs, nodeidx, "primitiveattribs", time, 0);
133  myPrimattriblist = ""_sh;
134  if (true && ( (true&&!(((getPrimitiveattribs()==0)))) ) )
135  graph->evalOpParm(myPrimattriblist, nodeidx, "primattriblist", time, 0);
136  myPointattribs = true;
137  if (true)
138  graph->evalOpParm(myPointattribs, nodeidx, "pointattribs", time, 0);
139  myPointattriblist = ""_sh;
140  if (true && ( (true&&!(((getPointattribs()==0)))) ) )
141  graph->evalOpParm(myPointattriblist, nodeidx, "pointattriblist", time, 0);
142  myVertexattribs = false;
143  if (true)
144  graph->evalOpParm(myVertexattribs, nodeidx, "vertexattribs", time, 0);
145  myVertexattriblist = ""_sh;
146  if (true && ( (true&&!(((getVertexattribs()==0)))) ) )
147  graph->evalOpParm(myVertexattriblist, nodeidx, "vertexattriblist", time, 0);
148  myCopyvariable = true;
149  if (true)
150  graph->evalOpParm(myCopyvariable, nodeidx, "copyvariable", time, 0);
151  myMatchpattrib = false;
152  if (true)
153  graph->evalOpParm(myMatchpattrib, nodeidx, "matchpattrib", time, 0);
154  myKernel = "elendt"_sh;
155  if (true)
156  graph->evalOpParm(myKernel, nodeidx, "kernel", time, 0);
157  myKernelradius = 10;
158  if (true && ( (true&&!(((getKernel()=="uniform")))) ) )
159  graph->evalOpParm(myKernelradius, nodeidx, "kernelradius", time, 0);
160  myMaxsamplecount = 1;
161  if (true)
162  graph->evalOpParm(myMaxsamplecount, nodeidx, "maxsamplecount", time, 0);
163  myThreshold = true;
164  if (true)
165  graph->evalOpParm(myThreshold, nodeidx, "threshold", time, 0);
166  myThresholddist = 10;
167  if (true && ( (true&&!(((getThreshold()==0)))) ) )
168  graph->evalOpParm(myThresholddist, nodeidx, "thresholddist", time, 0);
169  myBlendwidth = 0;
170  if (true && ( (true&&!(((getThreshold()==0)))) ) )
171  graph->evalOpParm(myBlendwidth, nodeidx, "blendwidth", time, 0);
172  myUniformbias = 0.5;
173  if (true && ( (true&&!(((getThreshold()==0))||((getKernel()!="uniform")))) ) )
174  graph->evalOpParm(myUniformbias, nodeidx, "uniformbias", time, 0);
175 
176  }
177 
178 
179  void loadFromOpSubclass(const LoadParms &loadparms) override
180  {
181  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
182  }
183 
184 
185  void copyFrom(const SOP_NodeParms *src) override
186  {
187  *this = *((const SOP_AttribTransferParms *)src);
188  }
189 
190  template <typename T>
191  void
192  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
193  {
194  if (idx.size() < 1)
195  return;
196  UT_ASSERT(idx.size() == instance.size()+1);
197  if (idx.size() != instance.size()+1)
198  return;
199  switch (idx[0])
200  {
201  case 0:
202  coerceValue(value, mySrcgroups);
203  break;
204  case 1:
205  coerceValue(value, mySrcgrouptype);
206  break;
207  case 2:
208  coerceValue(value, myDstgroups);
209  break;
210  case 3:
211  coerceValue(value, myDstgrouptype);
212  break;
213  case 4:
214  coerceValue(value, myDetailattribs);
215  break;
216  case 5:
217  coerceValue(value, myDetailattriblist);
218  break;
219  case 6:
220  coerceValue(value, myPrimitiveattribs);
221  break;
222  case 7:
223  coerceValue(value, myPrimattriblist);
224  break;
225  case 8:
226  coerceValue(value, myPointattribs);
227  break;
228  case 9:
229  coerceValue(value, myPointattriblist);
230  break;
231  case 10:
232  coerceValue(value, myVertexattribs);
233  break;
234  case 11:
235  coerceValue(value, myVertexattriblist);
236  break;
237  case 12:
238  coerceValue(value, myCopyvariable);
239  break;
240  case 13:
241  coerceValue(value, myMatchpattrib);
242  break;
243  case 14:
244  coerceValue(value, myKernel);
245  break;
246  case 15:
247  coerceValue(value, myKernelradius);
248  break;
249  case 16:
250  coerceValue(value, myMaxsamplecount);
251  break;
252  case 17:
253  coerceValue(value, myThreshold);
254  break;
255  case 18:
256  coerceValue(value, myThresholddist);
257  break;
258  case 19:
259  coerceValue(value, myBlendwidth);
260  break;
261  case 20:
262  coerceValue(value, myUniformbias);
263  break;
264 
265  }
266  }
267 
268  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
289  { doGetParmValue(idx, instance, value); }
290 
291  template <typename T>
292  void
293  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
294  {
295  if (idx.size() < 1)
296  return;
297  UT_ASSERT(idx.size() == instance.size()+1);
298  if (idx.size() != instance.size()+1)
299  return;
300  switch (idx[0])
301  {
302  case 0:
303  coerceValue(mySrcgroups, ( ( value ) ));
304  break;
305  case 1:
306  coerceValue(mySrcgrouptype, clampMinValue(0, clampMaxValue(1, value ) ));
307  break;
308  case 2:
309  coerceValue(myDstgroups, ( ( value ) ));
310  break;
311  case 3:
312  coerceValue(myDstgrouptype, clampMinValue(0, clampMaxValue(1, value ) ));
313  break;
314  case 4:
315  coerceValue(myDetailattribs, ( ( value ) ));
316  break;
317  case 5:
318  coerceValue(myDetailattriblist, ( ( value ) ));
319  break;
320  case 6:
321  coerceValue(myPrimitiveattribs, ( ( value ) ));
322  break;
323  case 7:
324  coerceValue(myPrimattriblist, ( ( value ) ));
325  break;
326  case 8:
327  coerceValue(myPointattribs, ( ( value ) ));
328  break;
329  case 9:
330  coerceValue(myPointattriblist, ( ( value ) ));
331  break;
332  case 10:
333  coerceValue(myVertexattribs, ( ( value ) ));
334  break;
335  case 11:
336  coerceValue(myVertexattriblist, ( ( value ) ));
337  break;
338  case 12:
339  coerceValue(myCopyvariable, ( ( value ) ));
340  break;
341  case 13:
342  coerceValue(myMatchpattrib, ( ( value ) ));
343  break;
344  case 14:
345  coerceValue(myKernel, ( ( value ) ));
346  break;
347  case 15:
348  coerceValue(myKernelradius, ( ( value ) ));
349  break;
350  case 16:
351  coerceValue(myMaxsamplecount, clampMinValue(1, ( value ) ));
352  break;
353  case 17:
354  coerceValue(myThreshold, ( ( value ) ));
355  break;
356  case 18:
357  coerceValue(myThresholddist, ( ( value ) ));
358  break;
359  case 19:
360  coerceValue(myBlendwidth, ( ( value ) ));
361  break;
362  case 20:
363  coerceValue(myUniformbias, ( ( value ) ));
364  break;
365 
366  }
367  }
368 
369  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
390  { doSetParmValue(idx, instance, value); }
391 
392  exint getNestNumParms(TempIndex idx) const override
393  {
394  if (idx.size() == 0)
395  return 21;
396  switch (idx[0])
397  {
398 
399  }
400  // Invalid
401  return 0;
402  }
403 
404  const char *getNestParmName(TempIndex fieldnum) const override
405  {
406  if (fieldnum.size() < 1)
407  return 0;
408  switch (fieldnum[0])
409  {
410  case 0:
411  return "srcgroups";
412  case 1:
413  return "srcgrouptype";
414  case 2:
415  return "dstgroups";
416  case 3:
417  return "dstgrouptype";
418  case 4:
419  return "detailattribs";
420  case 5:
421  return "detailattriblist";
422  case 6:
423  return "primitiveattribs";
424  case 7:
425  return "primattriblist";
426  case 8:
427  return "pointattribs";
428  case 9:
429  return "pointattriblist";
430  case 10:
431  return "vertexattribs";
432  case 11:
433  return "vertexattriblist";
434  case 12:
435  return "copyvariable";
436  case 13:
437  return "matchpattrib";
438  case 14:
439  return "kernel";
440  case 15:
441  return "kernelradius";
442  case 16:
443  return "maxsamplecount";
444  case 17:
445  return "threshold";
446  case 18:
447  return "thresholddist";
448  case 19:
449  return "blendwidth";
450  case 20:
451  return "uniformbias";
452 
453  }
454  return 0;
455  }
456 
457  ParmType getNestParmType(TempIndex fieldnum) const override
458  {
459  if (fieldnum.size() < 1)
460  return PARM_UNSUPPORTED;
461  switch (fieldnum[0])
462  {
463  case 0:
464  return PARM_STRING;
465  case 1:
466  return PARM_INTEGER;
467  case 2:
468  return PARM_STRING;
469  case 3:
470  return PARM_INTEGER;
471  case 4:
472  return PARM_INTEGER;
473  case 5:
474  return PARM_STRING;
475  case 6:
476  return PARM_INTEGER;
477  case 7:
478  return PARM_STRING;
479  case 8:
480  return PARM_INTEGER;
481  case 9:
482  return PARM_STRING;
483  case 10:
484  return PARM_INTEGER;
485  case 11:
486  return PARM_STRING;
487  case 12:
488  return PARM_INTEGER;
489  case 13:
490  return PARM_INTEGER;
491  case 14:
492  return PARM_STRING;
493  case 15:
494  return PARM_FLOAT;
495  case 16:
496  return PARM_INTEGER;
497  case 17:
498  return PARM_INTEGER;
499  case 18:
500  return PARM_FLOAT;
501  case 19:
502  return PARM_FLOAT;
503  case 20:
504  return PARM_FLOAT;
505 
506  }
507  return PARM_UNSUPPORTED;
508  }
509 
510  // Boiler plate to load individual types.
511  static void loadData(UT_IStream &is, int64 &v)
512  { is.bread(&v, 1); }
513  static void loadData(UT_IStream &is, bool &v)
514  { int64 iv; is.bread(&iv, 1); v = iv; }
515  static void loadData(UT_IStream &is, fpreal64 &v)
516  { is.bread<fpreal64>(&v, 1); }
517  static void loadData(UT_IStream &is, UT_Vector2D &v)
518  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
519  static void loadData(UT_IStream &is, UT_Vector3D &v)
520  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
521  is.bread<fpreal64>(&v.z(), 1); }
522  static void loadData(UT_IStream &is, UT_Vector4D &v)
523  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
524  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
525  static void loadData(UT_IStream &is, UT_Matrix2D &v)
526  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
527  static void loadData(UT_IStream &is, UT_Matrix3D &v)
528  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
529  static void loadData(UT_IStream &is, UT_Matrix4D &v)
530  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
531  static void loadData(UT_IStream &is, UT_Vector2I &v)
532  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
533  static void loadData(UT_IStream &is, UT_Vector3I &v)
534  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
535  is.bread<int64>(&v.z(), 1); }
536  static void loadData(UT_IStream &is, UT_Vector4I &v)
537  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
538  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
540  { is.bread(v); }
542  { UT_StringHolder rampdata;
543  loadData(is, rampdata);
544  if (rampdata.isstring())
545  {
546  v.reset(new UT_Ramp());
547  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
548  v->load(istr);
549  }
550  else v.reset();
551  }
554  loadData(is, data);
555  if (data.isstring())
556  {
557  // Find the data type.
558  const char *colon = UT_StringWrap(data).findChar(':');
559  if (colon)
560  {
561  int typelen = colon - data.buffer();
563  type.strncpy(data.buffer(), typelen);
564  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
565 
566  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
567  }
568  }
569  else v.reset();
570  }
571 
572  static void saveData(std::ostream &os, int64 v)
573  { UTwrite(os, &v); }
574  static void saveData(std::ostream &os, bool v)
575  { int64 iv = v; UTwrite(os, &iv); }
576  static void saveData(std::ostream &os, fpreal64 v)
577  { UTwrite<fpreal64>(os, &v); }
578  static void saveData(std::ostream &os, UT_Vector2D v)
579  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
580  static void saveData(std::ostream &os, UT_Vector3D v)
581  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
582  UTwrite<fpreal64>(os, &v.z()); }
583  static void saveData(std::ostream &os, UT_Vector4D v)
584  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
585  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
586  static void saveData(std::ostream &os, UT_Matrix2D v)
588  static void saveData(std::ostream &os, UT_Matrix3D v)
590  static void saveData(std::ostream &os, UT_Matrix4D v)
592  static void saveData(std::ostream &os, UT_StringHolder s)
593  { UT_StringWrap(s).saveBinary(os); }
594  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
596  UT_OStringStream ostr;
597  if (s) s->save(ostr);
598  result = ostr.str();
599  saveData(os, result);
600  }
601  static void saveData(std::ostream &os, PRM_DataItemHandle s)
603  UT_OStringStream ostr;
604  if (s)
605  {
606  ostr << s->getDataTypeToken();
607  ostr << ":";
608  s->saveBinary(ostr);
609  }
610  result = ostr.str();
611  saveData(os, result);
612  }
613 
614 
615  void save(std::ostream &os) const
616  {
617  int32 v = version();
618  UTwrite(os, &v);
619  saveData(os, mySrcgroups);
620  saveData(os, mySrcgrouptype);
621  saveData(os, myDstgroups);
622  saveData(os, myDstgrouptype);
623  saveData(os, myDetailattribs);
624  saveData(os, myDetailattriblist);
625  saveData(os, myPrimitiveattribs);
626  saveData(os, myPrimattriblist);
627  saveData(os, myPointattribs);
628  saveData(os, myPointattriblist);
629  saveData(os, myVertexattribs);
630  saveData(os, myVertexattriblist);
631  saveData(os, myCopyvariable);
632  saveData(os, myMatchpattrib);
633  saveData(os, myKernel);
634  saveData(os, myKernelradius);
635  saveData(os, myMaxsamplecount);
636  saveData(os, myThreshold);
637  saveData(os, myThresholddist);
638  saveData(os, myBlendwidth);
639  saveData(os, myUniformbias);
640 
641  }
642 
643  bool load(UT_IStream &is)
644  {
645  int32 v;
646  is.bread(&v, 1);
647  if (version() != v)
648  {
649  // Fail incompatible versions
650  return false;
651  }
652  loadData(is, mySrcgroups);
653  loadData(is, mySrcgrouptype);
654  loadData(is, myDstgroups);
655  loadData(is, myDstgrouptype);
656  loadData(is, myDetailattribs);
657  loadData(is, myDetailattriblist);
658  loadData(is, myPrimitiveattribs);
659  loadData(is, myPrimattriblist);
660  loadData(is, myPointattribs);
661  loadData(is, myPointattriblist);
662  loadData(is, myVertexattribs);
663  loadData(is, myVertexattriblist);
664  loadData(is, myCopyvariable);
665  loadData(is, myMatchpattrib);
666  loadData(is, myKernel);
667  loadData(is, myKernelradius);
668  loadData(is, myMaxsamplecount);
669  loadData(is, myThreshold);
670  loadData(is, myThresholddist);
671  loadData(is, myBlendwidth);
672  loadData(is, myUniformbias);
673 
674  return true;
675  }
676 
677  const UT_StringHolder & getSrcgroups() const { return mySrcgroups; }
678  void setSrcgroups(const UT_StringHolder & val) { mySrcgroups = val; }
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getSrcgroups();
684  OP_Utils::evalOpParm(result, thissop, "srcgroups", cookparms.getCookTime(), 0);
685  return result;
686  }
687  Srcgrouptype getSrcgrouptype() const { return Srcgrouptype(mySrcgrouptype); }
688  void setSrcgrouptype(Srcgrouptype val) { mySrcgrouptype = int64(val); }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getSrcgrouptype();
693  int64 result;
694  OP_Utils::evalOpParm(result, thissop, "srcgrouptype", cookparms.getCookTime(), 0);
695  return Srcgrouptype(result);
696  }
697  const UT_StringHolder & getDstgroups() const { return myDstgroups; }
698  void setDstgroups(const UT_StringHolder & val) { myDstgroups = val; }
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getDstgroups();
704  OP_Utils::evalOpParm(result, thissop, "dstgroups", cookparms.getCookTime(), 0);
705  return result;
706  }
707  Dstgrouptype getDstgrouptype() const { return Dstgrouptype(myDstgrouptype); }
708  void setDstgrouptype(Dstgrouptype val) { myDstgrouptype = int64(val); }
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getDstgrouptype();
713  int64 result;
714  OP_Utils::evalOpParm(result, thissop, "dstgrouptype", cookparms.getCookTime(), 0);
715  return Dstgrouptype(result);
716  }
717  bool getDetailattribs() const { return myDetailattribs; }
718  void setDetailattribs(bool val) { myDetailattribs = val; }
719  bool opDetailattribs(const SOP_NodeVerb::CookParms &cookparms) const
720  {
721  SOP_Node *thissop = cookparms.getNode();
722  if (!thissop) return getDetailattribs();
723  bool result;
724  OP_Utils::evalOpParm(result, thissop, "detailattribs", cookparms.getCookTime(), 0);
725  return result;
726  }
727  const UT_StringHolder & getDetailattriblist() const { return myDetailattriblist; }
728  void setDetailattriblist(const UT_StringHolder & val) { myDetailattriblist = val; }
730  {
731  SOP_Node *thissop = cookparms.getNode();
732  if (!thissop) return getDetailattriblist();
734  OP_Utils::evalOpParm(result, thissop, "detailattriblist", cookparms.getCookTime(), 0);
735  return result;
736  }
737  bool getPrimitiveattribs() const { return myPrimitiveattribs; }
738  void setPrimitiveattribs(bool val) { myPrimitiveattribs = val; }
739  bool opPrimitiveattribs(const SOP_NodeVerb::CookParms &cookparms) const
740  {
741  SOP_Node *thissop = cookparms.getNode();
742  if (!thissop) return getPrimitiveattribs();
743  bool result;
744  OP_Utils::evalOpParm(result, thissop, "primitiveattribs", cookparms.getCookTime(), 0);
745  return result;
746  }
747  const UT_StringHolder & getPrimattriblist() const { return myPrimattriblist; }
748  void setPrimattriblist(const UT_StringHolder & val) { myPrimattriblist = val; }
750  {
751  SOP_Node *thissop = cookparms.getNode();
752  if (!thissop) return getPrimattriblist();
754  OP_Utils::evalOpParm(result, thissop, "primattriblist", cookparms.getCookTime(), 0);
755  return result;
756  }
757  bool getPointattribs() const { return myPointattribs; }
758  void setPointattribs(bool val) { myPointattribs = val; }
759  bool opPointattribs(const SOP_NodeVerb::CookParms &cookparms) const
760  {
761  SOP_Node *thissop = cookparms.getNode();
762  if (!thissop) return getPointattribs();
763  bool result;
764  OP_Utils::evalOpParm(result, thissop, "pointattribs", cookparms.getCookTime(), 0);
765  return result;
766  }
767  const UT_StringHolder & getPointattriblist() const { return myPointattriblist; }
768  void setPointattriblist(const UT_StringHolder & val) { myPointattriblist = val; }
770  {
771  SOP_Node *thissop = cookparms.getNode();
772  if (!thissop) return getPointattriblist();
774  OP_Utils::evalOpParm(result, thissop, "pointattriblist", cookparms.getCookTime(), 0);
775  return result;
776  }
777  bool getVertexattribs() const { return myVertexattribs; }
778  void setVertexattribs(bool val) { myVertexattribs = val; }
779  bool opVertexattribs(const SOP_NodeVerb::CookParms &cookparms) const
780  {
781  SOP_Node *thissop = cookparms.getNode();
782  if (!thissop) return getVertexattribs();
783  bool result;
784  OP_Utils::evalOpParm(result, thissop, "vertexattribs", cookparms.getCookTime(), 0);
785  return result;
786  }
787  const UT_StringHolder & getVertexattriblist() const { return myVertexattriblist; }
788  void setVertexattriblist(const UT_StringHolder & val) { myVertexattriblist = val; }
790  {
791  SOP_Node *thissop = cookparms.getNode();
792  if (!thissop) return getVertexattriblist();
794  OP_Utils::evalOpParm(result, thissop, "vertexattriblist", cookparms.getCookTime(), 0);
795  return result;
796  }
797  bool getCopyvariable() const { return myCopyvariable; }
798  void setCopyvariable(bool val) { myCopyvariable = val; }
799  bool opCopyvariable(const SOP_NodeVerb::CookParms &cookparms) const
800  {
801  SOP_Node *thissop = cookparms.getNode();
802  if (!thissop) return getCopyvariable();
803  bool result;
804  OP_Utils::evalOpParm(result, thissop, "copyvariable", cookparms.getCookTime(), 0);
805  return result;
806  }
807  bool getMatchpattrib() const { return myMatchpattrib; }
808  void setMatchpattrib(bool val) { myMatchpattrib = val; }
809  bool opMatchpattrib(const SOP_NodeVerb::CookParms &cookparms) const
810  {
811  SOP_Node *thissop = cookparms.getNode();
812  if (!thissop) return getMatchpattrib();
813  bool result;
814  OP_Utils::evalOpParm(result, thissop, "matchpattrib", cookparms.getCookTime(), 0);
815  return result;
816  }
817  const UT_StringHolder & getKernel() const { return myKernel; }
818  void setKernel(const UT_StringHolder & val) { myKernel = val; }
820  {
821  SOP_Node *thissop = cookparms.getNode();
822  if (!thissop) return getKernel();
824  OP_Utils::evalOpParm(result, thissop, "kernel", cookparms.getCookTime(), 0);
825  return result;
826  }
827  fpreal64 getKernelradius() const { return myKernelradius; }
828  void setKernelradius(fpreal64 val) { myKernelradius = val; }
830  {
831  SOP_Node *thissop = cookparms.getNode();
832  if (!thissop) return getKernelradius();
834  OP_Utils::evalOpParm(result, thissop, "kernelradius", cookparms.getCookTime(), 0);
835  return result;
836  }
837  int64 getMaxsamplecount() const { return myMaxsamplecount; }
838  void setMaxsamplecount(int64 val) { myMaxsamplecount = val; }
840  {
841  SOP_Node *thissop = cookparms.getNode();
842  if (!thissop) return getMaxsamplecount();
843  int64 result;
844  OP_Utils::evalOpParm(result, thissop, "maxsamplecount", cookparms.getCookTime(), 0);
845  return result;
846  }
847  bool getThreshold() const { return myThreshold; }
848  void setThreshold(bool val) { myThreshold = val; }
849  bool opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
850  {
851  SOP_Node *thissop = cookparms.getNode();
852  if (!thissop) return getThreshold();
853  bool result;
854  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
855  return result;
856  }
857  fpreal64 getThresholddist() const { return myThresholddist; }
858  void setThresholddist(fpreal64 val) { myThresholddist = val; }
860  {
861  SOP_Node *thissop = cookparms.getNode();
862  if (!thissop) return getThresholddist();
864  OP_Utils::evalOpParm(result, thissop, "thresholddist", cookparms.getCookTime(), 0);
865  return result;
866  }
867  fpreal64 getBlendwidth() const { return myBlendwidth; }
868  void setBlendwidth(fpreal64 val) { myBlendwidth = val; }
870  {
871  SOP_Node *thissop = cookparms.getNode();
872  if (!thissop) return getBlendwidth();
874  OP_Utils::evalOpParm(result, thissop, "blendwidth", cookparms.getCookTime(), 0);
875  return result;
876  }
877  fpreal64 getUniformbias() const { return myUniformbias; }
878  void setUniformbias(fpreal64 val) { myUniformbias = val; }
880  {
881  SOP_Node *thissop = cookparms.getNode();
882  if (!thissop) return getUniformbias();
884  OP_Utils::evalOpParm(result, thissop, "uniformbias", cookparms.getCookTime(), 0);
885  return result;
886  }
887 
888 private:
889  UT_StringHolder mySrcgroups;
890  int64 mySrcgrouptype;
891  UT_StringHolder myDstgroups;
892  int64 myDstgrouptype;
893  bool myDetailattribs;
894  UT_StringHolder myDetailattriblist;
895  bool myPrimitiveattribs;
896  UT_StringHolder myPrimattriblist;
897  bool myPointattribs;
898  UT_StringHolder myPointattriblist;
899  bool myVertexattribs;
900  UT_StringHolder myVertexattriblist;
901  bool myCopyvariable;
902  bool myMatchpattrib;
903  UT_StringHolder myKernel;
904  fpreal64 myKernelradius;
905  int64 myMaxsamplecount;
906  bool myThreshold;
907  fpreal64 myThresholddist;
908  fpreal64 myBlendwidth;
909  fpreal64 myUniformbias;
910 
911 };
type
Definition: core.h:977
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setDstgrouptype(Dstgrouptype val)
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setPointattriblist(const UT_StringHolder &val)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opVertexattriblist(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
void setSrcgrouptype(Srcgrouptype val)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator==(const SOP_AttribTransferParms &src) const
bool opCopyvariable(const SOP_NodeVerb::CookParms &cookparms) const
void setDstgroups(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_StringHolder opDstgroups(const SOP_NodeVerb::CookParms &cookparms) const
bool opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GT_API const UT_StringHolder time
Srcgrouptype getSrcgrouptype() const
const UT_StringHolder & getSrcgroups() const
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal getTime() const
Definition: OP_Context.h:60
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, int64 v)
const GLfloat * c
Definition: glew.h:16631
const UT_StringHolder & getDetailattriblist() const
static void loadData(UT_IStream &is, fpreal64 &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
An output stream object that owns its own string buffer storage.
GLenum src
Definition: glcorearb.h:1792
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
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 setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
double fpreal64
Definition: SYS_Types.h:201
UT_StringHolder opKernel(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Matrix3D &v)
Srcgrouptype opSrcgrouptype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
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:30
static void saveData(std::ostream &os, UT_Vector3D v)
const GLdouble * v
Definition: glcorearb.h:836
const UT_StringHolder & getKernel() const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
Dstgrouptype getDstgrouptype() const
int64 opMaxsamplecount(const SOP_NodeVerb::CookParms &cookparms) const
bool opMatchpattrib(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opPointattriblist(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailattriblist(const UT_StringHolder &val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal64 opKernelradius(const SOP_NodeVerb::CookParms &cookparms) const
bool opPointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
void setKernel(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLboolean * data
Definition: glcorearb.h:130
const UT_StringHolder & getPrimattriblist() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
GLuint GLfloat * val
Definition: glcorearb.h:1607
fpreal64 opThresholddist(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void copyFrom(const SOP_NodeParms *src) override
void setSrcgroups(const UT_StringHolder &val)
bool opDetailattribs(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
#define SOP_API
Definition: SOP_API.h:10
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
const UT_StringHolder & getDstgroups() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1371
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:171
static void saveData(std::ostream &os, fpreal64 v)
bool opVertexattribs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal64 opUniformbias(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder opPrimattriblist(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1221
bool operator!=(const SOP_AttribTransferParms &src) const
GLdouble s
Definition: glew.h:1395
UT_StringHolder opDetailattriblist(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPointattriblist() const
bool opPrimitiveattribs(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
void setPrimattriblist(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
fpreal64 opBlendwidth(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setVertexattriblist(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opSrcgroups(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getVertexattriblist() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
Dstgrouptype opDstgrouptype(const SOP_NodeVerb::CookParms &cookparms) const