HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVFlatten-3.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 <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_UVFlatten_3_0Enums
24 {
25  enum class Method
26  {
27  SCP = 0,
28  ABF
29  };
30  enum class Align_axis
31  {
32  UAXIS = 0,
33  VAXIS
34  };
35  enum class Lalign_axis
36  {
37  UAXIS = 0,
38  VAXIS
39  };
40 }
41 
42 
44 {
45 public:
46  static int version() { return 1; }
47  struct Pins
48  {
49  bool usepin;
53 
54 
55  Pins()
56  {
57  usepin = true;
58  primvert = UT_Vector2D(0,0);
59  pinuv = UT_Vector2D(0,0);
60  pinrefuv = UT_Vector2D(0,0);
61 
62  }
63 
64  bool operator==(const Pins &src) const
65  {
66  if (usepin != src.usepin) return false;
67  if (primvert != src.primvert) return false;
68  if (pinuv != src.pinuv) return false;
69  if (pinrefuv != src.pinrefuv) return false;
70 
71  return true;
72  }
73  bool operator!=(const Pins &src) const
74  {
75  return !operator==(src);
76  }
77 
78  };
79 
81  {
83 
84  buf.strcat("[ ");
85  for (int i = 0; i < list.entries(); i++)
86  {
87  if (i)
88  buf.strcat(", ");
89  buf.strcat("( ");
90  buf.append("");
91  buf.appendSprintf("%s", (list(i).usepin) ? "true" : "false");
92  buf.append(", ");
93  buf.appendSprintf("(%f, %f)", list(i).primvert.x(), list(i).primvert.y());
94  buf.append(", ");
95  buf.appendSprintf("(%f, %f)", list(i).pinuv.x(), list(i).pinuv.y());
96  buf.append(", ");
97  buf.appendSprintf("(%f, %f)", list(i).pinrefuv.x(), list(i).pinrefuv.y());
98 
99  buf.strcat(" )");
100  }
101  buf.strcat(" ]");
102 
104  return result;
105  }
106  struct Alignments
107  {
111 
112 
114  {
115  align_enabled = true;
116  align_group = ""_sh;
117  align_axis = 0;
118 
119  }
120 
121  bool operator==(const Alignments &src) const
122  {
123  if (align_enabled != src.align_enabled) return false;
124  if (align_group != src.align_group) return false;
125  if (align_axis != src.align_axis) return false;
126 
127  return true;
128  }
129  bool operator!=(const Alignments &src) const
130  {
131  return !operator==(src);
132  }
133 
134  };
135 
137  {
139 
140  buf.strcat("[ ");
141  for (int i = 0; i < list.entries(); i++)
142  {
143  if (i)
144  buf.strcat(", ");
145  buf.strcat("( ");
146  buf.append("");
147  buf.appendSprintf("%s", (list(i).align_enabled) ? "true" : "false");
148  buf.append(", ");
149  { UT_String tmp; tmp = UT_StringWrap(list(i).align_group).makeQuotedString('"'); buf.strcat(tmp); }
150  buf.append(", ");
151  buf.appendSprintf("%d", (int) list(i).align_axis);
152 
153  buf.strcat(" )");
154  }
155  buf.strcat(" ]");
156 
158  return result;
159  }
161  {
164 
165 
167  {
168  straight_enabled = true;
169  straight_group = ""_sh;
170 
171  }
172 
173  bool operator==(const Straightenings &src) const
174  {
175  if (straight_enabled != src.straight_enabled) return false;
176  if (straight_group != src.straight_group) return false;
177 
178  return true;
179  }
180  bool operator!=(const Straightenings &src) const
181  {
182  return !operator==(src);
183  }
184 
185  };
186 
188  {
190 
191  buf.strcat("[ ");
192  for (int i = 0; i < list.entries(); i++)
193  {
194  if (i)
195  buf.strcat(", ");
196  buf.strcat("( ");
197  buf.append("");
198  buf.appendSprintf("%s", (list(i).straight_enabled) ? "true" : "false");
199  buf.append(", ");
200  { UT_String tmp; tmp = UT_StringWrap(list(i).straight_group).makeQuotedString('"'); buf.strcat(tmp); }
201 
202  buf.strcat(" )");
203  }
204  buf.strcat(" ]");
205 
207  return result;
208  }
209  struct Lpins
210  {
214 
215 
217  {
218  lprimvert = UT_Vector2D(0,0);
219  lpinuv = UT_Vector2D(0,0);
220  lpinrefuv = UT_Vector2D(0,0);
221 
222  }
223 
224  bool operator==(const Lpins &src) const
225  {
226  if (lprimvert != src.lprimvert) return false;
227  if (lpinuv != src.lpinuv) return false;
228  if (lpinrefuv != src.lpinrefuv) return false;
229 
230  return true;
231  }
232  bool operator!=(const Lpins &src) const
233  {
234  return !operator==(src);
235  }
236 
237  };
238 
240  {
242 
243  buf.strcat("[ ");
244  for (int i = 0; i < list.entries(); i++)
245  {
246  if (i)
247  buf.strcat(", ");
248  buf.strcat("( ");
249  buf.append("");
250  buf.appendSprintf("(%f, %f)", list(i).lprimvert.x(), list(i).lprimvert.y());
251  buf.append(", ");
252  buf.appendSprintf("(%f, %f)", list(i).lpinuv.x(), list(i).lpinuv.y());
253  buf.append(", ");
254  buf.appendSprintf("(%f, %f)", list(i).lpinrefuv.x(), list(i).lpinrefuv.y());
255 
256  buf.strcat(" )");
257  }
258  buf.strcat(" ]");
259 
261  return result;
262  }
263  struct Lalignments
264  {
267 
268 
270  {
271  lalign_group = ""_sh;
272  lalign_axis = 0;
273 
274  }
275 
276  bool operator==(const Lalignments &src) const
277  {
278  if (lalign_group != src.lalign_group) return false;
279  if (lalign_axis != src.lalign_axis) return false;
280 
281  return true;
282  }
283  bool operator!=(const Lalignments &src) const
284  {
285  return !operator==(src);
286  }
287 
288  };
289 
291  {
293 
294  buf.strcat("[ ");
295  for (int i = 0; i < list.entries(); i++)
296  {
297  if (i)
298  buf.strcat(", ");
299  buf.strcat("( ");
300  buf.append("");
301  { UT_String tmp; tmp = UT_StringWrap(list(i).lalign_group).makeQuotedString('"'); buf.strcat(tmp); }
302  buf.append(", ");
303  buf.appendSprintf("%d", (int) list(i).lalign_axis);
304 
305  buf.strcat(" )");
306  }
307  buf.strcat(" ]");
308 
310  return result;
311  }
313  {
315 
316 
318  {
319  lstraight_group = ""_sh;
320 
321  }
322 
323  bool operator==(const Lstraightenings &src) const
324  {
325  if (lstraight_group != src.lstraight_group) return false;
326 
327  return true;
328  }
329  bool operator!=(const Lstraightenings &src) const
330  {
331  return !operator==(src);
332  }
333 
334  };
335 
337  {
339 
340  buf.strcat("[ ");
341  for (int i = 0; i < list.entries(); i++)
342  {
343  if (i)
344  buf.strcat(", ");
345  buf.strcat("( ");
346  buf.append("");
347  { UT_String tmp; tmp = UT_StringWrap(list(i).lstraight_group).makeQuotedString('"'); buf.strcat(tmp); }
348 
349  buf.strcat(" )");
350  }
351  buf.strcat(" ]");
352 
354  return result;
355  }
356 
358  {
359  myGroup = ""_sh;
360  myUVAttrib = "uv"_sh;
361  myMethod = 0;
362  myKeepExistingSeams = false;
363  myKeepExistingLayout = false;
364  myPinBoundaries = false;
365  mySeams = ""_sh;
366  myRectifyGroup = ""_sh;
367  myUsePins = true;
368  myUseAlignments = true;
369  myUseStraightenings = true;
370  myManualLayout = true;
371  myLayoutSeams = ""_sh;
372  myLayoutRectifyGroup = ""_sh;
373  myUseOutputSeams = false;
374  myOutputSeams = "outputseams"_sh;
375  myUseOutputConstrIslands = false;
376  myOutputConstrIslands = "constrainedprims"_sh;
377  myBboxCenter = UT_Vector2D(0.5,0.5);
378  myBboxSize = UT_Vector2D(1,1);
379 
380  }
381 
382  explicit SOP_UVFlatten_3_0Parms(const SOP_UVFlatten_3_0Parms &) = default;
383 
385 
387  {
388  if (myGroup != src.myGroup) return false;
389  if (myUVAttrib != src.myUVAttrib) return false;
390  if (myMethod != src.myMethod) return false;
391  if (myKeepExistingSeams != src.myKeepExistingSeams) return false;
392  if (myKeepExistingLayout != src.myKeepExistingLayout) return false;
393  if (myPinBoundaries != src.myPinBoundaries) return false;
394  if (mySeams != src.mySeams) return false;
395  if (myRectifyGroup != src.myRectifyGroup) return false;
396  if (myUsePins != src.myUsePins) return false;
397  if (myPins != src.myPins) return false;
398  if (myUseAlignments != src.myUseAlignments) return false;
399  if (myAlignments != src.myAlignments) return false;
400  if (myUseStraightenings != src.myUseStraightenings) return false;
401  if (myStraightenings != src.myStraightenings) return false;
402  if (myManualLayout != src.myManualLayout) return false;
403  if (myLayoutSeams != src.myLayoutSeams) return false;
404  if (myLayoutRectifyGroup != src.myLayoutRectifyGroup) return false;
405  if (myLpins != src.myLpins) return false;
406  if (myLalignments != src.myLalignments) return false;
407  if (myLstraightenings != src.myLstraightenings) return false;
408  if (myUseOutputSeams != src.myUseOutputSeams) return false;
409  if (myOutputSeams != src.myOutputSeams) return false;
410  if (myUseOutputConstrIslands != src.myUseOutputConstrIslands) return false;
411  if (myOutputConstrIslands != src.myOutputConstrIslands) return false;
412  if (myBboxCenter != src.myBboxCenter) return false;
413  if (myBboxSize != src.myBboxSize) return false;
414 
415  return true;
416  }
418  {
419  return !operator==(src);
420  }
424 
425 
426 
427  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
428  {
429  myGroup = ""_sh;
430  if (true)
431  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
432  myUVAttrib = "uv"_sh;
433  if (true)
434  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
435  myMethod = 0;
436  if (true)
437  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
438  myKeepExistingSeams = false;
439  if (true)
440  graph->evalOpParm(myKeepExistingSeams, nodeidx, "keepexistingseams", time, 0);
441  myKeepExistingLayout = false;
442  if (true && ( (!(((getKeepExistingSeams()==0)))) ) )
443  graph->evalOpParm(myKeepExistingLayout, nodeidx, "keepexistinglayout", time, 0);
444  myPinBoundaries = false;
445  if (true && ( (!(((getKeepExistingSeams()==0))||((int64(getMethod())!=0)))) ) )
446  graph->evalOpParm(myPinBoundaries, nodeidx, "pinboundaries", time, 0);
447  mySeams = ""_sh;
448  if (true)
449  graph->evalOpParm(mySeams, nodeidx, "seamgroup", time, 0);
450  myRectifyGroup = ""_sh;
451  if (true)
452  graph->evalOpParm(myRectifyGroup, nodeidx, "rectifygroup", time, 0);
453  myUsePins = true;
454  if (true)
455  graph->evalOpParm(myUsePins, nodeidx, "usepins", time, 0);
456  if (true && ( (!(((getUsePins()==0)))) ) )
457  {
458  int64 length = 0;
459  graph->evalOpParm(length, nodeidx, "pins", time, 0);
460  myPins.entries(length);
461  for (exint i = 0; i < length; i++)
462  {
463  int parmidx = i+0;
464  auto && _curentry = myPins(i);
465  (void) _curentry;
466  myPins(i).usepin = true;
467  if (true && ( (!(((getUsePins()==0)))) ) )
468  graph->evalOpParmInst(myPins(i).usepin, nodeidx, "usepin#", &parmidx, time, 0);
469  myPins(i).primvert = UT_Vector2D(0,0);
470  if (true && ( (!(((getUsePins()==0)))) ) )
471  graph->evalOpParmInst(myPins(i).primvert, nodeidx, "primvert#", &parmidx, time, 0);
472  myPins(i).pinuv = UT_Vector2D(0,0);
473  if (true && ( (!(((getUsePins()==0)))) ) )
474  graph->evalOpParmInst(myPins(i).pinuv, nodeidx, "pinuv#", &parmidx, time, 0);
475  myPins(i).pinrefuv = UT_Vector2D(0,0);
476  if (true && ( (!(((getUsePins()==0)))) ) )
477  graph->evalOpParmInst(myPins(i).pinrefuv, nodeidx, "pinrefuv#", &parmidx, time, 0);
478 
479  }
480  }
481  else
482  myPins.clear();
483  myUseAlignments = true;
484  if (true)
485  graph->evalOpParm(myUseAlignments, nodeidx, "usealignments", time, 0);
486  if (true && ( (!(((getUseAlignments()==0)))) ) )
487  {
488  int64 length = 0;
489  graph->evalOpParm(length, nodeidx, "alignments", time, 0);
490  myAlignments.entries(length);
491  for (exint i = 0; i < length; i++)
492  {
493  int parmidx = i+0;
494  auto && _curentry = myAlignments(i);
495  (void) _curentry;
496  myAlignments(i).align_enabled = true;
497  if (true && ( (!(((getUseAlignments()==0)))) ) )
498  graph->evalOpParmInst(myAlignments(i).align_enabled, nodeidx, "align_enabled#", &parmidx, time, 0);
499  myAlignments(i).align_group = ""_sh;
500  if (true && ( (!(((getUseAlignments()==0)))) ) )
501  graph->evalOpParmInst(myAlignments(i).align_group, nodeidx, "align_group#", &parmidx, time, 0);
502  myAlignments(i).align_axis = 0;
503  if (true && ( (!(((getUseAlignments()==0)))) ) )
504  graph->evalOpParmInst(myAlignments(i).align_axis, nodeidx, "align_axis#", &parmidx, time, 0);
505 
506  }
507  }
508  else
509  myAlignments.clear();
510  myUseStraightenings = true;
511  if (true)
512  graph->evalOpParm(myUseStraightenings, nodeidx, "usestraightenings", time, 0);
513  if (true && ( (!(((getUseStraightenings()==0)))) ) )
514  {
515  int64 length = 0;
516  graph->evalOpParm(length, nodeidx, "straightenings", time, 0);
517  myStraightenings.entries(length);
518  for (exint i = 0; i < length; i++)
519  {
520  int parmidx = i+0;
521  auto && _curentry = myStraightenings(i);
522  (void) _curentry;
523  myStraightenings(i).straight_enabled = true;
524  if (true && ( (!(((getUseStraightenings()==0)))) ) )
525  graph->evalOpParmInst(myStraightenings(i).straight_enabled, nodeidx, "straight_enabled#", &parmidx, time, 0);
526  myStraightenings(i).straight_group = ""_sh;
527  if (true && ( (!(((getUseStraightenings()==0)))) ) )
528  graph->evalOpParmInst(myStraightenings(i).straight_group, nodeidx, "straight_group#", &parmidx, time, 0);
529 
530  }
531  }
532  else
533  myStraightenings.clear();
534  myManualLayout = true;
535  if (true)
536  graph->evalOpParm(myManualLayout, nodeidx, "manuallayout", time, 0);
537  myLayoutSeams = ""_sh;
538  if (true && ( (!(((getManualLayout()==0)))) ) )
539  graph->evalOpParm(myLayoutSeams, nodeidx, "layoutseamgroup", time, 0);
540  myLayoutRectifyGroup = ""_sh;
541  if (true && ( (!(((getManualLayout()==0)))) ) )
542  graph->evalOpParm(myLayoutRectifyGroup, nodeidx, "layoutrectifygroup", time, 0);
543  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
544  {
545  int64 length = 0;
546  graph->evalOpParm(length, nodeidx, "lpins", time, 0);
547  myLpins.entries(length);
548  for (exint i = 0; i < length; i++)
549  {
550  int parmidx = i+0;
551  auto && _curentry = myLpins(i);
552  (void) _curentry;
553  myLpins(i).lprimvert = UT_Vector2D(0,0);
554  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
555  graph->evalOpParmInst(myLpins(i).lprimvert, nodeidx, "lprimvert#", &parmidx, time, 0);
556  myLpins(i).lpinuv = UT_Vector2D(0,0);
557  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
558  graph->evalOpParmInst(myLpins(i).lpinuv, nodeidx, "lpinuv#", &parmidx, time, 0);
559  myLpins(i).lpinrefuv = UT_Vector2D(0,0);
560  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
561  graph->evalOpParmInst(myLpins(i).lpinrefuv, nodeidx, "lpinrefuv#", &parmidx, time, 0);
562 
563  }
564  }
565  else
566  myLpins.clear();
567  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
568  {
569  int64 length = 0;
570  graph->evalOpParm(length, nodeidx, "lalignments", time, 0);
571  myLalignments.entries(length);
572  for (exint i = 0; i < length; i++)
573  {
574  int parmidx = i+0;
575  auto && _curentry = myLalignments(i);
576  (void) _curentry;
577  myLalignments(i).lalign_group = ""_sh;
578  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
579  graph->evalOpParmInst(myLalignments(i).lalign_group, nodeidx, "lalign_group#", &parmidx, time, 0);
580  myLalignments(i).lalign_axis = 0;
581  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
582  graph->evalOpParmInst(myLalignments(i).lalign_axis, nodeidx, "lalign_axis#", &parmidx, time, 0);
583 
584  }
585  }
586  else
587  myLalignments.clear();
588  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
589  {
590  int64 length = 0;
591  graph->evalOpParm(length, nodeidx, "lstraightenings", time, 0);
592  myLstraightenings.entries(length);
593  for (exint i = 0; i < length; i++)
594  {
595  int parmidx = i+0;
596  auto && _curentry = myLstraightenings(i);
597  (void) _curentry;
598  myLstraightenings(i).lstraight_group = ""_sh;
599  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
600  graph->evalOpParmInst(myLstraightenings(i).lstraight_group, nodeidx, "lstraight_group#", &parmidx, time, 0);
601 
602  }
603  }
604  else
605  myLstraightenings.clear();
606  myUseOutputSeams = false;
607  if (true)
608  graph->evalOpParm(myUseOutputSeams, nodeidx, "useoutputseams", time, 0);
609  myOutputSeams = "outputseams"_sh;
610  if (true && ( (!(((getUseOutputSeams()==0)))) ) )
611  graph->evalOpParm(myOutputSeams, nodeidx, "outputseams", time, 0);
612  myUseOutputConstrIslands = false;
613  if (true)
614  graph->evalOpParm(myUseOutputConstrIslands, nodeidx, "useoutputconstrislands", time, 0);
615  myOutputConstrIslands = "constrainedprims"_sh;
616  if (true && ( (!(((getUseOutputConstrIslands()==0)))) ) )
617  graph->evalOpParm(myOutputConstrIslands, nodeidx, "outputconstrislands", time, 0);
618  myBboxCenter = UT_Vector2D(0.5,0.5);
619  if (true)
620  graph->evalOpParm(myBboxCenter, nodeidx, "bboxcenter", time, 0);
621  myBboxSize = UT_Vector2D(1,1);
622  if (true)
623  graph->evalOpParm(myBboxSize, nodeidx, "bboxsize", time, 0);
624 
625  }
626 
627 
628  void loadFromOpSubclass(const LoadParms &loadparms) override
629  {
630  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
631  }
632 
633 
634  void copyFrom(const SOP_NodeParms *src) override
635  {
636  *this = *((const SOP_UVFlatten_3_0Parms *)src);
637  }
638 
639  template <typename T>
640  void
641  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
642  {
643  if (idx.size() < 1)
644  return;
645  UT_ASSERT(idx.size() == instance.size()+1);
646  if (idx.size() != instance.size()+1)
647  return;
648  switch (idx[0])
649  {
650  case 0:
651  coerceValue(value, myGroup);
652  break;
653  case 1:
654  coerceValue(value, myUVAttrib);
655  break;
656  case 2:
657  coerceValue(value, myMethod);
658  break;
659  case 3:
660  coerceValue(value, myKeepExistingSeams);
661  break;
662  case 4:
663  coerceValue(value, myKeepExistingLayout);
664  break;
665  case 5:
666  coerceValue(value, myPinBoundaries);
667  break;
668  case 6:
669  coerceValue(value, mySeams);
670  break;
671  case 7:
672  coerceValue(value, myRectifyGroup);
673  break;
674  case 8:
675  coerceValue(value, myUsePins);
676  break;
677  case 9:
678  if (idx.size() == 1)
679  coerceValue(value, myPins.entries());
680  else if (instance[0] < myPins.entries())
681  {
682  auto && _data = myPins(instance[0]);
683  switch (idx[1])
684  {
685  case 0:
686  coerceValue(value, _data.usepin);
687  break;
688  case 1:
689  coerceValue(value, _data.primvert);
690  break;
691  case 2:
692  coerceValue(value, _data.pinuv);
693  break;
694  case 3:
695  coerceValue(value, _data.pinrefuv);
696  break;
697 
698  }
699  }
700  break;
701  case 10:
702  coerceValue(value, myUseAlignments);
703  break;
704  case 11:
705  if (idx.size() == 1)
706  coerceValue(value, myAlignments.entries());
707  else if (instance[0] < myAlignments.entries())
708  {
709  auto && _data = myAlignments(instance[0]);
710  switch (idx[1])
711  {
712  case 0:
713  coerceValue(value, _data.align_enabled);
714  break;
715  case 1:
716  coerceValue(value, _data.align_group);
717  break;
718  case 2:
719  coerceValue(value, _data.align_axis);
720  break;
721 
722  }
723  }
724  break;
725  case 12:
726  coerceValue(value, myUseStraightenings);
727  break;
728  case 13:
729  if (idx.size() == 1)
730  coerceValue(value, myStraightenings.entries());
731  else if (instance[0] < myStraightenings.entries())
732  {
733  auto && _data = myStraightenings(instance[0]);
734  switch (idx[1])
735  {
736  case 0:
737  coerceValue(value, _data.straight_enabled);
738  break;
739  case 1:
740  coerceValue(value, _data.straight_group);
741  break;
742 
743  }
744  }
745  break;
746  case 14:
747  coerceValue(value, myManualLayout);
748  break;
749  case 15:
750  coerceValue(value, myLayoutSeams);
751  break;
752  case 16:
753  coerceValue(value, myLayoutRectifyGroup);
754  break;
755  case 17:
756  if (idx.size() == 1)
757  coerceValue(value, myLpins.entries());
758  else if (instance[0] < myLpins.entries())
759  {
760  auto && _data = myLpins(instance[0]);
761  switch (idx[1])
762  {
763  case 0:
764  coerceValue(value, _data.lprimvert);
765  break;
766  case 1:
767  coerceValue(value, _data.lpinuv);
768  break;
769  case 2:
770  coerceValue(value, _data.lpinrefuv);
771  break;
772 
773  }
774  }
775  break;
776  case 18:
777  if (idx.size() == 1)
778  coerceValue(value, myLalignments.entries());
779  else if (instance[0] < myLalignments.entries())
780  {
781  auto && _data = myLalignments(instance[0]);
782  switch (idx[1])
783  {
784  case 0:
785  coerceValue(value, _data.lalign_group);
786  break;
787  case 1:
788  coerceValue(value, _data.lalign_axis);
789  break;
790 
791  }
792  }
793  break;
794  case 19:
795  if (idx.size() == 1)
796  coerceValue(value, myLstraightenings.entries());
797  else if (instance[0] < myLstraightenings.entries())
798  {
799  auto && _data = myLstraightenings(instance[0]);
800  switch (idx[1])
801  {
802  case 0:
803  coerceValue(value, _data.lstraight_group);
804  break;
805 
806  }
807  }
808  break;
809  case 20:
810  coerceValue(value, myUseOutputSeams);
811  break;
812  case 21:
813  coerceValue(value, myOutputSeams);
814  break;
815  case 22:
816  coerceValue(value, myUseOutputConstrIslands);
817  break;
818  case 23:
819  coerceValue(value, myOutputConstrIslands);
820  break;
821  case 24:
822  coerceValue(value, myBboxCenter);
823  break;
824  case 25:
825  coerceValue(value, myBboxSize);
826  break;
827 
828  }
829  }
830 
831  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
832  { doGetParmValue(idx, instance, value); }
833  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
834  { doGetParmValue(idx, instance, value); }
835  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
836  { doGetParmValue(idx, instance, value); }
837  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
838  { doGetParmValue(idx, instance, value); }
839  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
840  { doGetParmValue(idx, instance, value); }
841  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
842  { doGetParmValue(idx, instance, value); }
843  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
844  { doGetParmValue(idx, instance, value); }
845  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
846  { doGetParmValue(idx, instance, value); }
847  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
848  { doGetParmValue(idx, instance, value); }
849  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
850  { doGetParmValue(idx, instance, value); }
851  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
852  { doGetParmValue(idx, instance, value); }
853 
854  template <typename T>
855  void
856  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
857  {
858  if (idx.size() < 1)
859  return;
860  UT_ASSERT(idx.size() == instance.size()+1);
861  if (idx.size() != instance.size()+1)
862  return;
863  switch (idx[0])
864  {
865  case 0:
866  coerceValue(myGroup, value);
867  break;
868  case 1:
869  coerceValue(myUVAttrib, value);
870  break;
871  case 2:
872  coerceValue(myMethod, value);
873  break;
874  case 3:
875  coerceValue(myKeepExistingSeams, value);
876  break;
877  case 4:
878  coerceValue(myKeepExistingLayout, value);
879  break;
880  case 5:
881  coerceValue(myPinBoundaries, value);
882  break;
883  case 6:
884  coerceValue(mySeams, value);
885  break;
886  case 7:
887  coerceValue(myRectifyGroup, value);
888  break;
889  case 8:
890  coerceValue(myUsePins, value);
891  break;
892  case 9:
893  if (idx.size() == 1)
894  {
895  exint newsize;
896  coerceValue(newsize, value);
897  myPins.setSize(newsize);
898  }
899  else
900  {
901  myPins.setSizeIfNeeded(instance[0]+1);
902  auto && _data = myPins(instance[0]);
903  switch (idx[1])
904  {
905  case 0:
906  coerceValue(_data.usepin, value);
907  break;
908  case 1:
909  coerceValue(_data.primvert, value);
910  break;
911  case 2:
912  coerceValue(_data.pinuv, value);
913  break;
914  case 3:
915  coerceValue(_data.pinrefuv, value);
916  break;
917 
918  }
919  }
920  break;
921  case 10:
922  coerceValue(myUseAlignments, value);
923  break;
924  case 11:
925  if (idx.size() == 1)
926  {
927  exint newsize;
928  coerceValue(newsize, value);
929  myAlignments.setSize(newsize);
930  }
931  else
932  {
933  myAlignments.setSizeIfNeeded(instance[0]+1);
934  auto && _data = myAlignments(instance[0]);
935  switch (idx[1])
936  {
937  case 0:
938  coerceValue(_data.align_enabled, value);
939  break;
940  case 1:
941  coerceValue(_data.align_group, value);
942  break;
943  case 2:
944  coerceValue(_data.align_axis, value);
945  break;
946 
947  }
948  }
949  break;
950  case 12:
951  coerceValue(myUseStraightenings, value);
952  break;
953  case 13:
954  if (idx.size() == 1)
955  {
956  exint newsize;
957  coerceValue(newsize, value);
958  myStraightenings.setSize(newsize);
959  }
960  else
961  {
962  myStraightenings.setSizeIfNeeded(instance[0]+1);
963  auto && _data = myStraightenings(instance[0]);
964  switch (idx[1])
965  {
966  case 0:
967  coerceValue(_data.straight_enabled, value);
968  break;
969  case 1:
970  coerceValue(_data.straight_group, value);
971  break;
972 
973  }
974  }
975  break;
976  case 14:
977  coerceValue(myManualLayout, value);
978  break;
979  case 15:
980  coerceValue(myLayoutSeams, value);
981  break;
982  case 16:
983  coerceValue(myLayoutRectifyGroup, value);
984  break;
985  case 17:
986  if (idx.size() == 1)
987  {
988  exint newsize;
989  coerceValue(newsize, value);
990  myLpins.setSize(newsize);
991  }
992  else
993  {
994  myLpins.setSizeIfNeeded(instance[0]+1);
995  auto && _data = myLpins(instance[0]);
996  switch (idx[1])
997  {
998  case 0:
999  coerceValue(_data.lprimvert, value);
1000  break;
1001  case 1:
1002  coerceValue(_data.lpinuv, value);
1003  break;
1004  case 2:
1005  coerceValue(_data.lpinrefuv, value);
1006  break;
1007 
1008  }
1009  }
1010  break;
1011  case 18:
1012  if (idx.size() == 1)
1013  {
1014  exint newsize;
1015  coerceValue(newsize, value);
1016  myLalignments.setSize(newsize);
1017  }
1018  else
1019  {
1020  myLalignments.setSizeIfNeeded(instance[0]+1);
1021  auto && _data = myLalignments(instance[0]);
1022  switch (idx[1])
1023  {
1024  case 0:
1025  coerceValue(_data.lalign_group, value);
1026  break;
1027  case 1:
1028  coerceValue(_data.lalign_axis, value);
1029  break;
1030 
1031  }
1032  }
1033  break;
1034  case 19:
1035  if (idx.size() == 1)
1036  {
1037  exint newsize;
1038  coerceValue(newsize, value);
1039  myLstraightenings.setSize(newsize);
1040  }
1041  else
1042  {
1043  myLstraightenings.setSizeIfNeeded(instance[0]+1);
1044  auto && _data = myLstraightenings(instance[0]);
1045  switch (idx[1])
1046  {
1047  case 0:
1048  coerceValue(_data.lstraight_group, value);
1049  break;
1050 
1051  }
1052  }
1053  break;
1054  case 20:
1055  coerceValue(myUseOutputSeams, value);
1056  break;
1057  case 21:
1058  coerceValue(myOutputSeams, value);
1059  break;
1060  case 22:
1061  coerceValue(myUseOutputConstrIslands, value);
1062  break;
1063  case 23:
1064  coerceValue(myOutputConstrIslands, value);
1065  break;
1066  case 24:
1067  coerceValue(myBboxCenter, value);
1068  break;
1069  case 25:
1070  coerceValue(myBboxSize, value);
1071  break;
1072 
1073  }
1074  }
1075 
1076  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
1077  { doSetParmValue(idx, instance, value); }
1078  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
1079  { doSetParmValue(idx, instance, value); }
1080  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
1081  { doSetParmValue(idx, instance, value); }
1082  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
1083  { doSetParmValue(idx, instance, value); }
1084  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
1085  { doSetParmValue(idx, instance, value); }
1086  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
1087  { doSetParmValue(idx, instance, value); }
1088  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
1089  { doSetParmValue(idx, instance, value); }
1090  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
1091  { doSetParmValue(idx, instance, value); }
1092  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
1093  { doSetParmValue(idx, instance, value); }
1094  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
1095  { doSetParmValue(idx, instance, value); }
1096  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
1097  { doSetParmValue(idx, instance, value); }
1098 
1099  exint getNestNumParms(TempIndex idx) const override
1100  {
1101  if (idx.size() == 0)
1102  return 26;
1103  switch (idx[0])
1104  {
1105  case 9:
1106  return 4;
1107  case 11:
1108  return 3;
1109  case 13:
1110  return 2;
1111  case 17:
1112  return 3;
1113  case 18:
1114  return 2;
1115  case 19:
1116  return 1;
1117 
1118  }
1119  // Invalid
1120  return 0;
1121  }
1122 
1123  const char *getNestParmName(TempIndex fieldnum) const override
1124  {
1125  if (fieldnum.size() < 1)
1126  return 0;
1127  switch (fieldnum[0])
1128  {
1129  case 0:
1130  return "group";
1131  case 1:
1132  return "uvattrib";
1133  case 2:
1134  return "method";
1135  case 3:
1136  return "keepexistingseams";
1137  case 4:
1138  return "keepexistinglayout";
1139  case 5:
1140  return "pinboundaries";
1141  case 6:
1142  return "seamgroup";
1143  case 7:
1144  return "rectifygroup";
1145  case 8:
1146  return "usepins";
1147  case 9:
1148  if (fieldnum.size() == 1)
1149  return "pins";
1150  switch (fieldnum[1])
1151  {
1152  case 0:
1153  return "usepin#";
1154  case 1:
1155  return "primvert#";
1156  case 2:
1157  return "pinuv#";
1158  case 3:
1159  return "pinrefuv#";
1160 
1161  }
1162  return 0;
1163  case 10:
1164  return "usealignments";
1165  case 11:
1166  if (fieldnum.size() == 1)
1167  return "alignments";
1168  switch (fieldnum[1])
1169  {
1170  case 0:
1171  return "align_enabled#";
1172  case 1:
1173  return "align_group#";
1174  case 2:
1175  return "align_axis#";
1176 
1177  }
1178  return 0;
1179  case 12:
1180  return "usestraightenings";
1181  case 13:
1182  if (fieldnum.size() == 1)
1183  return "straightenings";
1184  switch (fieldnum[1])
1185  {
1186  case 0:
1187  return "straight_enabled#";
1188  case 1:
1189  return "straight_group#";
1190 
1191  }
1192  return 0;
1193  case 14:
1194  return "manuallayout";
1195  case 15:
1196  return "layoutseamgroup";
1197  case 16:
1198  return "layoutrectifygroup";
1199  case 17:
1200  if (fieldnum.size() == 1)
1201  return "lpins";
1202  switch (fieldnum[1])
1203  {
1204  case 0:
1205  return "lprimvert#";
1206  case 1:
1207  return "lpinuv#";
1208  case 2:
1209  return "lpinrefuv#";
1210 
1211  }
1212  return 0;
1213  case 18:
1214  if (fieldnum.size() == 1)
1215  return "lalignments";
1216  switch (fieldnum[1])
1217  {
1218  case 0:
1219  return "lalign_group#";
1220  case 1:
1221  return "lalign_axis#";
1222 
1223  }
1224  return 0;
1225  case 19:
1226  if (fieldnum.size() == 1)
1227  return "lstraightenings";
1228  switch (fieldnum[1])
1229  {
1230  case 0:
1231  return "lstraight_group#";
1232 
1233  }
1234  return 0;
1235  case 20:
1236  return "useoutputseams";
1237  case 21:
1238  return "outputseams";
1239  case 22:
1240  return "useoutputconstrislands";
1241  case 23:
1242  return "outputconstrislands";
1243  case 24:
1244  return "bboxcenter";
1245  case 25:
1246  return "bboxsize";
1247 
1248  }
1249  return 0;
1250  }
1251 
1252  ParmType getNestParmType(TempIndex fieldnum) const override
1253  {
1254  if (fieldnum.size() < 1)
1255  return PARM_UNSUPPORTED;
1256  switch (fieldnum[0])
1257  {
1258  case 0:
1259  return PARM_STRING;
1260  case 1:
1261  return PARM_STRING;
1262  case 2:
1263  return PARM_INTEGER;
1264  case 3:
1265  return PARM_INTEGER;
1266  case 4:
1267  return PARM_INTEGER;
1268  case 5:
1269  return PARM_INTEGER;
1270  case 6:
1271  return PARM_STRING;
1272  case 7:
1273  return PARM_STRING;
1274  case 8:
1275  return PARM_INTEGER;
1276  case 9:
1277  if (fieldnum.size() == 1)
1278  return PARM_MULTIPARM;
1279  switch (fieldnum[1])
1280  {
1281  case 0:
1282  return PARM_INTEGER;
1283  case 1:
1284  return PARM_VECTOR2;
1285  case 2:
1286  return PARM_VECTOR2;
1287  case 3:
1288  return PARM_VECTOR2;
1289 
1290  }
1291  return PARM_UNSUPPORTED;
1292  case 10:
1293  return PARM_INTEGER;
1294  case 11:
1295  if (fieldnum.size() == 1)
1296  return PARM_MULTIPARM;
1297  switch (fieldnum[1])
1298  {
1299  case 0:
1300  return PARM_INTEGER;
1301  case 1:
1302  return PARM_STRING;
1303  case 2:
1304  return PARM_INTEGER;
1305 
1306  }
1307  return PARM_UNSUPPORTED;
1308  case 12:
1309  return PARM_INTEGER;
1310  case 13:
1311  if (fieldnum.size() == 1)
1312  return PARM_MULTIPARM;
1313  switch (fieldnum[1])
1314  {
1315  case 0:
1316  return PARM_INTEGER;
1317  case 1:
1318  return PARM_STRING;
1319 
1320  }
1321  return PARM_UNSUPPORTED;
1322  case 14:
1323  return PARM_INTEGER;
1324  case 15:
1325  return PARM_STRING;
1326  case 16:
1327  return PARM_STRING;
1328  case 17:
1329  if (fieldnum.size() == 1)
1330  return PARM_MULTIPARM;
1331  switch (fieldnum[1])
1332  {
1333  case 0:
1334  return PARM_VECTOR2;
1335  case 1:
1336  return PARM_VECTOR2;
1337  case 2:
1338  return PARM_VECTOR2;
1339 
1340  }
1341  return PARM_UNSUPPORTED;
1342  case 18:
1343  if (fieldnum.size() == 1)
1344  return PARM_MULTIPARM;
1345  switch (fieldnum[1])
1346  {
1347  case 0:
1348  return PARM_STRING;
1349  case 1:
1350  return PARM_INTEGER;
1351 
1352  }
1353  return PARM_UNSUPPORTED;
1354  case 19:
1355  if (fieldnum.size() == 1)
1356  return PARM_MULTIPARM;
1357  switch (fieldnum[1])
1358  {
1359  case 0:
1360  return PARM_STRING;
1361 
1362  }
1363  return PARM_UNSUPPORTED;
1364  case 20:
1365  return PARM_INTEGER;
1366  case 21:
1367  return PARM_STRING;
1368  case 22:
1369  return PARM_INTEGER;
1370  case 23:
1371  return PARM_STRING;
1372  case 24:
1373  return PARM_VECTOR2;
1374  case 25:
1375  return PARM_VECTOR2;
1376 
1377  }
1378  return PARM_UNSUPPORTED;
1379  }
1380 
1381  // Boiler plate to load individual types.
1382  static void loadData(UT_IStream &is, int64 &v)
1383  { is.bread(&v, 1); }
1384  static void loadData(UT_IStream &is, bool &v)
1385  { int64 iv; is.bread(&iv, 1); v = iv; }
1386  static void loadData(UT_IStream &is, fpreal64 &v)
1387  { is.bread<fpreal64>(&v, 1); }
1388  static void loadData(UT_IStream &is, UT_Vector2D &v)
1389  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1390  static void loadData(UT_IStream &is, UT_Vector3D &v)
1391  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1392  is.bread<fpreal64>(&v.z(), 1); }
1393  static void loadData(UT_IStream &is, UT_Vector4D &v)
1394  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1395  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1396  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1397  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1398  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1399  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1400  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1401  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1402  static void loadData(UT_IStream &is, UT_Vector2I &v)
1403  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1404  static void loadData(UT_IStream &is, UT_Vector3I &v)
1405  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1406  is.bread<int64>(&v.z(), 1); }
1407  static void loadData(UT_IStream &is, UT_Vector4I &v)
1408  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1409  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1411  { is.bread(v); }
1413  { UT_StringHolder rampdata;
1414  loadData(is, rampdata);
1415  if (rampdata.isstring())
1416  {
1417  v.reset(new UT_Ramp());
1418  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1419  v->load(istr);
1420  }
1421  else v.reset();
1422  }
1425  loadData(is, data);
1426  if (data.isstring())
1427  {
1428  // Find the data type.
1429  const char *colon = UT_StringWrap(data).findChar(':');
1430  if (colon)
1431  {
1432  int typelen = colon - data.buffer();
1434  type.strncpy(data.buffer(), typelen);
1435  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1436 
1437  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1438  }
1439  }
1440  else v.reset();
1441  }
1442 
1443  static void saveData(std::ostream &os, int64 v)
1444  { UTwrite(os, &v); }
1445  static void saveData(std::ostream &os, bool v)
1446  { int64 iv = v; UTwrite(os, &iv); }
1447  static void saveData(std::ostream &os, fpreal64 v)
1448  { UTwrite<fpreal64>(os, &v); }
1449  static void saveData(std::ostream &os, UT_Vector2D v)
1450  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1451  static void saveData(std::ostream &os, UT_Vector3D v)
1452  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1453  UTwrite<fpreal64>(os, &v.z()); }
1454  static void saveData(std::ostream &os, UT_Vector4D v)
1455  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1456  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1457  static void saveData(std::ostream &os, UT_Matrix2D v)
1459  static void saveData(std::ostream &os, UT_Matrix3D v)
1461  static void saveData(std::ostream &os, UT_Matrix4D v)
1463  static void saveData(std::ostream &os, UT_StringHolder s)
1464  { UT_StringWrap(s).saveBinary(os); }
1465  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1467  UT_OStringStream ostr;
1468  if (s) s->save(ostr);
1469  result = ostr.str();
1470  saveData(os, result);
1471  }
1472  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1474  UT_OStringStream ostr;
1475  if (s)
1476  {
1477  ostr << s->getDataTypeToken();
1478  ostr << ":";
1479  s->saveBinary(ostr);
1480  }
1481  result = ostr.str();
1482  saveData(os, result);
1483  }
1484 
1485 
1486  void save(std::ostream &os) const
1487  {
1488  int32 v = version();
1489  UTwrite(os, &v);
1490  saveData(os, myGroup);
1491  saveData(os, myUVAttrib);
1492  saveData(os, myMethod);
1493  saveData(os, myKeepExistingSeams);
1494  saveData(os, myKeepExistingLayout);
1495  saveData(os, myPinBoundaries);
1496  saveData(os, mySeams);
1497  saveData(os, myRectifyGroup);
1498  saveData(os, myUsePins);
1499  {
1500  int64 length = myPins.entries();
1501  UTwrite(os, &length);
1502  for (exint i = 0; i < length; i++)
1503  {
1504  saveData(os, myPins(i).usepin);
1505  saveData(os, myPins(i).primvert);
1506  saveData(os, myPins(i).pinuv);
1507  saveData(os, myPins(i).pinrefuv);
1508 
1509  }
1510  }
1511  saveData(os, myUseAlignments);
1512  {
1513  int64 length = myAlignments.entries();
1514  UTwrite(os, &length);
1515  for (exint i = 0; i < length; i++)
1516  {
1517  saveData(os, myAlignments(i).align_enabled);
1518  saveData(os, myAlignments(i).align_group);
1519  saveData(os, myAlignments(i).align_axis);
1520 
1521  }
1522  }
1523  saveData(os, myUseStraightenings);
1524  {
1525  int64 length = myStraightenings.entries();
1526  UTwrite(os, &length);
1527  for (exint i = 0; i < length; i++)
1528  {
1529  saveData(os, myStraightenings(i).straight_enabled);
1530  saveData(os, myStraightenings(i).straight_group);
1531 
1532  }
1533  }
1534  saveData(os, myManualLayout);
1535  saveData(os, myLayoutSeams);
1536  saveData(os, myLayoutRectifyGroup);
1537  {
1538  int64 length = myLpins.entries();
1539  UTwrite(os, &length);
1540  for (exint i = 0; i < length; i++)
1541  {
1542  saveData(os, myLpins(i).lprimvert);
1543  saveData(os, myLpins(i).lpinuv);
1544  saveData(os, myLpins(i).lpinrefuv);
1545 
1546  }
1547  }
1548  {
1549  int64 length = myLalignments.entries();
1550  UTwrite(os, &length);
1551  for (exint i = 0; i < length; i++)
1552  {
1553  saveData(os, myLalignments(i).lalign_group);
1554  saveData(os, myLalignments(i).lalign_axis);
1555 
1556  }
1557  }
1558  {
1559  int64 length = myLstraightenings.entries();
1560  UTwrite(os, &length);
1561  for (exint i = 0; i < length; i++)
1562  {
1563  saveData(os, myLstraightenings(i).lstraight_group);
1564 
1565  }
1566  }
1567  saveData(os, myUseOutputSeams);
1568  saveData(os, myOutputSeams);
1569  saveData(os, myUseOutputConstrIslands);
1570  saveData(os, myOutputConstrIslands);
1571  saveData(os, myBboxCenter);
1572  saveData(os, myBboxSize);
1573 
1574  }
1575 
1576  bool load(UT_IStream &is)
1577  {
1578  int32 v;
1579  is.bread(&v, 1);
1580  if (version() != v)
1581  {
1582  // Fail incompatible versions
1583  return false;
1584  }
1585  loadData(is, myGroup);
1586  loadData(is, myUVAttrib);
1587  loadData(is, myMethod);
1588  loadData(is, myKeepExistingSeams);
1589  loadData(is, myKeepExistingLayout);
1590  loadData(is, myPinBoundaries);
1591  loadData(is, mySeams);
1592  loadData(is, myRectifyGroup);
1593  loadData(is, myUsePins);
1594  {
1595  int64 length;
1596  is.read(&length, 1);
1597  myPins.entries(length);
1598  for (exint i = 0; i < length; i++)
1599  {
1600  loadData(is, myPins(i).usepin);
1601  loadData(is, myPins(i).primvert);
1602  loadData(is, myPins(i).pinuv);
1603  loadData(is, myPins(i).pinrefuv);
1604 
1605  }
1606  }
1607  loadData(is, myUseAlignments);
1608  {
1609  int64 length;
1610  is.read(&length, 1);
1611  myAlignments.entries(length);
1612  for (exint i = 0; i < length; i++)
1613  {
1614  loadData(is, myAlignments(i).align_enabled);
1615  loadData(is, myAlignments(i).align_group);
1616  loadData(is, myAlignments(i).align_axis);
1617 
1618  }
1619  }
1620  loadData(is, myUseStraightenings);
1621  {
1622  int64 length;
1623  is.read(&length, 1);
1624  myStraightenings.entries(length);
1625  for (exint i = 0; i < length; i++)
1626  {
1627  loadData(is, myStraightenings(i).straight_enabled);
1628  loadData(is, myStraightenings(i).straight_group);
1629 
1630  }
1631  }
1632  loadData(is, myManualLayout);
1633  loadData(is, myLayoutSeams);
1634  loadData(is, myLayoutRectifyGroup);
1635  {
1636  int64 length;
1637  is.read(&length, 1);
1638  myLpins.entries(length);
1639  for (exint i = 0; i < length; i++)
1640  {
1641  loadData(is, myLpins(i).lprimvert);
1642  loadData(is, myLpins(i).lpinuv);
1643  loadData(is, myLpins(i).lpinrefuv);
1644 
1645  }
1646  }
1647  {
1648  int64 length;
1649  is.read(&length, 1);
1650  myLalignments.entries(length);
1651  for (exint i = 0; i < length; i++)
1652  {
1653  loadData(is, myLalignments(i).lalign_group);
1654  loadData(is, myLalignments(i).lalign_axis);
1655 
1656  }
1657  }
1658  {
1659  int64 length;
1660  is.read(&length, 1);
1661  myLstraightenings.entries(length);
1662  for (exint i = 0; i < length; i++)
1663  {
1664  loadData(is, myLstraightenings(i).lstraight_group);
1665 
1666  }
1667  }
1668  loadData(is, myUseOutputSeams);
1669  loadData(is, myOutputSeams);
1670  loadData(is, myUseOutputConstrIslands);
1671  loadData(is, myOutputConstrIslands);
1672  loadData(is, myBboxCenter);
1673  loadData(is, myBboxSize);
1674 
1675  return true;
1676  }
1677 
1678  const UT_StringHolder & getGroup() const { return myGroup; }
1679  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1681  {
1682  SOP_Node *thissop = cookparms.getNode();
1683  if (!thissop) return getGroup();
1685  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1686  return result;
1687  }
1688  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
1689  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
1691  {
1692  SOP_Node *thissop = cookparms.getNode();
1693  if (!thissop) return getUVAttrib();
1695  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
1696  return result;
1697  }
1698  Method getMethod() const { return Method(myMethod); }
1699  void setMethod(Method val) { myMethod = int64(val); }
1700  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1701  {
1702  SOP_Node *thissop = cookparms.getNode();
1703  if (!thissop) return getMethod();
1704  int64 result;
1705  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1706  return Method(result);
1707  }
1708  bool getKeepExistingSeams() const { return myKeepExistingSeams; }
1709  void setKeepExistingSeams(bool val) { myKeepExistingSeams = val; }
1710  bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
1711  {
1712  SOP_Node *thissop = cookparms.getNode();
1713  if (!thissop) return getKeepExistingSeams();
1714  bool result;
1715  OP_Utils::evalOpParm(result, thissop, "keepexistingseams", cookparms.getCookTime(), 0);
1716  return result;
1717  }
1718  bool getKeepExistingLayout() const { return myKeepExistingLayout; }
1719  void setKeepExistingLayout(bool val) { myKeepExistingLayout = val; }
1720  bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
1721  {
1722  SOP_Node *thissop = cookparms.getNode();
1723  if (!thissop) return getKeepExistingLayout();
1724  bool result;
1725  OP_Utils::evalOpParm(result, thissop, "keepexistinglayout", cookparms.getCookTime(), 0);
1726  return result;
1727  }
1728  bool getPinBoundaries() const { return myPinBoundaries; }
1729  void setPinBoundaries(bool val) { myPinBoundaries = val; }
1730  bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
1731  {
1732  SOP_Node *thissop = cookparms.getNode();
1733  if (!thissop) return getPinBoundaries();
1734  bool result;
1735  OP_Utils::evalOpParm(result, thissop, "pinboundaries", cookparms.getCookTime(), 0);
1736  return result;
1737  }
1738  const UT_StringHolder & getSeams() const { return mySeams; }
1739  void setSeams(const UT_StringHolder & val) { mySeams = val; }
1741  {
1742  SOP_Node *thissop = cookparms.getNode();
1743  if (!thissop) return getSeams();
1745  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
1746  return result;
1747  }
1748  const UT_StringHolder & getRectifyGroup() const { return myRectifyGroup; }
1749  void setRectifyGroup(const UT_StringHolder & val) { myRectifyGroup = val; }
1751  {
1752  SOP_Node *thissop = cookparms.getNode();
1753  if (!thissop) return getRectifyGroup();
1755  OP_Utils::evalOpParm(result, thissop, "rectifygroup", cookparms.getCookTime(), 0);
1756  return result;
1757  }
1758  bool getUsePins() const { return myUsePins; }
1759  void setUsePins(bool val) { myUsePins = val; }
1760  bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
1761  {
1762  SOP_Node *thissop = cookparms.getNode();
1763  if (!thissop) return getUsePins();
1764  bool result;
1765  OP_Utils::evalOpParm(result, thissop, "usepins", cookparms.getCookTime(), 0);
1766  return result;
1767  }
1768  const UT_Array<Pins> &getPins() const { return myPins; }
1769  void setPins(const UT_Array<Pins> &val) { myPins = val; }
1770  exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
1771  {
1772  SOP_Node *thissop = cookparms.getNode();
1773  if (!thissop) return getPins().entries();
1774  exint result;
1775  OP_Utils::evalOpParm(result, thissop, "pins", cookparms.getCookTime(), 0);
1776  return result;
1777  }
1778  bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1779  {
1780  SOP_Node *thissop = cookparms.getNode();
1781  if (!thissop) return (myPins(_idx).usepin);
1782  int _parmidx = _idx + 0;
1783  bool result;
1784  OP_Utils::evalOpParmInst(result, thissop, "usepin#", &_parmidx, cookparms.getCookTime(), 0);
1785  return (result);
1786  }
1788  {
1789  SOP_Node *thissop = cookparms.getNode();
1790  if (!thissop) return (myPins(_idx).primvert);
1791  int _parmidx = _idx + 0;
1793  OP_Utils::evalOpParmInst(result, thissop, "primvert#", &_parmidx, cookparms.getCookTime(), 0);
1794  return (result);
1795  }
1797  {
1798  SOP_Node *thissop = cookparms.getNode();
1799  if (!thissop) return (myPins(_idx).pinuv);
1800  int _parmidx = _idx + 0;
1802  OP_Utils::evalOpParmInst(result, thissop, "pinuv#", &_parmidx, cookparms.getCookTime(), 0);
1803  return (result);
1804  }
1806  {
1807  SOP_Node *thissop = cookparms.getNode();
1808  if (!thissop) return (myPins(_idx).pinrefuv);
1809  int _parmidx = _idx + 0;
1811  OP_Utils::evalOpParmInst(result, thissop, "pinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1812  return (result);
1813  }
1814 
1815  bool getUseAlignments() const { return myUseAlignments; }
1816  void setUseAlignments(bool val) { myUseAlignments = val; }
1817  bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
1818  {
1819  SOP_Node *thissop = cookparms.getNode();
1820  if (!thissop) return getUseAlignments();
1821  bool result;
1822  OP_Utils::evalOpParm(result, thissop, "usealignments", cookparms.getCookTime(), 0);
1823  return result;
1824  }
1825  const UT_Array<Alignments> &getAlignments() const { return myAlignments; }
1826  void setAlignments(const UT_Array<Alignments> &val) { myAlignments = val; }
1828  {
1829  SOP_Node *thissop = cookparms.getNode();
1830  if (!thissop) return getAlignments().entries();
1831  exint result;
1832  OP_Utils::evalOpParm(result, thissop, "alignments", cookparms.getCookTime(), 0);
1833  return result;
1834  }
1835  bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1836  {
1837  SOP_Node *thissop = cookparms.getNode();
1838  if (!thissop) return (myAlignments(_idx).align_enabled);
1839  int _parmidx = _idx + 0;
1840  bool result;
1841  OP_Utils::evalOpParmInst(result, thissop, "align_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1842  return (result);
1843  }
1845  {
1846  SOP_Node *thissop = cookparms.getNode();
1847  if (!thissop) return (myAlignments(_idx).align_group);
1848  int _parmidx = _idx + 0;
1850  OP_Utils::evalOpParmInst(result, thissop, "align_group#", &_parmidx, cookparms.getCookTime(), 0);
1851  return (result);
1852  }
1854  {
1855  SOP_Node *thissop = cookparms.getNode();
1856  if (!thissop) return (myAlignments(_idx).align_axis);
1857  int _parmidx = _idx + 0;
1858  int64 result;
1859  OP_Utils::evalOpParmInst(result, thissop, "align_axis#", &_parmidx, cookparms.getCookTime(), 0);
1860  return (result);
1861  }
1862 
1863  bool getUseStraightenings() const { return myUseStraightenings; }
1864  void setUseStraightenings(bool val) { myUseStraightenings = val; }
1865  bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
1866  {
1867  SOP_Node *thissop = cookparms.getNode();
1868  if (!thissop) return getUseStraightenings();
1869  bool result;
1870  OP_Utils::evalOpParm(result, thissop, "usestraightenings", cookparms.getCookTime(), 0);
1871  return result;
1872  }
1873  const UT_Array<Straightenings> &getStraightenings() const { return myStraightenings; }
1874  void setStraightenings(const UT_Array<Straightenings> &val) { myStraightenings = val; }
1876  {
1877  SOP_Node *thissop = cookparms.getNode();
1878  if (!thissop) return getStraightenings().entries();
1879  exint result;
1880  OP_Utils::evalOpParm(result, thissop, "straightenings", cookparms.getCookTime(), 0);
1881  return result;
1882  }
1884  {
1885  SOP_Node *thissop = cookparms.getNode();
1886  if (!thissop) return (myStraightenings(_idx).straight_enabled);
1887  int _parmidx = _idx + 0;
1888  bool result;
1889  OP_Utils::evalOpParmInst(result, thissop, "straight_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1890  return (result);
1891  }
1893  {
1894  SOP_Node *thissop = cookparms.getNode();
1895  if (!thissop) return (myStraightenings(_idx).straight_group);
1896  int _parmidx = _idx + 0;
1898  OP_Utils::evalOpParmInst(result, thissop, "straight_group#", &_parmidx, cookparms.getCookTime(), 0);
1899  return (result);
1900  }
1901 
1902  bool getManualLayout() const { return myManualLayout; }
1903  void setManualLayout(bool val) { myManualLayout = val; }
1904  bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
1905  {
1906  SOP_Node *thissop = cookparms.getNode();
1907  if (!thissop) return getManualLayout();
1908  bool result;
1909  OP_Utils::evalOpParm(result, thissop, "manuallayout", cookparms.getCookTime(), 0);
1910  return result;
1911  }
1912  const UT_StringHolder & getLayoutSeams() const { return myLayoutSeams; }
1913  void setLayoutSeams(const UT_StringHolder & val) { myLayoutSeams = val; }
1915  {
1916  SOP_Node *thissop = cookparms.getNode();
1917  if (!thissop) return getLayoutSeams();
1919  OP_Utils::evalOpParm(result, thissop, "layoutseamgroup", cookparms.getCookTime(), 0);
1920  return result;
1921  }
1922  const UT_StringHolder & getLayoutRectifyGroup() const { return myLayoutRectifyGroup; }
1923  void setLayoutRectifyGroup(const UT_StringHolder & val) { myLayoutRectifyGroup = val; }
1925  {
1926  SOP_Node *thissop = cookparms.getNode();
1927  if (!thissop) return getLayoutRectifyGroup();
1929  OP_Utils::evalOpParm(result, thissop, "layoutrectifygroup", cookparms.getCookTime(), 0);
1930  return result;
1931  }
1932  const UT_Array<Lpins> &getLpins() const { return myLpins; }
1933  void setLpins(const UT_Array<Lpins> &val) { myLpins = val; }
1934  exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
1935  {
1936  SOP_Node *thissop = cookparms.getNode();
1937  if (!thissop) return getLpins().entries();
1938  exint result;
1939  OP_Utils::evalOpParm(result, thissop, "lpins", cookparms.getCookTime(), 0);
1940  return result;
1941  }
1943  {
1944  SOP_Node *thissop = cookparms.getNode();
1945  if (!thissop) return (myLpins(_idx).lprimvert);
1946  int _parmidx = _idx + 0;
1948  OP_Utils::evalOpParmInst(result, thissop, "lprimvert#", &_parmidx, cookparms.getCookTime(), 0);
1949  return (result);
1950  }
1952  {
1953  SOP_Node *thissop = cookparms.getNode();
1954  if (!thissop) return (myLpins(_idx).lpinuv);
1955  int _parmidx = _idx + 0;
1957  OP_Utils::evalOpParmInst(result, thissop, "lpinuv#", &_parmidx, cookparms.getCookTime(), 0);
1958  return (result);
1959  }
1961  {
1962  SOP_Node *thissop = cookparms.getNode();
1963  if (!thissop) return (myLpins(_idx).lpinrefuv);
1964  int _parmidx = _idx + 0;
1966  OP_Utils::evalOpParmInst(result, thissop, "lpinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1967  return (result);
1968  }
1969 
1970  const UT_Array<Lalignments> &getLalignments() const { return myLalignments; }
1971  void setLalignments(const UT_Array<Lalignments> &val) { myLalignments = val; }
1973  {
1974  SOP_Node *thissop = cookparms.getNode();
1975  if (!thissop) return getLalignments().entries();
1976  exint result;
1977  OP_Utils::evalOpParm(result, thissop, "lalignments", cookparms.getCookTime(), 0);
1978  return result;
1979  }
1981  {
1982  SOP_Node *thissop = cookparms.getNode();
1983  if (!thissop) return (myLalignments(_idx).lalign_group);
1984  int _parmidx = _idx + 0;
1986  OP_Utils::evalOpParmInst(result, thissop, "lalign_group#", &_parmidx, cookparms.getCookTime(), 0);
1987  return (result);
1988  }
1990  {
1991  SOP_Node *thissop = cookparms.getNode();
1992  if (!thissop) return (myLalignments(_idx).lalign_axis);
1993  int _parmidx = _idx + 0;
1994  int64 result;
1995  OP_Utils::evalOpParmInst(result, thissop, "lalign_axis#", &_parmidx, cookparms.getCookTime(), 0);
1996  return (result);
1997  }
1998 
1999  const UT_Array<Lstraightenings> &getLstraightenings() const { return myLstraightenings; }
2000  void setLstraightenings(const UT_Array<Lstraightenings> &val) { myLstraightenings = val; }
2002  {
2003  SOP_Node *thissop = cookparms.getNode();
2004  if (!thissop) return getLstraightenings().entries();
2005  exint result;
2006  OP_Utils::evalOpParm(result, thissop, "lstraightenings", cookparms.getCookTime(), 0);
2007  return result;
2008  }
2010  {
2011  SOP_Node *thissop = cookparms.getNode();
2012  if (!thissop) return (myLstraightenings(_idx).lstraight_group);
2013  int _parmidx = _idx + 0;
2015  OP_Utils::evalOpParmInst(result, thissop, "lstraight_group#", &_parmidx, cookparms.getCookTime(), 0);
2016  return (result);
2017  }
2018 
2019  bool getUseOutputSeams() const { return myUseOutputSeams; }
2020  void setUseOutputSeams(bool val) { myUseOutputSeams = val; }
2021  bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
2022  {
2023  SOP_Node *thissop = cookparms.getNode();
2024  if (!thissop) return getUseOutputSeams();
2025  bool result;
2026  OP_Utils::evalOpParm(result, thissop, "useoutputseams", cookparms.getCookTime(), 0);
2027  return result;
2028  }
2029  const UT_StringHolder & getOutputSeams() const { return myOutputSeams; }
2030  void setOutputSeams(const UT_StringHolder & val) { myOutputSeams = val; }
2032  {
2033  SOP_Node *thissop = cookparms.getNode();
2034  if (!thissop) return getOutputSeams();
2036  OP_Utils::evalOpParm(result, thissop, "outputseams", cookparms.getCookTime(), 0);
2037  return result;
2038  }
2039  bool getUseOutputConstrIslands() const { return myUseOutputConstrIslands; }
2040  void setUseOutputConstrIslands(bool val) { myUseOutputConstrIslands = val; }
2042  {
2043  SOP_Node *thissop = cookparms.getNode();
2044  if (!thissop) return getUseOutputConstrIslands();
2045  bool result;
2046  OP_Utils::evalOpParm(result, thissop, "useoutputconstrislands", cookparms.getCookTime(), 0);
2047  return result;
2048  }
2049  const UT_StringHolder & getOutputConstrIslands() const { return myOutputConstrIslands; }
2050  void setOutputConstrIslands(const UT_StringHolder & val) { myOutputConstrIslands = val; }
2052  {
2053  SOP_Node *thissop = cookparms.getNode();
2054  if (!thissop) return getOutputConstrIslands();
2056  OP_Utils::evalOpParm(result, thissop, "outputconstrislands", cookparms.getCookTime(), 0);
2057  return result;
2058  }
2059  UT_Vector2D getBboxCenter() const { return myBboxCenter; }
2060  void setBboxCenter(UT_Vector2D val) { myBboxCenter = val; }
2062  {
2063  SOP_Node *thissop = cookparms.getNode();
2064  if (!thissop) return getBboxCenter();
2066  OP_Utils::evalOpParm(result, thissop, "bboxcenter", cookparms.getCookTime(), 0);
2067  return result;
2068  }
2069  UT_Vector2D getBboxSize() const { return myBboxSize; }
2070  void setBboxSize(UT_Vector2D val) { myBboxSize = val; }
2072  {
2073  SOP_Node *thissop = cookparms.getNode();
2074  if (!thissop) return getBboxSize();
2076  OP_Utils::evalOpParm(result, thissop, "bboxsize", cookparms.getCookTime(), 0);
2077  return result;
2078  }
2079 
2080 private:
2081  UT_StringHolder myGroup;
2082  UT_StringHolder myUVAttrib;
2083  int64 myMethod;
2084  bool myKeepExistingSeams;
2085  bool myKeepExistingLayout;
2086  bool myPinBoundaries;
2087  UT_StringHolder mySeams;
2088  UT_StringHolder myRectifyGroup;
2089  bool myUsePins;
2090  UT_Array<Pins> myPins;
2091  bool myUseAlignments;
2092  UT_Array<Alignments> myAlignments;
2093  bool myUseStraightenings;
2094  UT_Array<Straightenings> myStraightenings;
2095  bool myManualLayout;
2096  UT_StringHolder myLayoutSeams;
2097  UT_StringHolder myLayoutRectifyGroup;
2098  UT_Array<Lpins> myLpins;
2099  UT_Array<Lalignments> myLalignments;
2100  UT_Array<Lstraightenings> myLstraightenings;
2101  bool myUseOutputSeams;
2102  UT_StringHolder myOutputSeams;
2103  bool myUseOutputConstrIslands;
2104  UT_StringHolder myOutputConstrIslands;
2105  UT_Vector2D myBboxCenter;
2106  UT_Vector2D myBboxSize;
2107 
2108 };
void setUVAttrib(const UT_StringHolder &val)
GLdouble s
Definition: glew.h:1390
void setBboxCenter(UT_Vector2D val)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opBboxCenter(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setLstraightenings(const UT_Array< Lstraightenings > &val)
const UT_StringHolder & getLayoutRectifyGroup() const
UT_StringHolder opSeams(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
bool operator!=(const SOP_UVFlatten_3_0Parms &src) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const Lalignments &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const UT_Array< Lpins > & getLpins() const
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
UT_Vector2D opLpins_lprimvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator!=(const Lstraightenings &src) const
bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Alignments > &list) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getOutputSeams() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
bool operator!=(const Lpins &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal getTime() const
Definition: OP_Context.h:60
exint opLstraightenings(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2T< fpreal64 > UT_Vector2D
static void loadData(UT_IStream &is, bool &v)
GLuint const GLfloat * val
Definition: glew.h:2794
bool operator==(const Lstraightenings &src) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const UT_Array< Lalignments > & getLalignments() const
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
UT_StringHolder opLalignments_lalign_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder createString(const UT_Array< Lalignments > &list) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_StringHolder s)
exint opLalignments(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glew.h:1391
bool operator==(const Pins &src) const
bool operator==(const Lpins &src) const
UT_StringHolder opLstraightenings_lstraight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setOutputSeams(const UT_StringHolder &val)
void setLalignments(const UT_Array< Lalignments > &val)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opLayoutRectifyGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const UT_Array< Lstraightenings > & getLstraightenings() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getOutputConstrIslands() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2D opBboxSize(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
double fpreal64
Definition: SYS_Types.h:201
void setStraightenings(const UT_Array< Straightenings > &val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator!=(const Alignments &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
bool operator==(const Lalignments &src) const
void setAlignments(const UT_Array< Alignments > &val)
bool operator!=(const Straightenings &src) const
bool operator==(const Alignments &src) const
bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opLpins_lpinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_Vector2D opLpins_lpinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setBboxSize(UT_Vector2D val)
exint length() const
bool operator==(const Straightenings &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void setSeams(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
const char * getNestParmName(TempIndex fieldnum) const override
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
void
Definition: png.h:1083
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_Array< Pins > & getPins() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
exint opStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Lpins > &list) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setLayoutSeams(const UT_StringHolder &val)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setOutputConstrIslands(const UT_StringHolder &val)
UT_StringHolder createString(const UT_Array< Lstraightenings > &list) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
exint getNestNumParms(TempIndex idx) const override
bool opStraightenings_straight_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opAlignments_align_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector2D getBboxCenter() const
exint opAlignments(const SOP_NodeVerb::CookParms &cookparms) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
bool operator!=(const Pins &src) const
void setLayoutRectifyGroup(const UT_StringHolder &val)
UT_StringHolder opLayoutSeams(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
const UT_Array< Straightenings > & getStraightenings() const
UT_StringHolder opRectifyGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opStraightenings_straight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setRectifyGroup(const UT_StringHolder &val)
UT_StringHolder createString(const UT_Array< Pins > &list) const
UT_StringHolder opOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
const UT_Array< Alignments > & getAlignments() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
#define SOP_API
Definition: SOP_API.h:10
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getRectifyGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const UT_StringHolder & getSeams() const
UT_Vector2D getBboxSize() const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
UT_Vector2D opPins_primvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLuint64EXT * result
Definition: glew.h:14007
static void loadData(UT_IStream &is, fpreal64 &v)
void setLpins(const UT_Array< Lpins > &val)
void copyFrom(const SOP_NodeParms *src) override
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_Vector2D opPins_pinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_Vector2D opPins_pinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
int64 opAlignments_align_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
const UT_StringHolder & getLayoutSeams() const
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const UT_StringHolder & getUVAttrib() const
GLsizei const GLfloat * value
Definition: glew.h:1849
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setPins(const UT_Array< Pins > &val)
void save(std::ostream &os) const
int64 opLalignments_lalign_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:528
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool operator==(const SOP_UVFlatten_3_0Parms &src) const
UT_StringHolder createString(const UT_Array< Straightenings > &list) const