A newer version of Max is available. Click here to access the latest version of the documentation

jit.anim.path Reference

Evaluate a path of 3D transform points

jit.anim.path

Description

Takes a series of 3D transform points and interpolates between them. See the jit.path object for more information on this interpolation. Each point stores 11 values: a time value, 3 position values, 3 scale values and 4 quaternion rotation values.

Examples

Evaluate a path of 3D transform points

Attributes

autohandles [int]

Enable the calculation of handle values every time the path is edited (default = 1).

automatic [int]

Enable automatic animation notifications from the attached render context (default = 1).

closed [int]

g/s(get)

Indicates the path is closed (first and last points are equal).

drawpath [symbol]

Name of a jit.gl.path object used to draw this path.

drawto [symbol]

Assign to the named drawing context, allowing for updates to be received automatically.

duration [float]

g/s(get)

Path duration in seconds (default = 0.)

endreport [int]

Enable animation end reporting (default = 0). The symbol endnotify is sent out the dumpout when the animation ends. Only valid if loop = 0.

evalquat [int]

Output evaluated quaternion values (default = 0). Adding orientation values to the path enables.

evalreport [int]

Enable/disable the evaluation parameter reporting out the dumpout (default = 0). The report is a 3 element list where each element represents the current evaluation parameters as 0 to 1, 0 to duration, and 0 to length, in that order.

evalscale [int]

Output evaluated scale values (default = 0). Adding scale values to the path enables.

interpmode [symbol]

Path interpolation method (default = linear). Possible values:

'linear' ( Linear interpolation )
Linear interpolation

'spline' ( Hermite interpolation )
Linear interpolation

length [float]

g/s(get)

Path length (default = 0.)

loop [int]

Path animation loop method (default = 1). Possible values:

0 = 'off'
1 = 'on'
2 = 'palindrome'

loopreport [int]

Enable animation loop reporting (default = 0). The symbol loopnotify is sent out the dumpout when the animation loops. Only valid if loop is not 0.

name [symbol]

Specifies the name of the instance (default = UID).

play [int]

Enable path animation (default = 0).

pointcount [int]

g/s(get)

Number of path points (default = 0).

position [3 floats]

g/s(get)

Current path position (default = 0. 0. 0.).

quat [4 floats]

g/s(get)

Current path quaternion orientation (default = 0. 0. 0. 1.)

rate [float]

Animation rate value (default = 1.)

scale [3 floats]

g/s(get)

Current path scale value (default = 1. 1. 1.).

shortestrot [int]

Use the shortest path between rotations (default = 1).

targetname [symbol]

The name of the target object that should be either an OpenGL object, or a jit.anim.node object.

time [float]

Current path time value (default = 0.)

timemode [symbol]

Determine how time values added to the path (default = relative). Possible values:

'absolute' ( Time value is set to argument )
'relative' ( Time value is set to argument plus previous time value )

Common Box Attributes

annotation [symbol]

Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.

background [int] (default: 0)

Adds or removes the object from the patcher's background layer. background 1 adds the object to the background layer, background 0 removes it. Objects in the background layer are shown behind all objects in the default foreground layer.

color [4 floats]

Sets the color for the object box outline.

fontface [int]

Sets the type style used by the object. The options are:

plain
bold
italic
bold italic Possible values:

0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'

fontname [symbol]

Sets the object's font.

fontsize [float]

Sets the object's font size (in points). Possible values:

'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'

hidden [int] (default: 0)

Toggles whether an object is hidden when the patcher is locked.

hint [symbol]

Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.

ignoreclick [int] (default: 0)

Toggles whether an object ignores mouse clicks in a locked patcher.

jspainterfile [symbol]

JS Painter File

patching_rect [4 floats] (default: 0. 0. 100. 0.)

Sets the position and size of the object in the patcher window.

position [2 floats]

g/s(set)

Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.

presentation [int] (default: 0)

