23 namespace SOP_CopyTransformEnums
72 mySourceGroup =
""_UTsh;
73 mySourceGroupType = 0;
88 myNewgroupprefix =
"copyGroup"_UTsh;
89 myDocopyattrib =
false;
90 myCopyattrib =
"copynum"_UTsh;
103 if (mySourceGroup != src.mySourceGroup)
return false;
104 if (mySourceGroupType != src.mySourceGroupType)
return false;
105 if (myNcy != src.myNcy)
return false;
106 if (myPack != src.myPack)
return false;
107 if (myPivot != src.myPivot)
return false;
108 if (myViewportLOD != src.myViewportLOD)
return false;
109 if (myXord != src.myXord)
return false;
110 if (myRord != src.myRord)
return false;
111 if (myT != src.myT)
return false;
112 if (myR != src.myR)
return false;
113 if (myS != src.myS)
return false;
114 if (myShear != src.myShear)
return false;
115 if (myScale != src.myScale)
return false;
116 if (myP != src.myP)
return false;
117 if (myPr != src.myPr)
return false;
118 if (myNewgroups != src.myNewgroups)
return false;
119 if (myNewgroupprefix != src.myNewgroupprefix)
return false;
120 if (myDocopyattrib != src.myDocopyattrib)
return false;
121 if (myCopyattrib != src.myCopyattrib)
return false;
139 mySourceGroup =
""_UTsh;
141 graph->
evalOpParm(mySourceGroup, nodeidx,
"sourcegroup", time, 0);
142 mySourceGroupType = 0;
144 graph->
evalOpParm(mySourceGroupType, nodeidx,
"sourcegrouptype", time, 0);
147 graph->
evalOpParm(myNcy, nodeidx,
"ncy", time, 0);
150 graph->
evalOpParm(myPack, nodeidx,
"pack", time, 0);
152 if (
true && ( (
true&&!(((getPack()==0)))) ) )
153 graph->
evalOpParm(myPivot, nodeidx,
"pivot", time, 0);
155 if (
true && ( (
true&&!(((getPack()==0)))) ) )
156 graph->
evalOpParm(myViewportLOD, nodeidx,
"viewportlod", time, 0);
159 graph->
evalOpParm(myXord, nodeidx,
"xOrd", time, 0);
162 graph->
evalOpParm(myRord, nodeidx,
"rOrd", time, 0);
165 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
168 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
171 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
174 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
177 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
180 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
183 graph->
evalOpParm(myPr, nodeidx,
"pr", time, 0);
186 graph->
evalOpParm(myNewgroups, nodeidx,
"newgroups", time, 0);
187 myNewgroupprefix =
"copyGroup"_UTsh;
188 if (
true && ( (
true&&!(((getNewgroups()==0)))) ) )
189 graph->
evalOpParm(myNewgroupprefix, nodeidx,
"newgroupprefix", time, 0);
190 myDocopyattrib =
false;
192 graph->
evalOpParm(myDocopyattrib, nodeidx,
"docopyattrib", time, 0);
193 myCopyattrib =
"copynum"_UTsh;
194 if (
true && ( (
true&&!(((getDocopyattrib()==0)))) ) )
195 graph->
evalOpParm(myCopyattrib, nodeidx,
"copyattrib", time, 0);
211 template <
typename T>
218 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
313 { doGetParmValue(idx, instance, value); }
315 template <
typename T>
322 if (idx.
size() != instance.
size()+1)
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); }
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); }
424 if (fieldnum.
size() < 1)
429 return "sourcegroup";
431 return "sourcegrouptype";
439 return "viewportlod";
461 return "newgroupprefix";
463 return "docopyattrib";
473 if (fieldnum.
size() < 1)
474 return PARM_UNSUPPORTED;
536 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
538 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
540 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
553 loadData(is, rampdata);
571 int typelen = colon - data.
buffer();
585 {
int64 iv =
v; UTwrite(os, &iv); }
587 { UTwrite<fpreal64>(os, &
v); }
589 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
591 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
592 UTwrite<fpreal64>(os, &v.
z()); }
594 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
595 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
607 if (s) s->save(ostr);
609 saveData(os, result);
616 ostr << s->getDataTypeToken();
621 saveData(os, result);
625 void save(std::ostream &os)
const
629 saveData(os, mySourceGroup);
630 saveData(os, mySourceGroupType);
632 saveData(os, myPack);
633 saveData(os, myPivot);
634 saveData(os, myViewportLOD);
635 saveData(os, myXord);
636 saveData(os, myRord);
640 saveData(os, myShear);
641 saveData(os, myScale);
644 saveData(os, myNewgroups);
645 saveData(os, myNewgroupprefix);
646 saveData(os, myDocopyattrib);
647 saveData(os, myCopyattrib);
660 loadData(is, mySourceGroup);
661 loadData(is, mySourceGroupType);
663 loadData(is, myPack);
664 loadData(is, myPivot);
665 loadData(is, myViewportLOD);
666 loadData(is, myXord);
667 loadData(is, myRord);
671 loadData(is, myShear);
672 loadData(is, myScale);
675 loadData(is, myNewgroups);
676 loadData(is, myNewgroupprefix);
677 loadData(is, myDocopyattrib);
678 loadData(is, myCopyattrib);
688 if (!thissop)
return getSourceGroup();
690 OP_Utils::evalOpParm(result, thissop,
"sourcegroup", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getSourceGroupType();
700 OP_Utils::evalOpParm(result, thissop,
"sourcegrouptype", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getNcy();
710 OP_Utils::evalOpParm(result, thissop,
"ncy", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getPack();
720 OP_Utils::evalOpParm(result, thissop,
"pack", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getPivot();
730 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
731 return Pivot(result);
738 if (!thissop)
return getViewportLOD();
740 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getXord();
750 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getRord();
760 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getT();
770 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
778 if (!thissop)
return getR();
780 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
788 if (!thissop)
return getS();
790 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
798 if (!thissop)
return getShear();
800 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
810 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
818 if (!thissop)
return getP();
820 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
828 if (!thissop)
return getPr();
830 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
838 if (!thissop)
return getNewgroups();
840 OP_Utils::evalOpParm(result, thissop,
"newgroups", cookparms.
getCookTime(), 0);
848 if (!thissop)
return getNewgroupprefix();
850 OP_Utils::evalOpParm(result, thissop,
"newgroupprefix", cookparms.
getCookTime(), 0);
858 if (!thissop)
return getDocopyattrib();
860 OP_Utils::evalOpParm(result, thissop,
"docopyattrib", cookparms.
getCookTime(), 0);
868 if (!thissop)
return getCopyattrib();
870 OP_Utils::evalOpParm(result, thissop,
"copyattrib", cookparms.
getCookTime(), 0);
876 int64 mySourceGroupType;
SOP_Node * getNode() const
T clampMaxValue(fpreal maxvalue, const T &src) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
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 OP_GraphProxy * graph() const
UT_Vector3T< fpreal64 > UT_Vector3D
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
fpreal getCookTime() const
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept