hou.RampParmTemplate class

Parameter template for a ramp parameter.

Inheritence: hou.ParmTemplate >

Methods

__init__(self, name, label, ramp_parm_type, default_value=2, default_basis=None, show_controls=True, color_type=None, is_hidden=False, help=None, tags={})

The first two arguments are the internal name and the human-readable label for the parameter.

The third argument specifies this is a color or float ramp parameter. The value must be from hou.rampParmType, currently hou.rampParmType.Color or hou.rampParmType.Float.

The default basis for new keys is Linear. You can use the default_basis keyword argument to specify a value from hou.rampBasis. For example:

r = hou.RampParmTemplate("myRamp", "My Ramp", hou.rampParmType.Color,
                         default_basis = hou.rampBasis.CatmullRom)

The default color type for color ramps is RGB color. You can use the color_type keyword argument to specify a value from hou.colorType. For example:

r = hou.RampParmTemplate("myRamp", "My Ramp", hou.rampParmType.Color,
                         color_type = hou.colorType.RGB)
defaultValue(self)int

Returns the default value for new parameter instances. For ramp parameters, this is the default number of ramp keys.

parmType(self)hou.rampParmType

Returns the type of this ramp parameter template.