23 namespace SOP_PolyReduce_2_0Enums
36 using namespace UT::Literal;
71 if (attribname != src.
attribname)
return false;
88 for (
int i = 0; i < list.
entries(); i++)
94 buf.
appendSprintf(
"%s", (list(i).attribenabled) ?
"true" :
"false");
114 myReducePassedTarget =
false;
115 myQualityToleance = 1e-5;
116 myUseNormalDevThreshold =
false;
117 myNormalDevThreshold = 90;
118 myOriginalPoints =
false;
119 myPreserveQuads =
false;
120 myEqualizeLengths = 1e-10;
121 myBoundaryWeight = 1;
122 myVAttribSeamWeight = 1;
123 mySeamAttribs =
"* ^N"_UTsh;
124 myHardFeaturePoints =
""_UTsh;
125 myHardFeatureEdges =
""_UTsh;
126 mySoftFeaturePoints =
""_UTsh;
127 mySoftFeaturePointWeight = 1;
128 mySoftFeatureEdges =
""_UTsh;
129 mySoftFeatureEdgeWeight = 1;
130 myUseRetainAttrib =
false;
131 myRetainAttrib =
"retention"_UTsh;
133 mySilhouetteWeight = 1;
134 myUseSilhouetteFalloff =
false;
135 mySilhouetteFalloffDist = 1;
136 myFrontFacingWeight = 1;
137 myUseFrontFacingFalloff =
false;
138 myFrontFacingFalloffDist = 1;
139 myControlattribs.setSize(0);
152 if (myGroup != src.myGroup)
return false;
153 if (myTarget != src.myTarget)
return false;
154 if (myPercentage != src.myPercentage)
return false;
155 if (myFinalCount != src.myFinalCount)
return false;
156 if (myReducePassedTarget != src.myReducePassedTarget)
return false;
157 if (myQualityToleance != src.myQualityToleance)
return false;
158 if (myUseNormalDevThreshold != src.myUseNormalDevThreshold)
return false;
159 if (myNormalDevThreshold != src.myNormalDevThreshold)
return false;
160 if (myOriginalPoints != src.myOriginalPoints)
return false;
161 if (myPreserveQuads != src.myPreserveQuads)
return false;
162 if (myEqualizeLengths != src.myEqualizeLengths)
return false;
163 if (myBoundaryWeight != src.myBoundaryWeight)
return false;
164 if (myVAttribSeamWeight != src.myVAttribSeamWeight)
return false;
165 if (mySeamAttribs != src.mySeamAttribs)
return false;
166 if (myHardFeaturePoints != src.myHardFeaturePoints)
return false;
167 if (myHardFeatureEdges != src.myHardFeatureEdges)
return false;
168 if (mySoftFeaturePoints != src.mySoftFeaturePoints)
return false;
169 if (mySoftFeaturePointWeight != src.mySoftFeaturePointWeight)
return false;
170 if (mySoftFeatureEdges != src.mySoftFeatureEdges)
return false;
171 if (mySoftFeatureEdgeWeight != src.mySoftFeatureEdgeWeight)
return false;
172 if (myUseRetainAttrib != src.myUseRetainAttrib)
return false;
173 if (myRetainAttrib != src.myRetainAttrib)
return false;
174 if (myRetainWeight != src.myRetainWeight)
return false;
175 if (mySilhouetteWeight != src.mySilhouetteWeight)
return false;
176 if (myUseSilhouetteFalloff != src.myUseSilhouetteFalloff)
return false;
177 if (mySilhouetteFalloffDist != src.mySilhouetteFalloffDist)
return false;
178 if (myFrontFacingWeight != src.myFrontFacingWeight)
return false;
179 if (myUseFrontFacingFalloff != src.myUseFrontFacingFalloff)
return false;
180 if (myFrontFacingFalloffDist != src.myFrontFacingFalloffDist)
return false;
181 if (myControlattribs != src.myControlattribs)
return false;
200 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
203 graph->
evalOpParm(myTarget, nodeidx,
"target", time, graph->
isDirect()?
nullptr:depnode);
205 if (
true && ( (
true&&!(((
int64(getTarget())==2))||((
int64(getTarget())==3)))) ) )
206 graph->
evalOpParm(myPercentage, nodeidx,
"percentage", time, graph->
isDirect()?
nullptr:depnode);
208 if (
true && ( (
true&&!(((
int64(getTarget())==0))||((
int64(getTarget())==1)))) ) )
209 graph->
evalOpParm(myFinalCount, nodeidx,
"finalcount", time, graph->
isDirect()?
nullptr:depnode);
210 myReducePassedTarget =
false;
212 graph->
evalOpParm(myReducePassedTarget, nodeidx,
"reducepassedtarget", time, graph->
isDirect()?
nullptr:depnode);
213 myQualityToleance = 1e-5;
214 if (
true && ( (
true&&!(((getReducePassedTarget()==0)))) ) )
215 graph->
evalOpParm(myQualityToleance, nodeidx,
"qualitytolerance", time, graph->
isDirect()?
nullptr:depnode);
216 myUseNormalDevThreshold =
false;
218 graph->
evalOpParm(myUseNormalDevThreshold, nodeidx,
"usenormaldevthreshold", time, graph->
isDirect()?
nullptr:depnode);
219 myNormalDevThreshold = 90;
220 if (
true && ( (
true&&!(((getUseNormalDevThreshold()==0)))) ) )
221 graph->
evalOpParm(myNormalDevThreshold, nodeidx,
"normaldevthreshold", time, graph->
isDirect()?
nullptr:depnode);
222 myOriginalPoints =
false;
224 graph->
evalOpParm(myOriginalPoints, nodeidx,
"originalpoints", time, graph->
isDirect()?
nullptr:depnode);
225 myPreserveQuads =
false;
227 graph->
evalOpParm(myPreserveQuads, nodeidx,
"preservequads", time, graph->
isDirect()?
nullptr:depnode);
228 myEqualizeLengths = 1e-10;
230 graph->
evalOpParm(myEqualizeLengths, nodeidx,
"equalizelengths", time, graph->
isDirect()?
nullptr:depnode);
231 myBoundaryWeight = 1;
233 graph->
evalOpParm(myBoundaryWeight, nodeidx,
"boundaryweight", time, graph->
isDirect()?
nullptr:depnode);
234 myVAttribSeamWeight = 1;
236 graph->
evalOpParm(myVAttribSeamWeight, nodeidx,
"vattribseamweight", time, graph->
isDirect()?
nullptr:depnode);
237 mySeamAttribs =
"* ^N"_UTsh;
238 if (
true && ( (
true&&!(((getVAttribSeamWeight()==0)))) ) )
239 graph->
evalOpParm(mySeamAttribs, nodeidx,
"seamattribs", time, graph->
isDirect()?
nullptr:depnode);
240 myHardFeaturePoints =
""_UTsh;
242 graph->
evalOpParm(myHardFeaturePoints, nodeidx,
"hardfeaturepoints", time, graph->
isDirect()?
nullptr:depnode);
243 myHardFeatureEdges =
""_UTsh;
245 graph->
evalOpParm(myHardFeatureEdges, nodeidx,
"hardfeatureedges", time, graph->
isDirect()?
nullptr:depnode);
246 mySoftFeaturePoints =
""_UTsh;
248 graph->
evalOpParm(mySoftFeaturePoints, nodeidx,
"softfeaturepoints", time, graph->
isDirect()?
nullptr:depnode);
249 mySoftFeaturePointWeight = 1;
251 graph->
evalOpParm(mySoftFeaturePointWeight, nodeidx,
"softfeaturepointweight", time, graph->
isDirect()?
nullptr:depnode);
252 mySoftFeatureEdges =
""_UTsh;
254 graph->
evalOpParm(mySoftFeatureEdges, nodeidx,
"softfeatureedges", time, graph->
isDirect()?
nullptr:depnode);
255 mySoftFeatureEdgeWeight = 1;
257 graph->
evalOpParm(mySoftFeatureEdgeWeight, nodeidx,
"softfeatureedgeweight", time, graph->
isDirect()?
nullptr:depnode);
258 myUseRetainAttrib =
false;
260 graph->
evalOpParm(myUseRetainAttrib, nodeidx,
"useretainattrib", time, graph->
isDirect()?
nullptr:depnode);
261 myRetainAttrib =
"retention"_UTsh;
262 if (
true && ( (
true&&!(((getUseRetainAttrib()==0)))) ) )
263 graph->
evalOpParm(myRetainAttrib, nodeidx,
"retainattrib", time, graph->
isDirect()?
nullptr:depnode);
265 if (
true && ( (
true&&!(((getUseRetainAttrib()==0)))) ) )
266 graph->
evalOpParm(myRetainWeight, nodeidx,
"retainattribweight", time, graph->
isDirect()?
nullptr:depnode);
267 mySilhouetteWeight = 1;
268 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
269 graph->
evalOpParm(mySilhouetteWeight, nodeidx,
"silhouetteweight", time, graph->
isDirect()?
nullptr:depnode);
270 myUseSilhouetteFalloff =
false;
271 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
272 graph->
evalOpParm(myUseSilhouetteFalloff, nodeidx,
"usesilhouettefalloff", time, graph->
isDirect()?
nullptr:depnode);
273 mySilhouetteFalloffDist = 1;
274 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0))||((getUseSilhouetteFalloff()==0)))) ) )
275 graph->
evalOpParm(mySilhouetteFalloffDist, nodeidx,
"silhouettefalloffdist", time, graph->
isDirect()?
nullptr:depnode);
276 myFrontFacingWeight = 1;
277 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
278 graph->
evalOpParm(myFrontFacingWeight, nodeidx,
"frontfacingweight", time, graph->
isDirect()?
nullptr:depnode);
279 myUseFrontFacingFalloff =
false;
280 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
281 graph->
evalOpParm(myUseFrontFacingFalloff, nodeidx,
"usefrontfacingfalloff", time, graph->
isDirect()?
nullptr:depnode);
282 myFrontFacingFalloffDist = 1;
283 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0))||((getUseFrontFacingFalloff()==0)))) ) )
284 graph->
evalOpParm(myFrontFacingFalloffDist, nodeidx,
"frontfacingfalloffdist", time, graph->
isDirect()?
nullptr:depnode);
288 graph->
evalOpParm(length, nodeidx,
"controlattribs", time, graph->
isDirect()?
nullptr:depnode);
289 if (length < 0) length = 0;
290 myControlattribs.setSize(length);
297 auto && _curentry = myControlattribs(i);
299 _curentry.attribenabled =
true;
301 graph->
evalOpParmInst(_curentry.attribenabled, nodeidx,
"attribenabled#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
302 _curentry.attribname =
""_UTsh;
303 if (
true && ( (
true&&!(((_curentry.attribenabled==0)))) ) )
304 graph->
evalOpParmInst(_curentry.attribname, nodeidx,
"attribname#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
305 _curentry.attribweight = 1;
306 if (
true && ( (
true&&!(((_curentry.attribenabled==0)))) ) )
307 graph->
evalOpParmInst(_curentry.attribweight, nodeidx,
"attribweight#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
312 myControlattribs.clear();
328 template <
typename T>
335 if (idx.
size() != instance.
size()+1)
340 coerceValue(value, myGroup);
343 coerceValue(value, myTarget);
346 coerceValue(value, myPercentage);
349 coerceValue(value, myFinalCount);
352 coerceValue(value, myReducePassedTarget);
355 coerceValue(value, myQualityToleance);
358 coerceValue(value, myUseNormalDevThreshold);
361 coerceValue(value, myNormalDevThreshold);
364 coerceValue(value, myOriginalPoints);
367 coerceValue(value, myPreserveQuads);
370 coerceValue(value, myEqualizeLengths);
373 coerceValue(value, myBoundaryWeight);
376 coerceValue(value, myVAttribSeamWeight);
379 coerceValue(value, mySeamAttribs);
382 coerceValue(value, myHardFeaturePoints);
385 coerceValue(value, myHardFeatureEdges);
388 coerceValue(value, mySoftFeaturePoints);
391 coerceValue(value, mySoftFeaturePointWeight);
394 coerceValue(value, mySoftFeatureEdges);
397 coerceValue(value, mySoftFeatureEdgeWeight);
400 coerceValue(value, myUseRetainAttrib);
403 coerceValue(value, myRetainAttrib);
406 coerceValue(value, myRetainWeight);
409 coerceValue(value, mySilhouetteWeight);
412 coerceValue(value, myUseSilhouetteFalloff);
415 coerceValue(value, mySilhouetteFalloffDist);
418 coerceValue(value, myFrontFacingWeight);
421 coerceValue(value, myUseFrontFacingFalloff);
424 coerceValue(value, myFrontFacingFalloffDist);
428 coerceValue(value, myControlattribs.entries());
429 else if (instance[0] < myControlattribs.entries())
431 auto && _data = myControlattribs(instance[0]);
435 coerceValue(value, _data.attribenabled);
438 coerceValue(value, _data.attribname);
441 coerceValue(value, _data.attribweight);
461 { doGetParmValue(idx, instance, value); }
463 { doGetParmValue(idx, instance, value); }
465 { doGetParmValue(idx, instance, value); }
467 { doGetParmValue(idx, instance, value); }
469 { doGetParmValue(idx, instance, value); }
471 { doGetParmValue(idx, instance, value); }
473 { doGetParmValue(idx, instance, value); }
475 { doGetParmValue(idx, instance, value); }
477 { doGetParmValue(idx, instance, value); }
479 { doGetParmValue(idx, instance, value); }
481 { doGetParmValue(idx, instance, value); }
483 template <
typename T>
490 if (idx.
size() != instance.
size()+1)
495 coerceValue(myGroup, ( ( value ) ));
498 coerceValue(myTarget, clampMinValue(0, clampMaxValue(3, value ) ));
501 coerceValue(myPercentage, clampMinValue(0, clampMaxValue(100, value ) ));
504 coerceValue(myFinalCount, clampMinValue(1, ( value ) ));
507 coerceValue(myReducePassedTarget, ( ( value ) ));
510 coerceValue(myQualityToleance, clampMinValue(0, ( value ) ));
513 coerceValue(myUseNormalDevThreshold, ( ( value ) ));
516 coerceValue(myNormalDevThreshold, clampMinValue(0, clampMaxValue(180, value ) ));
519 coerceValue(myOriginalPoints, ( ( value ) ));
522 coerceValue(myPreserveQuads, ( ( value ) ));
525 coerceValue(myEqualizeLengths, clampMinValue(0, ( value ) ));
528 coerceValue(myBoundaryWeight, ( ( value ) ));
531 coerceValue(myVAttribSeamWeight, ( ( value ) ));
534 coerceValue(mySeamAttribs, ( ( value ) ));
537 coerceValue(myHardFeaturePoints, ( ( value ) ));
540 coerceValue(myHardFeatureEdges, ( ( value ) ));
543 coerceValue(mySoftFeaturePoints, ( ( value ) ));
546 coerceValue(mySoftFeaturePointWeight, ( ( value ) ));
549 coerceValue(mySoftFeatureEdges, ( ( value ) ));
552 coerceValue(mySoftFeatureEdgeWeight, ( ( value ) ));
555 coerceValue(myUseRetainAttrib, ( ( value ) ));
558 coerceValue(myRetainAttrib, ( ( value ) ));
561 coerceValue(myRetainWeight, ( ( value ) ));
564 coerceValue(mySilhouetteWeight, ( ( value ) ));
567 coerceValue(myUseSilhouetteFalloff, ( ( value ) ));
570 coerceValue(mySilhouetteFalloffDist, clampMinValue(0, ( value ) ));
573 coerceValue(myFrontFacingWeight, ( ( value ) ));
576 coerceValue(myUseFrontFacingFalloff, ( ( value ) ));
579 coerceValue(myFrontFacingFalloffDist, clampMinValue(0, ( value ) ));
585 coerceValue(newsize, value);
586 if (newsize < 0) newsize = 0;
587 myControlattribs.setSize(newsize);
593 myControlattribs.setSizeIfNeeded(instance[0]+1);
594 auto && _data = myControlattribs(instance[0]);
598 coerceValue(_data.attribenabled, value);
601 coerceValue(_data.attribname, value);
604 coerceValue(_data.attribweight, value);
615 { doSetParmValue(idx, instance, value); }
617 { doSetParmValue(idx, instance, value); }
619 { doSetParmValue(idx, instance, value); }
621 { doSetParmValue(idx, instance, value); }
623 { doSetParmValue(idx, instance, value); }
625 { doSetParmValue(idx, instance, value); }
627 { doSetParmValue(idx, instance, value); }
629 { doSetParmValue(idx, instance, value); }
631 { doSetParmValue(idx, instance, value); }
633 { doSetParmValue(idx, instance, value); }
635 { doSetParmValue(idx, instance, value); }
653 if (fieldnum.
size() < 1)
666 return "reducepassedtarget";
668 return "qualitytolerance";
670 return "usenormaldevthreshold";
672 return "normaldevthreshold";
674 return "originalpoints";
676 return "preservequads";
678 return "equalizelengths";
680 return "boundaryweight";
682 return "vattribseamweight";
684 return "seamattribs";
686 return "hardfeaturepoints";
688 return "hardfeatureedges";
690 return "softfeaturepoints";
692 return "softfeaturepointweight";
694 return "softfeatureedges";
696 return "softfeatureedgeweight";
698 return "useretainattrib";
700 return "retainattrib";
702 return "retainattribweight";
704 return "silhouetteweight";
706 return "usesilhouettefalloff";
708 return "silhouettefalloffdist";
710 return "frontfacingweight";
712 return "usefrontfacingfalloff";
714 return "frontfacingfalloffdist";
716 if (fieldnum.
size() == 1)
717 return "controlattribs";
721 return "attribenabled#";
723 return "attribname#";
725 return "attribweight#";
736 if (fieldnum.
size() < 1)
737 return PARM_UNSUPPORTED;
799 if (fieldnum.
size() == 1)
800 return PARM_MULTIPARM;
811 return PARM_UNSUPPORTED;
814 return PARM_UNSUPPORTED;
850 loadData(is, rampdata);
868 int typelen = colon - data.
buffer();
882 {
int64 iv =
v; UTwrite(os, &iv); }
884 { UTwrite<fpreal64>(os, &
v); }
886 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
888 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
889 UTwrite<fpreal64>(os, &v.
z()); }
891 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
892 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
904 if (s) s->save(ostr);
906 saveData(os, result);
913 ostr << s->getDataTypeToken();
918 saveData(os, result);
922 void save(std::ostream &os)
const
926 saveData(os, myGroup);
927 saveData(os, myTarget);
928 saveData(os, myPercentage);
929 saveData(os, myFinalCount);
930 saveData(os, myReducePassedTarget);
931 saveData(os, myQualityToleance);
932 saveData(os, myUseNormalDevThreshold);
933 saveData(os, myNormalDevThreshold);
934 saveData(os, myOriginalPoints);
935 saveData(os, myPreserveQuads);
936 saveData(os, myEqualizeLengths);
937 saveData(os, myBoundaryWeight);
938 saveData(os, myVAttribSeamWeight);
939 saveData(os, mySeamAttribs);
940 saveData(os, myHardFeaturePoints);
941 saveData(os, myHardFeatureEdges);
942 saveData(os, mySoftFeaturePoints);
943 saveData(os, mySoftFeaturePointWeight);
944 saveData(os, mySoftFeatureEdges);
945 saveData(os, mySoftFeatureEdgeWeight);
946 saveData(os, myUseRetainAttrib);
947 saveData(os, myRetainAttrib);
948 saveData(os, myRetainWeight);
949 saveData(os, mySilhouetteWeight);
950 saveData(os, myUseSilhouetteFalloff);
951 saveData(os, mySilhouetteFalloffDist);
952 saveData(os, myFrontFacingWeight);
953 saveData(os, myUseFrontFacingFalloff);
954 saveData(os, myFrontFacingFalloffDist);
957 UTwrite(os, &length);
960 auto && _curentry = myControlattribs(i);
962 saveData(os, _curentry.attribenabled);
963 saveData(os, _curentry.attribname);
964 saveData(os, _curentry.attribweight);
980 loadData(is, myGroup);
981 loadData(is, myTarget);
982 loadData(is, myPercentage);
983 loadData(is, myFinalCount);
984 loadData(is, myReducePassedTarget);
985 loadData(is, myQualityToleance);
986 loadData(is, myUseNormalDevThreshold);
987 loadData(is, myNormalDevThreshold);
988 loadData(is, myOriginalPoints);
989 loadData(is, myPreserveQuads);
990 loadData(is, myEqualizeLengths);
991 loadData(is, myBoundaryWeight);
992 loadData(is, myVAttribSeamWeight);
993 loadData(is, mySeamAttribs);
994 loadData(is, myHardFeaturePoints);
995 loadData(is, myHardFeatureEdges);
996 loadData(is, mySoftFeaturePoints);
997 loadData(is, mySoftFeaturePointWeight);
998 loadData(is, mySoftFeatureEdges);
999 loadData(is, mySoftFeatureEdgeWeight);
1000 loadData(is, myUseRetainAttrib);
1001 loadData(is, myRetainAttrib);
1002 loadData(is, myRetainWeight);
1003 loadData(is, mySilhouetteWeight);
1004 loadData(is, myUseSilhouetteFalloff);
1005 loadData(is, mySilhouetteFalloffDist);
1006 loadData(is, myFrontFacingWeight);
1007 loadData(is, myUseFrontFacingFalloff);
1008 loadData(is, myFrontFacingFalloffDist);
1011 is.
read(&length, 1);
1012 myControlattribs.setSize(length);
1015 auto && _curentry = myControlattribs(i);
1017 loadData(is, _curentry.attribenabled);
1018 loadData(is, _curentry.attribname);
1019 loadData(is, _curentry.attribweight);
1032 if (!thissop)
return getGroup();
1034 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
1042 if (!thissop)
return getTarget();
1044 OP_Utils::evalOpParm(result, thissop,
"target", cookparms.
getCookTime(), 0);
1052 if (!thissop)
return getPercentage();
1054 OP_Utils::evalOpParm(result, thissop,
"percentage", cookparms.
getCookTime(), 0);
1062 if (!thissop)
return getFinalCount();
1064 OP_Utils::evalOpParm(result, thissop,
"finalcount", cookparms.
getCookTime(), 0);
1072 if (!thissop)
return getReducePassedTarget();
1074 OP_Utils::evalOpParm(result, thissop,
"reducepassedtarget", cookparms.
getCookTime(), 0);
1082 if (!thissop)
return getQualityToleance();
1084 OP_Utils::evalOpParm(result, thissop,
"qualitytolerance", cookparms.
getCookTime(), 0);
1092 if (!thissop)
return getUseNormalDevThreshold();
1094 OP_Utils::evalOpParm(result, thissop,
"usenormaldevthreshold", cookparms.
getCookTime(), 0);
1102 if (!thissop)
return getNormalDevThreshold();
1104 OP_Utils::evalOpParm(result, thissop,
"normaldevthreshold", cookparms.
getCookTime(), 0);
1112 if (!thissop)
return getOriginalPoints();
1114 OP_Utils::evalOpParm(result, thissop,
"originalpoints", cookparms.
getCookTime(), 0);
1122 if (!thissop)
return getPreserveQuads();
1124 OP_Utils::evalOpParm(result, thissop,
"preservequads", cookparms.
getCookTime(), 0);
1132 if (!thissop)
return getEqualizeLengths();
1134 OP_Utils::evalOpParm(result, thissop,
"equalizelengths", cookparms.
getCookTime(), 0);
1142 if (!thissop)
return getBoundaryWeight();
1144 OP_Utils::evalOpParm(result, thissop,
"boundaryweight", cookparms.
getCookTime(), 0);
1152 if (!thissop)
return getVAttribSeamWeight();
1154 OP_Utils::evalOpParm(result, thissop,
"vattribseamweight", cookparms.
getCookTime(), 0);
1162 if (!thissop)
return getSeamAttribs();
1164 OP_Utils::evalOpParm(result, thissop,
"seamattribs", cookparms.
getCookTime(), 0);
1172 if (!thissop)
return getHardFeaturePoints();
1174 OP_Utils::evalOpParm(result, thissop,
"hardfeaturepoints", cookparms.
getCookTime(), 0);
1182 if (!thissop)
return getHardFeatureEdges();
1184 OP_Utils::evalOpParm(result, thissop,
"hardfeatureedges", cookparms.
getCookTime(), 0);
1192 if (!thissop)
return getSoftFeaturePoints();
1194 OP_Utils::evalOpParm(result, thissop,
"softfeaturepoints", cookparms.
getCookTime(), 0);
1202 if (!thissop)
return getSoftFeaturePointWeight();
1204 OP_Utils::evalOpParm(result, thissop,
"softfeaturepointweight", cookparms.
getCookTime(), 0);
1212 if (!thissop)
return getSoftFeatureEdges();
1214 OP_Utils::evalOpParm(result, thissop,
"softfeatureedges", cookparms.
getCookTime(), 0);
1222 if (!thissop)
return getSoftFeatureEdgeWeight();
1224 OP_Utils::evalOpParm(result, thissop,
"softfeatureedgeweight", cookparms.
getCookTime(), 0);
1232 if (!thissop)
return getUseRetainAttrib();
1234 OP_Utils::evalOpParm(result, thissop,
"useretainattrib", cookparms.
getCookTime(), 0);
1242 if (!thissop)
return getRetainAttrib();
1244 OP_Utils::evalOpParm(result, thissop,
"retainattrib", cookparms.
getCookTime(), 0);
1252 if (!thissop)
return getRetainWeight();
1254 OP_Utils::evalOpParm(result, thissop,
"retainattribweight", cookparms.
getCookTime(), 0);
1262 if (!thissop)
return getSilhouetteWeight();
1264 OP_Utils::evalOpParm(result, thissop,
"silhouetteweight", cookparms.
getCookTime(), 0);
1272 if (!thissop)
return getUseSilhouetteFalloff();
1274 OP_Utils::evalOpParm(result, thissop,
"usesilhouettefalloff", cookparms.
getCookTime(), 0);
1282 if (!thissop)
return getSilhouetteFalloffDist();
1284 OP_Utils::evalOpParm(result, thissop,
"silhouettefalloffdist", cookparms.
getCookTime(), 0);
1292 if (!thissop)
return getFrontFacingWeight();
1294 OP_Utils::evalOpParm(result, thissop,
"frontfacingweight", cookparms.
getCookTime(), 0);
1302 if (!thissop)
return getUseFrontFacingFalloff();
1304 OP_Utils::evalOpParm(result, thissop,
"usefrontfacingfalloff", cookparms.
getCookTime(), 0);
1312 if (!thissop)
return getFrontFacingFalloffDist();
1314 OP_Utils::evalOpParm(result, thissop,
"frontfacingfalloffdist", cookparms.
getCookTime(), 0);
1322 if (!thissop)
return getControlattribs().entries();
1324 OP_Utils::evalOpParm(result, thissop,
"controlattribs", cookparms.
getCookTime(), 0);
1328 {
return opinstControlattribs_attribenabled(cookparms, &_idx); }
1332 if (!thissop)
return (myControlattribs(_idx[0]).attribenabled);
1334 _parmidx[1-1] = _idx[1-1] + 1;
1337 OP_Utils::evalOpParmInst(result, thissop,
"attribenabled#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1341 {
return opinstControlattribs_attribname(cookparms, &_idx); }
1345 if (!thissop)
return (myControlattribs(_idx[0]).attribname);
1347 _parmidx[1-1] = _idx[1-1] + 1;
1350 OP_Utils::evalOpParmInst(result, thissop,
"attribname#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1354 {
return opinstControlattribs_attribweight(cookparms, &_idx); }
1358 if (!thissop)
return (myControlattribs(_idx[0]).attribweight);
1360 _parmidx[1-1] = _idx[1-1] + 1;
1363 OP_Utils::evalOpParmInst(result, thissop,
"attribweight#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1373 bool myReducePassedTarget;
1375 bool myUseNormalDevThreshold;
1377 bool myOriginalPoints;
1378 bool myPreserveQuads;
1389 bool myUseRetainAttrib;
1393 bool myUseSilhouetteFalloff;
1396 bool myUseFrontFacingFalloff;
static void loadData(UT_IStream &is, UT_Vector3D &v)
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
bool getUseSilhouetteFalloff() const
void save(std::ostream &os) const
static void saveData(std::ostream &os, fpreal64 v)
void setBoundaryWeight(fpreal64 val)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setFrontFacingWeight(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal64 getSoftFeaturePointWeight() const
void setPercentage(fpreal64 val)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 getFrontFacingFalloffDist() const
void copyFrom(const OP_NodeParms *src) override
fpreal64 opQualityToleance(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const UT_StringHolder & getSoftFeaturePoints() const
bool getUseRetainAttrib() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setControlattribs(const UT_Array< Controlattribs > &val)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Vector4D v)
void setUseRetainAttrib(bool val)
bool opUseSilhouetteFalloff(const SOP_NodeVerb::CookParms &cookparms) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
static void saveData(std::ostream &os, UT_Matrix2D v)
const OP_Context & context() const
const UT_StringHolder & getRetainAttrib() const
bool getUseNormalDevThreshold() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setUseFrontFacingFalloff(bool val)
UT_StringHolder opSoftFeaturePoints(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_PolyReduce_2_0Parms &src) const
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opHardFeaturePoints(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLsizei GLsizei * length
SOP_PolyReduce_2_0Parms()
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
fpreal64 opinstControlattribs_attribweight(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
**But if you need a result
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator!=(const Controlattribs &src) const
void setFinalCount(int64 val)
void setSoftFeatureEdges(const UT_StringHolder &val)
void setFrontFacingFalloffDist(fpreal64 val)
fpreal64 getNormalDevThreshold() const
void setEqualizeLengths(fpreal64 val)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opSoftFeatureEdges(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setSilhouetteFalloffDist(fpreal64 val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setOriginalPoints(bool val)
void setSoftFeaturePointWeight(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setRetainWeight(fpreal64 val)
GLuint GLsizei const GLuint const GLintptr * offsets
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Target opTarget(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
exint opControlattribs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal64 opFrontFacingWeight(const SOP_NodeVerb::CookParms &cookparms) const
void setRetainAttrib(const UT_StringHolder &val)
fpreal64 opSoftFeatureEdgeWeight(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int64 opFinalCount(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
const UT_StringHolder & getGroup() const
fpreal64 getVAttribSeamWeight() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opControlattribs_attribweight(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
fpreal64 getRetainWeight() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 opSilhouetteFalloffDist(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
void setNormalDevThreshold(fpreal64 val)
fpreal64 getQualityToleance() const
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
void setVAttribSeamWeight(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opUseNormalDevThreshold(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
void setPreserveQuads(bool val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool opOriginalPoints(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseFrontFacingFalloff(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseFrontFacingFalloff() const
const UT_StringHolder & getHardFeatureEdges() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setReducePassedTarget(bool val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opPreserveQuads(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opNormalDevThreshold(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal64 opSoftFeaturePointWeight(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSilhouetteWeight() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder attribname
fpreal64 opSilhouetteWeight(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strcat(const char *src)
fpreal64 opBoundaryWeight(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setSilhouetteWeight(fpreal64 val)
fpreal64 opEqualizeLengths(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
UT_StringHolder opRetainAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint entries() const
Alias of size(). size() is preferred.
bool operator==(const SOP_PolyReduce_2_0Parms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
fpreal64 getPercentage() const
UT_StringHolder opControlattribs_attribname(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setUseNormalDevThreshold(bool val)
void setHardFeatureEdges(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
SYS_FORCE_INLINE UT_StringHolder getToken(Target enum_value)
fpreal64 opRetainWeight(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 getFrontFacingWeight() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
DEP_MicroNode * depnode() const
bool opControlattribs_attribenabled(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint getNestNumParms(TempIndex idx) const override
void setUseSilhouetteFalloff(bool val)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void setGroup(const UT_StringHolder &val)
fpreal64 getSoftFeatureEdgeWeight() const
bool operator==(const Controlattribs &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 opPercentage(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opFrontFacingFalloffDist(const SOP_NodeVerb::CookParms &cookparms) const
virtual UT_StringHolder baseGetSignature() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opHardFeatureEdges(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSeamAttribs() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opinstControlattribs_attribenabled(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opUseRetainAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Controlattribs > &list) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const UT_StringHolder & getHardFeaturePoints() const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, bool v)
void setSoftFeatureEdgeWeight(fpreal64 val)
void setTarget(Target val)
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 getEqualizeLengths() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_StringHolder opSeamAttribs(const SOP_NodeVerb::CookParms &cookparms) const
bool getPreserveQuads() const
void setSeamAttribs(const UT_StringHolder &val)
fpreal64 getBoundaryWeight() const
const UT_Array< Controlattribs > & getControlattribs() const
const UT_StringHolder & getSoftFeatureEdges() const
void setSoftFeaturePoints(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
int64 getFinalCount() const
static void saveData(std::ostream &os, UT_StringHolder s)
bool getOriginalPoints() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opReducePassedTarget(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSilhouetteFalloffDist() const
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opinstControlattribs_attribname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool getReducePassedTarget() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setHardFeaturePoints(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setQualityToleance(fpreal64 val)
fpreal64 opVAttribSeamWeight(const SOP_NodeVerb::CookParms &cookparms) const