Basic question about 'type' and 'rampType' of HAPI_ParmInfo

   2376   2   0
User Avatar
Member
6 posts
Joined: Oct. 2018
Offline
There are two types in this struct, the ‘HAPI_ParmType’ and the ‘HAPI_RampType’,
when I attempt to create the parameter UI in my app, surely I need to know the type of the parameter, but there are two types, it's confusing. What will the type(HAPI_ParmType) be if the rampType(HAPI_RampType) is HAPI_RAMPTYPE_FLOAT or HAPI_RAMPTYPE_COLOR ?

When I construct the parameter UI, should I find out the parameter is ramp or not first?
if TRUE, I create the ramp control.
if FALSE, I use the type(HAPI_ParmType) to decide what control should be created.
Is it the right order for conditional judgement?

And is the RampParm a kind of MultiParm? I want to know the relationship between this two concepts.
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Always check the HAPI_ParmType first. You are correct that a ramp parameter is represented as a multiparm in HAPI, so if you check the HAPI_ParmType and it's a multiparm, you will then want to check the ramp type.
User Avatar
Member
6 posts
Joined: Oct. 2018
Offline
BrandonA
Always check the HAPI_ParmType first. You are correct that a ramp parameter is represented as a multiparm in HAPI, so if you check the HAPI_ParmType and it's a multiparm, you will then want to check the ramp type.
Got it, thanks a lot!
  • Quick Links