HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  SCP = 0,
26  ABF
27  };
28  enum class Align_axis
29  {
30  UAXIS = 0,
31  VAXIS
32  };
33  enum class Lalign_axis
34  {
35  UAXIS = 0,
36  VAXIS
37  };
38 }
39 
40 
42 {
43 public:
44  static int version() { return 1; }
45  struct Pins
46  {
47  bool usepin;
51 
52 
53  Pins()
54  {
55  usepin = false;
56  primvert = UT_Vector2D(0,0);
57  pinuv = UT_Vector2D(0,0);
58  pinrefuv = UT_Vector2D(0,0);
59 
60  }
61 
62  bool operator==(const Pins &src) const
63  {
64  if (usepin != src.usepin) return false;
65  if (primvert != src.primvert) return false;
66  if (pinuv != src.pinuv) return false;
67  if (pinrefuv != src.pinrefuv) return false;
68 
69  return true;
70  }
71  bool operator!=(const Pins &src) const
72  {
73  return !operator==(src);
74  }
75 
76  };
77 
79  {
81 
82  buf.strcat("[ ");
83  for (int i = 0; i < list.entries(); i++)
84  {
85  if (i)
86  buf.strcat(", ");
87  buf.strcat("( ");
88  buf.append("");
89  buf.appendSprintf("%s", (list(i).usepin) ? "true" : "false");
90  buf.append(", ");
91  buf.appendSprintf("(%f, %f)", list(i).primvert.x(), list(i).primvert.y());
92  buf.append(", ");
93  buf.appendSprintf("(%f, %f)", list(i).pinuv.x(), list(i).pinuv.y());
94  buf.append(", ");
95  buf.appendSprintf("(%f, %f)", list(i).pinrefuv.x(), list(i).pinrefuv.y());
96 
97  buf.strcat(" )");
98  }
99  buf.strcat(" ]");
100 
101  UT_StringHolder result = buf;
102  return result;
103  }
104  struct Alignments
105  {
109 
110 
112  {
113  align_enabled = false;
114  align_group = ""_sh;
115  align_axis = 0;
116 
117  }
118 
119  bool operator==(const Alignments &src) const
120  {
121  if (align_enabled != src.align_enabled) return false;
122  if (align_group != src.align_group) return false;
123  if (align_axis != src.align_axis) return false;
124 
125  return true;
126  }
127  bool operator!=(const Alignments &src) const
128  {
129  return !operator==(src);
130  }
131 
132  };
133 
135  {
137 
138  buf.strcat("[ ");
139  for (int i = 0; i < list.entries(); i++)
140  {
141  if (i)
142  buf.strcat(", ");
143  buf.strcat("( ");
144  buf.append("");
145  buf.appendSprintf("%s", (list(i).align_enabled) ? "true" : "false");
146  buf.append(", ");
147  { UT_String tmp; tmp = UT_StringWrap(list(i).align_group).makeQuotedString('"'); buf.strcat(tmp); }
148  buf.append(", ");
149  buf.appendSprintf("%d", (int) list(i).align_axis);
150 
151  buf.strcat(" )");
152  }
153  buf.strcat(" ]");
154 
155  UT_StringHolder result = buf;
156  return result;
157  }
159  {
162 
163 
165  {
166  straight_enabled = false;
167  straight_group = ""_sh;
168 
169  }
170 
171  bool operator==(const Straightenings &src) const
172  {
173  if (straight_enabled != src.straight_enabled) return false;
174  if (straight_group != src.straight_group) return false;
175 
176  return true;
177  }
178  bool operator!=(const Straightenings &src) const
179  {
180  return !operator==(src);
181  }
182 
183  };
184 
186  {
188 
189  buf.strcat("[ ");
190  for (int i = 0; i < list.entries(); i++)
191  {
192  if (i)
193  buf.strcat(", ");
194  buf.strcat("( ");
195  buf.append("");
196  buf.appendSprintf("%s", (list(i).straight_enabled) ? "true" : "false");
197  buf.append(", ");
198  { UT_String tmp; tmp = UT_StringWrap(list(i).straight_group).makeQuotedString('"'); buf.strcat(tmp); }
199 
200  buf.strcat(" )");
201  }
202  buf.strcat(" ]");
203 
204  UT_StringHolder result = buf;
205  return result;
206  }
207  struct Lpins
208  {
212 
213 
215  {
216  lprimvert = UT_Vector2D(0,0);
217  lpinuv = UT_Vector2D(0,0);
218  lpinrefuv = UT_Vector2D(0,0);
219 
220  }
221 
222  bool operator==(const Lpins &src) const
223  {
224  if (lprimvert != src.lprimvert) return false;
225  if (lpinuv != src.lpinuv) return false;
226  if (lpinrefuv != src.lpinrefuv) return false;
227 
228  return true;
229  }
230  bool operator!=(const Lpins &src) const
231  {
232  return !operator==(src);
233  }
234 
235  };
236 
238  {
240 
241  buf.strcat("[ ");
242  for (int i = 0; i < list.entries(); i++)
243  {
244  if (i)
245  buf.strcat(", ");
246  buf.strcat("( ");
247  buf.append("");
248  buf.appendSprintf("(%f, %f)", list(i).lprimvert.x(), list(i).lprimvert.y());
249  buf.append(", ");
250  buf.appendSprintf("(%f, %f)", list(i).lpinuv.x(), list(i).lpinuv.y());
251  buf.append(", ");
252  buf.appendSprintf("(%f, %f)", list(i).lpinrefuv.x(), list(i).lpinrefuv.y());
253 
254  buf.strcat(" )");
255  }
256  buf.strcat(" ]");
257 
258  UT_StringHolder result = buf;
259  return result;
260  }
261  struct Lalignments
262  {
265 
266 
268  {
269  lalign_group = ""_sh;
270  lalign_axis = 0;
271 
272  }
273 
274  bool operator==(const Lalignments &src) const
275  {
276  if (lalign_group != src.lalign_group) return false;
277  if (lalign_axis != src.lalign_axis) return false;
278 
279  return true;
280  }
281  bool operator!=(const Lalignments &src) const
282  {
283  return !operator==(src);
284  }
285 
286  };
287 
289  {
291 
292  buf.strcat("[ ");
293  for (int i = 0; i < list.entries(); i++)
294  {
295  if (i)
296  buf.strcat(", ");
297  buf.strcat("( ");
298  buf.append("");
299  { UT_String tmp; tmp = UT_StringWrap(list(i).lalign_group).makeQuotedString('"'); buf.strcat(tmp); }
300  buf.append(", ");
301  buf.appendSprintf("%d", (int) list(i).lalign_axis);
302 
303  buf.strcat(" )");
304  }
305  buf.strcat(" ]");
306 
307  UT_StringHolder result = buf;
308  return result;
309  }
311  {
313 
314 
316  {
317  lstraight_group = ""_sh;
318 
319  }
320 
321  bool operator==(const Lstraightenings &src) const
322  {
323  if (lstraight_group != src.lstraight_group) return false;
324 
325  return true;
326  }
327  bool operator!=(const Lstraightenings &src) const
328  {
329  return !operator==(src);
330  }
331 
332  };
333 
335  {
337 
338  buf.strcat("[ ");
339  for (int i = 0; i < list.entries(); i++)
340  {
341  if (i)
342  buf.strcat(", ");
343  buf.strcat("( ");
344  buf.append("");
345  { UT_String tmp; tmp = UT_StringWrap(list(i).lstraight_group).makeQuotedString('"'); buf.strcat(tmp); }
346 
347  buf.strcat(" )");
348  }
349  buf.strcat(" ]");
350 
351  UT_StringHolder result = buf;
352  return result;
353  }
354 
356  {
357  myGroup = ""_sh;
358  myUVAttrib = "uv"_sh;
359  myMethod = 0;
360  myKeepExistingSeams = false;
361  myKeepExistingLayout = false;
362  myPinBoundaries = false;
363  mySeams = ""_sh;
364  myUsePins = false;
365  myUseAlignments = false;
366  myUseStraightenings = false;
367  myManualLayout = false;
368  myLayoutSeams = ""_sh;
369  myUseOutputSeams = false;
370  myOutputSeams = "outputseams"_sh;
371  myUseOutputConstrIslands = false;
372  myOutputConstrIslands = "constrainedprims"_sh;
373  myBboxCenter = UT_Vector2D(0.5,0.5);
374  myBboxSize = UT_Vector2D(1,1);
375 
376  }
377 
378  explicit SOP_UVFlatten_2_0Parms(const SOP_UVFlatten_2_0Parms &) = default;
379 
381 
383  {
384  if (myGroup != src.myGroup) return false;
385  if (myUVAttrib != src.myUVAttrib) return false;
386  if (myMethod != src.myMethod) return false;
387  if (myKeepExistingSeams != src.myKeepExistingSeams) return false;
388  if (myKeepExistingLayout != src.myKeepExistingLayout) return false;
389  if (myPinBoundaries != src.myPinBoundaries) return false;
390  if (mySeams != src.mySeams) return false;
391  if (myUsePins != src.myUsePins) return false;
392  if (myPins != src.myPins) return false;
393  if (myUseAlignments != src.myUseAlignments) return false;
394  if (myAlignments != src.myAlignments) return false;
395  if (myUseStraightenings != src.myUseStraightenings) return false;
396  if (myStraightenings != src.myStraightenings) return false;
397  if (myManualLayout != src.myManualLayout) return false;
398  if (myLayoutSeams != src.myLayoutSeams) return false;
399  if (myLpins != src.myLpins) return false;
400  if (myLalignments != src.myLalignments) return false;
401  if (myLstraightenings != src.myLstraightenings) return false;
402  if (myUseOutputSeams != src.myUseOutputSeams) return false;
403  if (myOutputSeams != src.myOutputSeams) return false;
404  if (myUseOutputConstrIslands != src.myUseOutputConstrIslands) return false;
405  if (myOutputConstrIslands != src.myOutputConstrIslands) return false;
406  if (myBboxCenter != src.myBboxCenter) return false;
407  if (myBboxSize != src.myBboxSize) return false;
408 
409  return true;
410  }
412  {
413  return !operator==(src);
414  }
418 
419 
420 
421  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
422  {
423  if (true)
424  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
425  else myGroup = ""_sh;
426  if (true)
427  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
428  else myUVAttrib = "uv"_sh;
429  if (true)
430  OP_Utils::evalOpParm(myMethod, node, "method", time, 0);
431  else myMethod = 0;
432  if (true)
433  OP_Utils::evalOpParm(myKeepExistingSeams, node, "keepexistingseams", time, 0);
434  else myKeepExistingSeams = false;
435  if (true && ( (!(((getKeepExistingSeams()==0)))) ) )
436  OP_Utils::evalOpParm(myKeepExistingLayout, node, "keepexistinglayout", time, 0);
437  else myKeepExistingLayout = false;
438  if (true && ( (!(((getKeepExistingSeams()==0))||((int64(getMethod())!=0)))) ) )
439  OP_Utils::evalOpParm(myPinBoundaries, node, "pinboundaries", time, 0);
440  else myPinBoundaries = false;
441  if (true)
442  OP_Utils::evalOpParm(mySeams, node, "seamgroup", time, 0);
443  else mySeams = ""_sh;
444  if (true)
445  OP_Utils::evalOpParm(myUsePins, node, "usepins", time, 0);
446  else myUsePins = false;
447  if (true && ( (!(((getUsePins()==0)))) ) )
448  {
449  int64 length;
450  OP_Utils::evalOpParm(length, node, "pins", time, 0);
451  myPins.entries(length);
452  for (exint i = 0; i < length; i++)
453  {
454  int parmidx = i+0;
455  auto && _curentry = myPins(i);
456  (void) _curentry;
457  if (true && ( (!(((getUsePins()==0)))) ) )
458  OP_Utils::evalOpParmInst(myPins(i).usepin, node, "usepin#", &parmidx, time, 0);
459  else myPins(i).usepin = false;
460  if (true && ( (!(((getUsePins()==0)))) ) )
461  OP_Utils::evalOpParmInst(myPins(i).primvert, node, "primvert#", &parmidx, time, 0);
462  else myPins(i).primvert = UT_Vector2D(0,0);
463  if (true && ( (!(((getUsePins()==0)))) ) )
464  OP_Utils::evalOpParmInst(myPins(i).pinuv, node, "pinuv#", &parmidx, time, 0);
465  else myPins(i).pinuv = UT_Vector2D(0,0);
466  if (true && ( (!(((getUsePins()==0)))) ) )
467  OP_Utils::evalOpParmInst(myPins(i).pinrefuv, node, "pinrefuv#", &parmidx, time, 0);
468  else myPins(i).pinrefuv = UT_Vector2D(0,0);
469 
470  }
471  }
472  else
473  myPins.clear();
474  if (true)
475  OP_Utils::evalOpParm(myUseAlignments, node, "usealignments", time, 0);
476  else myUseAlignments = false;
477  if (true && ( (!(((getUseAlignments()==0)))) ) )
478  {
479  int64 length;
480  OP_Utils::evalOpParm(length, node, "alignments", time, 0);
481  myAlignments.entries(length);
482  for (exint i = 0; i < length; i++)
483  {
484  int parmidx = i+0;
485  auto && _curentry = myAlignments(i);
486  (void) _curentry;
487  if (true && ( (!(((getUseAlignments()==0)))) ) )
488  OP_Utils::evalOpParmInst(myAlignments(i).align_enabled, node, "align_enabled#", &parmidx, time, 0);
489  else myAlignments(i).align_enabled = false;
490  if (true && ( (!(((getUseAlignments()==0)))) ) )
491  OP_Utils::evalOpParmInst(myAlignments(i).align_group, node, "align_group#", &parmidx, time, 0);
492  else myAlignments(i).align_group = ""_sh;
493  if (true && ( (!(((getUseAlignments()==0)))) ) )
494  OP_Utils::evalOpParmInst(myAlignments(i).align_axis, node, "align_axis#", &parmidx, time, 0);
495  else myAlignments(i).align_axis = 0;
496 
497  }
498  }
499  else
500  myAlignments.clear();
501  if (true)
502  OP_Utils::evalOpParm(myUseStraightenings, node, "usestraightenings", time, 0);
503  else myUseStraightenings = false;
504  if (true && ( (!(((getUseStraightenings()==0)))) ) )
505  {
506  int64 length;
507  OP_Utils::evalOpParm(length, node, "straightenings", time, 0);
508  myStraightenings.entries(length);
509  for (exint i = 0; i < length; i++)
510  {
511  int parmidx = i+0;
512  auto && _curentry = myStraightenings(i);
513  (void) _curentry;
514  if (true && ( (!(((getUseStraightenings()==0)))) ) )
515  OP_Utils::evalOpParmInst(myStraightenings(i).straight_enabled, node, "straight_enabled#", &parmidx, time, 0);
516  else myStraightenings(i).straight_enabled = false;
517  if (true && ( (!(((getUseStraightenings()==0)))) ) )
518  OP_Utils::evalOpParmInst(myStraightenings(i).straight_group, node, "straight_group#", &parmidx, time, 0);
519  else myStraightenings(i).straight_group = ""_sh;
520 
521  }
522  }
523  else
524  myStraightenings.clear();
525  if (true)
526  OP_Utils::evalOpParm(myManualLayout, node, "manuallayout", time, 0);
527  else myManualLayout = false;
528  if (true && ( (!(((getManualLayout()==0)))) ) )
529  OP_Utils::evalOpParm(myLayoutSeams, node, "layoutseamgroup", time, 0);
530  else myLayoutSeams = ""_sh;
531  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
532  {
533  int64 length;
534  OP_Utils::evalOpParm(length, node, "lpins", time, 0);
535  myLpins.entries(length);
536  for (exint i = 0; i < length; i++)
537  {
538  int parmidx = i+0;
539  auto && _curentry = myLpins(i);
540  (void) _curentry;
541  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
542  OP_Utils::evalOpParmInst(myLpins(i).lprimvert, node, "lprimvert#", &parmidx, time, 0);
543  else myLpins(i).lprimvert = UT_Vector2D(0,0);
544  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
545  OP_Utils::evalOpParmInst(myLpins(i).lpinuv, node, "lpinuv#", &parmidx, time, 0);
546  else myLpins(i).lpinuv = UT_Vector2D(0,0);
547  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
548  OP_Utils::evalOpParmInst(myLpins(i).lpinrefuv, node, "lpinrefuv#", &parmidx, time, 0);
549  else myLpins(i).lpinrefuv = UT_Vector2D(0,0);
550 
551  }
552  }
553  else
554  myLpins.clear();
555  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
556  {
557  int64 length;
558  OP_Utils::evalOpParm(length, node, "lalignments", time, 0);
559  myLalignments.entries(length);
560  for (exint i = 0; i < length; i++)
561  {
562  int parmidx = i+0;
563  auto && _curentry = myLalignments(i);
564  (void) _curentry;
565  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
566  OP_Utils::evalOpParmInst(myLalignments(i).lalign_group, node, "lalign_group#", &parmidx, time, 0);
567  else myLalignments(i).lalign_group = ""_sh;
568  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
569  OP_Utils::evalOpParmInst(myLalignments(i).lalign_axis, node, "lalign_axis#", &parmidx, time, 0);
570  else myLalignments(i).lalign_axis = 0;
571 
572  }
573  }
574  else
575  myLalignments.clear();
576  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
577  {
578  int64 length;
579  OP_Utils::evalOpParm(length, node, "lstraightenings", time, 0);
580  myLstraightenings.entries(length);
581  for (exint i = 0; i < length; i++)
582  {
583  int parmidx = i+0;
584  auto && _curentry = myLstraightenings(i);
585  (void) _curentry;
586  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
587  OP_Utils::evalOpParmInst(myLstraightenings(i).lstraight_group, node, "lstraight_group#", &parmidx, time, 0);
588  else myLstraightenings(i).lstraight_group = ""_sh;
589 
590  }
591  }
592  else
593  myLstraightenings.clear();
594  if (true)
595  OP_Utils::evalOpParm(myUseOutputSeams, node, "useoutputseams", time, 0);
596  else myUseOutputSeams = false;
597  if (true && ( (!(((getUseOutputSeams()==0)))) ) )
598  OP_Utils::evalOpParm(myOutputSeams, node, "outputseams", time, 0);
599  else myOutputSeams = "outputseams"_sh;
600  if (true)
601  OP_Utils::evalOpParm(myUseOutputConstrIslands, node, "useoutputconstrislands", time, 0);
602  else myUseOutputConstrIslands = false;
603  if (true && ( (!(((getUseOutputConstrIslands()==0)))) ) )
604  OP_Utils::evalOpParm(myOutputConstrIslands, node, "outputconstrislands", time, 0);
605  else myOutputConstrIslands = "constrainedprims"_sh;
606  if (true)
607  OP_Utils::evalOpParm(myBboxCenter, node, "bboxcenter", time, 0);
608  else myBboxCenter = UT_Vector2D(0.5,0.5);
609  if (true)
610  OP_Utils::evalOpParm(myBboxSize, node, "bboxsize", time, 0);
611  else myBboxSize = UT_Vector2D(1,1);
612 
613  }
614 
615 
616  virtual void loadFromOpSubclass(const LoadParms &loadparms)
617  {
618  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
619  }
620 
621 
622  virtual void copyFrom(const SOP_NodeParms *src)
623  {
624  *this = *((const SOP_UVFlatten_2_0Parms *)src);
625  }
626 
627  template <typename T>
628  void
629  doGetParmValue(exint idx, T &value) const
630  {
631  switch (idx)
632  {
633  case 0:
634  coerceValue(value, myGroup);
635  break;
636  case 1:
637  coerceValue(value, myUVAttrib);
638  break;
639  case 2:
640  coerceValue(value, myMethod);
641  break;
642  case 3:
643  coerceValue(value, myKeepExistingSeams);
644  break;
645  case 4:
646  coerceValue(value, myKeepExistingLayout);
647  break;
648  case 5:
649  coerceValue(value, myPinBoundaries);
650  break;
651  case 6:
652  coerceValue(value, mySeams);
653  break;
654  case 7:
655  coerceValue(value, myUsePins);
656  break;
657  case 9:
658  coerceValue(value, myUseAlignments);
659  break;
660  case 11:
661  coerceValue(value, myUseStraightenings);
662  break;
663  case 13:
664  coerceValue(value, myManualLayout);
665  break;
666  case 14:
667  coerceValue(value, myLayoutSeams);
668  break;
669  case 18:
670  coerceValue(value, myUseOutputSeams);
671  break;
672  case 19:
673  coerceValue(value, myOutputSeams);
674  break;
675  case 20:
676  coerceValue(value, myUseOutputConstrIslands);
677  break;
678  case 21:
679  coerceValue(value, myOutputConstrIslands);
680  break;
681  case 22:
682  coerceValue(value, myBboxCenter);
683  break;
684  case 23:
685  coerceValue(value, myBboxSize);
686  break;
687 
688  }
689  }
690 
691  void getParmValue(exint idx, exint &value) const
692  { doGetParmValue(idx, value); }
693  void getParmValue(exint idx, fpreal &value) const
694  { doGetParmValue(idx, value); }
696  { doGetParmValue(idx, value); }
698  { doGetParmValue(idx, value); }
700  { doGetParmValue(idx, value); }
702  { doGetParmValue(idx, value); }
704  { doGetParmValue(idx, value); }
706  { doGetParmValue(idx, value); }
708  { doGetParmValue(idx, value); }
710  { doGetParmValue(idx, value); }
712  { doGetParmValue(idx, value); }
713 
714  template <typename T>
715  void
716  doSetParmValue(exint idx, const T &value)
717  {
718  switch (idx)
719  {
720  case 0:
721  coerceValue(myGroup, value);
722  break;
723  case 1:
724  coerceValue(myUVAttrib, value);
725  break;
726  case 2:
727  coerceValue(myMethod, value);
728  break;
729  case 3:
730  coerceValue(myKeepExistingSeams, value);
731  break;
732  case 4:
733  coerceValue(myKeepExistingLayout, value);
734  break;
735  case 5:
736  coerceValue(myPinBoundaries, value);
737  break;
738  case 6:
739  coerceValue(mySeams, value);
740  break;
741  case 7:
742  coerceValue(myUsePins, value);
743  break;
744  case 9:
745  coerceValue(myUseAlignments, value);
746  break;
747  case 11:
748  coerceValue(myUseStraightenings, value);
749  break;
750  case 13:
751  coerceValue(myManualLayout, value);
752  break;
753  case 14:
754  coerceValue(myLayoutSeams, value);
755  break;
756  case 18:
757  coerceValue(myUseOutputSeams, value);
758  break;
759  case 19:
760  coerceValue(myOutputSeams, value);
761  break;
762  case 20:
763  coerceValue(myUseOutputConstrIslands, value);
764  break;
765  case 21:
766  coerceValue(myOutputConstrIslands, value);
767  break;
768  case 22:
769  coerceValue(myBboxCenter, value);
770  break;
771  case 23:
772  coerceValue(myBboxSize, value);
773  break;
774 
775  }
776  }
777 
778  void setParmValue(exint idx, const exint &value)
779  { doSetParmValue(idx, value); }
780  void setParmValue(exint idx, const fpreal &value)
781  { doSetParmValue(idx, value); }
782  void setParmValue(exint idx, const UT_Vector2D &value)
783  { doSetParmValue(idx, value); }
784  void setParmValue(exint idx, const UT_Vector3D &value)
785  { doSetParmValue(idx, value); }
786  void setParmValue(exint idx, const UT_Vector4D &value)
787  { doSetParmValue(idx, value); }
788  void setParmValue(exint idx, const UT_Matrix2D &value)
789  { doSetParmValue(idx, value); }
790  void setParmValue(exint idx, const UT_Matrix3D &value)
791  { doSetParmValue(idx, value); }
792  void setParmValue(exint idx, const UT_Matrix4D &value)
793  { doSetParmValue(idx, value); }
795  { doSetParmValue(idx, value); }
797  { doSetParmValue(idx, value); }
799  { doSetParmValue(idx, value); }
800 
801  virtual exint getNumParms() const
802  {
803  return 24;
804  }
805 
806  virtual const char *getParmName(exint fieldnum) const
807  {
808  switch (fieldnum)
809  {
810  case 0:
811  return "group";
812  case 1:
813  return "uvattrib";
814  case 2:
815  return "method";
816  case 3:
817  return "keepexistingseams";
818  case 4:
819  return "keepexistinglayout";
820  case 5:
821  return "pinboundaries";
822  case 6:
823  return "seamgroup";
824  case 7:
825  return "usepins";
826  case 8:
827  return "pins";
828  case 9:
829  return "usealignments";
830  case 10:
831  return "alignments";
832  case 11:
833  return "usestraightenings";
834  case 12:
835  return "straightenings";
836  case 13:
837  return "manuallayout";
838  case 14:
839  return "layoutseamgroup";
840  case 15:
841  return "lpins";
842  case 16:
843  return "lalignments";
844  case 17:
845  return "lstraightenings";
846  case 18:
847  return "useoutputseams";
848  case 19:
849  return "outputseams";
850  case 20:
851  return "useoutputconstrislands";
852  case 21:
853  return "outputconstrislands";
854  case 22:
855  return "bboxcenter";
856  case 23:
857  return "bboxsize";
858 
859  }
860  return 0;
861  }
862 
863  virtual ParmType getParmType(exint fieldnum) const
864  {
865  switch (fieldnum)
866  {
867  case 0:
868  return PARM_STRING;
869  case 1:
870  return PARM_STRING;
871  case 2:
872  return PARM_INTEGER;
873  case 3:
874  return PARM_INTEGER;
875  case 4:
876  return PARM_INTEGER;
877  case 5:
878  return PARM_INTEGER;
879  case 6:
880  return PARM_STRING;
881  case 7:
882  return PARM_INTEGER;
883  case 9:
884  return PARM_INTEGER;
885  case 11:
886  return PARM_INTEGER;
887  case 13:
888  return PARM_INTEGER;
889  case 14:
890  return PARM_STRING;
891  case 18:
892  return PARM_INTEGER;
893  case 19:
894  return PARM_STRING;
895  case 20:
896  return PARM_INTEGER;
897  case 21:
898  return PARM_STRING;
899  case 22:
900  return PARM_VECTOR2;
901  case 23:
902  return PARM_VECTOR2;
903 
904  }
905  return PARM_UNSUPPORTED;
906  }
907 
908  // Boiler plate to load individual types.
909  static void loadData(UT_IStream &is, int64 &v)
910  { is.bread(&v, 1); }
911  static void loadData(UT_IStream &is, bool &v)
912  { int64 iv; is.bread(&iv, 1); v = iv; }
913  static void loadData(UT_IStream &is, fpreal64 &v)
914  { is.bread<fpreal64>(&v, 1); }
915  static void loadData(UT_IStream &is, UT_Vector2D &v)
916  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
917  static void loadData(UT_IStream &is, UT_Vector3D &v)
918  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
919  is.bread<fpreal64>(&v.z(), 1); }
920  static void loadData(UT_IStream &is, UT_Vector4D &v)
921  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
922  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
923  static void loadData(UT_IStream &is, UT_Matrix2D &v)
924  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
925  static void loadData(UT_IStream &is, UT_Matrix3D &v)
926  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
927  static void loadData(UT_IStream &is, UT_Matrix4D &v)
928  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
929  static void loadData(UT_IStream &is, UT_Vector2I &v)
930  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
931  static void loadData(UT_IStream &is, UT_Vector3I &v)
932  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
933  is.bread<int64>(&v.z(), 1); }
934  static void loadData(UT_IStream &is, UT_Vector4I &v)
935  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
936  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
938  { is.bread(v); }
940  { UT_StringHolder rampdata;
941  loadData(is, rampdata);
942  if (rampdata.isstring())
943  {
944  v.reset(new UT_Ramp());
945  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
946  v->load(istr);
947  }
948  else v.reset();
949  }
952  loadData(is, data);
953  if (data.isstring())
954  {
955  // Find the data type.
956  char *colon = UT_StringWrap(data).findChar(':');
957  if (colon)
958  {
959  int typelen = colon - data.buffer();
961  type.strncpy(data.buffer(), typelen);
962  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
963 
964  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
965  }
966  }
967  else v.reset();
968  }
969 
970  static void saveData(std::ostream &os, int64 v)
971  { UTwrite(os, &v); }
972  static void saveData(std::ostream &os, bool v)
973  { int64 iv = v; UTwrite(os, &iv); }
974  static void saveData(std::ostream &os, fpreal64 v)
975  { UTwrite<fpreal64>(os, &v); }
976  static void saveData(std::ostream &os, UT_Vector2D v)
977  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
978  static void saveData(std::ostream &os, UT_Vector3D v)
979  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
980  UTwrite<fpreal64>(os, &v.z()); }
981  static void saveData(std::ostream &os, UT_Vector4D v)
982  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
983  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
984  static void saveData(std::ostream &os, UT_Matrix2D v)
986  static void saveData(std::ostream &os, UT_Matrix3D v)
988  static void saveData(std::ostream &os, UT_Matrix4D v)
990  static void saveData(std::ostream &os, UT_StringHolder s)
991  { UT_StringWrap(s).saveBinary(os); }
992  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
993  { UT_StringHolder result;
994  UT_OStringStream ostr;
995  if (s) s->save(ostr);
996  result = ostr.str();
997  saveData(os, result);
998  }
999  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1000  { UT_StringHolder result;
1001  UT_OStringStream ostr;
1002  if (s)
1003  {
1004  ostr << s->getDataTypeToken();
1005  ostr << ":";
1006  s->saveBinary(ostr);
1007  }
1008  result = ostr.str();
1009  saveData(os, result);
1010  }
1011 
1012 
1013  void save(std::ostream &os) const
1014  {
1015  int32 v = version();
1016  UTwrite(os, &v);
1017  saveData(os, myGroup);
1018  saveData(os, myUVAttrib);
1019  saveData(os, myMethod);
1020  saveData(os, myKeepExistingSeams);
1021  saveData(os, myKeepExistingLayout);
1022  saveData(os, myPinBoundaries);
1023  saveData(os, mySeams);
1024  saveData(os, myUsePins);
1025  {
1026  int64 length = myPins.entries();
1027  UTwrite(os, &length);
1028  for (exint i = 0; i < length; i++)
1029  {
1030  saveData(os, myPins(i).usepin);
1031  saveData(os, myPins(i).primvert);
1032  saveData(os, myPins(i).pinuv);
1033  saveData(os, myPins(i).pinrefuv);
1034 
1035  }
1036  }
1037  saveData(os, myUseAlignments);
1038  {
1039  int64 length = myAlignments.entries();
1040  UTwrite(os, &length);
1041  for (exint i = 0; i < length; i++)
1042  {
1043  saveData(os, myAlignments(i).align_enabled);
1044  saveData(os, myAlignments(i).align_group);
1045  saveData(os, myAlignments(i).align_axis);
1046 
1047  }
1048  }
1049  saveData(os, myUseStraightenings);
1050  {
1051  int64 length = myStraightenings.entries();
1052  UTwrite(os, &length);
1053  for (exint i = 0; i < length; i++)
1054  {
1055  saveData(os, myStraightenings(i).straight_enabled);
1056  saveData(os, myStraightenings(i).straight_group);
1057 
1058  }
1059  }
1060  saveData(os, myManualLayout);
1061  saveData(os, myLayoutSeams);
1062  {
1063  int64 length = myLpins.entries();
1064  UTwrite(os, &length);
1065  for (exint i = 0; i < length; i++)
1066  {
1067  saveData(os, myLpins(i).lprimvert);
1068  saveData(os, myLpins(i).lpinuv);
1069  saveData(os, myLpins(i).lpinrefuv);
1070 
1071  }
1072  }
1073  {
1074  int64 length = myLalignments.entries();
1075  UTwrite(os, &length);
1076  for (exint i = 0; i < length; i++)
1077  {
1078  saveData(os, myLalignments(i).lalign_group);
1079  saveData(os, myLalignments(i).lalign_axis);
1080 
1081  }
1082  }
1083  {
1084  int64 length = myLstraightenings.entries();
1085  UTwrite(os, &length);
1086  for (exint i = 0; i < length; i++)
1087  {
1088  saveData(os, myLstraightenings(i).lstraight_group);
1089 
1090  }
1091  }
1092  saveData(os, myUseOutputSeams);
1093  saveData(os, myOutputSeams);
1094  saveData(os, myUseOutputConstrIslands);
1095  saveData(os, myOutputConstrIslands);
1096  saveData(os, myBboxCenter);
1097  saveData(os, myBboxSize);
1098 
1099  }
1100 
1101  bool load(UT_IStream &is)
1102  {
1103  int32 v;
1104  is.bread(&v, 1);
1105  if (version() != v)
1106  {
1107  // Fail incompatible versions
1108  return false;
1109  }
1110  loadData(is, myGroup);
1111  loadData(is, myUVAttrib);
1112  loadData(is, myMethod);
1113  loadData(is, myKeepExistingSeams);
1114  loadData(is, myKeepExistingLayout);
1115  loadData(is, myPinBoundaries);
1116  loadData(is, mySeams);
1117  loadData(is, myUsePins);
1118  {
1119  int64 length;
1120  is.read(&length, 1);
1121  myPins.entries(length);
1122  for (exint i = 0; i < length; i++)
1123  {
1124  loadData(is, myPins(i).usepin);
1125  loadData(is, myPins(i).primvert);
1126  loadData(is, myPins(i).pinuv);
1127  loadData(is, myPins(i).pinrefuv);
1128 
1129  }
1130  }
1131  loadData(is, myUseAlignments);
1132  {
1133  int64 length;
1134  is.read(&length, 1);
1135  myAlignments.entries(length);
1136  for (exint i = 0; i < length; i++)
1137  {
1138  loadData(is, myAlignments(i).align_enabled);
1139  loadData(is, myAlignments(i).align_group);
1140  loadData(is, myAlignments(i).align_axis);
1141 
1142  }
1143  }
1144  loadData(is, myUseStraightenings);
1145  {
1146  int64 length;
1147  is.read(&length, 1);
1148  myStraightenings.entries(length);
1149  for (exint i = 0; i < length; i++)
1150  {
1151  loadData(is, myStraightenings(i).straight_enabled);
1152  loadData(is, myStraightenings(i).straight_group);
1153 
1154  }
1155  }
1156  loadData(is, myManualLayout);
1157  loadData(is, myLayoutSeams);
1158  {
1159  int64 length;
1160  is.read(&length, 1);
1161  myLpins.entries(length);
1162  for (exint i = 0; i < length; i++)
1163  {
1164  loadData(is, myLpins(i).lprimvert);
1165  loadData(is, myLpins(i).lpinuv);
1166  loadData(is, myLpins(i).lpinrefuv);
1167 
1168  }
1169  }
1170  {
1171  int64 length;
1172  is.read(&length, 1);
1173  myLalignments.entries(length);
1174  for (exint i = 0; i < length; i++)
1175  {
1176  loadData(is, myLalignments(i).lalign_group);
1177  loadData(is, myLalignments(i).lalign_axis);
1178 
1179  }
1180  }
1181  {
1182  int64 length;
1183  is.read(&length, 1);
1184  myLstraightenings.entries(length);
1185  for (exint i = 0; i < length; i++)
1186  {
1187  loadData(is, myLstraightenings(i).lstraight_group);
1188 
1189  }
1190  }
1191  loadData(is, myUseOutputSeams);
1192  loadData(is, myOutputSeams);
1193  loadData(is, myUseOutputConstrIslands);
1194  loadData(is, myOutputConstrIslands);
1195  loadData(is, myBboxCenter);
1196  loadData(is, myBboxSize);
1197 
1198  return true;
1199  }
1200 
1201  const UT_StringHolder & getGroup() const { return myGroup; }
1202  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1204  {
1205  SOP_Node *thissop = cookparms.getNode();
1206  if (!thissop) return getGroup();
1207  UT_StringHolder result;
1208  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1209  return result;
1210  }
1211  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
1212  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
1214  {
1215  SOP_Node *thissop = cookparms.getNode();
1216  if (!thissop) return getUVAttrib();
1217  UT_StringHolder result;
1218  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
1219  return result;
1220  }
1221  Method getMethod() const { return Method(myMethod); }
1222  void setMethod(Method val) { myMethod = int64(val); }
1223  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1224  {
1225  SOP_Node *thissop = cookparms.getNode();
1226  if (!thissop) return getMethod();
1227  int64 result;
1228  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1229  return Method(result);
1230  }
1231  bool getKeepExistingSeams() const { return myKeepExistingSeams; }
1232  void setKeepExistingSeams(bool val) { myKeepExistingSeams = val; }
1233  bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
1234  {
1235  SOP_Node *thissop = cookparms.getNode();
1236  if (!thissop) return getKeepExistingSeams();
1237  bool result;
1238  OP_Utils::evalOpParm(result, thissop, "keepexistingseams", cookparms.getCookTime(), 0);
1239  return result;
1240  }
1241  bool getKeepExistingLayout() const { return myKeepExistingLayout; }
1242  void setKeepExistingLayout(bool val) { myKeepExistingLayout = val; }
1243  bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
1244  {
1245  SOP_Node *thissop = cookparms.getNode();
1246  if (!thissop) return getKeepExistingLayout();
1247  bool result;
1248  OP_Utils::evalOpParm(result, thissop, "keepexistinglayout", cookparms.getCookTime(), 0);
1249  return result;
1250  }
1251  bool getPinBoundaries() const { return myPinBoundaries; }
1252  void setPinBoundaries(bool val) { myPinBoundaries = val; }
1253  bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
1254  {
1255  SOP_Node *thissop = cookparms.getNode();
1256  if (!thissop) return getPinBoundaries();
1257  bool result;
1258  OP_Utils::evalOpParm(result, thissop, "pinboundaries", cookparms.getCookTime(), 0);
1259  return result;
1260  }
1261  const UT_StringHolder & getSeams() const { return mySeams; }
1262  void setSeams(const UT_StringHolder & val) { mySeams = val; }
1264  {
1265  SOP_Node *thissop = cookparms.getNode();
1266  if (!thissop) return getSeams();
1267  UT_StringHolder result;
1268  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
1269  return result;
1270  }
1271  bool getUsePins() const { return myUsePins; }
1272  void setUsePins(bool val) { myUsePins = val; }
1273  bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
1274  {
1275  SOP_Node *thissop = cookparms.getNode();
1276  if (!thissop) return getUsePins();
1277  bool result;
1278  OP_Utils::evalOpParm(result, thissop, "usepins", cookparms.getCookTime(), 0);
1279  return result;
1280  }
1281  const UT_Array<Pins> &getPins() const { return myPins; }
1282  void setPins(const UT_Array<Pins> &val) { myPins = val; }
1283  exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
1284  {
1285  SOP_Node *thissop = cookparms.getNode();
1286  if (!thissop) return getPins().entries();
1287  exint result;
1288  OP_Utils::evalOpParm(result, thissop, "pins", cookparms.getCookTime(), 0);
1289  return result;
1290  }
1291  bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1292  {
1293  SOP_Node *thissop = cookparms.getNode();
1294  if (!thissop) return (myPins(_idx).usepin);
1295  int _parmidx = _idx + 0;
1296  bool result;
1297  OP_Utils::evalOpParmInst(result, thissop, "usepin#", &_parmidx, cookparms.getCookTime(), 0);
1298  return (result);
1299  }
1301  {
1302  SOP_Node *thissop = cookparms.getNode();
1303  if (!thissop) return (myPins(_idx).primvert);
1304  int _parmidx = _idx + 0;
1305  UT_Vector2D result;
1306  OP_Utils::evalOpParmInst(result, thissop, "primvert#", &_parmidx, cookparms.getCookTime(), 0);
1307  return (result);
1308  }
1310  {
1311  SOP_Node *thissop = cookparms.getNode();
1312  if (!thissop) return (myPins(_idx).pinuv);
1313  int _parmidx = _idx + 0;
1314  UT_Vector2D result;
1315  OP_Utils::evalOpParmInst(result, thissop, "pinuv#", &_parmidx, cookparms.getCookTime(), 0);
1316  return (result);
1317  }
1319  {
1320  SOP_Node *thissop = cookparms.getNode();
1321  if (!thissop) return (myPins(_idx).pinrefuv);
1322  int _parmidx = _idx + 0;
1323  UT_Vector2D result;
1324  OP_Utils::evalOpParmInst(result, thissop, "pinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1325  return (result);
1326  }
1327 
1328  bool getUseAlignments() const { return myUseAlignments; }
1329  void setUseAlignments(bool val) { myUseAlignments = val; }
1330  bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
1331  {
1332  SOP_Node *thissop = cookparms.getNode();
1333  if (!thissop) return getUseAlignments();
1334  bool result;
1335  OP_Utils::evalOpParm(result, thissop, "usealignments", cookparms.getCookTime(), 0);
1336  return result;
1337  }
1338  const UT_Array<Alignments> &getAlignments() const { return myAlignments; }
1339  void setAlignments(const UT_Array<Alignments> &val) { myAlignments = val; }
1341  {
1342  SOP_Node *thissop = cookparms.getNode();
1343  if (!thissop) return getAlignments().entries();
1344  exint result;
1345  OP_Utils::evalOpParm(result, thissop, "alignments", cookparms.getCookTime(), 0);
1346  return result;
1347  }
1348  bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1349  {
1350  SOP_Node *thissop = cookparms.getNode();
1351  if (!thissop) return (myAlignments(_idx).align_enabled);
1352  int _parmidx = _idx + 0;
1353  bool result;
1354  OP_Utils::evalOpParmInst(result, thissop, "align_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1355  return (result);
1356  }
1358  {
1359  SOP_Node *thissop = cookparms.getNode();
1360  if (!thissop) return (myAlignments(_idx).align_group);
1361  int _parmidx = _idx + 0;
1362  UT_StringHolder result;
1363  OP_Utils::evalOpParmInst(result, thissop, "align_group#", &_parmidx, cookparms.getCookTime(), 0);
1364  return (result);
1365  }
1367  {
1368  SOP_Node *thissop = cookparms.getNode();
1369  if (!thissop) return (myAlignments(_idx).align_axis);
1370  int _parmidx = _idx + 0;
1371  int64 result;
1372  OP_Utils::evalOpParmInst(result, thissop, "align_axis#", &_parmidx, cookparms.getCookTime(), 0);
1373  return (result);
1374  }
1375 
1376  bool getUseStraightenings() const { return myUseStraightenings; }
1377  void setUseStraightenings(bool val) { myUseStraightenings = val; }
1378  bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
1379  {
1380  SOP_Node *thissop = cookparms.getNode();
1381  if (!thissop) return getUseStraightenings();
1382  bool result;
1383  OP_Utils::evalOpParm(result, thissop, "usestraightenings", cookparms.getCookTime(), 0);
1384  return result;
1385  }
1386  const UT_Array<Straightenings> &getStraightenings() const { return myStraightenings; }
1387  void setStraightenings(const UT_Array<Straightenings> &val) { myStraightenings = val; }
1389  {
1390  SOP_Node *thissop = cookparms.getNode();
1391  if (!thissop) return getStraightenings().entries();
1392  exint result;
1393  OP_Utils::evalOpParm(result, thissop, "straightenings", cookparms.getCookTime(), 0);
1394  return result;
1395  }
1397  {
1398  SOP_Node *thissop = cookparms.getNode();
1399  if (!thissop) return (myStraightenings(_idx).straight_enabled);
1400  int _parmidx = _idx + 0;
1401  bool result;
1402  OP_Utils::evalOpParmInst(result, thissop, "straight_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1403  return (result);
1404  }
1406  {
1407  SOP_Node *thissop = cookparms.getNode();
1408  if (!thissop) return (myStraightenings(_idx).straight_group);
1409  int _parmidx = _idx + 0;
1410  UT_StringHolder result;
1411  OP_Utils::evalOpParmInst(result, thissop, "straight_group#", &_parmidx, cookparms.getCookTime(), 0);
1412  return (result);
1413  }
1414 
1415  bool getManualLayout() const { return myManualLayout; }
1416  void setManualLayout(bool val) { myManualLayout = val; }
1417  bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
1418  {
1419  SOP_Node *thissop = cookparms.getNode();
1420  if (!thissop) return getManualLayout();
1421  bool result;
1422  OP_Utils::evalOpParm(result, thissop, "manuallayout", cookparms.getCookTime(), 0);
1423  return result;
1424  }
1425  const UT_StringHolder & getLayoutSeams() const { return myLayoutSeams; }
1426  void setLayoutSeams(const UT_StringHolder & val) { myLayoutSeams = val; }
1428  {
1429  SOP_Node *thissop = cookparms.getNode();
1430  if (!thissop) return getLayoutSeams();
1431  UT_StringHolder result;
1432  OP_Utils::evalOpParm(result, thissop, "layoutseamgroup", cookparms.getCookTime(), 0);
1433  return result;
1434  }
1435  const UT_Array<Lpins> &getLpins() const { return myLpins; }
1436  void setLpins(const UT_Array<Lpins> &val) { myLpins = val; }
1437  exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
1438  {
1439  SOP_Node *thissop = cookparms.getNode();
1440  if (!thissop) return getLpins().entries();
1441  exint result;
1442  OP_Utils::evalOpParm(result, thissop, "lpins", cookparms.getCookTime(), 0);
1443  return result;
1444  }
1446  {
1447  SOP_Node *thissop = cookparms.getNode();
1448  if (!thissop) return (myLpins(_idx).lprimvert);
1449  int _parmidx = _idx + 0;
1450  UT_Vector2D result;
1451  OP_Utils::evalOpParmInst(result, thissop, "lprimvert#", &_parmidx, cookparms.getCookTime(), 0);
1452  return (result);
1453  }
1455  {
1456  SOP_Node *thissop = cookparms.getNode();
1457  if (!thissop) return (myLpins(_idx).lpinuv);
1458  int _parmidx = _idx + 0;
1459  UT_Vector2D result;
1460  OP_Utils::evalOpParmInst(result, thissop, "lpinuv#", &_parmidx, cookparms.getCookTime(), 0);
1461  return (result);
1462  }
1464  {
1465  SOP_Node *thissop = cookparms.getNode();
1466  if (!thissop) return (myLpins(_idx).lpinrefuv);
1467  int _parmidx = _idx + 0;
1468  UT_Vector2D result;
1469  OP_Utils::evalOpParmInst(result, thissop, "lpinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1470  return (result);
1471  }
1472 
1473  const UT_Array<Lalignments> &getLalignments() const { return myLalignments; }
1474  void setLalignments(const UT_Array<Lalignments> &val) { myLalignments = val; }
1476  {
1477  SOP_Node *thissop = cookparms.getNode();
1478  if (!thissop) return getLalignments().entries();
1479  exint result;
1480  OP_Utils::evalOpParm(result, thissop, "lalignments", cookparms.getCookTime(), 0);
1481  return result;
1482  }
1484  {
1485  SOP_Node *thissop = cookparms.getNode();
1486  if (!thissop) return (myLalignments(_idx).lalign_group);
1487  int _parmidx = _idx + 0;
1488  UT_StringHolder result;
1489  OP_Utils::evalOpParmInst(result, thissop, "lalign_group#", &_parmidx, cookparms.getCookTime(), 0);
1490  return (result);
1491  }
1493  {
1494  SOP_Node *thissop = cookparms.getNode();
1495  if (!thissop) return (myLalignments(_idx).lalign_axis);
1496  int _parmidx = _idx + 0;
1497  int64 result;
1498  OP_Utils::evalOpParmInst(result, thissop, "lalign_axis#", &_parmidx, cookparms.getCookTime(), 0);
1499  return (result);
1500  }
1501 
1502  const UT_Array<Lstraightenings> &getLstraightenings() const { return myLstraightenings; }
1503  void setLstraightenings(const UT_Array<Lstraightenings> &val) { myLstraightenings = val; }
1505  {
1506  SOP_Node *thissop = cookparms.getNode();
1507  if (!thissop) return getLstraightenings().entries();
1508  exint result;
1509  OP_Utils::evalOpParm(result, thissop, "lstraightenings", cookparms.getCookTime(), 0);
1510  return result;
1511  }
1513  {
1514  SOP_Node *thissop = cookparms.getNode();
1515  if (!thissop) return (myLstraightenings(_idx).lstraight_group);
1516  int _parmidx = _idx + 0;
1517  UT_StringHolder result;
1518  OP_Utils::evalOpParmInst(result, thissop, "lstraight_group#", &_parmidx, cookparms.getCookTime(), 0);
1519  return (result);
1520  }
1521 
1522  bool getUseOutputSeams() const { return myUseOutputSeams; }
1523  void setUseOutputSeams(bool val) { myUseOutputSeams = val; }
1524  bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
1525  {
1526  SOP_Node *thissop = cookparms.getNode();
1527  if (!thissop) return getUseOutputSeams();
1528  bool result;
1529  OP_Utils::evalOpParm(result, thissop, "useoutputseams", cookparms.getCookTime(), 0);
1530  return result;
1531  }
1532  const UT_StringHolder & getOutputSeams() const { return myOutputSeams; }
1533  void setOutputSeams(const UT_StringHolder & val) { myOutputSeams = val; }
1535  {
1536  SOP_Node *thissop = cookparms.getNode();
1537  if (!thissop) return getOutputSeams();
1538  UT_StringHolder result;
1539  OP_Utils::evalOpParm(result, thissop, "outputseams", cookparms.getCookTime(), 0);
1540  return result;
1541  }
1542  bool getUseOutputConstrIslands() const { return myUseOutputConstrIslands; }
1543  void setUseOutputConstrIslands(bool val) { myUseOutputConstrIslands = val; }
1545  {
1546  SOP_Node *thissop = cookparms.getNode();
1547  if (!thissop) return getUseOutputConstrIslands();
1548  bool result;
1549  OP_Utils::evalOpParm(result, thissop, "useoutputconstrislands", cookparms.getCookTime(), 0);
1550  return result;
1551  }
1552  const UT_StringHolder & getOutputConstrIslands() const { return myOutputConstrIslands; }
1553  void setOutputConstrIslands(const UT_StringHolder & val) { myOutputConstrIslands = val; }
1555  {
1556  SOP_Node *thissop = cookparms.getNode();
1557  if (!thissop) return getOutputConstrIslands();
1558  UT_StringHolder result;
1559  OP_Utils::evalOpParm(result, thissop, "outputconstrislands", cookparms.getCookTime(), 0);
1560  return result;
1561  }
1562  UT_Vector2D getBboxCenter() const { return myBboxCenter; }
1563  void setBboxCenter(UT_Vector2D val) { myBboxCenter = val; }
1565  {
1566  SOP_Node *thissop = cookparms.getNode();
1567  if (!thissop) return getBboxCenter();
1568  UT_Vector2D result;
1569  OP_Utils::evalOpParm(result, thissop, "bboxcenter", cookparms.getCookTime(), 0);
1570  return result;
1571  }
1572  UT_Vector2D getBboxSize() const { return myBboxSize; }
1573  void setBboxSize(UT_Vector2D val) { myBboxSize = val; }
1575  {
1576  SOP_Node *thissop = cookparms.getNode();
1577  if (!thissop) return getBboxSize();
1578  UT_Vector2D result;
1579  OP_Utils::evalOpParm(result, thissop, "bboxsize", cookparms.getCookTime(), 0);
1580  return result;
1581  }
1582 
1583 private:
1584  UT_StringHolder myGroup;
1585  UT_StringHolder myUVAttrib;
1586  int64 myMethod;
1587  bool myKeepExistingSeams;
1588  bool myKeepExistingLayout;
1589  bool myPinBoundaries;
1590  UT_StringHolder mySeams;
1591  bool myUsePins;
1592  UT_Array<Pins> myPins;
1593  bool myUseAlignments;
1594  UT_Array<Alignments> myAlignments;
1595  bool myUseStraightenings;
1596  UT_Array<Straightenings> myStraightenings;
1597  bool myManualLayout;
1598  UT_StringHolder myLayoutSeams;
1599  UT_Array<Lpins> myLpins;
1600  UT_Array<Lalignments> myLalignments;
1601  UT_Array<Lstraightenings> myLstraightenings;
1602  bool myUseOutputSeams;
1603  UT_StringHolder myOutputSeams;
1604  bool myUseOutputConstrIslands;
1605  UT_StringHolder myOutputConstrIslands;
1606  UT_Vector2D myBboxCenter;
1607  UT_Vector2D myBboxSize;
1608 
1609 };
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, int64 v)
UT_Vector2D opLpins_lpinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const SOP_UVFlatten_2_0Parms &src) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_StringHolder &value) const
const UT_Array< Lstraightenings > & getLstraightenings() const
T & z(void)
Definition: UT_Vector4.h:379
static void saveData(std::ostream &os, bool v)
UT_Vector2D opBboxSize(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Pins > &list) const
void setLstraightenings(const UT_Array< Lstraightenings > &val)
void getParmValue(exint idx, UT_Vector2D &value) const
bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
fpreal getTime() const
Definition: OP_Context.h:60
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 opAlignments_align_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const Lpins &src) 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
UT_StringHolder opStraightenings_straight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opAlignments_align_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder createString(const UT_Array< Alignments > &list) const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE const char * buffer() const
void setBboxSize(UT_Vector2D val)
T & x(void)
Definition: UT_Vector2.h:285
bool operator==(const Pins &src) const
UT_Vector2D opPins_pinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
bool operator==(const Alignments &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_Array< Lpins > & getLpins() const
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
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)
UT_Vector2D opBboxCenter(const SOP_NodeVerb::CookParms &cookparms) const
png_uint_32 i
Definition: png.h:2877
const UT_Array< Lalignments > & getLalignments() const
void setParmValue(exint idx, const UT_Vector3D &value)
UT_StringHolder opLayoutSeams(const SOP_NodeVerb::CookParms &cookparms) const
void setOutputConstrIslands(const UT_StringHolder &val)
UT_StringHolder createString(const UT_Array< Lstraightenings > &list) const
bool operator!=(const Lstraightenings &src) const
void setLpins(const UT_Array< Lpins > &val)
exint opLstraightenings(const SOP_NodeVerb::CookParms &cookparms) const
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)
bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint opAlignments(const SOP_NodeVerb::CookParms &cookparms) const
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:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
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
exint opLalignments(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setBboxCenter(UT_Vector2D val)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
bool operator!=(const Pins &src) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
const UT_Array< Alignments > & getAlignments() const
double fpreal64
Definition: SYS_Types.h:192
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
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)
bool operator!=(const Lpins &src) const
UT_StringHolder createString(const UT_Array< Lalignments > &list) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_Array< Pins > & getPins() const
void setAlignments(const UT_Array< Alignments > &val)
bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const fpreal &value)
bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputConstrIslands() const
bool operator!=(const Alignments &src) const
GLboolean * data
Definition: glcorearb.h:130
virtual ParmType getParmType(exint fieldnum) const
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
UT_Vector2D opLpins_lprimvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder createString(const UT_Array< Straightenings > &list) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator!=(const Lalignments &src) const
SYS_FORCE_INLINE void strcat(const char *src)
bool opUseOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
bool operator!=(const Straightenings &src) const
GT_API const UT_StringHolder version
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:453
exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix3D &value)
virtual const char * getParmName(exint fieldnum) const
const UT_StringHolder & getSeams() const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
const UT_StringHolder & getLayoutSeams() const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setStraightenings(const UT_Array< Straightenings > &val)
UT_Vector2D opLpins_lpinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder createString(const UT_Array< Lpins > &list) const
void setGroup(const UT_StringHolder &val)
bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void setOutputSeams(const UT_StringHolder &val)
UT_StringHolder opLalignments_lalign_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
const UT_Array< Straightenings > & getStraightenings() const
void setUVAttrib(const UT_StringHolder &val)
SYS_FORCE_INLINE void append(char character)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setLayoutSeams(const UT_StringHolder &val)
UT_Vector2D getBboxSize() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputSeams() const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
exint opStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
UT_Vector2D opPins_primvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const Lalignments &src) const
UT_StringHolder opSeams(const SOP_NodeVerb::CookParms &cookparms) 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:501
void setParmValue(exint idx, const UT_Matrix4D &value)
T & x(void)
Definition: UT_Vector4.h:375
bool operator!=(const SOP_UVFlatten_2_0Parms &src) const
virtual void copyFrom(const SOP_NodeParms *src)
bool opStraightenings_straight_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
T & y(void)
Definition: UT_Vector2.h:287
static void saveData(std::ostream &os, UT_Vector4D v)
void setLalignments(const UT_Array< Lalignments > &val)
GLboolean r
Definition: glcorearb.h:1221
void doGetParmValue(exint idx, T &value) const
static void saveData(std::ostream &os, UT_Vector3D v)
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
bool operator==(const Lstraightenings &src) const
T & w(void)
Definition: UT_Vector4.h:381
void setSeams(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Matrix4D &value) const
UT_StringHolder opLstraightenings_lstraight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opLalignments_lalign_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
bool operator==(const Straightenings &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getParmValue(exint idx, UT_Matrix3D &value) const
void save(std::ostream &os) const
SYS_FORCE_INLINE bool isstring() const
UT_Vector2D getBboxCenter() const
void getParmValue(exint idx, UT_Vector3D &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
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