Parameter

A parameter

Constructors

this
this()

For serialization

this
this(string name, bool isVec2)

Create new parameter

Destructor

~this
~this()

Unload UUID on clear

Members

Functions

addBinding
void addBinding(ParameterBinding binding)

Add a new binding (must not exist)

axisPointCount
uint axisPointCount(uint axis)

Get number of points for an axis

createBinding
ParameterBinding createBinding(Node n, string bindingName, bool setZero)

Create a new binding (without adding it) for a given node and name

deleteAxisPoint
void deleteAxisPoint(uint axis, uint index)

Delete a specified axis point by index

deserializeFromFghj
SerdeException deserializeFromFghj(Fghj data)

Deserializes a parameter

dup
Parameter dup()

Clone this parameter

finalize
void finalize(Puppet puppet)

Finalize loading of parameter

findClosestKeypoint
vec2u findClosestKeypoint()

Find the keypoint closest to the current value

findClosestKeypoint
vec2u findClosestKeypoint(vec2 value)

Find the keypoint closest to a value

findOffset
void findOffset(vec2 offset, vec2u index, vec2 outOffset)
Undocumented in source. Be warned that the author may not have intended to support it.
getBinding
ParameterBinding getBinding(Node n, string bindingName)

Find a binding by node ref and name

getClosestAxisPointIndex
uint getClosestAxisPointIndex(uint axis, float offset)

Gets the axis point closest to a given offset

getClosestKeypointValue
vec2 getClosestKeypointValue()

Find the keypoint closest to the current value

getClosestKeypointValue
vec2 getClosestKeypointValue(vec2 value)

Find the keypoint closest to a value

getKeypointOffset
vec2 getKeypointOffset(vec2u index)

Get the offset (0..1) of a specified keypoint index

getKeypointValue
vec2 getKeypointValue(vec2u index)

Get the value at a specified keypoint index

getOrAddBinding
ParameterBinding getOrAddBinding(Node n, string bindingName, bool setZero)

Find a binding if it exists, or create and add a new one, and return it

hasBinding
bool hasBinding(Node n, string bindingName)

Check if a binding exists for a given node and name

insertAxisPoint
void insertAxisPoint(uint axis, float off)

Add a new axis point at the given offset

makeIndexable
void makeIndexable()
Undocumented in source. Be warned that the author may not have intended to support it.
mapAxis
float mapAxis(uint axis, float value)

Maps an input value to an offset (0.0->1.0) for an axis

mapValue
vec2 mapValue(vec2 value)

Maps an input value to an offset (0.0->1.0)

moveAxisPoint
void moveAxisPoint(uint axis, uint oldidx, float newoff)

Move an axis point to a new offset

normalizedValue
vec2 normalizedValue()

Gets the value normalized to the internal range (0.0->1.0)

normalizedValue
void normalizedValue(vec2 value)

Sets the value normalized up from the internal range (0.0->1.0) to the user defined range.

preUpdate
void preUpdate()
Undocumented in source. Be warned that the author may not have intended to support it.
removeBinding
void removeBinding(ParameterBinding binding)

Remove an existing binding by ref

reverseAxis
void reverseAxis(uint axis)

Flip the mapping across an axis

serialize
void serialize(S serializer)

Serializes a parameter

unmapAxis
float unmapAxis(uint axis, float offset)

Maps an internal value (0.0->1.0) to the input range for an axis

unmapValue
vec2 unmapValue(vec2 offset)

Maps an offset (0.0->1.0) to a value

update
void update()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

active
bool active;

Whether this parameter updates the model

axisPoints
float[][2] axisPoints;

Position of the keypoints along each axis

bindings
ParameterBinding[] bindings;

Binding to targets

defaults
vec2 defaults;

The default value

indexableName
string indexableName;

Optimized indexable name generated at runtime

isVec2
bool isVec2;

Whether the parameter is 2D

max
vec2 max;

The parameter's maximum bounds

min
vec2 min;

The parameter's minimum bounds

name
string name;

Name of the parameter

offset
vec2 offset;

Automator calculated offset to apply

uuid
uint uuid;

Unique ID of parameter

value
vec2 value;

The current parameter value

Meta