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