Sets whether an object belongs to the patcher's presentation.

presentation_rect [4 floats] (default: 0. 0. 0. 0.)

Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.

rect [4 floats]

g/s(set)

Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).

size [2 floats]

g/s(set)

Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.

textcolor [4 floats]

Sets the color for the object's text in RGBA format.

textjustification [int]

Sets the justification for the object's text. Possible values:

0 = 'left'
1 = 'center'
2 = 'right'

varname [symbol]

Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.

Messages

bang

Cause the animation to update, if currently active, and the transform messages to output.

addquat

Arguments

x [float]
y [float]
z [float]
w [float]
Add quaternion orientation values to the last point in the path.

addrotate

Arguments

angle [float]
x [float]
y [float]
z [float]
Add angle-axis orientation values to the last point in the path. The values are converted to a quaternion before adding.

addrotatexyz

Arguments

x [float]
y [float]
z [float]
Add euler orientation values to the last point in the path. The values are converted to a quaternion before adding.

addscale

Arguments

x [float]
y [float]
z [float]
Add scale values to the last point in the path.

append

Arguments

time [float]
x [float]
y [float]
z [float]
scale-x [float]
scale-y [float]
scale-z [float]
quat-x [float]
quat-y [float]
quat-z [float]
quat-w [float]
Append point values to the end of the path. If necessary, the path will be resorted based on the time value prior to evaluation.

calchandles

Calculate the path handles of each point in the path using the Catmull-Rom method. This will overwrite any previously stored handles.

clear

Remove all points from the path

closepath

Close the path by adding a point to the end equal to the first point.

delete

Arguments

index [int]
Delete the point at index .

edit

Arguments

index [int]
time [float]
x [float]
y [float]
z [float]
scale-x [float]
scale-y [float]
scale-z [float]
quat-x [float]
quat-y [float]
quat-z [float]
quat-w [float]
Edit the point at index

edithandle

Arguments

index [int]
time [float]
x [float]
y [float]
z [float]
scale-x [float]
scale-y [float]
scale-z [float]
quat-x [float]
quat-y [float]
quat-z [float]
quat-w [float]
Edit the point handle at index .

eval

Arguments

parameter [float]
Evaluate the path using parameter , (between 0. and 1.) and output the interpolated values.

evallength

Arguments

length-parameter [float]
Evaluate the path using the length-parameter (between 0 and pathlength) and output the interpolated values.

evaltime

Arguments

time [float]
Evaluate the path using time (between 0 and duration) and output the interpolated values.

gethandle

Arguments

index [int]
Get handle values at index and output through the right (dumpout) outlet.

getpoint

Arguments

index [int]
Get point values at index and output through the right (dumpout) outlet.

insert

Arguments

index [int]
time [float]
x [float]
y [float]
z [float]
scale-x [float]
scale-y [float]
scale-z [float]
quat-x [float]
quat-y [float]
quat-z [float]
quat-w [float]
Insert a new point at index

next

Advance the path animation to the next point.

prev

Rewind the path animation to the previous point

setquat

Arguments

index [int]
x [float]
y [float]
z [float]
w [float]
Set quaternion orientation values at index

setrotate

Arguments

index [int]
angle [float]
x [float]
y [float]
z [float]
Set angle-axis orientation orientation values at index

setrotatexyz

Arguments

index [int]
x [float]
y [float]
z [float]
Set euler orientation orientation values at index

setscale

Arguments

index [int]
x [float]
y [float]
z [float]
Set scale values at index

settime

Arguments

index [int]
Set time at index . If necessary, the path will be resorted prior to evaluation.

sorttime

Sort path based on time values

start

Start path animation

stop

Stop path animation

See Also

Name Description
jit.anim.drive Animate a 3D transform
jit.anim.path Evaluate a path of 3D transform points
jit.path Evaluates a series of N-dim points as a path
jit.gl.path Generate and render a path in OpenGL