HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVAutoseam.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_UVAutoseamEnums
24 {
25  enum class BaseSplit
26  {
27  CURVATURE = 0,
28  EXISTING
29  };
30 
32  getToken(BaseSplit enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case BaseSplit::CURVATURE: return "curvature"_sh;
37  case BaseSplit::EXISTING: return "existing"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myAvoidAttr = ""_UTsh;
54  myAvoidanceWeight = 1;
55  myBaseSplit = 0;
56  myGrainTolerance = 0.1;
57  myMergeThreshold = 0.5;
58  myUVAttrib = "uv"_UTsh;
59  myUVTolerance = 1e-5;
60  mySeamsGroupName = "seams"_UTsh;
61  myUseOutputIslandAttr = false;
62  myOutputIslandAttr = "island"_UTsh;
63  myPreseams = ""_UTsh;
64  myIslandAttr = ""_UTsh;
65  myNonseams = ""_UTsh;
66 
67  }
68 
69  explicit SOP_UVAutoseamParms(const SOP_UVAutoseamParms &) = default;
71  SOP_UVAutoseamParms(SOP_UVAutoseamParms &&) noexcept = default;
72  SOP_UVAutoseamParms &operator=(SOP_UVAutoseamParms &&) noexcept = default;
73 
74  ~SOP_UVAutoseamParms() override {}
75 
76  bool operator==(const SOP_UVAutoseamParms &src) const
77  {
78  if (myGroup != src.myGroup) return false;
79  if (myAvoidAttr != src.myAvoidAttr) return false;
80  if (myAvoidanceWeight != src.myAvoidanceWeight) return false;
81  if (myBaseSplit != src.myBaseSplit) return false;
82  if (myGrainTolerance != src.myGrainTolerance) return false;
83  if (myMergeThreshold != src.myMergeThreshold) return false;
84  if (myUVAttrib != src.myUVAttrib) return false;
85  if (myUVTolerance != src.myUVTolerance) return false;
86  if (mySeamsGroupName != src.mySeamsGroupName) return false;
87  if (myUseOutputIslandAttr != src.myUseOutputIslandAttr) return false;
88  if (myOutputIslandAttr != src.myOutputIslandAttr) return false;
89  if (myPreseams != src.myPreseams) return false;
90  if (myIslandAttr != src.myIslandAttr) return false;
91  if (myNonseams != src.myNonseams) return false;
92 
93  return true;
94  }
95  bool operator!=(const SOP_UVAutoseamParms &src) const
96  {
97  return !operator==(src);
98  }
100 
101 
102 
103  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
104  {
105  myGroup = ""_UTsh;
106  if (true)
107  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
108  myAvoidAttr = ""_UTsh;
109  if (true)
110  graph->evalOpParm(myAvoidAttr, nodeidx, "avoidattr", time, 0);
111  myAvoidanceWeight = 1;
112  if (true)
113  graph->evalOpParm(myAvoidanceWeight, nodeidx, "avoidanceweight", time, 0);
114  myBaseSplit = 0;
115  if (true)
116  graph->evalOpParm(myBaseSplit, nodeidx, "basesplit", time, 0);
117  myGrainTolerance = 0.1;
118  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
119  graph->evalOpParm(myGrainTolerance, nodeidx, "graintol", time, 0);
120  myMergeThreshold = 0.5;
121  if (true)
122  graph->evalOpParm(myMergeThreshold, nodeidx, "mergethreshold", time, 0);
123  myUVAttrib = "uv"_UTsh;
124  if (true && ( (true&&!(((int64(getBaseSplit())==0)))) ) )
125  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
126  myUVTolerance = 1e-5;
127  if (true && ( (true&&!(((int64(getBaseSplit())==0)))) ) )
128  graph->evalOpParm(myUVTolerance, nodeidx, "uvtolerance", time, 0);
129  mySeamsGroupName = "seams"_UTsh;
130  if (true)
131  graph->evalOpParm(mySeamsGroupName, nodeidx, "seamsgroupname", time, 0);
132  myUseOutputIslandAttr = false;
133  if (true)
134  graph->evalOpParm(myUseOutputIslandAttr, nodeidx, "useoutputislandattr", time, 0);
135  myOutputIslandAttr = "island"_UTsh;
136  if (true && ( (true&&!(((getUseOutputIslandAttr()==0)))) ) )
137  graph->evalOpParm(myOutputIslandAttr, nodeidx, "outputislandattr", time, 0);
138  myPreseams = ""_UTsh;
139  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
140  graph->evalOpParm(myPreseams, nodeidx, "preseams", time, 0);
141  myIslandAttr = ""_UTsh;
142  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
143  graph->evalOpParm(myIslandAttr, nodeidx, "islandattr", time, 0);
144  myNonseams = ""_UTsh;
145  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
146  graph->evalOpParm(myNonseams, nodeidx, "nonseams", time, 0);
147 
148  }
149 
150 
151  void loadFromOpSubclass(const LoadParms &loadparms) override
152  {
153  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
154  }
155 
156 
157  void copyFrom(const OP_NodeParms *src) override
158  {
159  *this = *((const SOP_UVAutoseamParms *)src);
160  }
161 
162  template <typename T>
163  void
164  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
165  {
166  if (idx.size() < 1)
167  return;
168  UT_ASSERT(idx.size() == instance.size()+1);
169  if (idx.size() != instance.size()+1)
170  return;
171  switch (idx[0])
172  {
173  case 0:
174  coerceValue(value, myGroup);
175  break;
176  case 1:
177  coerceValue(value, myAvoidAttr);
178  break;
179  case 2:
180  coerceValue(value, myAvoidanceWeight);
181  break;
182  case 3:
183  coerceValue(value, myBaseSplit);
184  break;
185  case 4:
186  coerceValue(value, myGrainTolerance);
187  break;
188  case 5:
189  coerceValue(value, myMergeThreshold);
190  break;
191  case 6:
192  coerceValue(value, myUVAttrib);
193  break;
194  case 7:
195  coerceValue(value, myUVTolerance);
196  break;
197  case 8:
198  coerceValue(value, mySeamsGroupName);
199  break;
200  case 9:
201  coerceValue(value, myUseOutputIslandAttr);
202  break;
203  case 10:
204  coerceValue(value, myOutputIslandAttr);
205  break;
206  case 11:
207  coerceValue(value, myPreseams);
208  break;
209  case 12:
210  coerceValue(value, myIslandAttr);
211  break;
212  case 13:
213  coerceValue(value, myNonseams);
214  break;
215 
216  }
217  }
218 
219  bool isParmColorRamp(exint idx) const override
220  {
221  switch (idx)
222  {
223 
224  }
225  return false;
226  }
227 
228  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
249  { doGetParmValue(idx, instance, value); }
250 
251  template <typename T>
252  void
253  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
254  {
255  if (idx.size() < 1)
256  return;
257  UT_ASSERT(idx.size() == instance.size()+1);
258  if (idx.size() != instance.size()+1)
259  return;
260  switch (idx[0])
261  {
262  case 0:
263  coerceValue(myGroup, ( ( value ) ));
264  break;
265  case 1:
266  coerceValue(myAvoidAttr, ( ( value ) ));
267  break;
268  case 2:
269  coerceValue(myAvoidanceWeight, ( ( value ) ));
270  break;
271  case 3:
272  coerceValue(myBaseSplit, clampMinValue(0, clampMaxValue(1, value ) ));
273  break;
274  case 4:
275  coerceValue(myGrainTolerance, clampMinValue(0, ( value ) ));
276  break;
277  case 5:
278  coerceValue(myMergeThreshold, clampMinValue(0, clampMaxValue(1, value ) ));
279  break;
280  case 6:
281  coerceValue(myUVAttrib, ( ( value ) ));
282  break;
283  case 7:
284  coerceValue(myUVTolerance, clampMinValue(0, ( value ) ));
285  break;
286  case 8:
287  coerceValue(mySeamsGroupName, ( ( value ) ));
288  break;
289  case 9:
290  coerceValue(myUseOutputIslandAttr, ( ( value ) ));
291  break;
292  case 10:
293  coerceValue(myOutputIslandAttr, ( ( value ) ));
294  break;
295  case 11:
296  coerceValue(myPreseams, ( ( value ) ));
297  break;
298  case 12:
299  coerceValue(myIslandAttr, ( ( value ) ));
300  break;
301  case 13:
302  coerceValue(myNonseams, ( ( value ) ));
303  break;
304 
305  }
306  }
307 
308  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
329  { doSetParmValue(idx, instance, value); }
330 
331  exint getNestNumParms(TempIndex idx) const override
332  {
333  if (idx.size() == 0)
334  return 14;
335  switch (idx[0])
336  {
337 
338  }
339  // Invalid
340  return 0;
341  }
342 
343  const char *getNestParmName(TempIndex fieldnum) const override
344  {
345  if (fieldnum.size() < 1)
346  return 0;
347  switch (fieldnum[0])
348  {
349  case 0:
350  return "group";
351  case 1:
352  return "avoidattr";
353  case 2:
354  return "avoidanceweight";
355  case 3:
356  return "basesplit";
357  case 4:
358  return "graintol";
359  case 5:
360  return "mergethreshold";
361  case 6:
362  return "uvattrib";
363  case 7:
364  return "uvtolerance";
365  case 8:
366  return "seamsgroupname";
367  case 9:
368  return "useoutputislandattr";
369  case 10:
370  return "outputislandattr";
371  case 11:
372  return "preseams";
373  case 12:
374  return "islandattr";
375  case 13:
376  return "nonseams";
377 
378  }
379  return 0;
380  }
381 
382  ParmType getNestParmType(TempIndex fieldnum) const override
383  {
384  if (fieldnum.size() < 1)
385  return PARM_UNSUPPORTED;
386  switch (fieldnum[0])
387  {
388  case 0:
389  return PARM_STRING;
390  case 1:
391  return PARM_STRING;
392  case 2:
393  return PARM_FLOAT;
394  case 3:
395  return PARM_INTEGER;
396  case 4:
397  return PARM_FLOAT;
398  case 5:
399  return PARM_FLOAT;
400  case 6:
401  return PARM_STRING;
402  case 7:
403  return PARM_FLOAT;
404  case 8:
405  return PARM_STRING;
406  case 9:
407  return PARM_INTEGER;
408  case 10:
409  return PARM_STRING;
410  case 11:
411  return PARM_STRING;
412  case 12:
413  return PARM_STRING;
414  case 13:
415  return PARM_STRING;
416 
417  }
418  return PARM_UNSUPPORTED;
419  }
420 
421  // Boiler plate to load individual types.
422  static void loadData(UT_IStream &is, int64 &v)
423  { is.bread(&v, 1); }
424  static void loadData(UT_IStream &is, bool &v)
425  { int64 iv; is.bread(&iv, 1); v = iv; }
426  static void loadData(UT_IStream &is, fpreal64 &v)
427  { is.bread<fpreal64>(&v, 1); }
428  static void loadData(UT_IStream &is, UT_Vector2D &v)
429  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector3D &v)
431  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
432  is.bread<fpreal64>(&v.z(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector4D &v)
434  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
435  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
436  static void loadData(UT_IStream &is, UT_Matrix2D &v)
437  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
438  static void loadData(UT_IStream &is, UT_Matrix3D &v)
439  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
440  static void loadData(UT_IStream &is, UT_Matrix4D &v)
441  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
442  static void loadData(UT_IStream &is, UT_Vector2I &v)
443  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector3I &v)
445  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
446  is.bread<int64>(&v.z(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector4I &v)
448  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
449  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
451  { is.bread(v); }
453  { UT_StringHolder rampdata;
454  loadData(is, rampdata);
455  if (rampdata.isstring())
456  {
457  v.reset(new UT_Ramp());
458  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
459  v->load(istr);
460  }
461  else v.reset();
462  }
465  loadData(is, data);
466  if (data.isstring())
467  {
468  // Find the data type.
469  const char *colon = UT_StringWrap(data).findChar(':');
470  if (colon)
471  {
472  int typelen = colon - data.buffer();
474  type.strncpy(data.buffer(), typelen);
475  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
476 
477  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
478  }
479  }
480  else v.reset();
481  }
482 
483  static void saveData(std::ostream &os, int64 v)
484  { UTwrite(os, &v); }
485  static void saveData(std::ostream &os, bool v)
486  { int64 iv = v; UTwrite(os, &iv); }
487  static void saveData(std::ostream &os, fpreal64 v)
488  { UTwrite<fpreal64>(os, &v); }
489  static void saveData(std::ostream &os, UT_Vector2D v)
490  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
491  static void saveData(std::ostream &os, UT_Vector3D v)
492  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
493  UTwrite<fpreal64>(os, &v.z()); }
494  static void saveData(std::ostream &os, UT_Vector4D v)
495  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
496  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
497  static void saveData(std::ostream &os, UT_Matrix2D v)
499  static void saveData(std::ostream &os, UT_Matrix3D v)
501  static void saveData(std::ostream &os, UT_Matrix4D v)
503  static void saveData(std::ostream &os, UT_StringHolder s)
504  { UT_StringWrap(s).saveBinary(os); }
505  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
507  UT_OStringStream ostr;
508  if (s) s->save(ostr);
509  result = ostr.str();
510  saveData(os, result);
511  }
512  static void saveData(std::ostream &os, PRM_DataItemHandle s)
514  UT_OStringStream ostr;
515  if (s)
516  {
517  ostr << s->getDataTypeToken();
518  ostr << ":";
519  s->saveBinary(ostr);
520  }
521  result = ostr.str();
522  saveData(os, result);
523  }
524 
525 
526  void save(std::ostream &os) const
527  {
528  int32 v = version();
529  UTwrite(os, &v);
530  saveData(os, myGroup);
531  saveData(os, myAvoidAttr);
532  saveData(os, myAvoidanceWeight);
533  saveData(os, myBaseSplit);
534  saveData(os, myGrainTolerance);
535  saveData(os, myMergeThreshold);
536  saveData(os, myUVAttrib);
537  saveData(os, myUVTolerance);
538  saveData(os, mySeamsGroupName);
539  saveData(os, myUseOutputIslandAttr);
540  saveData(os, myOutputIslandAttr);
541  saveData(os, myPreseams);
542  saveData(os, myIslandAttr);
543  saveData(os, myNonseams);
544 
545  }
546 
547  bool load(UT_IStream &is)
548  {
549  int32 v;
550  is.bread(&v, 1);
551  if (version() != v)
552  {
553  // Fail incompatible versions
554  return false;
555  }
556  loadData(is, myGroup);
557  loadData(is, myAvoidAttr);
558  loadData(is, myAvoidanceWeight);
559  loadData(is, myBaseSplit);
560  loadData(is, myGrainTolerance);
561  loadData(is, myMergeThreshold);
562  loadData(is, myUVAttrib);
563  loadData(is, myUVTolerance);
564  loadData(is, mySeamsGroupName);
565  loadData(is, myUseOutputIslandAttr);
566  loadData(is, myOutputIslandAttr);
567  loadData(is, myPreseams);
568  loadData(is, myIslandAttr);
569  loadData(is, myNonseams);
570 
571  return true;
572  }
573 
574  const UT_StringHolder & getGroup() const { return myGroup; }
575  void setGroup(const UT_StringHolder & val) { myGroup = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getGroup();
581  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
582  return result;
583  }
584  const UT_StringHolder & getAvoidAttr() const { return myAvoidAttr; }
585  void setAvoidAttr(const UT_StringHolder & val) { myAvoidAttr = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getAvoidAttr();
591  OP_Utils::evalOpParm(result, thissop, "avoidattr", cookparms.getCookTime(), 0);
592  return result;
593  }
594  fpreal64 getAvoidanceWeight() const { return myAvoidanceWeight; }
595  void setAvoidanceWeight(fpreal64 val) { myAvoidanceWeight = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getAvoidanceWeight();
601  OP_Utils::evalOpParm(result, thissop, "avoidanceweight", cookparms.getCookTime(), 0);
602  return result;
603  }
604  BaseSplit getBaseSplit() const { return BaseSplit(myBaseSplit); }
605  void setBaseSplit(BaseSplit val) { myBaseSplit = int64(val); }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getBaseSplit();
610  int64 result;
611  OP_Utils::evalOpParm(result, thissop, "basesplit", cookparms.getCookTime(), 0);
612  return BaseSplit(result);
613  }
614  fpreal64 getGrainTolerance() const { return myGrainTolerance; }
615  void setGrainTolerance(fpreal64 val) { myGrainTolerance = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getGrainTolerance();
621  OP_Utils::evalOpParm(result, thissop, "graintol", cookparms.getCookTime(), 0);
622  return result;
623  }
624  fpreal64 getMergeThreshold() const { return myMergeThreshold; }
625  void setMergeThreshold(fpreal64 val) { myMergeThreshold = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getMergeThreshold();
631  OP_Utils::evalOpParm(result, thissop, "mergethreshold", cookparms.getCookTime(), 0);
632  return result;
633  }
634  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
635  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getUVAttrib();
641  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getUVTolerance() const { return myUVTolerance; }
645  void setUVTolerance(fpreal64 val) { myUVTolerance = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getUVTolerance();
651  OP_Utils::evalOpParm(result, thissop, "uvtolerance", cookparms.getCookTime(), 0);
652  return result;
653  }
654  const UT_StringHolder & getSeamsGroupName() const { return mySeamsGroupName; }
655  void setSeamsGroupName(const UT_StringHolder & val) { mySeamsGroupName = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getSeamsGroupName();
661  OP_Utils::evalOpParm(result, thissop, "seamsgroupname", cookparms.getCookTime(), 0);
662  return result;
663  }
664  bool getUseOutputIslandAttr() const { return myUseOutputIslandAttr; }
665  void setUseOutputIslandAttr(bool val) { myUseOutputIslandAttr = val; }
666  bool opUseOutputIslandAttr(const SOP_NodeVerb::CookParms &cookparms) const
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getUseOutputIslandAttr();
670  bool result;
671  OP_Utils::evalOpParm(result, thissop, "useoutputislandattr", cookparms.getCookTime(), 0);
672  return result;
673  }
674  const UT_StringHolder & getOutputIslandAttr() const { return myOutputIslandAttr; }
675  void setOutputIslandAttr(const UT_StringHolder & val) { myOutputIslandAttr = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getOutputIslandAttr();
681  OP_Utils::evalOpParm(result, thissop, "outputislandattr", cookparms.getCookTime(), 0);
682  return result;
683  }
684  const UT_StringHolder & getPreseams() const { return myPreseams; }
685  void setPreseams(const UT_StringHolder & val) { myPreseams = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getPreseams();
691  OP_Utils::evalOpParm(result, thissop, "preseams", cookparms.getCookTime(), 0);
692  return result;
693  }
694  const UT_StringHolder & getIslandAttr() const { return myIslandAttr; }
695  void setIslandAttr(const UT_StringHolder & val) { myIslandAttr = val; }
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getIslandAttr();
701  OP_Utils::evalOpParm(result, thissop, "islandattr", cookparms.getCookTime(), 0);
702  return result;
703  }
704  const UT_StringHolder & getNonseams() const { return myNonseams; }
705  void setNonseams(const UT_StringHolder & val) { myNonseams = val; }
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getNonseams();
711  OP_Utils::evalOpParm(result, thissop, "nonseams", cookparms.getCookTime(), 0);
712  return result;
713  }
714 
715 private:
716  UT_StringHolder myGroup;
717  UT_StringHolder myAvoidAttr;
718  fpreal64 myAvoidanceWeight;
719  int64 myBaseSplit;
720  fpreal64 myGrainTolerance;
721  fpreal64 myMergeThreshold;
722  UT_StringHolder myUVAttrib;
723  fpreal64 myUVTolerance;
724  UT_StringHolder mySeamsGroupName;
725  bool myUseOutputIslandAttr;
726  UT_StringHolder myOutputIslandAttr;
727  UT_StringHolder myPreseams;
728  UT_StringHolder myIslandAttr;
729  UT_StringHolder myNonseams;
730 
731 };
void setOutputIslandAttr(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getIslandAttr() const
fpreal64 opUVTolerance(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, fpreal64 v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
UT_StringHolder opAvoidAttr(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
UT_StringHolder opOutputIslandAttr(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputIslandAttr() const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
An output stream object that owns its own string buffer storage.
fpreal64 opGrainTolerance(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPreseams(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPreseams() const
bool isParmColorRamp(exint idx) const override
**But if you need a result
Definition: thread.h:613
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getAvoidAttr() const
static void saveData(std::ostream &os, UT_Vector4D v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getNonseams() const
void setPreseams(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opUseOutputIslandAttr(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector4D &v)
BaseSplit getBaseSplit() const
static void saveData(std::ostream &os, bool v)
void setGroup(const UT_StringHolder &val)
double fpreal64
Definition: SYS_Types.h:201
void setUVAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setSeamsGroupName(const UT_StringHolder &val)
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
BaseSplit opBaseSplit(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
exint length() const
bool operator==(const SOP_UVAutoseamParms &src) const
SYS_FORCE_INLINE const char * buffer() const
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
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
UT_StringHolder opIslandAttr(const SOP_NodeVerb::CookParms &cookparms) const
void setMergeThreshold(fpreal64 val)
bool getUseOutputIslandAttr() const
void setIslandAttr(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setBaseSplit(BaseSplit val)
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getUVAttrib() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getGroup() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getSeamsGroupName() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 getAvoidanceWeight() const
fpreal64 getMergeThreshold() const
void setAvoidanceWeight(fpreal64 val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opNonseams(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void save(std::ostream &os) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
fpreal64 getGrainTolerance() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
#define SOP_API
Definition: SOP_API.h:10
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
bool load(UT_IStream &is)
void setNonseams(const UT_StringHolder &val)
fpreal64 opAvoidanceWeight(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, UT_Vector2D v)
void setGrainTolerance(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 getUVTolerance() const
bool operator!=(const SOP_UVAutoseamParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setAvoidAttr(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
type
Definition: core.h:1059
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(BaseSplit enum_value)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setUVTolerance(fpreal64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opSeamsGroupName(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
fpreal64 opMergeThreshold(const SOP_NodeVerb::CookParms &cookparms) const
void setUseOutputIslandAttr(bool val)