DoctorBuzz

DoctorBuzz

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

HDA: variable number of inputs May 8, 2009, 7:08 p.m.

It's possible to create an HDA in SHOP context that accept variable number of inputs, like the Switch SHOP?

HDK : How to use the new Ramp? April 12, 2009, 6:02 p.m.

Hi JOEMI,
those are parameters.

static PRM_Name SpValue (“spvalue”, “Point value”);
static PRM_Name SpOffset (“spoffset”, “Point offset”);
static PRM_Name SpInterp (“spinterp”, “Point interpolation”);
static PRM_Name Ramp (“ramp”, “Ramp Values”);

HDK : How to use the new Ramp? April 10, 2009, 6:35 a.m.

Hi guys,
this worked for me:

static PRM_Name Ramp (“ramp”, “Ramp Values”);

static PRM_Template RampTemplates = {
PRM_Template (PRM_FLT_J, 1, &SpOffset, PRMzeroDefaults),
PRM_Template (PRM_FLT_J, 1, &SpValue, PRMzeroDefaults),
PRM_Template (PRM_INT, 1, &SpInterp, PRMtwoDefaults),
PRM_Template (),
};

PRM_Template
SOP_YourSOP::myTemplateList = {
PRM_Template (PRM_MULTITYPE_RAMP_FLT, theTwistTemplates, 1, &Ramp, PRMtwoDefaults),
PRM_Template (),
};

UT_Ramp myramp;

UT_Ramp*
SOP_YourSOP::getRamp (void)
{
PRM_Template *rampTemplate = PRMgetRampTemplate (“ramp”, PRM_MULTITYPE_RAMP_FLT, NULL);

if (myramp.getNodeCount () < 2)
{
myramp.addNode (0, UT_FRGBA (0, 0, 0, 1));
myramp.addNode (1, UT_FRGBA (1, 1, 1, 1));
}

return &myramp;
}

Then add the other node to the ramp and with the rampLookup method read their values.
Hope this can help you.