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 myOriginalPoints =
false;
117 myPreserveQuads =
false;
118 myEqualizeLengths = 1e-10;
119 myBoundaryWeight = 1;
120 myVAttribSeamWeight = 1;
121 mySeamAttribs =
"* ^N"_UTsh;
122 myHardFeaturePoints =
""_UTsh;
123 myHardFeatureEdges =
""_UTsh;
124 mySoftFeaturePoints =
""_UTsh;
125 mySoftFeaturePointWeight = 1;
126 mySoftFeatureEdges =
""_UTsh;
127 mySoftFeatureEdgeWeight = 1;
128 myUseRetainAttrib =
false;
129 myRetainAttrib =
"retention"_UTsh;
131 mySilhouetteWeight = 1;
132 myUseSilhouetteFalloff =
false;
133 mySilhouetteFalloffDist = 1;
134 myFrontFacingWeight = 1;
135 myUseFrontFacingFalloff =
false;
136 myFrontFacingFalloffDist = 1;
137 myMaxNormalDev = 180;
138 myUseOutNormalProxy =
false;
139 myOutNormalProxy =
"normalproxy"_UTsh;
140 myControlattribs.setSize(0);
153 if (myGroup != src.myGroup)
return false;
154 if (myTarget != src.myTarget)
return false;
155 if (myPercentage != src.myPercentage)
return false;
156 if (myFinalCount != src.myFinalCount)
return false;
157 if (myReducePassedTarget != src.myReducePassedTarget)
return false;
158 if (myQualityToleance != src.myQualityToleance)
return false;
159 if (myOriginalPoints != src.myOriginalPoints)
return false;
160 if (myPreserveQuads != src.myPreserveQuads)
return false;
161 if (myEqualizeLengths != src.myEqualizeLengths)
return false;
162 if (myBoundaryWeight != src.myBoundaryWeight)
return false;
163 if (myVAttribSeamWeight != src.myVAttribSeamWeight)
return false;
164 if (mySeamAttribs != src.mySeamAttribs)
return false;
165 if (myHardFeaturePoints != src.myHardFeaturePoints)
return false;
166 if (myHardFeatureEdges != src.myHardFeatureEdges)
return false;
167 if (mySoftFeaturePoints != src.mySoftFeaturePoints)
return false;
168 if (mySoftFeaturePointWeight != src.mySoftFeaturePointWeight)
return false;
169 if (mySoftFeatureEdges != src.mySoftFeatureEdges)
return false;
170 if (mySoftFeatureEdgeWeight != src.mySoftFeatureEdgeWeight)
return false;
171 if (myUseRetainAttrib != src.myUseRetainAttrib)
return false;
172 if (myRetainAttrib != src.myRetainAttrib)
return false;
173 if (myRetainWeight != src.myRetainWeight)
return false;
174 if (mySilhouetteWeight != src.mySilhouetteWeight)
return false;
175 if (myUseSilhouetteFalloff != src.myUseSilhouetteFalloff)
return false;
176 if (mySilhouetteFalloffDist != src.mySilhouetteFalloffDist)
return false;
177 if (myFrontFacingWeight != src.myFrontFacingWeight)
return false;
178 if (myUseFrontFacingFalloff != src.myUseFrontFacingFalloff)
return false;
179 if (myFrontFacingFalloffDist != src.myFrontFacingFalloffDist)
return false;
180 if (myMaxNormalDev != src.myMaxNormalDev)
return false;
181 if (myUseOutNormalProxy != src.myUseOutNormalProxy)
return false;
182 if (myOutNormalProxy != src.myOutNormalProxy)
return false;
183 if (myControlattribs != src.myControlattribs)
return false;
199 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
202 graph->
evalOpParm(myTarget, nodeidx,
"target", time, 0);
204 if (
true && ( (
true&&!(((
int64(getTarget())==2))||((
int64(getTarget())==3)))) ) )
205 graph->
evalOpParm(myPercentage, nodeidx,
"percentage", time, 0);
207 if (
true && ( (
true&&!(((
int64(getTarget())==0))||((
int64(getTarget())==1)))) ) )
208 graph->
evalOpParm(myFinalCount, nodeidx,
"finalcount", time, 0);
209 myReducePassedTarget =
false;
211 graph->
evalOpParm(myReducePassedTarget, nodeidx,
"reducepassedtarget", time, 0);
212 myQualityToleance = 1e-5;
213 if (
true && ( (
true&&!(((getReducePassedTarget()==0)))) ) )
214 graph->
evalOpParm(myQualityToleance, nodeidx,
"qualitytolerance", time, 0);
215 myOriginalPoints =
false;
217 graph->
evalOpParm(myOriginalPoints, nodeidx,
"originalpoints", time, 0);
218 myPreserveQuads =
false;
220 graph->
evalOpParm(myPreserveQuads, nodeidx,
"preservequads", time, 0);
221 myEqualizeLengths = 1e-10;
223 graph->
evalOpParm(myEqualizeLengths, nodeidx,
"equalizelengths", time, 0);
224 myBoundaryWeight = 1;
226 graph->
evalOpParm(myBoundaryWeight, nodeidx,
"boundaryweight", time, 0);
227 myVAttribSeamWeight = 1;
229 graph->
evalOpParm(myVAttribSeamWeight, nodeidx,
"vattribseamweight", time, 0);
230 mySeamAttribs =
"* ^N"_UTsh;
231 if (
true && ( (
true&&!(((getVAttribSeamWeight()==0)))) ) )
232 graph->
evalOpParm(mySeamAttribs, nodeidx,
"seamattribs", time, 0);
233 myHardFeaturePoints =
""_UTsh;
235 graph->
evalOpParm(myHardFeaturePoints, nodeidx,
"hardfeaturepoints", time, 0);
236 myHardFeatureEdges =
""_UTsh;
238 graph->
evalOpParm(myHardFeatureEdges, nodeidx,
"hardfeatureedges", time, 0);
239 mySoftFeaturePoints =
""_UTsh;
241 graph->
evalOpParm(mySoftFeaturePoints, nodeidx,
"softfeaturepoints", time, 0);
242 mySoftFeaturePointWeight = 1;
244 graph->
evalOpParm(mySoftFeaturePointWeight, nodeidx,
"softfeaturepointweight", time, 0);
245 mySoftFeatureEdges =
""_UTsh;
247 graph->
evalOpParm(mySoftFeatureEdges, nodeidx,
"softfeatureedges", time, 0);
248 mySoftFeatureEdgeWeight = 1;
250 graph->
evalOpParm(mySoftFeatureEdgeWeight, nodeidx,
"softfeatureedgeweight", time, 0);
251 myUseRetainAttrib =
false;
253 graph->
evalOpParm(myUseRetainAttrib, nodeidx,
"useretainattrib", time, 0);
254 myRetainAttrib =
"retention"_UTsh;
255 if (
true && ( (
true&&!(((getUseRetainAttrib()==0)))) ) )
256 graph->
evalOpParm(myRetainAttrib, nodeidx,
"retainattrib", time, 0);
258 if (
true && ( (
true&&!(((getUseRetainAttrib()==0)))) ) )
259 graph->
evalOpParm(myRetainWeight, nodeidx,
"retainattribweight", time, 0);
260 mySilhouetteWeight = 1;
261 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
262 graph->
evalOpParm(mySilhouetteWeight, nodeidx,
"silhouetteweight", time, 0);
263 myUseSilhouetteFalloff =
false;
264 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
265 graph->
evalOpParm(myUseSilhouetteFalloff, nodeidx,
"usesilhouettefalloff", time, 0);
266 mySilhouetteFalloffDist = 1;
267 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0))||((getUseSilhouetteFalloff()==0)))) ) )
268 graph->
evalOpParm(mySilhouetteFalloffDist, nodeidx,
"silhouettefalloffdist", time, 0);
269 myFrontFacingWeight = 1;
270 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
271 graph->
evalOpParm(myFrontFacingWeight, nodeidx,
"frontfacingweight", time, 0);
272 myUseFrontFacingFalloff =
false;
273 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0)))) ) )
274 graph->
evalOpParm(myUseFrontFacingFalloff, nodeidx,
"usefrontfacingfalloff", time, 0);
275 myFrontFacingFalloffDist = 1;
276 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,2)>=0)==0))||((getUseFrontFacingFalloff()==0)))) ) )
277 graph->
evalOpParm(myFrontFacingFalloffDist, nodeidx,
"frontfacingfalloffdist", time, 0);
278 myMaxNormalDev = 180;
280 graph->
evalOpParm(myMaxNormalDev, nodeidx,
"maxnormaldev", time, 0);
281 myUseOutNormalProxy =
false;
283 graph->
evalOpParm(myUseOutNormalProxy, nodeidx,
"useoutnormalproxy", time, 0);
284 myOutNormalProxy =
"normalproxy"_UTsh;
286 graph->
evalOpParm(myOutNormalProxy, nodeidx,
"normalproxy", time, 0);
290 graph->
evalOpParm(length, nodeidx,
"controlattribs", time, 0);
291 if (length < 0) length = 0;
292 myControlattribs.setSize(length);
299 auto && _curentry = myControlattribs(i);
301 _curentry.attribenabled =
true;
303 graph->
evalOpParmInst(_curentry.attribenabled, nodeidx,
"attribenabled#", parmidx, offsets, time, 0, 2-1);
304 _curentry.attribname =
""_UTsh;
305 if (
true && ( (
true&&!(((_curentry.attribenabled==0)))) ) )
306 graph->
evalOpParmInst(_curentry.attribname, nodeidx,
"attribname#", parmidx, offsets, time, 0, 2-1);
307 _curentry.attribweight = 1;
308 if (
true && ( (
true&&!(((_curentry.attribenabled==0)))) ) )
309 graph->
evalOpParmInst(_curentry.attribweight, nodeidx,
"attribweight#", parmidx, offsets, time, 0, 2-1);
314 myControlattribs.clear();
330 template <
typename T>
337 if (idx.
size() != instance.
size()+1)
342 coerceValue(value, myGroup);
345 coerceValue(value, myTarget);
348 coerceValue(value, myPercentage);
351 coerceValue(value, myFinalCount);
354 coerceValue(value, myReducePassedTarget);
357 coerceValue(value, myQualityToleance);
360 coerceValue(value, myOriginalPoints);
363 coerceValue(value, myPreserveQuads);
366 coerceValue(value, myEqualizeLengths);
369 coerceValue(value, myBoundaryWeight);
372 coerceValue(value, myVAttribSeamWeight);
375 coerceValue(value, mySeamAttribs);
378 coerceValue(value, myHardFeaturePoints);
381 coerceValue(value, myHardFeatureEdges);
384 coerceValue(value, mySoftFeaturePoints);
387 coerceValue(value, mySoftFeaturePointWeight);
390 coerceValue(value, mySoftFeatureEdges);
393 coerceValue(value, mySoftFeatureEdgeWeight);
396 coerceValue(value, myUseRetainAttrib);
399 coerceValue(value, myRetainAttrib);
402 coerceValue(value, myRetainWeight);
405 coerceValue(value, mySilhouetteWeight);
408 coerceValue(value, myUseSilhouetteFalloff);
411 coerceValue(value, mySilhouetteFalloffDist);
414 coerceValue(value, myFrontFacingWeight);
417 coerceValue(value, myUseFrontFacingFalloff);
420 coerceValue(value, myFrontFacingFalloffDist);
423 coerceValue(value, myMaxNormalDev);
426 coerceValue(value, myUseOutNormalProxy);
429 coerceValue(value, myOutNormalProxy);
433 coerceValue(value, myControlattribs.entries());
434 else if (instance[0] < myControlattribs.entries())
436 auto && _data = myControlattribs(instance[0]);
440 coerceValue(value, _data.attribenabled);
443 coerceValue(value, _data.attribname);
446 coerceValue(value, _data.attribweight);
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(myTarget, clampMinValue(0, clampMaxValue(3, value ) ));
506 coerceValue(myPercentage, clampMinValue(0, clampMaxValue(100, value ) ));
509 coerceValue(myFinalCount, clampMinValue(1, ( value ) ));
512 coerceValue(myReducePassedTarget, ( ( value ) ));
515 coerceValue(myQualityToleance, clampMinValue(0, ( value ) ));
518 coerceValue(myOriginalPoints, ( ( value ) ));
521 coerceValue(myPreserveQuads, ( ( value ) ));
524 coerceValue(myEqualizeLengths, clampMinValue(0, ( value ) ));
527 coerceValue(myBoundaryWeight, ( ( value ) ));
530 coerceValue(myVAttribSeamWeight, ( ( value ) ));
533 coerceValue(mySeamAttribs, ( ( value ) ));
536 coerceValue(myHardFeaturePoints, ( ( value ) ));
539 coerceValue(myHardFeatureEdges, ( ( value ) ));
542 coerceValue(mySoftFeaturePoints, ( ( value ) ));
545 coerceValue(mySoftFeaturePointWeight, ( ( value ) ));
548 coerceValue(mySoftFeatureEdges, ( ( value ) ));
551 coerceValue(mySoftFeatureEdgeWeight, ( ( value ) ));
554 coerceValue(myUseRetainAttrib, ( ( value ) ));
557 coerceValue(myRetainAttrib, ( ( value ) ));
560 coerceValue(myRetainWeight, ( ( value ) ));
563 coerceValue(mySilhouetteWeight, ( ( value ) ));
566 coerceValue(myUseSilhouetteFalloff, ( ( value ) ));
569 coerceValue(mySilhouetteFalloffDist, clampMinValue(0, ( value ) ));
572 coerceValue(myFrontFacingWeight, ( ( value ) ));
575 coerceValue(myUseFrontFacingFalloff, ( ( value ) ));
578 coerceValue(myFrontFacingFalloffDist, clampMinValue(0, ( value ) ));
581 coerceValue(myMaxNormalDev, clampMinValue(0, clampMaxValue(180, value ) ));
584 coerceValue(myUseOutNormalProxy, ( ( value ) ));
587 coerceValue(myOutNormalProxy, ( ( value ) ));
593 coerceValue(newsize, value);
594 if (newsize < 0) newsize = 0;
595 myControlattribs.setSize(newsize);
601 myControlattribs.setSizeIfNeeded(instance[0]+1);
602 auto && _data = myControlattribs(instance[0]);
606 coerceValue(_data.attribenabled, value);
609 coerceValue(_data.attribname, value);
612 coerceValue(_data.attribweight, 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); }
637 { doSetParmValue(idx, instance, value); }
639 { doSetParmValue(idx, instance, value); }
641 { doSetParmValue(idx, instance, value); }
643 { doSetParmValue(idx, instance, value); }
661 if (fieldnum.
size() < 1)
674 return "reducepassedtarget";
676 return "qualitytolerance";
678 return "originalpoints";
680 return "preservequads";
682 return "equalizelengths";
684 return "boundaryweight";
686 return "vattribseamweight";
688 return "seamattribs";
690 return "hardfeaturepoints";
692 return "hardfeatureedges";
694 return "softfeaturepoints";
696 return "softfeaturepointweight";
698 return "softfeatureedges";
700 return "softfeatureedgeweight";
702 return "useretainattrib";
704 return "retainattrib";
706 return "retainattribweight";
708 return "silhouetteweight";
710 return "usesilhouettefalloff";
712 return "silhouettefalloffdist";
714 return "frontfacingweight";
716 return "usefrontfacingfalloff";
718 return "frontfacingfalloffdist";
720 return "maxnormaldev";
722 return "useoutnormalproxy";
724 return "normalproxy";
726 if (fieldnum.
size() == 1)
727 return "controlattribs";
731 return "attribenabled#";
733 return "attribname#";
735 return "attribweight#";
746 if (fieldnum.
size() < 1)
747 return PARM_UNSUPPORTED;
811 if (fieldnum.
size() == 1)
812 return PARM_MULTIPARM;
823 return PARM_UNSUPPORTED;
826 return PARM_UNSUPPORTED;
862 loadData(is, rampdata);
880 int typelen = colon - data.
buffer();
894 {
int64 iv =
v; UTwrite(os, &iv); }
896 { UTwrite<fpreal64>(os, &
v); }
898 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
900 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
901 UTwrite<fpreal64>(os, &v.
z()); }
903 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
904 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
916 if (s) s->save(ostr);
918 saveData(os, result);
925 ostr << s->getDataTypeToken();
930 saveData(os, result);
934 void save(std::ostream &os)
const
938 saveData(os, myGroup);
939 saveData(os, myTarget);
940 saveData(os, myPercentage);
941 saveData(os, myFinalCount);
942 saveData(os, myReducePassedTarget);
943 saveData(os, myQualityToleance);
944 saveData(os, myOriginalPoints);
945 saveData(os, myPreserveQuads);
946 saveData(os, myEqualizeLengths);
947 saveData(os, myBoundaryWeight);
948 saveData(os, myVAttribSeamWeight);
949 saveData(os, mySeamAttribs);
950 saveData(os, myHardFeaturePoints);
951 saveData(os, myHardFeatureEdges);
952 saveData(os, mySoftFeaturePoints);
953 saveData(os, mySoftFeaturePointWeight);
954 saveData(os, mySoftFeatureEdges);
955 saveData(os, mySoftFeatureEdgeWeight);
956 saveData(os, myUseRetainAttrib);
957 saveData(os, myRetainAttrib);
958 saveData(os, myRetainWeight);
959 saveData(os, mySilhouetteWeight);
960 saveData(os, myUseSilhouetteFalloff);
961 saveData(os, mySilhouetteFalloffDist);
962 saveData(os, myFrontFacingWeight);
963 saveData(os, myUseFrontFacingFalloff);
964 saveData(os, myFrontFacingFalloffDist);
965 saveData(os, myMaxNormalDev);
966 saveData(os, myUseOutNormalProxy);
967 saveData(os, myOutNormalProxy);
970 UTwrite(os, &length);
973 auto && _curentry = myControlattribs(i);
975 saveData(os, _curentry.attribenabled);
976 saveData(os, _curentry.attribname);
977 saveData(os, _curentry.attribweight);
993 loadData(is, myGroup);
994 loadData(is, myTarget);
995 loadData(is, myPercentage);
996 loadData(is, myFinalCount);
997 loadData(is, myReducePassedTarget);
998 loadData(is, myQualityToleance);
999 loadData(is, myOriginalPoints);
1000 loadData(is, myPreserveQuads);
1001 loadData(is, myEqualizeLengths);
1002 loadData(is, myBoundaryWeight);
1003 loadData(is, myVAttribSeamWeight);
1004 loadData(is, mySeamAttribs);
1005 loadData(is, myHardFeaturePoints);
1006 loadData(is, myHardFeatureEdges);
1007 loadData(is, mySoftFeaturePoints);
1008 loadData(is, mySoftFeaturePointWeight);
1009 loadData(is, mySoftFeatureEdges);
1010 loadData(is, mySoftFeatureEdgeWeight);
1011 loadData(is, myUseRetainAttrib);
1012 loadData(is, myRetainAttrib);
1013 loadData(is, myRetainWeight);
1014 loadData(is, mySilhouetteWeight);
1015 loadData(is, myUseSilhouetteFalloff);
1016 loadData(is, mySilhouetteFalloffDist);
1017 loadData(is, myFrontFacingWeight);
1018 loadData(is, myUseFrontFacingFalloff);
1019 loadData(is, myFrontFacingFalloffDist);
1020 loadData(is, myMaxNormalDev);
1021 loadData(is, myUseOutNormalProxy);
1022 loadData(is, myOutNormalProxy);
1025 is.
read(&length, 1);
1026 myControlattribs.setSize(length);
1029 auto && _curentry = myControlattribs(i);
1031 loadData(is, _curentry.attribenabled);
1032 loadData(is, _curentry.attribname);
1033 loadData(is, _curentry.attribweight);
1046 if (!thissop)
return getGroup();
1048 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
1056 if (!thissop)
return getTarget();
1058 OP_Utils::evalOpParm(result, thissop,
"target", cookparms.
getCookTime(), 0);
1066 if (!thissop)
return getPercentage();
1068 OP_Utils::evalOpParm(result, thissop,
"percentage", cookparms.
getCookTime(), 0);
1076 if (!thissop)
return getFinalCount();
1078 OP_Utils::evalOpParm(result, thissop,
"finalcount", cookparms.
getCookTime(), 0);
1086 if (!thissop)
return getReducePassedTarget();
1088 OP_Utils::evalOpParm(result, thissop,
"reducepassedtarget", cookparms.
getCookTime(), 0);
1096 if (!thissop)
return getQualityToleance();
1098 OP_Utils::evalOpParm(result, thissop,
"qualitytolerance", cookparms.
getCookTime(), 0);
1106 if (!thissop)
return getOriginalPoints();
1108 OP_Utils::evalOpParm(result, thissop,
"originalpoints", cookparms.
getCookTime(), 0);
1116 if (!thissop)
return getPreserveQuads();
1118 OP_Utils::evalOpParm(result, thissop,
"preservequads", cookparms.
getCookTime(), 0);
1126 if (!thissop)
return getEqualizeLengths();
1128 OP_Utils::evalOpParm(result, thissop,
"equalizelengths", cookparms.
getCookTime(), 0);
1136 if (!thissop)
return getBoundaryWeight();
1138 OP_Utils::evalOpParm(result, thissop,
"boundaryweight", cookparms.
getCookTime(), 0);
1146 if (!thissop)
return getVAttribSeamWeight();
1148 OP_Utils::evalOpParm(result, thissop,
"vattribseamweight", cookparms.
getCookTime(), 0);
1156 if (!thissop)
return getSeamAttribs();
1158 OP_Utils::evalOpParm(result, thissop,
"seamattribs", cookparms.
getCookTime(), 0);
1166 if (!thissop)
return getHardFeaturePoints();
1168 OP_Utils::evalOpParm(result, thissop,
"hardfeaturepoints", cookparms.
getCookTime(), 0);
1176 if (!thissop)
return getHardFeatureEdges();
1178 OP_Utils::evalOpParm(result, thissop,
"hardfeatureedges", cookparms.
getCookTime(), 0);
1186 if (!thissop)
return getSoftFeaturePoints();
1188 OP_Utils::evalOpParm(result, thissop,
"softfeaturepoints", cookparms.
getCookTime(), 0);
1196 if (!thissop)
return getSoftFeaturePointWeight();
1198 OP_Utils::evalOpParm(result, thissop,
"softfeaturepointweight", cookparms.
getCookTime(), 0);
1206 if (!thissop)
return getSoftFeatureEdges();
1208 OP_Utils::evalOpParm(result, thissop,
"softfeatureedges", cookparms.
getCookTime(), 0);
1216 if (!thissop)
return getSoftFeatureEdgeWeight();
1218 OP_Utils::evalOpParm(result, thissop,
"softfeatureedgeweight", cookparms.
getCookTime(), 0);
1226 if (!thissop)
return getUseRetainAttrib();
1228 OP_Utils::evalOpParm(result, thissop,
"useretainattrib", cookparms.
getCookTime(), 0);
1236 if (!thissop)
return getRetainAttrib();
1238 OP_Utils::evalOpParm(result, thissop,
"retainattrib", cookparms.
getCookTime(), 0);
1246 if (!thissop)
return getRetainWeight();
1248 OP_Utils::evalOpParm(result, thissop,
"retainattribweight", cookparms.
getCookTime(), 0);
1256 if (!thissop)
return getSilhouetteWeight();
1258 OP_Utils::evalOpParm(result, thissop,
"silhouetteweight", cookparms.
getCookTime(), 0);
1266 if (!thissop)
return getUseSilhouetteFalloff();
1268 OP_Utils::evalOpParm(result, thissop,
"usesilhouettefalloff", cookparms.
getCookTime(), 0);
1276 if (!thissop)
return getSilhouetteFalloffDist();
1278 OP_Utils::evalOpParm(result, thissop,
"silhouettefalloffdist", cookparms.
getCookTime(), 0);
1286 if (!thissop)
return getFrontFacingWeight();
1288 OP_Utils::evalOpParm(result, thissop,
"frontfacingweight", cookparms.
getCookTime(), 0);
1296 if (!thissop)
return getUseFrontFacingFalloff();
1298 OP_Utils::evalOpParm(result, thissop,
"usefrontfacingfalloff", cookparms.
getCookTime(), 0);
1306 if (!thissop)
return getFrontFacingFalloffDist();
1308 OP_Utils::evalOpParm(result, thissop,
"frontfacingfalloffdist", cookparms.
getCookTime(), 0);
1316 if (!thissop)
return getMaxNormalDev();
1318 OP_Utils::evalOpParm(result, thissop,
"maxnormaldev", cookparms.
getCookTime(), 0);
1326 if (!thissop)
return getUseOutNormalProxy();
1328 OP_Utils::evalOpParm(result, thissop,
"useoutnormalproxy", cookparms.
getCookTime(), 0);
1336 if (!thissop)
return getOutNormalProxy();
1338 OP_Utils::evalOpParm(result, thissop,
"normalproxy", cookparms.
getCookTime(), 0);
1346 if (!thissop)
return getControlattribs().entries();
1348 OP_Utils::evalOpParm(result, thissop,
"controlattribs", cookparms.
getCookTime(), 0);
1352 {
return opinstControlattribs_attribenabled(cookparms, &_idx); }
1356 if (!thissop)
return (myControlattribs(_idx[0]).attribenabled);
1358 _parmidx[1-1] = _idx[1-1] + 1;
1361 OP_Utils::evalOpParmInst(result, thissop,
"attribenabled#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1365 {
return opinstControlattribs_attribname(cookparms, &_idx); }
1369 if (!thissop)
return (myControlattribs(_idx[0]).attribname);
1371 _parmidx[1-1] = _idx[1-1] + 1;
1374 OP_Utils::evalOpParmInst(result, thissop,
"attribname#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1378 {
return opinstControlattribs_attribweight(cookparms, &_idx); }
1382 if (!thissop)
return (myControlattribs(_idx[0]).attribweight);
1384 _parmidx[1-1] = _idx[1-1] + 1;
1387 OP_Utils::evalOpParmInst(result, thissop,
"attribweight#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1397 bool myReducePassedTarget;
1399 bool myOriginalPoints;
1400 bool myPreserveQuads;
1411 bool myUseRetainAttrib;
1415 bool myUseSilhouetteFalloff;
1418 bool myUseFrontFacingFalloff;
1421 bool myUseOutNormalProxy;
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool getUseSilhouetteFalloff() const
void save(std::ostream &os) const
bool getUseOutNormalProxy() 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 setOutNormalProxy(const UT_StringHolder &val)
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)
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
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
void setMaxNormalDev(fpreal64 val)
**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)
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
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
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
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 setUseOutNormalProxy(bool val)
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
UT_StringHolder opOutNormalProxy(const SOP_NodeVerb::CookParms &cookparms) const
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)
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
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
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
const UT_StringHolder & getOutNormalProxy() const
static int getInt(UT_IntControl i)
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 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.
fpreal64 opMaxNormalDev(const SOP_NodeVerb::CookParms &cookparms) const
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
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
bool opUseOutNormalProxy(const SOP_NodeVerb::CookParms &cookparms) const
int64 getFinalCount() const
static void saveData(std::ostream &os, UT_StringHolder s)
bool getOriginalPoints() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opReducePassedTarget(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSilhouetteFalloffDist() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
fpreal64 getMaxNormalDev() const
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