23 namespace SOP_UVFlattenFromPointsEnums
35 using namespace UT::Literal;
53 using namespace UT::Literal;
70 using namespace UT::Literal;
88 using namespace UT::Literal;
108 myUVAttrib =
"uv"_UTsh;
110 myCenterPointsSource = 0;
111 mySrcPoints =
""_UTsh;
112 myPointSelectionMethod = 0;
113 myAddAutomaticSources =
false;
114 myNAutomaticSources = 0;
115 myAutomaticDistortionThreshold = 3;
117 myUDirAttrib =
"up"_UTsh;
119 myLogScaleAttrib =
"scale"_UTsh;
121 myLogScaleUniformAttrib =
"pscale"_UTsh;
125 myUseUDIMTarget =
false;
126 myUDIMTargetAttrib =
"udim"_UTsh;
128 myUseDistortionPruning =
true;
129 myDistortionThreshold = 3;
130 myUseOutputMissingGroup =
false;
131 myMissingPrimsGroup =
"distorted"_UTsh;
132 myPreserveExistingUVs =
false;
133 myUseOutputUnprocessedPrims =
false;
134 myUnprocessedPrimsGroup =
"unprocessed"_UTsh;
135 myUseOutputSeams =
false;
136 myOutputSeams =
"outputseams"_UTsh;
137 myUseOutputVoronoiCells =
false;
138 myOutputVoronoiCells =
"id"_UTsh;
139 myUseCopyPointAttribs =
false;
140 myCopyPointAttribs =
"* ^v ^Alpha ^N"_UTsh;
141 myUseOutputIndividualUVs =
false;
142 myOutputIndividualUVs =
"uv"_UTsh;
155 if (myGroup != src.myGroup)
return false;
156 if (myUVAttrib != src.myUVAttrib)
return false;
157 if (myLayoutMethod != src.myLayoutMethod)
return false;
158 if (myCenterPointsSource != src.myCenterPointsSource)
return false;
159 if (mySrcPoints != src.mySrcPoints)
return false;
160 if (myPointSelectionMethod != src.myPointSelectionMethod)
return false;
161 if (myAddAutomaticSources != src.myAddAutomaticSources)
return false;
162 if (myNAutomaticSources != src.myNAutomaticSources)
return false;
163 if (myAutomaticDistortionThreshold != src.myAutomaticDistortionThreshold)
return false;
164 if (myUseUp != src.myUseUp)
return false;
165 if (myUDirAttrib != src.myUDirAttrib)
return false;
166 if (myUseScale != src.myUseScale)
return false;
167 if (myLogScaleAttrib != src.myLogScaleAttrib)
return false;
168 if (myUsePScale != src.myUsePScale)
return false;
169 if (myLogScaleUniformAttrib != src.myLogScaleUniformAttrib)
return false;
170 if (myPackingMethod != src.myPackingMethod)
return false;
171 if (myBBoxCenter != src.myBBoxCenter)
return false;
172 if (myBBoxSize != src.myBBoxSize)
return false;
173 if (myUseUDIMTarget != src.myUseUDIMTarget)
return false;
174 if (myUDIMTargetAttrib != src.myUDIMTargetAttrib)
return false;
175 if (myNoneUVCenter != src.myNoneUVCenter)
return false;
176 if (myUseDistortionPruning != src.myUseDistortionPruning)
return false;
177 if (myDistortionThreshold != src.myDistortionThreshold)
return false;
178 if (myUseOutputMissingGroup != src.myUseOutputMissingGroup)
return false;
179 if (myMissingPrimsGroup != src.myMissingPrimsGroup)
return false;
180 if (myPreserveExistingUVs != src.myPreserveExistingUVs)
return false;
181 if (myUseOutputUnprocessedPrims != src.myUseOutputUnprocessedPrims)
return false;
182 if (myUnprocessedPrimsGroup != src.myUnprocessedPrimsGroup)
return false;
183 if (myUseOutputSeams != src.myUseOutputSeams)
return false;
184 if (myOutputSeams != src.myOutputSeams)
return false;
185 if (myUseOutputVoronoiCells != src.myUseOutputVoronoiCells)
return false;
186 if (myOutputVoronoiCells != src.myOutputVoronoiCells)
return false;
187 if (myUseCopyPointAttribs != src.myUseCopyPointAttribs)
return false;
188 if (myCopyPointAttribs != src.myCopyPointAttribs)
return false;
189 if (myUseOutputIndividualUVs != src.myUseOutputIndividualUVs)
return false;
190 if (myOutputIndividualUVs != src.myOutputIndividualUVs)
return false;
212 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
213 myUVAttrib =
"uv"_UTsh;
215 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, graph->
isDirect()?
nullptr:depnode);
218 graph->
evalOpParm(myLayoutMethod, nodeidx,
"method", time, graph->
isDirect()?
nullptr:depnode);
219 myCenterPointsSource = 0;
221 graph->
evalOpParm(myCenterPointsSource, nodeidx,
"centerpointsource", time, graph->
isDirect()?
nullptr:depnode);
222 mySrcPoints =
""_UTsh;
224 graph->
evalOpParm(mySrcPoints, nodeidx,
"srcpoints", time, graph->
isDirect()?
nullptr:depnode);
225 myPointSelectionMethod = 0;
227 graph->
evalOpParm(myPointSelectionMethod, nodeidx,
"automaticmethod", time, graph->
isDirect()?
nullptr:depnode);
228 myAddAutomaticSources =
false;
230 graph->
evalOpParm(myAddAutomaticSources, nodeidx,
"addautomaticsources", time, graph->
isDirect()?
nullptr:depnode);
231 myNAutomaticSources = 0;
232 if (
true && ( (
true&&!(((getAddAutomaticSources()==0)))) ) )
233 graph->
evalOpParm(myNAutomaticSources, nodeidx,
"nautomaticsources", time, graph->
isDirect()?
nullptr:depnode);
234 myAutomaticDistortionThreshold = 3;
235 if (
true && ( (
true&&!(((getAddAutomaticSources()==0))||((
int64(getPointSelectionMethod())!=1)))) ) )
236 graph->
evalOpParm(myAutomaticDistortionThreshold, nodeidx,
"automaticdistortionthreshold", time, graph->
isDirect()?
nullptr:depnode);
239 graph->
evalOpParm(myUseUp, nodeidx,
"useup", time, graph->
isDirect()?
nullptr:depnode);
240 myUDirAttrib =
"up"_UTsh;
241 if (
true && ( (
true&&!(((getUseUp()==0)))) ) )
242 graph->
evalOpParm(myUDirAttrib, nodeidx,
"up", time, graph->
isDirect()?
nullptr:depnode);
245 graph->
evalOpParm(myUseScale, nodeidx,
"usescale", time, graph->
isDirect()?
nullptr:depnode);
246 myLogScaleAttrib =
"scale"_UTsh;
247 if (
true && ( (
true&&!(((getUseScale()==0)))) ) )
248 graph->
evalOpParm(myLogScaleAttrib, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
251 graph->
evalOpParm(myUsePScale, nodeidx,
"usepscale", time, graph->
isDirect()?
nullptr:depnode);
252 myLogScaleUniformAttrib =
"pscale"_UTsh;
253 if (
true && ( (
true&&!(((getUsePScale()==0)))) ) )
254 graph->
evalOpParm(myLogScaleUniformAttrib, nodeidx,
"pscale", time, graph->
isDirect()?
nullptr:depnode);
257 graph->
evalOpParm(myPackingMethod, nodeidx,
"packingmethod", time, graph->
isDirect()?
nullptr:depnode);
259 if (
true && ( (
true&&!(((
int64(getPackingMethod())!=0)))) ) )
260 graph->
evalOpParm(myBBoxCenter, nodeidx,
"bboxcenter", time, graph->
isDirect()?
nullptr:depnode);
262 if (
true && ( (
true&&!(((
int64(getPackingMethod())!=0)))) ) )
263 graph->
evalOpParm(myBBoxSize, nodeidx,
"bboxsize", time, graph->
isDirect()?
nullptr:depnode);
264 myUseUDIMTarget =
false;
265 if (
true && ( (
true&&!(((
int64(getPackingMethod())!=1)))) ) )
266 graph->
evalOpParm(myUseUDIMTarget, nodeidx,
"useudimtarget", time, graph->
isDirect()?
nullptr:depnode);
267 myUDIMTargetAttrib =
"udim"_UTsh;
268 if (
true && ( (
true&&!(((getUseUDIMTarget()==0))||((
int64(getPackingMethod())!=1)))) ) )
269 graph->
evalOpParm(myUDIMTargetAttrib, nodeidx,
"udimtarget", time, graph->
isDirect()?
nullptr:depnode);
271 if (
true && ( (
true&&!(((
int64(getPackingMethod())!=2)))) ) )
272 graph->
evalOpParm(myNoneUVCenter, nodeidx,
"uvcenter", time, graph->
isDirect()?
nullptr:depnode);
273 myUseDistortionPruning =
true;
275 graph->
evalOpParm(myUseDistortionPruning, nodeidx,
"usedistortionpruning", time, graph->
isDirect()?
nullptr:depnode);
276 myDistortionThreshold = 3;
277 if (
true && ( (
true&&!(((getUseDistortionPruning()==0)))) ) )
278 graph->
evalOpParm(myDistortionThreshold, nodeidx,
"distortionthreshold", time, graph->
isDirect()?
nullptr:depnode);
279 myUseOutputMissingGroup =
false;
281 graph->
evalOpParm(myUseOutputMissingGroup, nodeidx,
"useoutputdistortedprims", time, graph->
isDirect()?
nullptr:depnode);
282 myMissingPrimsGroup =
"distorted"_UTsh;
283 if (
true && ( (
true&&!(((getUseOutputMissingGroup()==0)))) ) )
284 graph->
evalOpParm(myMissingPrimsGroup, nodeidx,
"distortedprims", time, graph->
isDirect()?
nullptr:depnode);
285 myPreserveExistingUVs =
false;
287 graph->
evalOpParm(myPreserveExistingUVs, nodeidx,
"preserveexistinguvs", time, graph->
isDirect()?
nullptr:depnode);
288 myUseOutputUnprocessedPrims =
false;
290 graph->
evalOpParm(myUseOutputUnprocessedPrims, nodeidx,
"useoutputunprocessedprims", time, graph->
isDirect()?
nullptr:depnode);
291 myUnprocessedPrimsGroup =
"unprocessed"_UTsh;
292 if (
true && ( (
true&&!(((getUseOutputUnprocessedPrims()==0)))) ) )
293 graph->
evalOpParm(myUnprocessedPrimsGroup, nodeidx,
"unprocessedprims", time, graph->
isDirect()?
nullptr:depnode);
294 myUseOutputSeams =
false;
295 if (
true && ( (
true&&!(((
int64(getLayoutMethod())==2)))) ) )
296 graph->
evalOpParm(myUseOutputSeams, nodeidx,
"useoutputseams", time, graph->
isDirect()?
nullptr:depnode);
297 myOutputSeams =
"outputseams"_UTsh;
298 if (
true && ( (
true&&!(((getUseOutputSeams()==0)&&(
int64(getLayoutMethod())!=2)))) ) )
299 graph->
evalOpParm(myOutputSeams, nodeidx,
"outputseams", time, graph->
isDirect()?
nullptr:depnode);
300 myUseOutputVoronoiCells =
false;
302 graph->
evalOpParm(myUseOutputVoronoiCells, nodeidx,
"useoutputislandnumber", time, graph->
isDirect()?
nullptr:depnode);
303 myOutputVoronoiCells =
"id"_UTsh;
304 if (
true && ( (
true&&!(((getUseOutputVoronoiCells()==0)))) ) )
305 graph->
evalOpParm(myOutputVoronoiCells, nodeidx,
"outputislandnumber", time, graph->
isDirect()?
nullptr:depnode);
306 myUseCopyPointAttribs =
false;
307 if (
true && ( (
true&&!(((
int64(getCenterPointsSource())==0))||((graph->
nInputs(nodeidx)<2)))) ) )
308 graph->
evalOpParm(myUseCopyPointAttribs, nodeidx,
"usecopypointattribs", time, graph->
isDirect()?
nullptr:depnode);
309 myCopyPointAttribs =
"* ^v ^Alpha ^N"_UTsh;
310 if (
true && ( (
true&&!(((getUseCopyPointAttribs()==0))||((
int64(getCenterPointsSource())==0)))) ) )
311 graph->
evalOpParm(myCopyPointAttribs, nodeidx,
"copypointattribs", time, graph->
isDirect()?
nullptr:depnode);
312 myUseOutputIndividualUVs =
false;
314 graph->
evalOpParm(myUseOutputIndividualUVs, nodeidx,
"createuvsetperpoint", time, graph->
isDirect()?
nullptr:depnode);
315 myOutputIndividualUVs =
"uv"_UTsh;
316 if (
true && ( (
true&&!(((getUseOutputIndividualUVs()==0)))) ) )
317 graph->
evalOpParm(myOutputIndividualUVs, nodeidx,
"uvsetprefix", time, graph->
isDirect()?
nullptr:depnode);
333 template <
typename T>
340 if (idx.
size() != instance.
size()+1)
345 coerceValue(value, myGroup);
348 coerceValue(value, myUVAttrib);
351 coerceValue(value, myLayoutMethod);
354 coerceValue(value, myCenterPointsSource);
357 coerceValue(value, mySrcPoints);
360 coerceValue(value, myPointSelectionMethod);
363 coerceValue(value, myAddAutomaticSources);
366 coerceValue(value, myNAutomaticSources);
369 coerceValue(value, myAutomaticDistortionThreshold);
372 coerceValue(value, myUseUp);
375 coerceValue(value, myUDirAttrib);
378 coerceValue(value, myUseScale);
381 coerceValue(value, myLogScaleAttrib);
384 coerceValue(value, myUsePScale);
387 coerceValue(value, myLogScaleUniformAttrib);
390 coerceValue(value, myPackingMethod);
393 coerceValue(value, myBBoxCenter);
396 coerceValue(value, myBBoxSize);
399 coerceValue(value, myUseUDIMTarget);
402 coerceValue(value, myUDIMTargetAttrib);
405 coerceValue(value, myNoneUVCenter);
408 coerceValue(value, myUseDistortionPruning);
411 coerceValue(value, myDistortionThreshold);
414 coerceValue(value, myUseOutputMissingGroup);
417 coerceValue(value, myMissingPrimsGroup);
420 coerceValue(value, myPreserveExistingUVs);
423 coerceValue(value, myUseOutputUnprocessedPrims);
426 coerceValue(value, myUnprocessedPrimsGroup);
429 coerceValue(value, myUseOutputSeams);
432 coerceValue(value, myOutputSeams);
435 coerceValue(value, myUseOutputVoronoiCells);
438 coerceValue(value, myOutputVoronoiCells);
441 coerceValue(value, myUseCopyPointAttribs);
444 coerceValue(value, myCopyPointAttribs);
447 coerceValue(value, myUseOutputIndividualUVs);
450 coerceValue(value, myOutputIndividualUVs);
466 { doGetParmValue(idx, instance, value); }
468 { doGetParmValue(idx, instance, value); }
470 { doGetParmValue(idx, instance, value); }
472 { doGetParmValue(idx, instance, value); }
474 { doGetParmValue(idx, instance, value); }
476 { doGetParmValue(idx, instance, value); }
478 { doGetParmValue(idx, instance, value); }
480 { doGetParmValue(idx, instance, value); }
482 { doGetParmValue(idx, instance, value); }
484 { doGetParmValue(idx, instance, value); }
486 { doGetParmValue(idx, instance, value); }
488 template <
typename T>
495 if (idx.
size() != instance.
size()+1)
500 coerceValue(myGroup, ( ( value ) ));
503 coerceValue(myUVAttrib, ( ( value ) ));
506 coerceValue(myLayoutMethod, clampMinValue(0, clampMaxValue(2, value ) ));
509 coerceValue(myCenterPointsSource, clampMinValue(0, clampMaxValue(1, value ) ));
512 coerceValue(mySrcPoints, ( ( value ) ));
515 coerceValue(myPointSelectionMethod, clampMinValue(0, clampMaxValue(1, value ) ));
518 coerceValue(myAddAutomaticSources, ( ( value ) ));
521 coerceValue(myNAutomaticSources, clampMinValue(0, ( value ) ));
524 coerceValue(myAutomaticDistortionThreshold, clampMinValue(1, ( value ) ));
527 coerceValue(myUseUp, ( ( value ) ));
530 coerceValue(myUDirAttrib, ( ( value ) ));
533 coerceValue(myUseScale, ( ( value ) ));
536 coerceValue(myLogScaleAttrib, ( ( value ) ));
539 coerceValue(myUsePScale, ( ( value ) ));
542 coerceValue(myLogScaleUniformAttrib, ( ( value ) ));
545 coerceValue(myPackingMethod, clampMinValue(0, clampMaxValue(2, value ) ));
548 coerceValue(myBBoxCenter, ( ( value ) ));
551 coerceValue(myBBoxSize, clampMinValue(0, ( value ) ));
554 coerceValue(myUseUDIMTarget, ( ( value ) ));
557 coerceValue(myUDIMTargetAttrib, ( ( value ) ));
560 coerceValue(myNoneUVCenter, ( ( value ) ));
563 coerceValue(myUseDistortionPruning, ( ( value ) ));
566 coerceValue(myDistortionThreshold, clampMinValue(1, ( value ) ));
569 coerceValue(myUseOutputMissingGroup, ( ( value ) ));
572 coerceValue(myMissingPrimsGroup, ( ( value ) ));
575 coerceValue(myPreserveExistingUVs, ( ( value ) ));
578 coerceValue(myUseOutputUnprocessedPrims, ( ( value ) ));
581 coerceValue(myUnprocessedPrimsGroup, ( ( value ) ));
584 coerceValue(myUseOutputSeams, ( ( value ) ));
587 coerceValue(myOutputSeams, ( ( value ) ));
590 coerceValue(myUseOutputVoronoiCells, ( ( value ) ));
593 coerceValue(myOutputVoronoiCells, ( ( value ) ));
596 coerceValue(myUseCopyPointAttribs, ( ( value ) ));
599 coerceValue(myCopyPointAttribs, ( ( value ) ));
602 coerceValue(myUseOutputIndividualUVs, ( ( value ) ));
605 coerceValue(myOutputIndividualUVs, ( ( value ) ));
612 { doSetParmValue(idx, instance, value); }
614 { doSetParmValue(idx, instance, value); }
616 { doSetParmValue(idx, instance, value); }
618 { doSetParmValue(idx, instance, value); }
620 { doSetParmValue(idx, instance, value); }
622 { doSetParmValue(idx, instance, value); }
624 { doSetParmValue(idx, instance, value); }
626 { doSetParmValue(idx, instance, value); }
628 { doSetParmValue(idx, instance, value); }
630 { doSetParmValue(idx, instance, value); }
632 { doSetParmValue(idx, instance, value); }
648 if (fieldnum.
size() < 1)
659 return "centerpointsource";
663 return "automaticmethod";
665 return "addautomaticsources";
667 return "nautomaticsources";
669 return "automaticdistortionthreshold";
683 return "packingmethod";
689 return "useudimtarget";
695 return "usedistortionpruning";
697 return "distortionthreshold";
699 return "useoutputdistortedprims";
701 return "distortedprims";
703 return "preserveexistinguvs";
705 return "useoutputunprocessedprims";
707 return "unprocessedprims";
709 return "useoutputseams";
711 return "outputseams";
713 return "useoutputislandnumber";
715 return "outputislandnumber";
717 return "usecopypointattribs";
719 return "copypointattribs";
721 return "createuvsetperpoint";
723 return "uvsetprefix";
731 if (fieldnum.
size() < 1)
732 return PARM_UNSUPPORTED;
809 return PARM_UNSUPPORTED;
845 loadData(is, rampdata);
863 int typelen = colon - data.
buffer();
877 {
int64 iv =
v; UTwrite(os, &iv); }
879 { UTwrite<fpreal64>(os, &
v); }
881 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
883 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
884 UTwrite<fpreal64>(os, &v.
z()); }
886 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
887 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
899 if (s) s->save(ostr);
901 saveData(os, result);
908 ostr << s->getDataTypeToken();
913 saveData(os, result);
917 void save(std::ostream &os)
const
921 saveData(os, myGroup);
922 saveData(os, myUVAttrib);
923 saveData(os, myLayoutMethod);
924 saveData(os, myCenterPointsSource);
925 saveData(os, mySrcPoints);
926 saveData(os, myPointSelectionMethod);
927 saveData(os, myAddAutomaticSources);
928 saveData(os, myNAutomaticSources);
929 saveData(os, myAutomaticDistortionThreshold);
930 saveData(os, myUseUp);
931 saveData(os, myUDirAttrib);
932 saveData(os, myUseScale);
933 saveData(os, myLogScaleAttrib);
934 saveData(os, myUsePScale);
935 saveData(os, myLogScaleUniformAttrib);
936 saveData(os, myPackingMethod);
937 saveData(os, myBBoxCenter);
938 saveData(os, myBBoxSize);
939 saveData(os, myUseUDIMTarget);
940 saveData(os, myUDIMTargetAttrib);
941 saveData(os, myNoneUVCenter);
942 saveData(os, myUseDistortionPruning);
943 saveData(os, myDistortionThreshold);
944 saveData(os, myUseOutputMissingGroup);
945 saveData(os, myMissingPrimsGroup);
946 saveData(os, myPreserveExistingUVs);
947 saveData(os, myUseOutputUnprocessedPrims);
948 saveData(os, myUnprocessedPrimsGroup);
949 saveData(os, myUseOutputSeams);
950 saveData(os, myOutputSeams);
951 saveData(os, myUseOutputVoronoiCells);
952 saveData(os, myOutputVoronoiCells);
953 saveData(os, myUseCopyPointAttribs);
954 saveData(os, myCopyPointAttribs);
955 saveData(os, myUseOutputIndividualUVs);
956 saveData(os, myOutputIndividualUVs);
969 loadData(is, myGroup);
970 loadData(is, myUVAttrib);
971 loadData(is, myLayoutMethod);
972 loadData(is, myCenterPointsSource);
973 loadData(is, mySrcPoints);
974 loadData(is, myPointSelectionMethod);
975 loadData(is, myAddAutomaticSources);
976 loadData(is, myNAutomaticSources);
977 loadData(is, myAutomaticDistortionThreshold);
978 loadData(is, myUseUp);
979 loadData(is, myUDirAttrib);
980 loadData(is, myUseScale);
981 loadData(is, myLogScaleAttrib);
982 loadData(is, myUsePScale);
983 loadData(is, myLogScaleUniformAttrib);
984 loadData(is, myPackingMethod);
985 loadData(is, myBBoxCenter);
986 loadData(is, myBBoxSize);
987 loadData(is, myUseUDIMTarget);
988 loadData(is, myUDIMTargetAttrib);
989 loadData(is, myNoneUVCenter);
990 loadData(is, myUseDistortionPruning);
991 loadData(is, myDistortionThreshold);
992 loadData(is, myUseOutputMissingGroup);
993 loadData(is, myMissingPrimsGroup);
994 loadData(is, myPreserveExistingUVs);
995 loadData(is, myUseOutputUnprocessedPrims);
996 loadData(is, myUnprocessedPrimsGroup);
997 loadData(is, myUseOutputSeams);
998 loadData(is, myOutputSeams);
999 loadData(is, myUseOutputVoronoiCells);
1000 loadData(is, myOutputVoronoiCells);
1001 loadData(is, myUseCopyPointAttribs);
1002 loadData(is, myCopyPointAttribs);
1003 loadData(is, myUseOutputIndividualUVs);
1004 loadData(is, myOutputIndividualUVs);
1014 if (!thissop)
return getGroup();
1016 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
1024 if (!thissop)
return getUVAttrib();
1026 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
1034 if (!thissop)
return getLayoutMethod();
1036 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
1044 if (!thissop)
return getCenterPointsSource();
1046 OP_Utils::evalOpParm(result, thissop,
"centerpointsource", cookparms.
getCookTime(), 0);
1054 if (!thissop)
return getSrcPoints();
1056 OP_Utils::evalOpParm(result, thissop,
"srcpoints", cookparms.
getCookTime(), 0);
1064 if (!thissop)
return getPointSelectionMethod();
1066 OP_Utils::evalOpParm(result, thissop,
"automaticmethod", cookparms.
getCookTime(), 0);
1074 if (!thissop)
return getAddAutomaticSources();
1076 OP_Utils::evalOpParm(result, thissop,
"addautomaticsources", cookparms.
getCookTime(), 0);
1084 if (!thissop)
return getNAutomaticSources();
1086 OP_Utils::evalOpParm(result, thissop,
"nautomaticsources", cookparms.
getCookTime(), 0);
1094 if (!thissop)
return getAutomaticDistortionThreshold();
1096 OP_Utils::evalOpParm(result, thissop,
"automaticdistortionthreshold", cookparms.
getCookTime(), 0);
1104 if (!thissop)
return getUseUp();
1106 OP_Utils::evalOpParm(result, thissop,
"useup", cookparms.
getCookTime(), 0);
1114 if (!thissop)
return getUDirAttrib();
1116 OP_Utils::evalOpParm(result, thissop,
"up", cookparms.
getCookTime(), 0);
1124 if (!thissop)
return getUseScale();
1126 OP_Utils::evalOpParm(result, thissop,
"usescale", cookparms.
getCookTime(), 0);
1134 if (!thissop)
return getLogScaleAttrib();
1136 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
1144 if (!thissop)
return getUsePScale();
1146 OP_Utils::evalOpParm(result, thissop,
"usepscale", cookparms.
getCookTime(), 0);
1154 if (!thissop)
return getLogScaleUniformAttrib();
1156 OP_Utils::evalOpParm(result, thissop,
"pscale", cookparms.
getCookTime(), 0);
1164 if (!thissop)
return getPackingMethod();
1166 OP_Utils::evalOpParm(result, thissop,
"packingmethod", cookparms.
getCookTime(), 0);
1174 if (!thissop)
return getBBoxCenter();
1176 OP_Utils::evalOpParm(result, thissop,
"bboxcenter", cookparms.
getCookTime(), 0);
1184 if (!thissop)
return getBBoxSize();
1186 OP_Utils::evalOpParm(result, thissop,
"bboxsize", cookparms.
getCookTime(), 0);
1194 if (!thissop)
return getUseUDIMTarget();
1196 OP_Utils::evalOpParm(result, thissop,
"useudimtarget", cookparms.
getCookTime(), 0);
1204 if (!thissop)
return getUDIMTargetAttrib();
1206 OP_Utils::evalOpParm(result, thissop,
"udimtarget", cookparms.
getCookTime(), 0);
1214 if (!thissop)
return getNoneUVCenter();
1216 OP_Utils::evalOpParm(result, thissop,
"uvcenter", cookparms.
getCookTime(), 0);
1224 if (!thissop)
return getUseDistortionPruning();
1226 OP_Utils::evalOpParm(result, thissop,
"usedistortionpruning", cookparms.
getCookTime(), 0);
1234 if (!thissop)
return getDistortionThreshold();
1236 OP_Utils::evalOpParm(result, thissop,
"distortionthreshold", cookparms.
getCookTime(), 0);
1244 if (!thissop)
return getUseOutputMissingGroup();
1246 OP_Utils::evalOpParm(result, thissop,
"useoutputdistortedprims", cookparms.
getCookTime(), 0);
1254 if (!thissop)
return getMissingPrimsGroup();
1256 OP_Utils::evalOpParm(result, thissop,
"distortedprims", cookparms.
getCookTime(), 0);
1264 if (!thissop)
return getPreserveExistingUVs();
1266 OP_Utils::evalOpParm(result, thissop,
"preserveexistinguvs", cookparms.
getCookTime(), 0);
1274 if (!thissop)
return getUseOutputUnprocessedPrims();
1276 OP_Utils::evalOpParm(result, thissop,
"useoutputunprocessedprims", cookparms.
getCookTime(), 0);
1284 if (!thissop)
return getUnprocessedPrimsGroup();
1286 OP_Utils::evalOpParm(result, thissop,
"unprocessedprims", cookparms.
getCookTime(), 0);
1294 if (!thissop)
return getUseOutputSeams();
1296 OP_Utils::evalOpParm(result, thissop,
"useoutputseams", cookparms.
getCookTime(), 0);
1304 if (!thissop)
return getOutputSeams();
1306 OP_Utils::evalOpParm(result, thissop,
"outputseams", cookparms.
getCookTime(), 0);
1314 if (!thissop)
return getUseOutputVoronoiCells();
1316 OP_Utils::evalOpParm(result, thissop,
"useoutputislandnumber", cookparms.
getCookTime(), 0);
1324 if (!thissop)
return getOutputVoronoiCells();
1326 OP_Utils::evalOpParm(result, thissop,
"outputislandnumber", cookparms.
getCookTime(), 0);
1334 if (!thissop)
return getUseCopyPointAttribs();
1336 OP_Utils::evalOpParm(result, thissop,
"usecopypointattribs", cookparms.
getCookTime(), 0);
1344 if (!thissop)
return getCopyPointAttribs();
1346 OP_Utils::evalOpParm(result, thissop,
"copypointattribs", cookparms.
getCookTime(), 0);
1354 if (!thissop)
return getUseOutputIndividualUVs();
1356 OP_Utils::evalOpParm(result, thissop,
"createuvsetperpoint", cookparms.
getCookTime(), 0);
1364 if (!thissop)
return getOutputIndividualUVs();
1366 OP_Utils::evalOpParm(result, thissop,
"uvsetprefix", cookparms.
getCookTime(), 0);
1373 int64 myLayoutMethod;
1374 int64 myCenterPointsSource;
1376 int64 myPointSelectionMethod;
1377 bool myAddAutomaticSources;
1378 int64 myNAutomaticSources;
1379 fpreal64 myAutomaticDistortionThreshold;
1386 int64 myPackingMethod;
1389 bool myUseUDIMTarget;
1392 bool myUseDistortionPruning;
1394 bool myUseOutputMissingGroup;
1396 bool myPreserveExistingUVs;
1397 bool myUseOutputUnprocessedPrims;
1399 bool myUseOutputSeams;
1401 bool myUseOutputVoronoiCells;
1403 bool myUseCopyPointAttribs;
1405 bool myUseOutputIndividualUVs;
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int64 getNAutomaticSources() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setUsePScale(bool val)
void setLogScaleUniformAttrib(const UT_StringHolder &val)
void setNoneUVCenter(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
SOP_Node * getNode() const
const UT_StringHolder & getGroup() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getMissingPrimsGroup() const
const UT_StringHolder & getOutputSeams() const
void setPreserveExistingUVs(bool val)
void setUnprocessedPrimsGroup(const UT_StringHolder &val)
void setOutputSeams(const UT_StringHolder &val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
bool load(UT_IStream &is)
UT_Vector2T< fpreal64 > UT_Vector2D
UT_StringHolder opLogScaleUniformAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
GLsizei const GLfloat * value
void setUseOutputIndividualUVs(bool val)
void setAddAutomaticSources(bool val)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool getUseOutputMissingGroup() const
void setOutputIndividualUVs(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getLogScaleUniformAttrib() const
An output stream object that owns its own string buffer storage.
bool getUseOutputIndividualUVs() const
void setPointSelectionMethod(PointSelectionMethod val)
CenterPointsSource getCenterPointsSource() const
const UT_StringHolder & getUDirAttrib() const
**But if you need a result
void setUDirAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_Vector2D opBBoxSize(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opOutputIndividualUVs(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSrcPoints() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getUseDistortionPruning() const
bool opAddAutomaticSources(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
PackingMethod getPackingMethod() const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool opUseUDIMTarget(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_StringHolder opOutputVoronoiCells(const SOP_NodeVerb::CookParms &cookparms) const
void setUseOutputMissingGroup(bool val)
const UT_StringHolder & getLogScaleAttrib() const
UT_Vector2D getBBoxCenter() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getUseOutputVoronoiCells() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opUseOutputUnprocessedPrims(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, int64 &v)
void setUseOutputVoronoiCells(bool val)
PointSelectionMethod opPointSelectionMethod(const SOP_NodeVerb::CookParms &cookparms) const
void setLogScaleAttrib(const UT_StringHolder &val)
void setUseScale(bool val)
bool opUsePScale(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseCopyPointAttribs() const
void setLayoutMethod(LayoutMethod val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
const char * getNestParmName(TempIndex fieldnum) const override
bool getUseOutputSeams() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setMissingPrimsGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getUVAttrib() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opCopyPointAttribs(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opNoneUVCenter(const SOP_NodeVerb::CookParms &cookparms) const
void setAutomaticDistortionThreshold(fpreal64 val)
const OP_GraphProxy * graph() const
bool operator==(const SOP_UVFlattenFromPointsParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setUVAttrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setUseOutputUnprocessedPrims(bool val)
void setPackingMethod(PackingMethod val)
bool operator!=(const SOP_UVFlattenFromPointsParms &src) const
void setCopyPointAttribs(const UT_StringHolder &val)
void setUseCopyPointAttribs(bool val)
fpreal64 opAutomaticDistortionThreshold(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setUDIMTargetAttrib(const UT_StringHolder &val)
UT_Vector2D getNoneUVCenter() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE UT_StringHolder getToken(LayoutMethod enum_value)
CenterPointsSource opCenterPointsSource(const SOP_NodeVerb::CookParms &cookparms) const
LayoutMethod getLayoutMethod() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setUseOutputSeams(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool opUseOutputIndividualUVs(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
void setBBoxCenter(UT_Vector2D val)
UT_StringHolder opSrcPoints(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
virtual int nInputs(NodeIdx idx) const =0
static void loadData(UT_IStream &is, fpreal64 &v)
bool isParmColorRamp(exint idx) const override
UT_StringHolder opUDIMTargetAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputVoronoiCells() const
bool getAddAutomaticSources() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getPreserveExistingUVs() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool getUsePScale() const
void setCenterPointsSource(CenterPointsSource val)
DEP_MicroNode * depnode() const
UT_StringHolder opUnprocessedPrimsGroup(const SOP_NodeVerb::CookParms &cookparms) const
PackingMethod opPackingMethod(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setOutputVoronoiCells(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_Vector4D v)
virtual UT_StringHolder baseGetSignature() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opUseUp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
LayoutMethod opLayoutMethod(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getCopyPointAttribs() const
UT_StringHolder opLogScaleAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal getCookTime() const
const UT_StringHolder & getUDIMTargetAttrib() const
bool opUseOutputVoronoiCells(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
PointSelectionMethod getPointSelectionMethod() const
const char * findChar(int c) const
bool opUseScale(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseOutputUnprocessedPrims() const
void setUseDistortionPruning(bool val)
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getAutomaticDistortionThreshold() const
bool opPreserveExistingUVs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, int64 v)
void setUseUDIMTarget(bool val)
UT_StringHolder opMissingPrimsGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
SOP_UVFlattenFromPointsParms()
void setDistortionThreshold(fpreal64 val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_Vector2D opBBoxCenter(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputIndividualUVs() const
void setSrcPoints(const UT_StringHolder &val)
bool opUseCopyPointAttribs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opDistortionThreshold(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseUDIMTarget() const
fpreal64 getDistortionThreshold() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opUseDistortionPruning(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opUDirAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputMissingGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
ParmType getNestParmType(TempIndex fieldnum) const override
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_Vector2D getBBoxSize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setBBoxSize(UT_Vector2D val)
void setNAutomaticSources(int64 val)
int64 opNAutomaticSources(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getUnprocessedPrimsGroup() const