20 using namespace UT::Literal;
23 namespace SOP_EdgeTransportEnums
78 myPrimitiveGroup =
""_sh;
79 myAttribute =
"distance"_sh;
81 myParentAttribute =
"parent"_sh;
86 myIgnoreAttribute =
true;
99 if (myMethod != src.myMethod)
return false;
100 if (myPointGroup != src.myPointGroup)
return false;
101 if (myPrimitiveGroup != src.myPrimitiveGroup)
return false;
102 if (myAttribute != src.myAttribute)
return false;
103 if (myCurveDir != src.myCurveDir)
return false;
104 if (myParentAttribute != src.myParentAttribute)
return false;
105 if (myRootType != src.myRootType)
return false;
106 if (myRootGroup != src.myRootGroup)
return false;
107 if (myOperation != src.myOperation)
return false;
108 if (myRootValue != src.myRootValue)
return false;
109 if (myIgnoreAttribute != src.myIgnoreAttribute)
return false;
110 if (myScaleByEdge != src.myScaleByEdge)
return false;
111 if (mySplitMethod != src.mySplitMethod)
return false;
112 if (myMergeMethod != src.myMergeMethod)
return false;
134 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
135 myPointGroup =
""_sh;
136 if (
true && ( (!(((
int64(getMethod())==0)))) ) )
137 graph->
evalOpParm(myPointGroup, nodeidx,
"ptgroup", time, 0);
138 myPrimitiveGroup =
""_sh;
139 if (
true && ( (!(((
int64(getMethod())!=0)))) ) )
140 graph->
evalOpParm(myPrimitiveGroup, nodeidx,
"primgroup", time, 0);
141 myAttribute =
"distance"_sh;
143 graph->
evalOpParm(myAttribute, nodeidx,
"attribute", time, 0);
146 graph->
evalOpParm(myCurveDir, nodeidx,
"curvedir", time, 0);
147 myParentAttribute =
"parent"_sh;
148 if (
true && ( (!(((
int64(getMethod())!=2)))) ) )
149 graph->
evalOpParm(myParentAttribute, nodeidx,
"parentattribute", time, 0);
151 if (
true && ( (!(((
int64(getMethod())!=1)))) ) )
152 graph->
evalOpParm(myRootType, nodeidx,
"roottype", time, 0);
153 myRootGroup =
"0"_sh;
154 if (
true && ( (!(((
int64(getRootType())!=2))||((
int64(getMethod())!=1)))) ) )
155 graph->
evalOpParm(myRootGroup, nodeidx,
"rootgroup", time, 0);
158 graph->
evalOpParm(myOperation, nodeidx,
"operation", time, 0);
160 if (
true && ( (!(((
int64(getOperation())!=0)))) ) )
161 graph->
evalOpParm(myRootValue, nodeidx,
"rootvalue", time, 0);
162 myIgnoreAttribute =
true;
163 if (
true && ( (!(((
int64(getOperation())!=2)))) ) )
164 graph->
evalOpParm(myIgnoreAttribute, nodeidx,
"ignoreattribute", time, 0);
165 myScaleByEdge =
true;
166 if (
true && ( (!(((
int64(getOperation())!=2)))) ) )
167 graph->
evalOpParm(myScaleByEdge, nodeidx,
"scalebyedge", time, 0);
169 if (
true && ( (!(((
int64(getMethod())==0))||((
int64(getCurveDir())!=0)))) ) )
170 graph->
evalOpParm(mySplitMethod, nodeidx,
"splitmethod", time, 0);
172 if (
true && ( (!(((
int64(getMethod())==0))||((
int64(getCurveDir())!=1)))) ) )
173 graph->
evalOpParm(myMergeMethod, nodeidx,
"mergemethod", time, 0);
189 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
201 coerceValue(value, myMethod);
204 coerceValue(value, myPointGroup);
207 coerceValue(value, myPrimitiveGroup);
210 coerceValue(value, myAttribute);
213 coerceValue(value, myCurveDir);
216 coerceValue(value, myParentAttribute);
219 coerceValue(value, myRootType);
222 coerceValue(value, myRootGroup);
225 coerceValue(value, myOperation);
228 coerceValue(value, myRootValue);
231 coerceValue(value, myIgnoreAttribute);
234 coerceValue(value, myScaleByEdge);
237 coerceValue(value, mySplitMethod);
240 coerceValue(value, myMergeMethod);
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 template <
typename T>
276 if (idx.
size() != instance.
size()+1)
281 coerceValue(myMethod, value);
284 coerceValue(myPointGroup, value);
287 coerceValue(myPrimitiveGroup, value);
290 coerceValue(myAttribute, value);
293 coerceValue(myCurveDir, value);
296 coerceValue(myParentAttribute, value);
299 coerceValue(myRootType, value);
302 coerceValue(myRootGroup, value);
305 coerceValue(myOperation, value);
308 coerceValue(myRootValue, value);
311 coerceValue(myIgnoreAttribute, value);
314 coerceValue(myScaleByEdge, value);
317 coerceValue(mySplitMethod, value);
320 coerceValue(myMergeMethod, value);
327 { doSetParmValue(idx, instance, value); }
329 { doSetParmValue(idx, instance, value); }
331 { doSetParmValue(idx, instance, value); }
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
363 if (fieldnum.
size() < 1)
378 return "parentattribute";
388 return "ignoreattribute";
390 return "scalebyedge";
392 return "splitmethod";
394 return "mergemethod";
402 if (fieldnum.
size() < 1)
403 return PARM_UNSUPPORTED;
436 return PARM_UNSUPPORTED;
472 loadData(is, rampdata);
490 int typelen = colon - data.
buffer();
504 {
int64 iv =
v; UTwrite(os, &iv); }
506 { UTwrite<fpreal64>(os, &
v); }
508 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
510 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
511 UTwrite<fpreal64>(os, &v.
z()); }
513 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
514 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
526 if (s) s->save(ostr);
528 saveData(os, result);
535 ostr << s->getDataTypeToken();
540 saveData(os, result);
544 void save(std::ostream &os)
const
548 saveData(os, myMethod);
549 saveData(os, myPointGroup);
550 saveData(os, myPrimitiveGroup);
551 saveData(os, myAttribute);
552 saveData(os, myCurveDir);
553 saveData(os, myParentAttribute);
554 saveData(os, myRootType);
555 saveData(os, myRootGroup);
556 saveData(os, myOperation);
557 saveData(os, myRootValue);
558 saveData(os, myIgnoreAttribute);
559 saveData(os, myScaleByEdge);
560 saveData(os, mySplitMethod);
561 saveData(os, myMergeMethod);
574 loadData(is, myMethod);
575 loadData(is, myPointGroup);
576 loadData(is, myPrimitiveGroup);
577 loadData(is, myAttribute);
578 loadData(is, myCurveDir);
579 loadData(is, myParentAttribute);
580 loadData(is, myRootType);
581 loadData(is, myRootGroup);
582 loadData(is, myOperation);
583 loadData(is, myRootValue);
584 loadData(is, myIgnoreAttribute);
585 loadData(is, myScaleByEdge);
586 loadData(is, mySplitMethod);
587 loadData(is, myMergeMethod);
597 if (!thissop)
return getMethod();
599 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
607 if (!thissop)
return getPointGroup();
609 OP_Utils::evalOpParm(result, thissop,
"ptgroup", cookparms.
getCookTime(), 0);
617 if (!thissop)
return getPrimitiveGroup();
619 OP_Utils::evalOpParm(result, thissop,
"primgroup", cookparms.
getCookTime(), 0);
627 if (!thissop)
return getAttribute();
629 OP_Utils::evalOpParm(result, thissop,
"attribute", cookparms.
getCookTime(), 0);
637 if (!thissop)
return getCurveDir();
639 OP_Utils::evalOpParm(result, thissop,
"curvedir", cookparms.
getCookTime(), 0);
647 if (!thissop)
return getParentAttribute();
649 OP_Utils::evalOpParm(result, thissop,
"parentattribute", cookparms.
getCookTime(), 0);
657 if (!thissop)
return getRootType();
659 OP_Utils::evalOpParm(result, thissop,
"roottype", cookparms.
getCookTime(), 0);
667 if (!thissop)
return getRootGroup();
669 OP_Utils::evalOpParm(result, thissop,
"rootgroup", cookparms.
getCookTime(), 0);
677 if (!thissop)
return getOperation();
679 OP_Utils::evalOpParm(result, thissop,
"operation", cookparms.
getCookTime(), 0);
687 if (!thissop)
return getRootValue();
689 OP_Utils::evalOpParm(result, thissop,
"rootvalue", cookparms.
getCookTime(), 0);
697 if (!thissop)
return getIgnoreAttribute();
699 OP_Utils::evalOpParm(result, thissop,
"ignoreattribute", cookparms.
getCookTime(), 0);
707 if (!thissop)
return getScaleByEdge();
709 OP_Utils::evalOpParm(result, thissop,
"scalebyedge", cookparms.
getCookTime(), 0);
717 if (!thissop)
return getSplitMethod();
719 OP_Utils::evalOpParm(result, thissop,
"splitmethod", cookparms.
getCookTime(), 0);
727 if (!thissop)
return getMergeMethod();
729 OP_Utils::evalOpParm(result, thissop,
"mergemethod", cookparms.
getCookTime(), 0);
744 bool myIgnoreAttribute;
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
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SOP_Node * getNode() const
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
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 setOperation(Operation val)
RootType getRootType() const
GLuint const GLfloat * val
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opRootGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getIgnoreAttribute() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
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
const SOP_GraphProxy * graph() const
CurveDir getCurveDir() const
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
UT_StringHolder opAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
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
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
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Matrix2D v)
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.
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
GLint GLenum GLsizei GLint GLsizei const void * data
static void saveData(std::ostream &os, bool v)
~SOP_EdgeTransportParms() override
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 copyFrom(const SOP_NodeParms *src) 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)
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
DEP_MicroNode * depnode() const
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 setPrimitiveGroup(const UT_StringHolder &val)
bool load(UT_IStream &is)
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
RootValue opRootValue(const SOP_NodeVerb::CookParms &cookparms) const
void setMergeMethod(MergeMethod val)
GLdouble GLdouble GLdouble r
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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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 setIgnoreAttribute(bool val)
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
GLsizei const GLfloat * value
const OP_Context & context() const
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
SYS_FORCE_INLINE bool isstring() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opParentAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const