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 <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_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 
94  if (baseGetSignature() != src.baseGetSignature()) return false;
95 
96  return true;
97  }
98  bool operator!=(const SOP_UVAutoseamParms &src) const
99  {
100  return !operator==(src);
101  }
103 
104 
105 
106  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
107  {
108  myGroup = ""_UTsh;
109  if (true)
110  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
111  myAvoidAttr = ""_UTsh;
112  if (true)
113  graph->evalOpParm(myAvoidAttr, nodeidx, "avoidattr", time, graph->isDirect()?nullptr:depnode);
114  myAvoidanceWeight = 1;
115  if (true)
116  graph->evalOpParm(myAvoidanceWeight, nodeidx, "avoidanceweight", time, graph->isDirect()?nullptr:depnode);
117  myBaseSplit = 0;
118  if (true)
119  graph->evalOpParm(myBaseSplit, nodeidx, "basesplit", time, graph->isDirect()?nullptr:depnode);
120  myGrainTolerance = 0.1;
121  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
122  graph->evalOpParm(myGrainTolerance, nodeidx, "graintol", time, graph->isDirect()?nullptr:depnode);
123  myMergeThreshold = 0.5;
124  if (true)
125  graph->evalOpParm(myMergeThreshold, nodeidx, "mergethreshold", time, graph->isDirect()?nullptr:depnode);
126  myUVAttrib = "uv"_UTsh;
127  if (true && ( (true&&!(((int64(getBaseSplit())==0)))) ) )
128  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, graph->isDirect()?nullptr:depnode);
129  myUVTolerance = 1e-5;
130  if (true && ( (true&&!(((int64(getBaseSplit())==0)))) ) )
131  graph->evalOpParm(myUVTolerance, nodeidx, "uvtolerance", time, graph->isDirect()?nullptr:depnode);
132  mySeamsGroupName = "seams"_UTsh;
133  if (true)
134  graph->evalOpParm(mySeamsGroupName, nodeidx, "seamsgroupname", time, graph->isDirect()?nullptr:depnode);
135  myUseOutputIslandAttr = false;
136  if (true)
137  graph->evalOpParm(myUseOutputIslandAttr, nodeidx, "useoutputislandattr", time, graph->isDirect()?nullptr:depnode);
138  myOutputIslandAttr = "island"_UTsh;
139  if (true && ( (true&&!(((getUseOutputIslandAttr()==0)))) ) )
140  graph->evalOpParm(myOutputIslandAttr, nodeidx, "outputislandattr", time, graph->isDirect()?nullptr:depnode);
141  myPreseams = ""_UTsh;
142  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
143  graph->evalOpParm(myPreseams, nodeidx, "preseams", time, graph->isDirect()?nullptr:depnode);
144  myIslandAttr = ""_UTsh;
145  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
146  graph->evalOpParm(myIslandAttr, nodeidx, "islandattr", time, graph->isDirect()?nullptr:depnode);
147  myNonseams = ""_UTsh;
148  if (true && ( (true&&!(((int64(getBaseSplit())==1)))) ) )
149  graph->evalOpParm(myNonseams, nodeidx, "nonseams", time, graph->isDirect()?nullptr:depnode);
150 
151  }
152 
153 
154  void loadFromOpSubclass(const LoadParms &loadparms) override
155  {
156  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
157  }
158 
159 
160  void copyFrom(const OP_NodeParms *src) override
161  {
162  *this = *((const SOP_UVAutoseamParms *)src);
163  }
164 
165  template <typename T>
166  void
167  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
168  {
169  if (idx.size() < 1)
170  return;
171  UT_ASSERT(idx.size() == instance.size()+1);
172  if (idx.size() != instance.size()+1)
173  return;
174  switch (idx[0])
175  {
176  case 0:
177  coerceValue(value, myGroup);
178  break;
179  case 1:
180  coerceValue(value, myAvoidAttr);
181  break;
182  case 2:
183  coerceValue(value, myAvoidanceWeight);
184  break;
185  case 3:
186  coerceValue(value, myBaseSplit);
187  break;
188  case 4:
189  coerceValue(value, myGrainTolerance);
190  break;
191  case 5:
192  coerceValue(value, myMergeThreshold);
193  break;
194  case 6:
195  coerceValue(value, myUVAttrib);
196  break;
197  case 7:
198  coerceValue(value, myUVTolerance);
199  break;
200  case 8:
201  coerceValue(value, mySeamsGroupName);
202  break;
203  case 9:
204  coerceValue(value, myUseOutputIslandAttr);
205  break;
206  case 10:
207  coerceValue(value, myOutputIslandAttr);
208  break;
209  case 11:
210  coerceValue(value, myPreseams);
211  break;
212  case 12:
213  coerceValue(value, myIslandAttr);
214  break;
215  case 13:
216  coerceValue(value, myNonseams);
217  break;
218 
219  }
220  }
221 
222  bool isParmColorRamp(exint idx) const override
223  {
224  switch (idx)
225  {
226 
227  }
228  return false;
229  }
230 
231  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
252  { doGetParmValue(idx, instance, value); }
253 
254  template <typename T>
255  void
256  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
257  {
258  if (idx.size() < 1)
259  return;
260  UT_ASSERT(idx.size() == instance.size()+1);
261  if (idx.size() != instance.size()+1)
262  return;
263  switch (idx[0])
264  {
265  case 0:
266  coerceValue(myGroup, ( ( value ) ));
267  break;
268  case 1:
269  coerceValue(myAvoidAttr, ( ( value ) ));
270  break;
271  case 2:
272  coerceValue(myAvoidanceWeight, ( ( value ) ));
273  break;
274  case 3:
275  coerceValue(myBaseSplit, clampMinValue(0, clampMaxValue(1, value ) ));
276  break;
277  case 4:
278  coerceValue(myGrainTolerance, clampMinValue(0, ( value ) ));
279  break;
280  case 5:
281  coerceValue(myMergeThreshold, clampMinValue(0, clampMaxValue(1, value ) ));
282  break;
283  case 6:
284  coerceValue(myUVAttrib, ( ( value ) ));
285  break;
286  case 7:
287  coerceValue(myUVTolerance, clampMinValue(0, ( value ) ));
288  break;
289  case 8:
290  coerceValue(mySeamsGroupName, ( ( value ) ));
291  break;
292  case 9:
293  coerceValue(myUseOutputIslandAttr, ( ( value ) ));
294  break;
295  case 10:
296  coerceValue(myOutputIslandAttr, ( ( value ) ));
297  break;
298  case 11:
299  coerceValue(myPreseams, ( ( value ) ));
300  break;
301  case 12:
302  coerceValue(myIslandAttr, ( ( value ) ));
303  break;
304  case 13:
305  coerceValue(myNonseams, ( ( value ) ));
306  break;
307 
308  }
309  }
310 
311  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
332  { doSetParmValue(idx, instance, value); }
333 
334  exint getNestNumParms(TempIndex idx) const override
335  {
336  if (idx.size() == 0)
337  return 14;
338  switch (idx[0])
339  {
340 
341  }
342  // Invalid
343  return 0;
344  }
345 
346  const char *getNestParmName(TempIndex fieldnum) const override
347  {
348  if (fieldnum.size() < 1)
349  return 0;
350  switch (fieldnum[0])
351  {
352  case 0:
353  return "group";
354  case 1:
355  return "avoidattr";
356  case 2:
357  return "avoidanceweight";
358  case 3:
359  return "basesplit";
360  case 4:
361  return "graintol";
362  case 5:
363  return "mergethreshold";
364  case 6:
365  return "uvattrib";
366  case 7:
367  return "uvtolerance";
368  case 8:
369  return "seamsgroupname";
370  case 9:
371  return "useoutputislandattr";
372  case 10:
373  return "outputislandattr";
374  case 11:
375  return "preseams";
376  case 12:
377  return "islandattr";
378  case 13:
379  return "nonseams";
380 
381  }
382  return 0;
383  }
384 
385  ParmType getNestParmType(TempIndex fieldnum) const override
386  {
387  if (fieldnum.size() < 1)
388  return PARM_UNSUPPORTED;
389  switch (fieldnum[0])
390  {
391  case 0:
392  return PARM_STRING;
393  case 1:
394  return PARM_STRING;
395  case 2:
396  return PARM_FLOAT;
397  case 3:
398  return PARM_INTEGER;
399  case 4:
400  return PARM_FLOAT;
401  case 5:
402  return PARM_FLOAT;
403  case 6:
404  return PARM_STRING;
405  case 7:
406  return PARM_FLOAT;
407  case 8:
408  return PARM_STRING;
409  case 9:
410  return PARM_INTEGER;
411  case 10:
412  return PARM_STRING;
413  case 11:
414  return PARM_STRING;
415  case 12:
416  return PARM_STRING;
417  case 13:
418  return PARM_STRING;
419 
420  }
421  return PARM_UNSUPPORTED;
422  }
423 
424  // Boiler plate to load individual types.
425  static void loadData(UT_IStream &is, int64 &v)
426  { is.bread(&v, 1); }
427  static void loadData(UT_IStream &is, bool &v)
428  { int64 iv; is.bread(&iv, 1); v = iv; }
429  static void loadData(UT_IStream &is, fpreal64 &v)
430  { is.bread<fpreal64>(&v, 1); }
431  static void loadData(UT_IStream &is, UT_Vector2D &v)
432  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector3D &v)
434  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
435  is.bread<fpreal64>(&v.z(), 1); }
436  static void loadData(UT_IStream &is, UT_Vector4D &v)
437  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
438  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
439  static void loadData(UT_IStream &is, UT_Matrix2D &v)
440  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
441  static void loadData(UT_IStream &is, UT_Matrix3D &v)
442  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
443  static void loadData(UT_IStream &is, UT_Matrix4D &v)
444  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
445  static void loadData(UT_IStream &is, UT_Vector2I &v)
446  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector3I &v)
448  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
449  is.bread<int64>(&v.z(), 1); }
450  static void loadData(UT_IStream &is, UT_Vector4I &v)
451  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
452  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
454  { is.bread(v); }
456  { UT_StringHolder rampdata;
457  loadData(is, rampdata);
458  if (rampdata.isstring())
459  {
460  v.reset(new UT_Ramp());
461  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
462  v->load(istr);
463  }
464  else v.reset();
465  }
468  loadData(is, data);
469  if (data.isstring())
470  {
471  // Find the data type.
472  const char *colon = UT_StringWrap(data).findChar(':');
473  if (colon)
474  {
475  int typelen = colon - data.buffer();
477  type.strncpy(data.buffer(), typelen);
478  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
479 
480  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
481  }
482  }
483  else v.reset();
484  }
485 
486  static void saveData(std::ostream &os, int64 v)
487  { UTwrite(os, &v); }
488  static void saveData(std::ostream &os, bool v)
489  { int64 iv = v; UTwrite(os, &iv); }
490  static void saveData(std::ostream &os, fpreal64 v)
491  { UTwrite<fpreal64>(os, &v); }
492  static void saveData(std::ostream &os, UT_Vector2D v)
493  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
494  static void saveData(std::ostream &os, UT_Vector3D v)
495  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
496  UTwrite<fpreal64>(os, &v.z()); }
497  static void saveData(std::ostream &os, UT_Vector4D v)
498  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
499  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
500  static void saveData(std::ostream &os, UT_Matrix2D v)
502  static void saveData(std::ostream &os, UT_Matrix3D v)
504  static void saveData(std::ostream &os, UT_Matrix4D v)
506  static void saveData(std::ostream &os, UT_StringHolder s)
507  { UT_StringWrap(s).saveBinary(os); }
508  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
510  UT_OStringStream ostr;
511  if (s) s->save(ostr);
512  result = ostr.str();
513  saveData(os, result);
514  }
515  static void saveData(std::ostream &os, PRM_DataItemHandle s)
517  UT_OStringStream ostr;
518  if (s)
519  {
520  ostr << s->getDataTypeToken();
521  ostr << ":";
522  s->saveBinary(ostr);
523  }
524  result = ostr.str();
525  saveData(os, result);
526  }
527 
528 
529  void save(std::ostream &os) const
530  {
531  int32 v = version();
532  UTwrite(os, &v);
533  saveData(os, myGroup);
534  saveData(os, myAvoidAttr);
535  saveData(os, myAvoidanceWeight);
536  saveData(os, myBaseSplit);
537  saveData(os, myGrainTolerance);
538  saveData(os, myMergeThreshold);
539  saveData(os, myUVAttrib);
540  saveData(os, myUVTolerance);
541  saveData(os, mySeamsGroupName);
542  saveData(os, myUseOutputIslandAttr);
543  saveData(os, myOutputIslandAttr);
544  saveData(os, myPreseams);
545  saveData(os, myIslandAttr);
546  saveData(os, myNonseams);
547 
548  }
549 
550  bool load(UT_IStream &is)
551  {
552  int32 v;
553  is.bread(&v, 1);
554  if (version() != v)
555  {
556  // Fail incompatible versions
557  return false;
558  }
559  loadData(is, myGroup);
560  loadData(is, myAvoidAttr);
561  loadData(is, myAvoidanceWeight);
562  loadData(is, myBaseSplit);
563  loadData(is, myGrainTolerance);
564  loadData(is, myMergeThreshold);
565  loadData(is, myUVAttrib);
566  loadData(is, myUVTolerance);
567  loadData(is, mySeamsGroupName);
568  loadData(is, myUseOutputIslandAttr);
569  loadData(is, myOutputIslandAttr);
570  loadData(is, myPreseams);
571  loadData(is, myIslandAttr);
572  loadData(is, myNonseams);
573 
574  return true;
575  }
576 
577  const UT_StringHolder & getGroup() const { return myGroup; }
578  void setGroup(const UT_StringHolder & val) { myGroup = val; }
580  {
581  SOP_Node *thissop = cookparms.getNode();
582  if (!thissop) return getGroup();
584  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
585  return result;
586  }
587  const UT_StringHolder & getAvoidAttr() const { return myAvoidAttr; }
588  void setAvoidAttr(const UT_StringHolder & val) { myAvoidAttr = val; }
590  {
591  SOP_Node *thissop = cookparms.getNode();
592  if (!thissop) return getAvoidAttr();
594  OP_Utils::evalOpParm(result, thissop, "avoidattr", cookparms.getCookTime(), 0);
595  return result;
596  }
597  fpreal64 getAvoidanceWeight() const { return myAvoidanceWeight; }
598  void setAvoidanceWeight(fpreal64 val) { myAvoidanceWeight = val; }
600  {
601  SOP_Node *thissop = cookparms.getNode();
602  if (!thissop) return getAvoidanceWeight();
604  OP_Utils::evalOpParm(result, thissop, "avoidanceweight", cookparms.getCookTime(), 0);
605  return result;
606  }
607  BaseSplit getBaseSplit() const { return BaseSplit(myBaseSplit); }
608  void setBaseSplit(BaseSplit val) { myBaseSplit = int64(val); }
610  {
611  SOP_Node *thissop = cookparms.getNode();
612  if (!thissop) return getBaseSplit();
613  int64 result;
614  OP_Utils::evalOpParm(result, thissop, "basesplit", cookparms.getCookTime(), 0);
615  return BaseSplit(result);
616  }
617  fpreal64 getGrainTolerance() const { return myGrainTolerance; }
618  void setGrainTolerance(fpreal64 val) { myGrainTolerance = val; }
620  {
621  SOP_Node *thissop = cookparms.getNode();
622  if (!thissop) return getGrainTolerance();
624  OP_Utils::evalOpParm(result, thissop, "graintol", cookparms.getCookTime(), 0);
625  return result;
626  }
627  fpreal64 getMergeThreshold() const { return myMergeThreshold; }
628  void setMergeThreshold(fpreal64 val) { myMergeThreshold = val; }
630  {
631  SOP_Node *thissop = cookparms.getNode();
632  if (!thissop) return getMergeThreshold();
634  OP_Utils::evalOpParm(result, thissop, "mergethreshold", cookparms.getCookTime(), 0);
635  return result;
636  }
637  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
638  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
640  {
641  SOP_Node *thissop = cookparms.getNode();
642  if (!thissop) return getUVAttrib();
644  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
645  return result;
646  }
647  fpreal64 getUVTolerance() const { return myUVTolerance; }
648  void setUVTolerance(fpreal64 val) { myUVTolerance = val; }
650  {
651  SOP_Node *thissop = cookparms.getNode();
652  if (!thissop) return getUVTolerance();
654  OP_Utils::evalOpParm(result, thissop, "uvtolerance", cookparms.getCookTime(), 0);
655  return result;
656  }
657  const UT_StringHolder & getSeamsGroupName() const { return mySeamsGroupName; }
658  void setSeamsGroupName(const UT_StringHolder & val) { mySeamsGroupName = val; }
660  {
661  SOP_Node *thissop = cookparms.getNode();
662  if (!thissop) return getSeamsGroupName();
664  OP_Utils::evalOpParm(result, thissop, "seamsgroupname", cookparms.getCookTime(), 0);
665  return result;
666  }
667  bool getUseOutputIslandAttr() const { return myUseOutputIslandAttr; }
668  void setUseOutputIslandAttr(bool val) { myUseOutputIslandAttr = val; }
669  bool opUseOutputIslandAttr(const SOP_NodeVerb::CookParms &cookparms) const
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getUseOutputIslandAttr();
673  bool result;
674  OP_Utils::evalOpParm(result, thissop, "useoutputislandattr", cookparms.getCookTime(), 0);
675  return result;
676  }
677  const UT_StringHolder & getOutputIslandAttr() const { return myOutputIslandAttr; }
678  void setOutputIslandAttr(const UT_StringHolder & val) { myOutputIslandAttr = val; }
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getOutputIslandAttr();
684  OP_Utils::evalOpParm(result, thissop, "outputislandattr", cookparms.getCookTime(), 0);
685  return result;
686  }
687  const UT_StringHolder & getPreseams() const { return myPreseams; }
688  void setPreseams(const UT_StringHolder & val) { myPreseams = val; }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getPreseams();
694  OP_Utils::evalOpParm(result, thissop, "preseams", cookparms.getCookTime(), 0);
695  return result;
696  }
697  const UT_StringHolder & getIslandAttr() const { return myIslandAttr; }
698  void setIslandAttr(const UT_StringHolder & val) { myIslandAttr = val; }
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getIslandAttr();
704  OP_Utils::evalOpParm(result, thissop, "islandattr", cookparms.getCookTime(), 0);
705  return result;
706  }
707  const UT_StringHolder & getNonseams() const { return myNonseams; }
708  void setNonseams(const UT_StringHolder & val) { myNonseams = val; }
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getNonseams();
714  OP_Utils::evalOpParm(result, thissop, "nonseams", cookparms.getCookTime(), 0);
715  return result;
716  }
717 
718 private:
719  UT_StringHolder myGroup;
720  UT_StringHolder myAvoidAttr;
721  fpreal64 myAvoidanceWeight;
722  int64 myBaseSplit;
723  fpreal64 myGrainTolerance;
724  fpreal64 myMergeThreshold;
725  UT_StringHolder myUVAttrib;
726  fpreal64 myUVTolerance;
727  UT_StringHolder mySeamsGroupName;
728  bool myUseOutputIslandAttr;
729  UT_StringHolder myOutputIslandAttr;
730  UT_StringHolder myPreseams;
731  UT_StringHolder myIslandAttr;
732  UT_StringHolder myNonseams;
733 
734 };
void setOutputIslandAttr(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
type
Definition: core.h:556
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:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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)
exint getNestNumParms(TempIndex idx) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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)