23 namespace SOP_AttribInterpolateEnums
56 myNumberattrib =
"sourceprim"_UTsh;
57 myWeightsattrib =
"sourceprimuv"_UTsh;
58 myPointattribs =
"*"_UTsh;
59 myVertattribs =
""_UTsh;
60 myPrimattribs =
""_UTsh;
61 myDetailattribs =
""_UTsh;
63 myComputeweights =
false;
64 myComputenumberstype = 1;
65 myComputednumbersattrib =
"sourcevtxnums"_UTsh;
66 myComputedweightsattrib =
"sourcevtxweights"_UTsh;
84 if (myTotype != src.myTotype)
return false;
85 if (myInterpby != src.myInterpby)
return false;
86 if (myNumberattrib != src.myNumberattrib)
return false;
87 if (myWeightsattrib != src.myWeightsattrib)
return false;
88 if (myPointattribs != src.myPointattribs)
return false;
89 if (myVertattribs != src.myVertattribs)
return false;
90 if (myPrimattribs != src.myPrimattribs)
return false;
91 if (myDetailattribs != src.myDetailattribs)
return false;
92 if (myMatchgroups != src.myMatchgroups)
return false;
93 if (myComputeweights != src.myComputeweights)
return false;
94 if (myComputenumberstype != src.myComputenumberstype)
return false;
95 if (myComputednumbersattrib != src.myComputednumbersattrib)
return false;
96 if (myComputedweightsattrib != src.myComputedweightsattrib)
return false;
97 if (myPrescale != src.myPrescale)
return false;
98 if (myNormalize != src.myNormalize)
return false;
99 if (myThreshold != src.myThreshold)
return false;
100 if (myBlend != src.myBlend)
return false;
101 if (myGroup != src.myGroup)
return false;
119 graph->
evalOpParm(myTotype, nodeidx,
"totype", time, 0);
122 graph->
evalOpParm(myInterpby, nodeidx,
"interpby", time, 0);
123 myNumberattrib =
"sourceprim"_UTsh;
125 graph->
evalOpParm(myNumberattrib, nodeidx,
"numberattrib", time, 0);
126 myWeightsattrib =
"sourceprimuv"_UTsh;
128 graph->
evalOpParm(myWeightsattrib, nodeidx,
"weightsattrib", time, 0);
129 myPointattribs =
"*"_UTsh;
130 if (
true && ( (
true&&!(((
int64(getInterpby())==3)))) ) )
131 graph->
evalOpParm(myPointattribs, nodeidx,
"pointattribs", time, 0);
132 myVertattribs =
""_UTsh;
133 if (
true && ( (
true&&!(((
int64(getInterpby())==3))||((
int64(getInterpby())==1)))) ) )
134 graph->
evalOpParm(myVertattribs, nodeidx,
"vertattribs", time, 0);
135 myPrimattribs =
""_UTsh;
136 if (
true && ( (
true&&!(((
int64(getInterpby())==1)))) ) )
137 graph->
evalOpParm(myPrimattribs, nodeidx,
"primattribs", time, 0);
138 myDetailattribs =
""_UTsh;
140 graph->
evalOpParm(myDetailattribs, nodeidx,
"detailattribs", time, 0);
141 myMatchgroups =
true;
143 graph->
evalOpParm(myMatchgroups, nodeidx,
"matchgroups", time, 0);
144 myComputeweights =
false;
145 if (
true && ( (
true&&!(((
int64(getInterpby())!=0)))) ) )
146 graph->
evalOpParm(myComputeweights, nodeidx,
"computeweights", time, 0);
147 myComputenumberstype = 1;
148 if (
true && ( (
true&&!(((
int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
149 graph->
evalOpParm(myComputenumberstype, nodeidx,
"computenumberstype", time, 0);
150 myComputednumbersattrib =
"sourcevtxnums"_UTsh;
151 if (
true && ( (
true&&!(((
int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
152 graph->
evalOpParm(myComputednumbersattrib, nodeidx,
"computednumbersattrib", time, 0);
153 myComputedweightsattrib =
"sourcevtxweights"_UTsh;
154 if (
true && ( (
true&&!(((
int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
155 graph->
evalOpParm(myComputedweightsattrib, nodeidx,
"computedweightsattrib", time, 0);
158 graph->
evalOpParm(myPrescale, nodeidx,
"prescale", time, 0);
161 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, 0);
163 if (
true && ( (
true&&!(((getNormalize()==0)))) ) )
164 graph->
evalOpParm(myThreshold, nodeidx,
"threshold", time, 0);
166 if (
true && ( (
true&&!(((getNormalize()==0)))) ) )
167 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
169 if (
true && ( (
true&&!(((
int64(getTotype())==3)))) ) )
170 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
186 template <
typename T>
193 if (idx.
size() != instance.
size()+1)
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 { doGetParmValue(idx, instance, value); }
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 template <
typename T>
294 if (idx.
size() != instance.
size()+1)
332 coerceValue(myComputednumbersattrib, ( ( value ) ));
335 coerceValue(myComputedweightsattrib, ( ( value ) ));
357 { doSetParmValue(idx, instance, value); }
359 { doSetParmValue(idx, instance, value); }
361 { doSetParmValue(idx, instance, value); }
363 { doSetParmValue(idx, instance, value); }
365 { doSetParmValue(idx, instance, value); }
367 { doSetParmValue(idx, instance, value); }
369 { doSetParmValue(idx, instance, value); }
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
377 { doSetParmValue(idx, instance, value); }
393 if (fieldnum.
size() < 1)
402 return "numberattrib";
404 return "weightsattrib";
406 return "pointattribs";
408 return "vertattribs";
410 return "primattribs";
412 return "detailattribs";
414 return "matchgroups";
416 return "computeweights";
418 return "computenumberstype";
420 return "computednumbersattrib";
422 return "computedweightsattrib";
440 if (fieldnum.
size() < 1)
441 return PARM_UNSUPPORTED;
501 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
503 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
505 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
518 loadData(is, rampdata);
536 int typelen = colon - data.
buffer();
550 {
int64 iv =
v; UTwrite(os, &iv); }
552 { UTwrite<fpreal64>(os, &
v); }
554 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
556 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
557 UTwrite<fpreal64>(os, &v.
z()); }
559 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
560 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
572 if (s) s->save(ostr);
574 saveData(os, result);
581 ostr << s->getDataTypeToken();
586 saveData(os, result);
590 void save(std::ostream &os)
const
594 saveData(os, myTotype);
595 saveData(os, myInterpby);
596 saveData(os, myNumberattrib);
597 saveData(os, myWeightsattrib);
598 saveData(os, myPointattribs);
599 saveData(os, myVertattribs);
600 saveData(os, myPrimattribs);
601 saveData(os, myDetailattribs);
602 saveData(os, myMatchgroups);
603 saveData(os, myComputeweights);
604 saveData(os, myComputenumberstype);
605 saveData(os, myComputednumbersattrib);
606 saveData(os, myComputedweightsattrib);
607 saveData(os, myPrescale);
608 saveData(os, myNormalize);
609 saveData(os, myThreshold);
610 saveData(os, myBlend);
611 saveData(os, myGroup);
624 loadData(is, myTotype);
625 loadData(is, myInterpby);
626 loadData(is, myNumberattrib);
627 loadData(is, myWeightsattrib);
628 loadData(is, myPointattribs);
629 loadData(is, myVertattribs);
630 loadData(is, myPrimattribs);
631 loadData(is, myDetailattribs);
632 loadData(is, myMatchgroups);
633 loadData(is, myComputeweights);
634 loadData(is, myComputenumberstype);
635 loadData(is, myComputednumbersattrib);
636 loadData(is, myComputedweightsattrib);
637 loadData(is, myPrescale);
638 loadData(is, myNormalize);
639 loadData(is, myThreshold);
640 loadData(is, myBlend);
641 loadData(is, myGroup);
651 if (!thissop)
return getTotype();
653 OP_Utils::evalOpParm(result, thissop,
"totype", cookparms.
getCookTime(), 0);
661 if (!thissop)
return getInterpby();
663 OP_Utils::evalOpParm(result, thissop,
"interpby", cookparms.
getCookTime(), 0);
671 if (!thissop)
return getNumberattrib();
673 OP_Utils::evalOpParm(result, thissop,
"numberattrib", cookparms.
getCookTime(), 0);
681 if (!thissop)
return getWeightsattrib();
683 OP_Utils::evalOpParm(result, thissop,
"weightsattrib", cookparms.
getCookTime(), 0);
691 if (!thissop)
return getPointattribs();
693 OP_Utils::evalOpParm(result, thissop,
"pointattribs", cookparms.
getCookTime(), 0);
701 if (!thissop)
return getVertattribs();
703 OP_Utils::evalOpParm(result, thissop,
"vertattribs", cookparms.
getCookTime(), 0);
711 if (!thissop)
return getPrimattribs();
713 OP_Utils::evalOpParm(result, thissop,
"primattribs", cookparms.
getCookTime(), 0);
721 if (!thissop)
return getDetailattribs();
723 OP_Utils::evalOpParm(result, thissop,
"detailattribs", cookparms.
getCookTime(), 0);
731 if (!thissop)
return getMatchgroups();
733 OP_Utils::evalOpParm(result, thissop,
"matchgroups", cookparms.
getCookTime(), 0);
741 if (!thissop)
return getComputeweights();
743 OP_Utils::evalOpParm(result, thissop,
"computeweights", cookparms.
getCookTime(), 0);
751 if (!thissop)
return getComputenumberstype();
753 OP_Utils::evalOpParm(result, thissop,
"computenumberstype", cookparms.
getCookTime(), 0);
761 if (!thissop)
return getComputednumbersattrib();
763 OP_Utils::evalOpParm(result, thissop,
"computednumbersattrib", cookparms.
getCookTime(), 0);
771 if (!thissop)
return getComputedweightsattrib();
773 OP_Utils::evalOpParm(result, thissop,
"computedweightsattrib", cookparms.
getCookTime(), 0);
781 if (!thissop)
return getPrescale();
783 OP_Utils::evalOpParm(result, thissop,
"prescale", cookparms.
getCookTime(), 0);
791 if (!thissop)
return getNormalize();
793 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
801 if (!thissop)
return getThreshold();
803 OP_Utils::evalOpParm(result, thissop,
"threshold", cookparms.
getCookTime(), 0);
811 if (!thissop)
return getBlend();
813 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
821 if (!thissop)
return getGroup();
823 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
837 bool myComputeweights;
838 int64 myComputenumberstype;
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setComputedweightsattrib(const UT_StringHolder &val)
void setPrimattribs(const UT_StringHolder &val)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opComputednumbersattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setBlend(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setWeightsattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
SOP_AttribInterpolateParms()
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opPrimattribs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const UT_StringHolder & getNumberattrib() const
fpreal64 opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
bool opMatchgroups(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool operator!=(const SOP_AttribInterpolateParms &src) const
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const UT_StringHolder & getGroup() const
bool opComputeweights(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opNumberattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setInterpby(Interpby val)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool getComputeweights() const
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
const char * getNestParmName(TempIndex fieldnum) const override
Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setComputednumbersattrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void save(std::ostream &os) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setTotype(Totype val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
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 UT_StringHolder & getPrimattribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
const OP_GraphProxy * graph() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 getBlend() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 getPrescale() const
UT_StringHolder opWeightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setPointattribs(const UT_StringHolder &val)
const UT_StringHolder & getComputednumbersattrib() const
const UT_StringHolder & getWeightsattrib() const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 opPrescale(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Interpby getInterpby() const
const UT_StringHolder & getComputedweightsattrib() const
fpreal64 getThreshold() const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_StringHolder & getVertattribs() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setVertattribs(const UT_StringHolder &val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
Computenumberstype getComputenumberstype() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder opComputedweightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getDetailattribs() const
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Computenumberstype opComputenumberstype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
void coerceValue(T &result, const S &src) const
void setThreshold(fpreal64 val)
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
Interpby opInterpby(const SOP_NodeVerb::CookParms &cookparms) const
void setPrescale(fpreal64 val)
UT_StringHolder opDetailattribs(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
void setComputeweights(bool val)
const UT_StringHolder & getPointattribs() const
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opVertattribs(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
bool getNormalize() const
bool getMatchgroups() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNormalize(bool val)
void setDetailattribs(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNumberattrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, bool v)
SYS_FORCE_INLINE bool isstring() const
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator==(const SOP_AttribInterpolateParms &src) const
void setComputenumberstype(Computenumberstype val)
void setMatchgroups(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override