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