23 namespace SOP_CapEnums
37 using namespace UT::Literal;
60 using namespace UT::Literal;
83 using namespace UT::Literal;
106 using namespace UT::Literal;
107 switch (enum_value) {
154 if (myGroup != src.myGroup)
return false;
155 if (myFirstU != src.myFirstU)
return false;
156 if (myDivsU1 != src.myDivsU1)
return false;
157 if (myScaleU1 != src.myScaleU1)
return false;
158 if (myLastU != src.myLastU)
return false;
159 if (myDivsU2 != src.myDivsU2)
return false;
160 if (myScaleU2 != src.myScaleU2)
return false;
161 if (myFirstV != src.myFirstV)
return false;
162 if (myDivsV1 != src.myDivsV1)
return false;
163 if (myScaleV1 != src.myScaleV1)
return false;
164 if (myLastV != src.myLastV)
return false;
165 if (myDivsV2 != src.myDivsV2)
return false;
166 if (myScaleV2 != src.myScaleV2)
return false;
167 if (myPShapeU != src.myPShapeU)
return false;
168 if (myPShapeV != src.myPShapeV)
return false;
187 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
190 graph->
evalOpParm(myFirstU, nodeidx,
"firstu", time, 0);
192 if (
true && ( (
true&&!(((
int64(getFirstU())<3)))) ) )
193 graph->
evalOpParm(myDivsU1, nodeidx,
"divsu1", time, 0);
195 if (
true && ( (
true&&!(((
int64(getFirstU())<3)))) ) )
196 graph->
evalOpParm(myScaleU1, nodeidx,
"scaleu1", time, 0);
199 graph->
evalOpParm(myLastU, nodeidx,
"lastu", time, 0);
201 if (
true && ( (
true&&!(((
int64(getLastU())<3)))) ) )
202 graph->
evalOpParm(myDivsU2, nodeidx,
"divsu2", time, 0);
204 if (
true && ( (
true&&!(((
int64(getLastU())<3)))) ) )
205 graph->
evalOpParm(myScaleU2, nodeidx,
"scaleu2", time, 0);
208 graph->
evalOpParm(myFirstV, nodeidx,
"firstv", time, 0);
210 if (
true && ( (
true&&!(((
int64(getFirstV())<3)))) ) )
211 graph->
evalOpParm(myDivsV1, nodeidx,
"divsv1", time, 0);
213 if (
true && ( (
true&&!(((
int64(getFirstV())<3)))) ) )
214 graph->
evalOpParm(myScaleV1, nodeidx,
"scalev1", time, 0);
217 graph->
evalOpParm(myLastV, nodeidx,
"lastv", time, 0);
219 if (
true && ( (
true&&!(((
int64(getLastV())<3)))) ) )
220 graph->
evalOpParm(myDivsV2, nodeidx,
"divsv2", time, 0);
222 if (
true && ( (
true&&!(((
int64(getLastV())<3)))) ) )
223 graph->
evalOpParm(myScaleV2, nodeidx,
"scalev2", time, 0);
225 if (
true && ( (
true&&!(((
int64(getFirstU())<3)&&(
int64(getLastU())<3)))) ) )
226 graph->
evalOpParm(myPShapeU, nodeidx,
"pshapeu", time, 0);
228 if (
true && ( (
true&&!(((
int64(getFirstV())<3)&&(
int64(getLastV())<3)))) ) )
229 graph->
evalOpParm(myPShapeV, nodeidx,
"pshapev", time, 0);
245 template <
typename T>
252 if (idx.
size() != instance.
size()+1)
257 coerceValue(value, myGroup);
260 coerceValue(value, myFirstU);
263 coerceValue(value, myDivsU1);
266 coerceValue(value, myScaleU1);
269 coerceValue(value, myLastU);
272 coerceValue(value, myDivsU2);
275 coerceValue(value, myScaleU2);
278 coerceValue(value, myFirstV);
281 coerceValue(value, myDivsV1);
284 coerceValue(value, myScaleV1);
287 coerceValue(value, myLastV);
290 coerceValue(value, myDivsV2);
293 coerceValue(value, myScaleV2);
296 coerceValue(value, myPShapeU);
299 coerceValue(value, myPShapeV);
315 { doGetParmValue(idx, instance, value); }
317 { doGetParmValue(idx, instance, value); }
319 { doGetParmValue(idx, instance, value); }
321 { doGetParmValue(idx, instance, value); }
323 { doGetParmValue(idx, instance, value); }
325 { doGetParmValue(idx, instance, value); }
327 { doGetParmValue(idx, instance, value); }
329 { doGetParmValue(idx, instance, value); }
331 { doGetParmValue(idx, instance, value); }
333 { doGetParmValue(idx, instance, value); }
335 { doGetParmValue(idx, instance, value); }
337 template <
typename T>
344 if (idx.
size() != instance.
size()+1)
349 coerceValue(myGroup, ( ( value ) ));
352 coerceValue(myFirstU, clampMinValue(0, clampMaxValue(4, value ) ));
355 coerceValue(myDivsU1, clampMinValue(1, ( value ) ));
358 coerceValue(myScaleU1, ( ( value ) ));
361 coerceValue(myLastU, clampMinValue(0, clampMaxValue(4, value ) ));
364 coerceValue(myDivsU2, clampMinValue(1, ( value ) ));
367 coerceValue(myScaleU2, ( ( value ) ));
370 coerceValue(myFirstV, clampMinValue(0, clampMaxValue(4, value ) ));
373 coerceValue(myDivsV1, clampMinValue(1, ( value ) ));
376 coerceValue(myScaleV1, ( ( value ) ));
379 coerceValue(myLastV, clampMinValue(0, clampMaxValue(4, value ) ));
382 coerceValue(myDivsV2, clampMinValue(1, ( value ) ));
385 coerceValue(myScaleV2, ( ( value ) ));
388 coerceValue(myPShapeU, ( ( value ) ));
391 coerceValue(myPShapeV, ( ( value ) ));
398 { doSetParmValue(idx, instance, value); }
400 { doSetParmValue(idx, instance, value); }
402 { doSetParmValue(idx, instance, value); }
404 { doSetParmValue(idx, instance, value); }
406 { doSetParmValue(idx, instance, value); }
408 { doSetParmValue(idx, instance, value); }
410 { doSetParmValue(idx, instance, value); }
412 { doSetParmValue(idx, instance, value); }
414 { doSetParmValue(idx, instance, value); }
416 { doSetParmValue(idx, instance, value); }
418 { doSetParmValue(idx, instance, value); }
434 if (fieldnum.
size() < 1)
475 if (fieldnum.
size() < 1)
476 return PARM_UNSUPPORTED;
511 return PARM_UNSUPPORTED;
547 loadData(is, rampdata);
565 int typelen = colon - data.
buffer();
579 {
int64 iv =
v; UTwrite(os, &iv); }
581 { UTwrite<fpreal64>(os, &
v); }
583 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
585 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
586 UTwrite<fpreal64>(os, &v.
z()); }
588 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
589 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
601 if (s) s->save(ostr);
603 saveData(os, result);
610 ostr << s->getDataTypeToken();
615 saveData(os, result);
619 void save(std::ostream &os)
const
623 saveData(os, myGroup);
624 saveData(os, myFirstU);
625 saveData(os, myDivsU1);
626 saveData(os, myScaleU1);
627 saveData(os, myLastU);
628 saveData(os, myDivsU2);
629 saveData(os, myScaleU2);
630 saveData(os, myFirstV);
631 saveData(os, myDivsV1);
632 saveData(os, myScaleV1);
633 saveData(os, myLastV);
634 saveData(os, myDivsV2);
635 saveData(os, myScaleV2);
636 saveData(os, myPShapeU);
637 saveData(os, myPShapeV);
650 loadData(is, myGroup);
651 loadData(is, myFirstU);
652 loadData(is, myDivsU1);
653 loadData(is, myScaleU1);
654 loadData(is, myLastU);
655 loadData(is, myDivsU2);
656 loadData(is, myScaleU2);
657 loadData(is, myFirstV);
658 loadData(is, myDivsV1);
659 loadData(is, myScaleV1);
660 loadData(is, myLastV);
661 loadData(is, myDivsV2);
662 loadData(is, myScaleV2);
663 loadData(is, myPShapeU);
664 loadData(is, myPShapeV);
674 if (!thissop)
return getGroup();
676 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getFirstU();
686 OP_Utils::evalOpParm(result, thissop,
"firstu", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getDivsU1();
696 OP_Utils::evalOpParm(result, thissop,
"divsu1", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getScaleU1();
706 OP_Utils::evalOpParm(result, thissop,
"scaleu1", cookparms.
getCookTime(), 0);
714 if (!thissop)
return getLastU();
716 OP_Utils::evalOpParm(result, thissop,
"lastu", cookparms.
getCookTime(), 0);
717 return LastU(result);
724 if (!thissop)
return getDivsU2();
726 OP_Utils::evalOpParm(result, thissop,
"divsu2", cookparms.
getCookTime(), 0);
734 if (!thissop)
return getScaleU2();
736 OP_Utils::evalOpParm(result, thissop,
"scaleu2", cookparms.
getCookTime(), 0);
744 if (!thissop)
return getFirstV();
746 OP_Utils::evalOpParm(result, thissop,
"firstv", cookparms.
getCookTime(), 0);
754 if (!thissop)
return getDivsV1();
756 OP_Utils::evalOpParm(result, thissop,
"divsv1", cookparms.
getCookTime(), 0);
764 if (!thissop)
return getScaleV1();
766 OP_Utils::evalOpParm(result, thissop,
"scalev1", cookparms.
getCookTime(), 0);
774 if (!thissop)
return getLastV();
776 OP_Utils::evalOpParm(result, thissop,
"lastv", cookparms.
getCookTime(), 0);
777 return LastV(result);
784 if (!thissop)
return getDivsV2();
786 OP_Utils::evalOpParm(result, thissop,
"divsv2", cookparms.
getCookTime(), 0);
794 if (!thissop)
return getScaleV2();
796 OP_Utils::evalOpParm(result, thissop,
"scalev2", cookparms.
getCookTime(), 0);
804 if (!thissop)
return getPShapeU();
806 OP_Utils::evalOpParm(result, thissop,
"pshapeu", cookparms.
getCookTime(), 0);
814 if (!thissop)
return getPShapeV();
816 OP_Utils::evalOpParm(result, thissop,
"pshapev", cookparms.
getCookTime(), 0);
const char * getNestParmName(TempIndex fieldnum) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
int64 opDivsU1(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, fpreal64 v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal64 getScaleU1() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_Context & context() const
void setGroup(const UT_StringHolder &val)
bool operator!=(const SOP_CapParms &src) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setFirstU(FirstU val)
SYS_FORCE_INLINE UT_StringHolder getToken(FirstU enum_value)
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, int64 &v)
void setFirstV(FirstV val)
**But if you need a result
FirstV opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
void setPShapeU(bool val)
fpreal64 opScaleV2(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) 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 getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
int64 opDivsU2(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setScaleU1(fpreal64 val)
fpreal64 opScaleU1(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_StringHolder & getGroup() const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 getScaleU2() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setScaleV1(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
FirstU opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
const OP_GraphProxy * graph() const
void setScaleU2(fpreal64 val)
void setDivsV1(int64 val)
fpreal64 getScaleV2() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setDivsU2(int64 val)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, fpreal64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
LastV opLastV(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opScaleV1(const SOP_NodeVerb::CookParms &cookparms) const
void setDivsU1(int64 val)
void setScaleV2(fpreal64 val)
bool opPShapeU(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opScaleU2(const SOP_NodeVerb::CookParms &cookparms) const
int64 opDivsV2(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, UT_Matrix2D v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Matrix3D v)
LastU opLastU(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setPShapeV(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal getCookTime() const
const char * findChar(int c) const
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setDivsV2(int64 val)
bool operator==(const SOP_CapParms &src) const
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opPShapeV(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
int64 opDivsV1(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 getScaleV1() const