23 namespace SOP_EdgeTransportEnums
82 myPointGroup =
""_UTsh;
83 myPrimitiveGroup =
""_UTsh;
84 myAttribute =
"dist"_UTsh;
86 myParentAttribute =
"parent"_UTsh;
88 myRootGroup =
"0"_UTsh;
90 myUseNormalization =
false;
93 myIgnoreAttribute =
true;
95 myRotateByEdge =
false;
110 if (myMethod != src.myMethod)
return false;
111 if (myPointGroup != src.myPointGroup)
return false;
112 if (myPrimitiveGroup != src.myPrimitiveGroup)
return false;
113 if (myAttribute != src.myAttribute)
return false;
114 if (myCurveDir != src.myCurveDir)
return false;
115 if (myParentAttribute != src.myParentAttribute)
return false;
116 if (myRootType != src.myRootType)
return false;
117 if (myRootGroup != src.myRootGroup)
return false;
118 if (myOperation != src.myOperation)
return false;
119 if (myUseNormalization != src.myUseNormalization)
return false;
120 if (myNormalization != src.myNormalization)
return false;
121 if (myRootValue != src.myRootValue)
return false;
122 if (myIgnoreAttribute != src.myIgnoreAttribute)
return false;
123 if (myScaleByEdge != src.myScaleByEdge)
return false;
124 if (myRotateByEdge != src.myRotateByEdge)
return false;
125 if (mySplitMethod != src.mySplitMethod)
return false;
126 if (myMergeMethod != src.myMergeMethod)
return false;
149 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
150 myPointGroup =
""_UTsh;
151 if (
true && ( (
true&&!(((
int64(getMethod())==0)))) ) )
152 graph->
evalOpParm(myPointGroup, nodeidx,
"ptgroup", time, 0);
153 myPrimitiveGroup =
""_UTsh;
154 if (
true && ( (
true&&!(((
int64(getMethod())!=0)))) ) )
155 graph->
evalOpParm(myPrimitiveGroup, nodeidx,
"primgroup", time, 0);
156 myAttribute =
"dist"_UTsh;
158 graph->
evalOpParm(myAttribute, nodeidx,
"attribute", time, 0);
161 graph->
evalOpParm(myCurveDir, nodeidx,
"curvedir", time, 0);
162 myParentAttribute =
"parent"_UTsh;
163 if (
true && ( (
true&&!(((
int64(getMethod())!=2)))) ) )
164 graph->
evalOpParm(myParentAttribute, nodeidx,
"parentattribute", time, 0);
166 if (
true && ( (
true&&!(((
int64(getMethod())!=1)))) ) )
167 graph->
evalOpParm(myRootType, nodeidx,
"roottype", time, 0);
168 myRootGroup =
"0"_UTsh;
169 if (
true && ( (
true&&!(((
int64(getRootType())!=2))||((
int64(getMethod())!=1)))) ) )
170 graph->
evalOpParm(myRootGroup, nodeidx,
"rootgroup", time, 0);
173 graph->
evalOpParm(myOperation, nodeidx,
"operation", time, 0);
174 myUseNormalization =
false;
176 graph->
evalOpParm(myUseNormalization, nodeidx,
"donormalization", time, 0);
178 if (
true && ( (
true&&!(((getUseNormalization()==0)))) ) )
179 graph->
evalOpParm(myNormalization, nodeidx,
"normalization", time, 0);
181 if (
true && ( (
true&&!(((
int64(getOperation())!=0)))) ) )
182 graph->
evalOpParm(myRootValue, nodeidx,
"rootvalue", time, 0);
183 myIgnoreAttribute =
true;
184 if (
true && ( (
true&&!(((
int64(getOperation())!=2)))) ) )
185 graph->
evalOpParm(myIgnoreAttribute, nodeidx,
"ignoreattribute", time, 0);
186 myScaleByEdge =
true;
187 if (
true && ( (
true&&!(((
int64(getOperation())!=2)))) ) )
188 graph->
evalOpParm(myScaleByEdge, nodeidx,
"scalebyedge", time, 0);
189 myRotateByEdge =
false;
190 if (
true && ( (
true&&!(((
int64(getMethod())!=0)&&(
int64(getCurveDir())==1)))) ) )
191 graph->
evalOpParm(myRotateByEdge, nodeidx,
"rotatebyedge", time, 0);
193 if (
true && ( (
true&&!(((
int64(getMethod())==0))||((
int64(getCurveDir())!=0)))) ) )
194 graph->
evalOpParm(mySplitMethod, nodeidx,
"splitmethod", time, 0);
196 if (
true && ( (
true&&!(((
int64(getMethod())==0))||((
int64(getCurveDir())!=1)))) ) )
197 graph->
evalOpParm(myMergeMethod, nodeidx,
"mergemethod", time, 0);
213 template <
typename T>
220 if (idx.
size() != instance.
size()+1)
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 { doGetParmValue(idx, instance, value); }
297 { doGetParmValue(idx, instance, value); }
299 { doGetParmValue(idx, instance, value); }
301 { doGetParmValue(idx, instance, value); }
303 { doGetParmValue(idx, instance, value); }
305 { doGetParmValue(idx, instance, value); }
307 { doGetParmValue(idx, instance, value); }
309 { doGetParmValue(idx, instance, value); }
311 template <
typename T>
318 if (idx.
size() != instance.
size()+1)
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
384 { doSetParmValue(idx, instance, value); }
386 { doSetParmValue(idx, instance, value); }
388 { doSetParmValue(idx, instance, value); }
390 { doSetParmValue(idx, instance, value); }
392 { doSetParmValue(idx, instance, value); }
394 { doSetParmValue(idx, instance, value); }
396 { doSetParmValue(idx, instance, value); }
398 { doSetParmValue(idx, instance, value); }
414 if (fieldnum.
size() < 1)
429 return "parentattribute";
437 return "donormalization";
439 return "normalization";
443 return "ignoreattribute";
445 return "scalebyedge";
447 return "rotatebyedge";
449 return "splitmethod";
451 return "mergemethod";
459 if (fieldnum.
size() < 1)
460 return PARM_UNSUPPORTED;
518 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
520 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
522 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
535 loadData(is, rampdata);
553 int typelen = colon - data.
buffer();
567 {
int64 iv =
v; UTwrite(os, &iv); }
569 { UTwrite<fpreal64>(os, &
v); }
571 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
573 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
574 UTwrite<fpreal64>(os, &v.
z()); }
576 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
577 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
589 if (s) s->save(ostr);
591 saveData(os, result);
598 ostr << s->getDataTypeToken();
603 saveData(os, result);
607 void save(std::ostream &os)
const
611 saveData(os, myMethod);
612 saveData(os, myPointGroup);
613 saveData(os, myPrimitiveGroup);
614 saveData(os, myAttribute);
615 saveData(os, myCurveDir);
616 saveData(os, myParentAttribute);
617 saveData(os, myRootType);
618 saveData(os, myRootGroup);
619 saveData(os, myOperation);
620 saveData(os, myUseNormalization);
621 saveData(os, myNormalization);
622 saveData(os, myRootValue);
623 saveData(os, myIgnoreAttribute);
624 saveData(os, myScaleByEdge);
625 saveData(os, myRotateByEdge);
626 saveData(os, mySplitMethod);
627 saveData(os, myMergeMethod);
640 loadData(is, myMethod);
641 loadData(is, myPointGroup);
642 loadData(is, myPrimitiveGroup);
643 loadData(is, myAttribute);
644 loadData(is, myCurveDir);
645 loadData(is, myParentAttribute);
646 loadData(is, myRootType);
647 loadData(is, myRootGroup);
648 loadData(is, myOperation);
649 loadData(is, myUseNormalization);
650 loadData(is, myNormalization);
651 loadData(is, myRootValue);
652 loadData(is, myIgnoreAttribute);
653 loadData(is, myScaleByEdge);
654 loadData(is, myRotateByEdge);
655 loadData(is, mySplitMethod);
656 loadData(is, myMergeMethod);
666 if (!thissop)
return getMethod();
668 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getPointGroup();
678 OP_Utils::evalOpParm(result, thissop,
"ptgroup", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getPrimitiveGroup();
688 OP_Utils::evalOpParm(result, thissop,
"primgroup", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getAttribute();
698 OP_Utils::evalOpParm(result, thissop,
"attribute", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getCurveDir();
708 OP_Utils::evalOpParm(result, thissop,
"curvedir", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getParentAttribute();
718 OP_Utils::evalOpParm(result, thissop,
"parentattribute", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getRootType();
728 OP_Utils::evalOpParm(result, thissop,
"roottype", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getRootGroup();
738 OP_Utils::evalOpParm(result, thissop,
"rootgroup", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getOperation();
748 OP_Utils::evalOpParm(result, thissop,
"operation", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getUseNormalization();
758 OP_Utils::evalOpParm(result, thissop,
"donormalization", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getNormalization();
768 OP_Utils::evalOpParm(result, thissop,
"normalization", cookparms.
getCookTime(), 0);
776 if (!thissop)
return getRootValue();
778 OP_Utils::evalOpParm(result, thissop,
"rootvalue", cookparms.
getCookTime(), 0);
786 if (!thissop)
return getIgnoreAttribute();
788 OP_Utils::evalOpParm(result, thissop,
"ignoreattribute", cookparms.
getCookTime(), 0);
796 if (!thissop)
return getScaleByEdge();
798 OP_Utils::evalOpParm(result, thissop,
"scalebyedge", cookparms.
getCookTime(), 0);
806 if (!thissop)
return getRotateByEdge();
808 OP_Utils::evalOpParm(result, thissop,
"rotatebyedge", cookparms.
getCookTime(), 0);
816 if (!thissop)
return getSplitMethod();
818 OP_Utils::evalOpParm(result, thissop,
"splitmethod", cookparms.
getCookTime(), 0);
826 if (!thissop)
return getMergeMethod();
828 OP_Utils::evalOpParm(result, thissop,
"mergemethod", cookparms.
getCookTime(), 0);
842 bool myUseNormalization;
843 int64 myNormalization;
845 bool myIgnoreAttribute;
Normalization getNormalization() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setPointGroup(const UT_StringHolder &val)
RootValue getRootValue() const
SOP_Node * getNode() const
bool isParmColorRamp(exint idx) const override
void setParentAttribute(const UT_StringHolder &val)
Operation getOperation() const
void setScaleByEdge(bool val)
const UT_StringHolder & getPrimitiveGroup() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opScaleByEdge(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
Normalization opNormalization(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint bread(int32 *buffer, exint asize=1)
RootType opRootType(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
void setRotateByEdge(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setOperation(Operation val)
RootType getRootType() const
bool getRotateByEdge() const
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opRootGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setUseNormalization(bool val)
bool getIgnoreAttribute() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Vector2D v)
void setRootType(RootType val)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getAttribute() const
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
CurveDir getCurveDir() const
void setNormalization(Normalization val)
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const UT_StringHolder & getPointGroup() const
**But if you need a result
UT_StringHolder opAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
T clampMinValue(fpreal minvalue, const T &src) const
SplitMethod opSplitMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
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 setCurveDir(CurveDir val)
bool getScaleByEdge() const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const SOP_EdgeTransportParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opRotateByEdge(const SOP_NodeVerb::CookParms &cookparms) const
void setMethod(Method val)
bool operator!=(const SOP_EdgeTransportParms &src) const
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
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, bool v)
const OP_GraphProxy * graph() const
SplitMethod getSplitMethod() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_StringHolder & getRootGroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
MergeMethod opMergeMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GT_API const UT_StringHolder version
void setSplitMethod(SplitMethod val)
void setRootValue(RootValue val)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setRootGroup(const UT_StringHolder &val)
void coerceValue(T &result, const S &src) const
void setPrimitiveGroup(const UT_StringHolder &val)
bool load(UT_IStream &is)
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool getUseNormalization() const
RootValue opRootValue(const SOP_NodeVerb::CookParms &cookparms) const
void setMergeMethod(MergeMethod val)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getParentAttribute() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal getCookTime() const
void setAttribute(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * findChar(int c) const
ParmType getNestParmType(TempIndex fieldnum) const override
bool opIgnoreAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setIgnoreAttribute(bool val)
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opPrimitiveGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
CurveDir opCurveDir(const SOP_NodeVerb::CookParms &cookparms) const
MergeMethod getMergeMethod() const
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opUseNormalization(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opParentAttribute(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const