23 namespace SOP_CopyTransformEnums
35 using namespace UT::Literal;
53 using namespace UT::Literal;
73 using namespace UT::Literal;
97 using namespace UT::Literal;
122 using namespace UT::Literal;
123 switch (enum_value) {
144 mySourceGroup =
""_UTsh;
145 mySourceGroupType = 0;
160 myNewgroupprefix =
"copyGroup"_UTsh;
161 myDocopyattrib =
false;
162 myCopyattrib =
"copynum"_UTsh;
175 if (mySourceGroup != src.mySourceGroup)
return false;
176 if (mySourceGroupType != src.mySourceGroupType)
return false;
177 if (myNcy != src.myNcy)
return false;
178 if (myPack != src.myPack)
return false;
179 if (myPivot != src.myPivot)
return false;
180 if (myViewportLOD != src.myViewportLOD)
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 (myShear != src.myShear)
return false;
187 if (myScale != src.myScale)
return false;
188 if (myP != src.myP)
return false;
189 if (myPr != src.myPr)
return false;
190 if (myNewgroups != src.myNewgroups)
return false;
191 if (myNewgroupprefix != src.myNewgroupprefix)
return false;
192 if (myDocopyattrib != src.myDocopyattrib)
return false;
193 if (myCopyattrib != src.myCopyattrib)
return false;
214 mySourceGroup =
""_UTsh;
216 graph->
evalOpParm(mySourceGroup, nodeidx,
"sourcegroup", time, graph->
isDirect()?
nullptr:depnode);
217 mySourceGroupType = 0;
219 graph->
evalOpParm(mySourceGroupType, nodeidx,
"sourcegrouptype", time, graph->
isDirect()?
nullptr:depnode);
227 if (
true && ( (
true&&!(((getPack()==0)))) ) )
228 graph->
evalOpParm(myPivot, nodeidx,
"pivot", time, graph->
isDirect()?
nullptr:depnode);
230 if (
true && ( (
true&&!(((getPack()==0)))) ) )
231 graph->
evalOpParm(myViewportLOD, nodeidx,
"viewportlod", time, graph->
isDirect()?
nullptr:depnode);
249 graph->
evalOpParm(myShear, nodeidx,
"shear", time, graph->
isDirect()?
nullptr:depnode);
252 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
261 graph->
evalOpParm(myNewgroups, nodeidx,
"newgroups", time, graph->
isDirect()?
nullptr:depnode);
262 myNewgroupprefix =
"copyGroup"_UTsh;
263 if (
true && ( (
true&&!(((getNewgroups()==0)))) ) )
264 graph->
evalOpParm(myNewgroupprefix, nodeidx,
"newgroupprefix", time, graph->
isDirect()?
nullptr:depnode);
265 myDocopyattrib =
false;
267 graph->
evalOpParm(myDocopyattrib, nodeidx,
"docopyattrib", time, graph->
isDirect()?
nullptr:depnode);
268 myCopyattrib =
"copynum"_UTsh;
269 if (
true && ( (
true&&!(((getDocopyattrib()==0)))) ) )
270 graph->
evalOpParm(myCopyattrib, nodeidx,
"copyattrib", time, graph->
isDirect()?
nullptr:depnode);
286 template <
typename T>
293 if (idx.
size() != instance.
size()+1)
298 coerceValue(value, mySourceGroup);
301 coerceValue(value, mySourceGroupType);
304 coerceValue(value, myNcy);
307 coerceValue(value, myPack);
310 coerceValue(value, myPivot);
313 coerceValue(value, myViewportLOD);
316 coerceValue(value, myXord);
319 coerceValue(value, myRord);
322 coerceValue(value, myT);
325 coerceValue(value, myR);
328 coerceValue(value, myS);
331 coerceValue(value, myShear);
334 coerceValue(value, myScale);
337 coerceValue(value, myP);
340 coerceValue(value, myPr);
343 coerceValue(value, myNewgroups);
346 coerceValue(value, myNewgroupprefix);
349 coerceValue(value, myDocopyattrib);
352 coerceValue(value, myCopyattrib);
368 { doGetParmValue(idx, instance, value); }
370 { doGetParmValue(idx, instance, value); }
372 { doGetParmValue(idx, instance, value); }
374 { doGetParmValue(idx, instance, value); }
376 { doGetParmValue(idx, instance, value); }
378 { doGetParmValue(idx, instance, value); }
380 { doGetParmValue(idx, instance, value); }
382 { doGetParmValue(idx, instance, value); }
384 { doGetParmValue(idx, instance, value); }
386 { doGetParmValue(idx, instance, value); }
388 { doGetParmValue(idx, instance, value); }
390 template <
typename T>
397 if (idx.
size() != instance.
size()+1)
402 coerceValue(mySourceGroup, ( ( value ) ));
405 coerceValue(mySourceGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
408 coerceValue(myNcy, clampMinValue(0, ( value ) ));
411 coerceValue(myPack, ( ( value ) ));
414 coerceValue(myPivot, clampMinValue(0, clampMaxValue(1, value ) ));
417 coerceValue(myViewportLOD, clampMinValue(0, clampMaxValue(4, value ) ));
420 coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
423 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
426 coerceValue(myT, ( ( value ) ));
429 coerceValue(myR, ( ( value ) ));
432 coerceValue(myS, ( ( value ) ));
435 coerceValue(myShear, ( ( value ) ));
438 coerceValue(myScale, ( ( value ) ));
441 coerceValue(myP, ( ( value ) ));
444 coerceValue(myPr, ( ( value ) ));
447 coerceValue(myNewgroups, ( ( value ) ));
450 coerceValue(myNewgroupprefix, ( ( value ) ));
453 coerceValue(myDocopyattrib, ( ( value ) ));
456 coerceValue(myCopyattrib, ( ( 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); }
473 { doSetParmValue(idx, instance, value); }
475 { doSetParmValue(idx, instance, value); }
477 { doSetParmValue(idx, instance, value); }
479 { doSetParmValue(idx, instance, value); }
481 { doSetParmValue(idx, instance, value); }
483 { doSetParmValue(idx, instance, value); }
499 if (fieldnum.
size() < 1)
504 return "sourcegroup";
506 return "sourcegrouptype";
514 return "viewportlod";
536 return "newgroupprefix";
538 return "docopyattrib";
548 if (fieldnum.
size() < 1)
549 return PARM_UNSUPPORTED;
592 return PARM_UNSUPPORTED;
628 loadData(is, rampdata);
646 int typelen = colon - data.
buffer();
660 {
int64 iv =
v; UTwrite(os, &iv); }
662 { UTwrite<fpreal64>(os, &
v); }
664 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
666 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
667 UTwrite<fpreal64>(os, &v.
z()); }
669 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
670 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
682 if (s) s->save(ostr);
684 saveData(os, result);
691 ostr << s->getDataTypeToken();
696 saveData(os, result);
700 void save(std::ostream &os)
const
704 saveData(os, mySourceGroup);
705 saveData(os, mySourceGroupType);
707 saveData(os, myPack);
708 saveData(os, myPivot);
709 saveData(os, myViewportLOD);
710 saveData(os, myXord);
711 saveData(os, myRord);
715 saveData(os, myShear);
716 saveData(os, myScale);
719 saveData(os, myNewgroups);
720 saveData(os, myNewgroupprefix);
721 saveData(os, myDocopyattrib);
722 saveData(os, myCopyattrib);
735 loadData(is, mySourceGroup);
736 loadData(is, mySourceGroupType);
738 loadData(is, myPack);
739 loadData(is, myPivot);
740 loadData(is, myViewportLOD);
741 loadData(is, myXord);
742 loadData(is, myRord);
746 loadData(is, myShear);
747 loadData(is, myScale);
750 loadData(is, myNewgroups);
751 loadData(is, myNewgroupprefix);
752 loadData(is, myDocopyattrib);
753 loadData(is, myCopyattrib);
763 if (!thissop)
return getSourceGroup();
765 OP_Utils::evalOpParm(result, thissop,
"sourcegroup", cookparms.
getCookTime(), 0);
773 if (!thissop)
return getSourceGroupType();
775 OP_Utils::evalOpParm(result, thissop,
"sourcegrouptype", cookparms.
getCookTime(), 0);
783 if (!thissop)
return getNcy();
785 OP_Utils::evalOpParm(result, thissop,
"ncy", cookparms.
getCookTime(), 0);
793 if (!thissop)
return getPack();
795 OP_Utils::evalOpParm(result, thissop,
"pack", cookparms.
getCookTime(), 0);
803 if (!thissop)
return getPivot();
805 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
806 return Pivot(result);
813 if (!thissop)
return getViewportLOD();
815 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
823 if (!thissop)
return getXord();
825 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
833 if (!thissop)
return getRord();
835 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
843 if (!thissop)
return getT();
845 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
853 if (!thissop)
return getR();
855 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
863 if (!thissop)
return getS();
865 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
873 if (!thissop)
return getShear();
875 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
885 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
893 if (!thissop)
return getP();
895 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
903 if (!thissop)
return getPr();
905 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
913 if (!thissop)
return getNewgroups();
915 OP_Utils::evalOpParm(result, thissop,
"newgroups", cookparms.
getCookTime(), 0);
923 if (!thissop)
return getNewgroupprefix();
925 OP_Utils::evalOpParm(result, thissop,
"newgroupprefix", cookparms.
getCookTime(), 0);
933 if (!thissop)
return getDocopyattrib();
935 OP_Utils::evalOpParm(result, thissop,
"docopyattrib", cookparms.
getCookTime(), 0);
943 if (!thissop)
return getCopyattrib();
945 OP_Utils::evalOpParm(result, thissop,
"copyattrib", cookparms.
getCookTime(), 0);
951 int64 mySourceGroupType;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
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
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept