23 namespace SOP_UVProjectEnums
34 using namespace UT::Literal;
54 using namespace UT::Literal;
78 using namespace UT::Literal;
103 using namespace UT::Literal;
104 switch (enum_value) {
126 using namespace UT::Literal;
127 switch (enum_value) {
146 myUVAttrib =
"uv"_UTsh;
176 if (myUVAttrib != src.myUVAttrib)
return false;
177 if (myGroup != src.myGroup)
return false;
178 if (myGroupType != src.myGroupType)
return false;
179 if (myProjType != src.myProjType)
return false;
180 if (myTorRad != src.myTorRad)
return false;
181 if (myXord != src.myXord)
return false;
182 if (myRord != src.myRord)
return false;
183 if (myT != src.myT)
return false;
184 if (myR != src.myR)
return false;
185 if (myS != src.myS)
return false;
186 if (myP != src.myP)
return false;
187 if (myInittype != src.myInittype)
return false;
188 if (myURange != src.myURange)
return false;
189 if (myVRange != src.myVRange)
return false;
190 if (myAngle != src.myAngle)
return false;
191 if (myFixSeams != src.myFixSeams)
return false;
192 if (myFixPolar != src.myFixPolar)
return false;
193 if (myPoleRad != src.myPoleRad)
return false;
211 myUVAttrib =
"uv"_UTsh;
213 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
216 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
219 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
222 graph->
evalOpParm(myProjType, nodeidx,
"projtype", time, 0);
224 if (
true && ( (
true&&!(((
int64(getProjType())!=3)))) ) )
225 graph->
evalOpParm(myTorRad, nodeidx,
"torrad", time, 0);
228 graph->
evalOpParm(myXord, nodeidx,
"xOrd", time, 0);
231 graph->
evalOpParm(myRord, nodeidx,
"rOrd", time, 0);
234 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
237 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
240 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
243 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
246 graph->
evalOpParm(myInittype, nodeidx,
"inittype", time, 0);
249 graph->
evalOpParm(myURange, nodeidx,
"urange", time, 0);
252 graph->
evalOpParm(myVRange, nodeidx,
"vrange", time, 0);
255 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
257 if (
true && ( (
true&&!(((
int64(getProjType())==0))||((
int64(getProjType())==4)))) ) )
258 graph->
evalOpParm(myFixSeams, nodeidx,
"fixseams", time, 0);
260 if (
true && ( (
true&&!(((
int64(getProjType())==0))||((
int64(getProjType())==3)))) ) )
261 graph->
evalOpParm(myFixPolar, nodeidx,
"fixpolar", time, 0);
263 if (
true && ( (
true&&!(((
int64(getProjType())==0))||((
int64(getProjType())==3))||((getFixPolar()==0)))) ) )
264 graph->
evalOpParm(myPoleRad, nodeidx,
"polerad", time, 0);
280 template <
typename T>
287 if (idx.
size() != instance.
size()+1)
292 coerceValue(value, myUVAttrib);
295 coerceValue(value, myGroup);
298 coerceValue(value, myGroupType);
301 coerceValue(value, myProjType);
304 coerceValue(value, myTorRad);
307 coerceValue(value, myXord);
310 coerceValue(value, myRord);
313 coerceValue(value, myT);
316 coerceValue(value, myR);
319 coerceValue(value, myS);
322 coerceValue(value, myP);
325 coerceValue(value, myInittype);
328 coerceValue(value, myURange);
331 coerceValue(value, myVRange);
334 coerceValue(value, myAngle);
337 coerceValue(value, myFixSeams);
340 coerceValue(value, myFixPolar);
343 coerceValue(value, myPoleRad);
359 { doGetParmValue(idx, instance, value); }
361 { doGetParmValue(idx, instance, value); }
363 { doGetParmValue(idx, instance, value); }
365 { doGetParmValue(idx, instance, value); }
367 { doGetParmValue(idx, instance, value); }
369 { doGetParmValue(idx, instance, value); }
371 { doGetParmValue(idx, instance, value); }
373 { doGetParmValue(idx, instance, value); }
375 { doGetParmValue(idx, instance, value); }
377 { doGetParmValue(idx, instance, value); }
379 { doGetParmValue(idx, instance, value); }
381 template <
typename T>
388 if (idx.
size() != instance.
size()+1)
393 coerceValue(myUVAttrib, ( ( value ) ));
396 coerceValue(myGroup, ( ( value ) ));
399 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(1, value ) ));
402 coerceValue(myProjType, clampMinValue(0, clampMaxValue(4, value ) ));
405 coerceValue(myTorRad, ( ( value ) ));
408 coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
411 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
414 coerceValue(myT, ( ( value ) ));
417 coerceValue(myR, ( ( value ) ));
420 coerceValue(myS, ( ( value ) ));
423 coerceValue(myP, ( ( value ) ));
426 coerceValue(myInittype, clampMinValue(0, clampMaxValue(3, value ) ));
429 coerceValue(myURange, ( ( value ) ));
432 coerceValue(myVRange, ( ( value ) ));
435 coerceValue(myAngle, ( ( value ) ));
438 coerceValue(myFixSeams, ( ( value ) ));
441 coerceValue(myFixPolar, ( ( value ) ));
444 coerceValue(myPoleRad, ( ( value ) ));
451 { doSetParmValue(idx, instance, value); }
453 { doSetParmValue(idx, instance, value); }
455 { doSetParmValue(idx, instance, value); }
457 { doSetParmValue(idx, instance, value); }
459 { doSetParmValue(idx, instance, value); }
461 { doSetParmValue(idx, instance, value); }
463 { doSetParmValue(idx, instance, value); }
465 { doSetParmValue(idx, instance, value); }
467 { doSetParmValue(idx, instance, value); }
469 { doSetParmValue(idx, instance, value); }
471 { doSetParmValue(idx, instance, value); }
487 if (fieldnum.
size() < 1)
534 if (fieldnum.
size() < 1)
535 return PARM_UNSUPPORTED;
576 return PARM_UNSUPPORTED;
612 loadData(is, rampdata);
630 int typelen = colon - data.
buffer();
644 {
int64 iv =
v; UTwrite(os, &iv); }
646 { UTwrite<fpreal64>(os, &
v); }
648 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
650 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
651 UTwrite<fpreal64>(os, &v.
z()); }
653 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
654 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
666 if (s) s->save(ostr);
668 saveData(os, result);
675 ostr << s->getDataTypeToken();
680 saveData(os, result);
684 void save(std::ostream &os)
const
688 saveData(os, myUVAttrib);
689 saveData(os, myGroup);
690 saveData(os, myGroupType);
691 saveData(os, myProjType);
692 saveData(os, myTorRad);
693 saveData(os, myXord);
694 saveData(os, myRord);
699 saveData(os, myInittype);
700 saveData(os, myURange);
701 saveData(os, myVRange);
702 saveData(os, myAngle);
703 saveData(os, myFixSeams);
704 saveData(os, myFixPolar);
705 saveData(os, myPoleRad);
718 loadData(is, myUVAttrib);
719 loadData(is, myGroup);
720 loadData(is, myGroupType);
721 loadData(is, myProjType);
722 loadData(is, myTorRad);
723 loadData(is, myXord);
724 loadData(is, myRord);
729 loadData(is, myInittype);
730 loadData(is, myURange);
731 loadData(is, myVRange);
732 loadData(is, myAngle);
733 loadData(is, myFixSeams);
734 loadData(is, myFixPolar);
735 loadData(is, myPoleRad);
745 if (!thissop)
return getUVAttrib();
747 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
755 if (!thissop)
return getGroup();
757 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
765 if (!thissop)
return getGroupType();
767 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
775 if (!thissop)
return getProjType();
777 OP_Utils::evalOpParm(result, thissop,
"projtype", cookparms.
getCookTime(), 0);
785 if (!thissop)
return getTorRad();
787 OP_Utils::evalOpParm(result, thissop,
"torrad", cookparms.
getCookTime(), 0);
795 if (!thissop)
return getXord();
797 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
805 if (!thissop)
return getRord();
807 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
815 if (!thissop)
return getT();
817 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
825 if (!thissop)
return getR();
827 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
835 if (!thissop)
return getS();
837 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
845 if (!thissop)
return getP();
847 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
855 if (!thissop)
return getInittype();
857 OP_Utils::evalOpParm(result, thissop,
"inittype", cookparms.
getCookTime(), 0);
865 if (!thissop)
return getURange();
867 OP_Utils::evalOpParm(result, thissop,
"urange", cookparms.
getCookTime(), 0);
875 if (!thissop)
return getVRange();
877 OP_Utils::evalOpParm(result, thissop,
"vrange", cookparms.
getCookTime(), 0);
885 if (!thissop)
return getAngle();
887 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
895 if (!thissop)
return getFixSeams();
897 OP_Utils::evalOpParm(result, thissop,
"fixseams", cookparms.
getCookTime(), 0);
905 if (!thissop)
return getFixPolar();
907 OP_Utils::evalOpParm(result, thissop,
"fixpolar", cookparms.
getCookTime(), 0);
915 if (!thissop)
return getPoleRad();
917 OP_Utils::evalOpParm(result, thissop,
"polerad", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setProjType(ProjType val)
fpreal64 getTorRad() const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal64 getAngle() const
SOP_Node * getNode() const
void setUVAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setGroupType(GroupType val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2D opVRange(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2T< fpreal64 > UT_Vector2D
fpreal64 opPoleRad(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
void setP(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setGroup(const UT_StringHolder &val)
An output stream object that owns its own string buffer storage.
UT_Vector2D getURange() const
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool load(UT_IStream &is)
const UT_StringHolder & getUVAttrib() const
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setFixSeams(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setT(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 getPoleRad() const
Inittype opInittype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GroupType getGroupType() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setURange(UT_Vector2D val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, fpreal64 v)
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Inittype getInittype() const
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_UVProjectParms &src) const
void save(std::ostream &os) const
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector2D opURange(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GT_API const UT_StringHolder version
SYS_FORCE_INLINE UT_StringHolder getToken(GroupType enum_value)
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
void setS(UT_Vector3D val)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_UVProjectParms &src) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
LeafData & operator=(const LeafData &)=delete
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
UT_Vector2D getVRange() const
static void saveData(std::ostream &os, UT_Vector2D v)
exint getNestNumParms(TempIndex idx) const override
void setPoleRad(fpreal64 val)
fpreal getCookTime() const
void setFixPolar(bool val)
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
ProjType getProjType() const
void setAngle(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setTorRad(fpreal64 val)
void setInittype(Inittype val)
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
void setR(UT_Vector3D val)
ProjType opProjType(const SOP_NodeVerb::CookParms &cookparms) const
void setVRange(UT_Vector2D val)
static void saveData(std::ostream &os, UT_StringHolder s)
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void copyFrom(const OP_NodeParms *src) override
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept