HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_UVFlatten-2.0.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 <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_UVFlatten_2_0Enums
22 {
23  enum class Method
24  {
25  SPECTRAL = 0,
26  LINABF
27  };
28  enum class Straightenmode
29  {
30  NONE = 0,
31  BOUNDARY,
32  ORTHOB,
33  INTERIOR,
34  ORTHO
35  };
36  enum class Uorv
37  {
38  UDIR = 0,
39  VDIR
40  };
41 }
42 
43 
45 {
46 public:
47  static int version() { return 1; }
48  struct Pins
49  {
50  bool usepin;
53 
54 
55  Pins()
56  {
57  usepin = false;
58  primvert = UT_Vector2D(0,0);
59  pinuv = UT_Vector2D(0,0);
60 
61  }
62 
63  bool operator==(const Pins &src) const
64  {
65  if (usepin != src.usepin) return false;
66  if (primvert != src.primvert) return false;
67  if (pinuv != src.pinuv) return false;
68 
69  return true;
70  }
71 
72  };
73 
75  {
77 
78  buf.strcat("[ ");
79  for (int i = 0; i < list.entries(); i++)
80  {
81  if (i)
82  buf.strcat(", ");
83  buf.strcat("( ");
84  buf.append("");
85  buf.appendSprintf("%s", (list(i).usepin) ? "true" : "false");
86  buf.append(", ");
87  buf.appendSprintf("(%f, %f)", list(i).primvert.x(), list(i).primvert.y());
88  buf.append(", ");
89  buf.appendSprintf("(%f, %f)", list(i).pinuv.x(), list(i).pinuv.y());
90 
91  buf.strcat(" )");
92  }
93  buf.strcat(" ]");
94 
95  UT_StringHolder result = buf;
96  return result;
97  }
98  struct Aligngroups
99  {
100  bool usealign;
103 
104 
106  {
107  usealign = false;
108  aligngroup = ""_sh;
109  uorv = 0;
110 
111  }
112 
113  bool operator==(const Aligngroups &src) const
114  {
115  if (usealign != src.usealign) return false;
116  if (aligngroup != src.aligngroup) return false;
117  if (uorv != src.uorv) return false;
118 
119  return true;
120  }
121 
122  };
123 
125  {
127 
128  buf.strcat("[ ");
129  for (int i = 0; i < list.entries(); i++)
130  {
131  if (i)
132  buf.strcat(", ");
133  buf.strcat("( ");
134  buf.append("");
135  buf.appendSprintf("%s", (list(i).usealign) ? "true" : "false");
136  buf.append(", ");
137  { UT_String tmp; tmp = UT_StringWrap(list(i).aligngroup).makeQuotedString('"'); buf.strcat(tmp); }
138  buf.append(", ");
139  buf.appendSprintf("%d", (int) list(i).uorv);
140 
141  buf.strcat(" )");
142  }
143  buf.strcat(" ]");
144 
145  UT_StringHolder result = buf;
146  return result;
147  }
149  {
152 
153 
155  {
156  usestraighten = false;
157  straightengroup = ""_sh;
158 
159  }
160 
161  bool operator==(const Straightengroups &src) const
162  {
163  if (usestraighten != src.usestraighten) return false;
164  if (straightengroup != src.straightengroup) return false;
165 
166  return true;
167  }
168 
169  };
170 
172  {
174 
175  buf.strcat("[ ");
176  for (int i = 0; i < list.entries(); i++)
177  {
178  if (i)
179  buf.strcat(", ");
180  buf.strcat("( ");
181  buf.append("");
182  buf.appendSprintf("%s", (list(i).usestraighten) ? "true" : "false");
183  buf.append(", ");
184  { UT_String tmp; tmp = UT_StringWrap(list(i).straightengroup).makeQuotedString('"'); buf.strcat(tmp); }
185 
186  buf.strcat(" )");
187  }
188  buf.strcat(" ]");
189 
190  UT_StringHolder result = buf;
191  return result;
192  }
193 
195  {
196  myUVAttrib = "uv"_sh;
197  myGroup = ""_sh;
198  mySeamgroup = ""_sh;
199  myExtraseamgroup = ""_sh;
200  myMethod = 0;
201  myUseexistinguv = false;
202  myUseexistingboundaryuv = false;
203  myTest = 0;
204  myStraightenmode = 0;
205  myUsepins = false;
206 
207  }
208 
209  explicit SOP_UVFlatten_2_0Parms(const SOP_UVFlatten_2_0Parms &) = default;
210 
212 
214  {
215  if (myUVAttrib != src.myUVAttrib) return false;
216  if (myGroup != src.myGroup) return false;
217  if (mySeamgroup != src.mySeamgroup) return false;
218  if (myExtraseamgroup != src.myExtraseamgroup) return false;
219  if (myMethod != src.myMethod) return false;
220  if (myUseexistinguv != src.myUseexistinguv) return false;
221  if (myUseexistingboundaryuv != src.myUseexistingboundaryuv) return false;
222  if (myTest != src.myTest) return false;
223  if (myStraightenmode != src.myStraightenmode) return false;
224  if (myUsepins != src.myUsepins) return false;
225  if (myPins != src.myPins) return false;
226  if (myAligngroups != src.myAligngroups) return false;
227  if (myStraightengroups != src.myStraightengroups) return false;
228 
229  return true;
230  }
234 
235 
236 
237  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
238  {
239  if (true)
240  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
241  else myUVAttrib = "uv"_sh;
242  if (true)
243  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
244  else myGroup = ""_sh;
245  if (true)
246  OP_Utils::evalOpParm(mySeamgroup, node, "seamgroup", time, 0);
247  else mySeamgroup = ""_sh;
248  if (true)
249  OP_Utils::evalOpParm(myExtraseamgroup, node, "extraseamgroup", time, 0);
250  else myExtraseamgroup = ""_sh;
251  if (true)
252  OP_Utils::evalOpParm(myMethod, node, "method", time, 0);
253  else myMethod = 0;
254  if (true)
255  OP_Utils::evalOpParm(myUseexistinguv, node, "useexistinguv", time, 0);
256  else myUseexistinguv = false;
257  if (true && ( (!(((int64(getMethod())==1)))) ) )
258  OP_Utils::evalOpParm(myUseexistingboundaryuv, node, "useexistingboundaryuv", time, 0);
259  else myUseexistingboundaryuv = false;
260  if (true)
261  OP_Utils::evalOpParm(myTest, node, "test", time, 0);
262  else myTest = 0;
263  if (true && ( (!(((int64(getMethod())==0)))) ) )
264  OP_Utils::evalOpParm(myStraightenmode, node, "straightenmode", time, 0);
265  else myStraightenmode = 0;
266  if (true && ( (!(((int64(getMethod())==1)))) ) )
267  OP_Utils::evalOpParm(myUsepins, node, "usepins", time, 0);
268  else myUsepins = false;
269  if (true && ( (!(((int64(getMethod())==1)))) ) )
270  {
271  int64 length;
272  OP_Utils::evalOpParm(length, node, "pins", time, 0);
273  myPins.entries(length);
274  for (exint i = 0; i < length; i++)
275  {
276  int parmidx = i+0;
277  auto && _curentry = myPins(i);
278  (void) _curentry;
279  if (true && ( (!(((int64(getMethod())==1)))) ) )
280  OP_Utils::evalOpParmInst(myPins(i).usepin, node, "usepin#", &parmidx, time, 0);
281  else myPins(i).usepin = false;
282  if (true && ( (!(((int64(getMethod())==1)))) ) )
283  OP_Utils::evalOpParmInst(myPins(i).primvert, node, "primvert#", &parmidx, time, 0);
284  else myPins(i).primvert = UT_Vector2D(0,0);
285  if (true && ( (!(((int64(getMethod())==1)))) ) )
286  OP_Utils::evalOpParmInst(myPins(i).pinuv, node, "pinuv#", &parmidx, time, 0);
287  else myPins(i).pinuv = UT_Vector2D(0,0);
288 
289  }
290  }
291  else
292  myPins.clear();
293  if (true && ( (!(((int64(getMethod())==1)))) ) )
294  {
295  int64 length;
296  OP_Utils::evalOpParm(length, node, "aligngroups", time, 0);
297  myAligngroups.entries(length);
298  for (exint i = 0; i < length; i++)
299  {
300  int parmidx = i+0;
301  auto && _curentry = myAligngroups(i);
302  (void) _curentry;
303  if (true && ( (!(((int64(getMethod())==1)))) ) && ( (!(((int64(getMethod())==1)))) ) )
304  OP_Utils::evalOpParmInst(myAligngroups(i).usealign, node, "usealign#", &parmidx, time, 0);
305  else myAligngroups(i).usealign = false;
306  if (true && ( (!(((int64(getMethod())==1)))) ) && ( (!(((int64(getMethod())==1)))) ) )
307  OP_Utils::evalOpParmInst(myAligngroups(i).aligngroup, node, "aligngroup#", &parmidx, time, 0);
308  else myAligngroups(i).aligngroup = ""_sh;
309  if (true && ( (!(((int64(getMethod())==1)))) ) && ( (!(((int64(getMethod())==1)))) ) )
310  OP_Utils::evalOpParmInst(myAligngroups(i).uorv, node, "uorv#", &parmidx, time, 0);
311  else myAligngroups(i).uorv = 0;
312 
313  }
314  }
315  else
316  myAligngroups.clear();
317  if (true && ( (!(((int64(getStraightenmode())==1)))) ) )
318  {
319  int64 length;
320  OP_Utils::evalOpParm(length, node, "straightengroups", time, 0);
321  myStraightengroups.entries(length);
322  for (exint i = 0; i < length; i++)
323  {
324  int parmidx = i+0;
325  auto && _curentry = myStraightengroups(i);
326  (void) _curentry;
327  if (true && ( (!(((int64(getStraightenmode())==1)))) ) )
328  OP_Utils::evalOpParmInst(myStraightengroups(i).usestraighten, node, "usestraighten#", &parmidx, time, 0);
329  else myStraightengroups(i).usestraighten = false;
330  if (true && ( (!(((int64(getStraightenmode())==1)))) ) )
331  OP_Utils::evalOpParmInst(myStraightengroups(i).straightengroup, node, "straightengroup#", &parmidx, time, 0);
332  else myStraightengroups(i).straightengroup = ""_sh;
333 
334  }
335  }
336  else
337  myStraightengroups.clear();
338 
339  }
340 
341 
342  virtual void loadFromOpSubclass(const LoadParms &loadparms)
343  {
344  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
345  }
346 
347 
348  virtual void copyFrom(const SOP_NodeParms *src)
349  {
350  *this = *((const SOP_UVFlatten_2_0Parms *)src);
351  }
352 
353  template <typename T>
354  void
355  doGetParmValue(exint idx, T &value) const
356  {
357  switch (idx)
358  {
359  case 0:
360  coerceValue(value, myUVAttrib);
361  break;
362  case 1:
363  coerceValue(value, myGroup);
364  break;
365  case 2:
366  coerceValue(value, mySeamgroup);
367  break;
368  case 3:
369  coerceValue(value, myExtraseamgroup);
370  break;
371  case 4:
372  coerceValue(value, myMethod);
373  break;
374  case 5:
375  coerceValue(value, myUseexistinguv);
376  break;
377  case 6:
378  coerceValue(value, myUseexistingboundaryuv);
379  break;
380  case 7:
381  coerceValue(value, myTest);
382  break;
383  case 8:
384  coerceValue(value, myStraightenmode);
385  break;
386  case 9:
387  coerceValue(value, myUsepins);
388  break;
389 
390  }
391  }
392 
393  void getParmValue(exint idx, exint &value) const
394  { doGetParmValue(idx, value); }
395  void getParmValue(exint idx, fpreal &value) const
396  { doGetParmValue(idx, value); }
398  { doGetParmValue(idx, value); }
400  { doGetParmValue(idx, value); }
402  { doGetParmValue(idx, value); }
404  { doGetParmValue(idx, value); }
406  { doGetParmValue(idx, value); }
408  { doGetParmValue(idx, value); }
410  { doGetParmValue(idx, value); }
412  { doGetParmValue(idx, value); }
414  { doGetParmValue(idx, value); }
415 
416  template <typename T>
417  void
418  doSetParmValue(exint idx, const T &value)
419  {
420  switch (idx)
421  {
422  case 0:
423  coerceValue(myUVAttrib, value);
424  break;
425  case 1:
426  coerceValue(myGroup, value);
427  break;
428  case 2:
429  coerceValue(mySeamgroup, value);
430  break;
431  case 3:
432  coerceValue(myExtraseamgroup, value);
433  break;
434  case 4:
435  coerceValue(myMethod, value);
436  break;
437  case 5:
438  coerceValue(myUseexistinguv, value);
439  break;
440  case 6:
441  coerceValue(myUseexistingboundaryuv, value);
442  break;
443  case 7:
444  coerceValue(myTest, value);
445  break;
446  case 8:
447  coerceValue(myStraightenmode, value);
448  break;
449  case 9:
450  coerceValue(myUsepins, value);
451  break;
452 
453  }
454  }
455 
456  void setParmValue(exint idx, const exint &value)
457  { doSetParmValue(idx, value); }
458  void setParmValue(exint idx, const fpreal &value)
459  { doSetParmValue(idx, value); }
460  void setParmValue(exint idx, const UT_Vector2D &value)
461  { doSetParmValue(idx, value); }
462  void setParmValue(exint idx, const UT_Vector3D &value)
463  { doSetParmValue(idx, value); }
464  void setParmValue(exint idx, const UT_Vector4D &value)
465  { doSetParmValue(idx, value); }
466  void setParmValue(exint idx, const UT_Matrix2D &value)
467  { doSetParmValue(idx, value); }
468  void setParmValue(exint idx, const UT_Matrix3D &value)
469  { doSetParmValue(idx, value); }
470  void setParmValue(exint idx, const UT_Matrix4D &value)
471  { doSetParmValue(idx, value); }
473  { doSetParmValue(idx, value); }
475  { doSetParmValue(idx, value); }
477  { doSetParmValue(idx, value); }
478 
479  virtual exint getNumParms() const
480  {
481  return 13;
482  }
483 
484  virtual const char *getParmName(exint fieldnum) const
485  {
486  switch (fieldnum)
487  {
488  case 0:
489  return "uvattrib";
490  case 1:
491  return "group";
492  case 2:
493  return "seamgroup";
494  case 3:
495  return "extraseamgroup";
496  case 4:
497  return "method";
498  case 5:
499  return "useexistinguv";
500  case 6:
501  return "useexistingboundaryuv";
502  case 7:
503  return "test";
504  case 8:
505  return "straightenmode";
506  case 9:
507  return "usepins";
508  case 10:
509  return "pins";
510  case 11:
511  return "aligngroups";
512  case 12:
513  return "straightengroups";
514 
515  }
516  return 0;
517  }
518 
519  virtual ParmType getParmType(exint fieldnum) const
520  {
521  switch (fieldnum)
522  {
523  case 0:
524  return PARM_STRING;
525  case 1:
526  return PARM_STRING;
527  case 2:
528  return PARM_STRING;
529  case 3:
530  return PARM_STRING;
531  case 4:
532  return PARM_INTEGER;
533  case 5:
534  return PARM_INTEGER;
535  case 6:
536  return PARM_INTEGER;
537  case 7:
538  return PARM_INTEGER;
539  case 8:
540  return PARM_INTEGER;
541  case 9:
542  return PARM_INTEGER;
543 
544  }
545  return PARM_UNSUPPORTED;
546  }
547 
548  // Boiler plate to load individual types.
549  static void loadData(UT_IStream &is, int64 &v)
550  { is.bread(&v, 1); }
551  static void loadData(UT_IStream &is, bool &v)
552  { int64 iv; is.bread(&iv, 1); v = iv; }
553  static void loadData(UT_IStream &is, fpreal64 &v)
554  { is.bread<fpreal64>(&v, 1); }
555  static void loadData(UT_IStream &is, UT_Vector2D &v)
556  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
557  static void loadData(UT_IStream &is, UT_Vector3D &v)
558  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
559  is.bread<fpreal64>(&v.z(), 1); }
560  static void loadData(UT_IStream &is, UT_Vector4D &v)
561  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
562  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
563  static void loadData(UT_IStream &is, UT_Matrix2D &v)
564  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
565  static void loadData(UT_IStream &is, UT_Matrix3D &v)
566  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
567  static void loadData(UT_IStream &is, UT_Matrix4D &v)
568  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
569  static void loadData(UT_IStream &is, UT_Vector2I &v)
570  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
571  static void loadData(UT_IStream &is, UT_Vector3I &v)
572  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
573  is.bread<int64>(&v.z(), 1); }
574  static void loadData(UT_IStream &is, UT_Vector4I &v)
575  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
576  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
578  { is.bread(v); }
580  { UT_StringHolder rampdata;
581  loadData(is, rampdata);
582  if (rampdata.isstring())
583  {
584  v.reset(new UT_Ramp());
585  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
586  v->load(istr);
587  }
588  else v.reset();
589  }
592  loadData(is, data);
593  if (data.isstring())
594  {
595  // Find the data type.
596  char *colon = UT_StringWrap(data).findChar(':');
597  if (colon)
598  {
599  int typelen = colon - data.buffer();
601  type.strncpy(data.buffer(), typelen);
602  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
603 
604  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
605  }
606  }
607  else v.reset();
608  }
609 
610  static void saveData(std::ostream &os, int64 v)
611  { UTwrite(os, &v); }
612  static void saveData(std::ostream &os, bool v)
613  { int64 iv = v; UTwrite(os, &iv); }
614  static void saveData(std::ostream &os, fpreal64 v)
615  { UTwrite<fpreal64>(os, &v); }
616  static void saveData(std::ostream &os, UT_Vector2D v)
617  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
618  static void saveData(std::ostream &os, UT_Vector3D v)
619  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
620  UTwrite<fpreal64>(os, &v.z()); }
621  static void saveData(std::ostream &os, UT_Vector4D v)
622  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
623  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
624  static void saveData(std::ostream &os, UT_Matrix2D v)
626  static void saveData(std::ostream &os, UT_Matrix3D v)
628  static void saveData(std::ostream &os, UT_Matrix4D v)
630  static void saveData(std::ostream &os, UT_StringHolder s)
631  { UT_StringWrap(s).saveBinary(os); }
632  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
633  { UT_StringHolder result;
634  UT_OStringStream ostr;
635  if (s) s->save(ostr);
636  result = ostr.str();
637  saveData(os, result);
638  }
639  static void saveData(std::ostream &os, PRM_DataItemHandle s)
640  { UT_StringHolder result;
641  UT_OStringStream ostr;
642  if (s)
643  {
644  ostr << s->getDataTypeToken();
645  ostr << ":";
646  s->saveBinary(ostr);
647  }
648  result = ostr.str();
649  saveData(os, result);
650  }
651 
652 
653  void save(std::ostream &os) const
654  {
655  int32 v = version();
656  UTwrite(os, &v);
657  saveData(os, myUVAttrib);
658  saveData(os, myGroup);
659  saveData(os, mySeamgroup);
660  saveData(os, myExtraseamgroup);
661  saveData(os, myMethod);
662  saveData(os, myUseexistinguv);
663  saveData(os, myUseexistingboundaryuv);
664  saveData(os, myTest);
665  saveData(os, myStraightenmode);
666  saveData(os, myUsepins);
667  {
668  int64 length = myPins.entries();
669  UTwrite(os, &length);
670  for (exint i = 0; i < length; i++)
671  {
672  saveData(os, myPins(i).usepin);
673  saveData(os, myPins(i).primvert);
674  saveData(os, myPins(i).pinuv);
675 
676  }
677  }
678  {
679  int64 length = myAligngroups.entries();
680  UTwrite(os, &length);
681  for (exint i = 0; i < length; i++)
682  {
683  saveData(os, myAligngroups(i).usealign);
684  saveData(os, myAligngroups(i).aligngroup);
685  saveData(os, myAligngroups(i).uorv);
686 
687  }
688  }
689  {
690  int64 length = myStraightengroups.entries();
691  UTwrite(os, &length);
692  for (exint i = 0; i < length; i++)
693  {
694  saveData(os, myStraightengroups(i).usestraighten);
695  saveData(os, myStraightengroups(i).straightengroup);
696 
697  }
698  }
699 
700  }
701 
702  bool load(UT_IStream &is)
703  {
704  int32 v;
705  is.bread(&v, 1);
706  if (version() != v)
707  {
708  // Fail incompatible versions
709  return false;
710  }
711  loadData(is, myUVAttrib);
712  loadData(is, myGroup);
713  loadData(is, mySeamgroup);
714  loadData(is, myExtraseamgroup);
715  loadData(is, myMethod);
716  loadData(is, myUseexistinguv);
717  loadData(is, myUseexistingboundaryuv);
718  loadData(is, myTest);
719  loadData(is, myStraightenmode);
720  loadData(is, myUsepins);
721  {
722  int64 length;
723  is.read(&length, 1);
724  myPins.entries(length);
725  for (exint i = 0; i < length; i++)
726  {
727  loadData(is, myPins(i).usepin);
728  loadData(is, myPins(i).primvert);
729  loadData(is, myPins(i).pinuv);
730 
731  }
732  }
733  {
734  int64 length;
735  is.read(&length, 1);
736  myAligngroups.entries(length);
737  for (exint i = 0; i < length; i++)
738  {
739  loadData(is, myAligngroups(i).usealign);
740  loadData(is, myAligngroups(i).aligngroup);
741  loadData(is, myAligngroups(i).uorv);
742 
743  }
744  }
745  {
746  int64 length;
747  is.read(&length, 1);
748  myStraightengroups.entries(length);
749  for (exint i = 0; i < length; i++)
750  {
751  loadData(is, myStraightengroups(i).usestraighten);
752  loadData(is, myStraightengroups(i).straightengroup);
753 
754  }
755  }
756 
757  return true;
758  }
759 
760  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
761  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getUVAttrib();
766  UT_StringHolder result;
767  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
768  return result;
769  }
770  const UT_StringHolder & getGroup() const { return myGroup; }
771  void setGroup(const UT_StringHolder & val) { myGroup = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getGroup();
776  UT_StringHolder result;
777  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
778  return result;
779  }
780  const UT_StringHolder & getSeamgroup() const { return mySeamgroup; }
781  void setSeamgroup(const UT_StringHolder & val) { mySeamgroup = val; }
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getSeamgroup();
786  UT_StringHolder result;
787  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
788  return result;
789  }
790  const UT_StringHolder & getExtraseamgroup() const { return myExtraseamgroup; }
791  void setExtraseamgroup(const UT_StringHolder & val) { myExtraseamgroup = val; }
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getExtraseamgroup();
796  UT_StringHolder result;
797  OP_Utils::evalOpParm(result, thissop, "extraseamgroup", cookparms.getCookTime(), 0);
798  return result;
799  }
800  Method getMethod() const { return Method(myMethod); }
801  void setMethod(Method val) { myMethod = int64(val); }
802  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
803  {
804  SOP_Node *thissop = cookparms.getNode();
805  if (!thissop) return getMethod();
806  int64 result;
807  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
808  return Method(result);
809  }
810  bool getUseexistinguv() const { return myUseexistinguv; }
811  void setUseexistinguv(bool val) { myUseexistinguv = val; }
812  bool opUseexistinguv(const SOP_NodeVerb::CookParms &cookparms) const
813  {
814  SOP_Node *thissop = cookparms.getNode();
815  if (!thissop) return getUseexistinguv();
816  bool result;
817  OP_Utils::evalOpParm(result, thissop, "useexistinguv", cookparms.getCookTime(), 0);
818  return result;
819  }
820  bool getUseexistingboundaryuv() const { return myUseexistingboundaryuv; }
821  void setUseexistingboundaryuv(bool val) { myUseexistingboundaryuv = val; }
823  {
824  SOP_Node *thissop = cookparms.getNode();
825  if (!thissop) return getUseexistingboundaryuv();
826  bool result;
827  OP_Utils::evalOpParm(result, thissop, "useexistingboundaryuv", cookparms.getCookTime(), 0);
828  return result;
829  }
830  int64 getTest() const { return myTest; }
831  void setTest(int64 val) { myTest = val; }
832  int64 opTest(const SOP_NodeVerb::CookParms &cookparms) const
833  {
834  SOP_Node *thissop = cookparms.getNode();
835  if (!thissop) return getTest();
836  int64 result;
837  OP_Utils::evalOpParm(result, thissop, "test", cookparms.getCookTime(), 0);
838  return result;
839  }
840  Straightenmode getStraightenmode() const { return Straightenmode(myStraightenmode); }
841  void setStraightenmode(Straightenmode val) { myStraightenmode = int64(val); }
843  {
844  SOP_Node *thissop = cookparms.getNode();
845  if (!thissop) return getStraightenmode();
846  int64 result;
847  OP_Utils::evalOpParm(result, thissop, "straightenmode", cookparms.getCookTime(), 0);
848  return Straightenmode(result);
849  }
850  bool getUsepins() const { return myUsepins; }
851  void setUsepins(bool val) { myUsepins = val; }
852  bool opUsepins(const SOP_NodeVerb::CookParms &cookparms) const
853  {
854  SOP_Node *thissop = cookparms.getNode();
855  if (!thissop) return getUsepins();
856  bool result;
857  OP_Utils::evalOpParm(result, thissop, "usepins", cookparms.getCookTime(), 0);
858  return result;
859  }
860  const UT_Array<Pins> &getPins() const { return myPins; }
861  void setPins(const UT_Array<Pins> &val) { myPins = val; }
862  exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
863  {
864  SOP_Node *thissop = cookparms.getNode();
865  if (!thissop) return getPins().entries();
866  exint result;
867  OP_Utils::evalOpParm(result, thissop, "pins", cookparms.getCookTime(), 0);
868  return result;
869  }
870  bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
871  {
872  SOP_Node *thissop = cookparms.getNode();
873  if (!thissop) return (myPins(_idx).usepin);
874  int _parmidx = _idx + 0;
875  bool result;
876  OP_Utils::evalOpParmInst(result, thissop, "usepin#", &_parmidx, cookparms.getCookTime(), 0);
877  return (result);
878  }
880  {
881  SOP_Node *thissop = cookparms.getNode();
882  if (!thissop) return (myPins(_idx).primvert);
883  int _parmidx = _idx + 0;
884  UT_Vector2D result;
885  OP_Utils::evalOpParmInst(result, thissop, "primvert#", &_parmidx, cookparms.getCookTime(), 0);
886  return (result);
887  }
889  {
890  SOP_Node *thissop = cookparms.getNode();
891  if (!thissop) return (myPins(_idx).pinuv);
892  int _parmidx = _idx + 0;
893  UT_Vector2D result;
894  OP_Utils::evalOpParmInst(result, thissop, "pinuv#", &_parmidx, cookparms.getCookTime(), 0);
895  return (result);
896  }
897 
898  const UT_Array<Aligngroups> &getAligngroups() const { return myAligngroups; }
899  void setAligngroups(const UT_Array<Aligngroups> &val) { myAligngroups = val; }
901  {
902  SOP_Node *thissop = cookparms.getNode();
903  if (!thissop) return getAligngroups().entries();
904  exint result;
905  OP_Utils::evalOpParm(result, thissop, "aligngroups", cookparms.getCookTime(), 0);
906  return result;
907  }
908  bool opAligngroups_usealign(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
909  {
910  SOP_Node *thissop = cookparms.getNode();
911  if (!thissop) return (myAligngroups(_idx).usealign);
912  int _parmidx = _idx + 0;
913  bool result;
914  OP_Utils::evalOpParmInst(result, thissop, "usealign#", &_parmidx, cookparms.getCookTime(), 0);
915  return (result);
916  }
918  {
919  SOP_Node *thissop = cookparms.getNode();
920  if (!thissop) return (myAligngroups(_idx).aligngroup);
921  int _parmidx = _idx + 0;
922  UT_StringHolder result;
923  OP_Utils::evalOpParmInst(result, thissop, "aligngroup#", &_parmidx, cookparms.getCookTime(), 0);
924  return (result);
925  }
927  {
928  SOP_Node *thissop = cookparms.getNode();
929  if (!thissop) return (myAligngroups(_idx).uorv);
930  int _parmidx = _idx + 0;
931  int64 result;
932  OP_Utils::evalOpParmInst(result, thissop, "uorv#", &_parmidx, cookparms.getCookTime(), 0);
933  return (result);
934  }
935 
936  const UT_Array<Straightengroups> &getStraightengroups() const { return myStraightengroups; }
937  void setStraightengroups(const UT_Array<Straightengroups> &val) { myStraightengroups = val; }
939  {
940  SOP_Node *thissop = cookparms.getNode();
941  if (!thissop) return getStraightengroups().entries();
942  exint result;
943  OP_Utils::evalOpParm(result, thissop, "straightengroups", cookparms.getCookTime(), 0);
944  return result;
945  }
947  {
948  SOP_Node *thissop = cookparms.getNode();
949  if (!thissop) return (myStraightengroups(_idx).usestraighten);
950  int _parmidx = _idx + 0;
951  bool result;
952  OP_Utils::evalOpParmInst(result, thissop, "usestraighten#", &_parmidx, cookparms.getCookTime(), 0);
953  return (result);
954  }
956  {
957  SOP_Node *thissop = cookparms.getNode();
958  if (!thissop) return (myStraightengroups(_idx).straightengroup);
959  int _parmidx = _idx + 0;
960  UT_StringHolder result;
961  OP_Utils::evalOpParmInst(result, thissop, "straightengroup#", &_parmidx, cookparms.getCookTime(), 0);
962  return (result);
963  }
964 
965 
966 private:
967  UT_StringHolder myUVAttrib;
968  UT_StringHolder myGroup;
969  UT_StringHolder mySeamgroup;
970  UT_StringHolder myExtraseamgroup;
971  int64 myMethod;
972  bool myUseexistinguv;
973  bool myUseexistingboundaryuv;
974  int64 myTest;
975  int64 myStraightenmode;
976  bool myUsepins;
977  UT_Array<Pins> myPins;
978  UT_Array<Aligngroups> myAligngroups;
979  UT_Array<Straightengroups> myStraightengroups;
980 
981 };
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_StringHolder createString(const UT_Array< Aligngroups > &list) const
static void saveData(std::ostream &os, int64 v)
bool operator==(const SOP_UVFlatten_2_0Parms &src) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_StringHolder &value) const
T & z(void)
Definition: UT_Vector4.h:372
static void saveData(std::ostream &os, bool v)
UT_StringHolder createString(const UT_Array< Pins > &list) const
void getParmValue(exint idx, UT_Vector2D &value) const
bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opSeamgroup(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
void getParmValue(exint idx, UT_Matrix2D &value) const
fpreal getTime() const
Definition: OP_Context.h:34
void setParmValue(exint idx, const exint &value)
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, int64 &v)
UT_Vector2T< fpreal64 > UT_Vector2D
int64 opAligngroups_uorv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
T & x(void)
Definition: UT_Vector2.h:284
bool operator==(const Pins &src) const
An output stream object that owns its own string buffer storage.
void setStraightengroups(const UT_Array< Straightengroups > &val)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opUsepins(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getGroup() const
int64 opTest(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
exint opAligngroups(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
bool operator==(const Aligngroups &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doSetParmValue(exint idx, const T &value)
const UT_StringHolder & getSeamgroup() const
png_uint_32 i
Definition: png.h:2877
void setParmValue(exint idx, const UT_Vector3D &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setParmValue(exint idx, const UT_Matrix2D &value)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getParmValue(exint idx, fpreal &value) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:100
virtual exint getNumParms() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getParmValue(exint idx, exint &value) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opStraightengroups_usestraighten(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void append(char character)
SYS_FORCE_INLINE const char * buffer() const
int64 exint
Definition: SYS_Types.h:109
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:185
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:280
UT_StringHolder opExtraseamgroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getUVAttrib() const
UT_Vector2D opPins_pinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setExtraseamgroup(const UT_StringHolder &val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_Array< Pins > & getPins() const
void setParmValue(exint idx, const fpreal &value)
GLboolean * data
Definition: glcorearb.h:130
void setStraightenmode(Straightenmode val)
virtual ParmType getParmType(exint fieldnum) const
const UT_StringHolder & getExtraseamgroup() const
int int32
Definition: SYS_Types.h:28
T & y(void)
Definition: UT_Vector4.h:370
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opStraightengroups_straightengroup(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void saveData(std::ostream &os, fpreal64 v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
void setPins(const UT_Array< Pins > &val)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:446
Straightenmode getStraightenmode() const
void setParmValue(exint idx, const UT_Matrix3D &value)
virtual const char * getParmName(exint fieldnum) const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
void strncpy(const char *src, exint maxlen)
const UT_Array< Straightengroups > & getStraightengroups() const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setGroup(const UT_StringHolder &val)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setUVAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
#define SOP_API
Definition: SOP_API.h:10
UT_Vector2D opPins_primvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const char * buffer() const
UT_StringHolder createString(const UT_Array< Straightengroups > &list) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
void setParmValue(exint idx, const UT_Matrix4D &value)
T & x(void)
Definition: UT_Vector4.h:368
virtual void copyFrom(const SOP_NodeParms *src)
bool opUseexistingboundaryuv(const SOP_NodeVerb::CookParms &cookparms) const
exint opStraightengroups(const SOP_NodeVerb::CookParms &cookparms) const
T & y(void)
Definition: UT_Vector2.h:286
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator==(const Straightengroups &src) const
GLboolean r
Definition: glcorearb.h:1221
void setAligngroups(const UT_Array< Aligngroups > &val)
void doGetParmValue(exint idx, T &value) const
static void saveData(std::ostream &os, UT_Vector3D v)
bool opUseexistinguv(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector4D &value) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
const UT_Array< Aligngroups > & getAligngroups() const
void strcat(const char *src)
T & w(void)
Definition: UT_Vector4.h:374
UT_StringHolder opAligngroups_aligngroup(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void getParmValue(exint idx, UT_Matrix4D &value) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getParmValue(exint idx, UT_Matrix3D &value) const
void save(std::ostream &os) const
Straightenmode opStraightenmode(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void setSeamgroup(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Vector3D &value) const
bool opAligngroups_usealign(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const UT_Vector4D &value)
GLenum src
Definition: glcorearb.h:1792