43 using namespace HDK_Sample;
59 PRM_Name(
"numobj",
"Number of Objects"),
61 PRM_Name(
"xformpath",
"Transform Object"),
62 PRM_Name(
"enable#",
"Enable Merge #"),
107 bool changed =
false;
110 for (
int i = 1; i <=
n; i++)
122 if (
flags().getHardLocked())
128 for (
int objindex = 1; objindex <= numobj; objindex++)
178 xformobjptr = (
OP_Network *)CAST_OBJNODE(xformobjptr);
180 if (!xformobjptr && objname.
isstring())
192 bool copiedfirst =
false;
193 bool copiedlast =
false;
195 for (
int objindex = 1; objindex <= numobj; objindex++)
246 bool firstmerge = !copiedfirst;
254 if (objindex == numobj)
260 else if (objindex == numobj)
295 gdp->
transform(xform, primmarker.getRange(), pointmarker.getRange(),
false);
310 else if (!copiedlast)
const GU_Detail * getCookedGeo(OP_Context &, int forced=0)
virtual bool getWorldTransform(UT_Matrix4D &xform, OP_Context &)
const GA_IndexMap & getPrimitiveMap() const
PRM_API const PRM_Type PRM_STRING
const OP_NodeFlags & flags() const
void XFORMPATH(UT_String &str, fpreal t)
OP_Node * findNode(const char *path, OTLSyncMode syncmode=OTLSYNC_DOSYNC) const
Uses the path (eg. "/obj/geo1") to find a node in our hierarchy.
void addTransformError(const OP_Node &node, const char *label=0) const
void SOPPATH(UT_String &str, int i, fpreal t)
void clearAndDestroy()
Clear all the points/primitives out of this detail.
#define OP_FLAG_GENERATOR
void transform(const UT_Matrix4T< FLOAT_T > &mat, const GA_Range &primitives, bool just_P, bool keep_vector_lengths=true, bool check_pasting=true, bool neg_determinant_flip_vector=true, bool update_ptnormals=false, GEO_Delta *geodelta=nullptr, bool updateaffectednormals=false, const char *attribpattern=nullptr)
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
int getDandROpsEqual() override
OP_Network * getCreator() const
void addError(int code, const char *msg=0)
void newSopOperator(OP_OperatorTable *table)
const GA_IndexMap & getPointMap() const
OP_ERROR cookMySop(OP_Context &context) override
static PRM_SpareData sopPath
void addWarning(SOP_ErrorCodes code, const char *msg=0)
bool enableParmInst(const char *name, const int *inst, int state, int nestlevel=1, int v=-1)
virtual bool getIWorldTransform(UT_Matrix4D &xform, OP_Context &)
GLuint const GLchar * name
static PRM_Template myTemplateList[]
SOP_Node * getSOPNode(const char *path, int addextra=0, bool *got_by_flag=nullptr) const
bool copy(const GEO_Detail &src, GEO_CopyMethod method=GEO_COPY_ONCE, bool this_parameter_is_ignored=true, bool keep_internal_groups=true, GA_DataIdStrategy data_id_strategy=GA_DATA_ID_BUMP)
bool updateParmsFlags() override
SYS_FORCE_INLINE UT_StringHolder getToken(Add enum_value)
GLenum GLenum GLsizei void * table
void setManagesDataIDs(bool onOff)
virtual OP_OpTypeId getOpTypeID() const
PRM_API PRM_Default PRMoneDefaults[]
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
virtual void addExtraInput(OP_Node *op, OP_InterestType type)
int getDandROpsEqual() override
PRM_API const PRM_Type PRM_TOGGLE
void select(GU_SelectionType stype)
virtual int isCookingRender() const
~SOP_HDKObject() override
SOP_HDKObject(OP_Network *net, const char *name, OP_Operator *entry)
GEO_CopyMethod
An enum for GEO_Detail::copy's method parameter.
static PRM_SpareData objPath
virtual void setCookingRender(int val)