40 using namespace HDK_Sample;
48 PRM_Name(
"number",
"Number of Stairs"),
54 PRM_Name(
"channelname",
"Channel Name"),
185 #define START_HANDLE 1
187 #define OFFSET_HANDLE 3
201 xoffset = (end -
start) * 0.75 + start;
202 yoffset = OFFSET(context.
getTime());
251 switch(handle->
getId())
281 SET_START(t, new_offset);
302 samplerate = RATE(context.
getTime());
312 CHAN_NAME(name, context.
getTime());
327 for (my_C=0; my_C < nchan; my_C++)
329 defvalue = DEFAULT(context.
getTime());
330 value = OFFSET(context.
getTime());
331 idxstep = (end-start+1) / (NUMBER(context.
getTime()) + 1);
332 stepheight = HEIGHT(context.
getTime());
333 if (DIRECTION() == 1)
347 for(i=0; i < (end-start+1); i++)
CL_Track * addTrack(const UT_StringHolder &name)
CHOP_API PRM_Name CHOP_RangeName
void cookMyHandles(OP_Context &context) override
Places the handles along the channels.
PRM_API PRM_Default PRMtwoDefaults[]
GLint GLint GLint yoffset
CHOP_API PRM_Name CHOP_DefaultValueName
PRM_API const PRM_Type PRM_FLT
static CH_LocalVariable myVariableList[]
PRM_API const PRM_Type PRM_STRING
static OP_TemplatePair myTemplatePair
static OP_VariablePair myVariablePair
void constant(fpreal value=0)
static OP_TemplatePair myTemplatePair
GLsizei const GLfloat * value
OP_ERROR cookMyChop(OP_Context &context) override
Overridden to generate our channel data.
CHOP_API PRM_Default CHOP_SampleRateDefault
#define HANDLE_LABEL_BOTTOM
PRM_API const PRM_Type PRM_ORD
bool setCurrent(bool on_off)
#define OP_FLAG_GENERATOR
CHOP_API PRM_Range CHOP_FrameRange
CHOP_API PRM_Default CHOP_StartDefault
**But if you need a result
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
static OP_VariablePair myVariablePair
void getParmIntervalInSamples(fpreal t, fpreal &start, fpreal &end, const char *range_parm=0, const char *start_parm=0, const char *end_parm=0)
PRM_API const PRM_Type PRM_INT_J
bool updateParmsFlags() override
void setTrackLength(int length, int clear_extra=0)
CHOP_API PRM_ChoiceList CHOP_RangeMenu
bool evalVariableValue(fpreal &v, int index, int thread) override
Stair has some local variables defined, this returns their value.
fpreal shiftStart(fpreal new_offset, fpreal t) override
CHOP_API PRM_Name CHOP_EndName
fpreal handleChanged(CHOP_Handle *handle, CHOP_HandleData *hdata) override
Responds to user changes in any handle.
CHOP_API PRM_Range CHOP_DefaultValueRange
bool enableParm(int pi, int state, int v=-1)
CHOP_SWITCHER2(4,"Stair", 8,"Channel")
CHOP_API PRM_Name CHOP_ExtendLeftName
CHOP_HandleList myHandles
CHOP_API PRM_Name CHOP_ExtendRightName
GLuint const GLchar * name
void newChopOperator(OP_OperatorTable *table)
unsigned int getId() const
PRM_API const PRM_Type PRM_FLT_J
bool updateParmsFlags() override
SYS_FORCE_INLINE UT_StringHolder getToken(Add enum_value)
GLenum GLenum GLsizei void * table
PRM_API const PRM_Type PRM_SWITCHER
void setStart(fpreal start)
bool SYSequalZero(const UT_Vector3T< T > &v)
PRM_API PRM_Default PRMoneDefaults[]
PRM_API PRM_Name PRMswitcherName
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
void setSampleRate(fpreal rate)
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
CHOP_API PRM_Name CHOP_StartName
static void addError(int code, const char *msg=0)
virtual bool evalVariableValue(UT_String &val, int index, int thread)
int setPattern(const char *pattern, int *dirty_flag=0)
CHOP_Stair(OP_Network *net, const char *name, OP_Operator *op)
void pickRequest(OP_NetworkBoxItem *item, int shift)
OP_Network * getParent() const
CHOP_API PRM_Name CHOP_SampleRateName
CHOP_API PRM_ChoiceList CHOP_ExtendMenu
int getParmIndex(const PRM_Parm *parm) const
#define HANDLE_LABEL_RIGHT
void setDefault(fpreal value)
const CH_Channel * getChannel(const UT_StringRef &name) const
PRM_API PRM_Default PRMzeroDefaults[]
SYS_FORCE_INLINE PRM_ParmList * getParmList()
CHOP_API PRM_Range CHOP_SampleRateRange
static PRM_Template myTemplateList[]
CHOP_API PRM_Default CHOP_EndDefault
fpreal toUnit(fpreal index, CL_Unit unit=UNIT_NONE, int end_width=0) const
void setRight(CL_TrackOutside type)
void setLeft(CL_TrackOutside type)
const char * getToken() const