Working With Paths¶
Accessing Path Data¶
Paths differ from other parameter types, in that their values are not directly accessible. In addition to checking them out and in (like layer parameters), you must use our path data function suites to obtain the details of the path at a given time. See PF_PathQuerySuite1 and PF_PathDataSuite. Never use the values present in a path parameter when it's passed to you, without first checking it out; while deleted paths will not be available, further updating is done "lazily" (later); your effect won't see these changes unless it checks out the path.
Manipulating Path Data¶
You can also use the AEGP_MaskOutlineSuite3 to manipulate paths. See Cheating Effect Usage of AEGP Suites. Path parameters are treated as opaque blobs of data; get and set functions must be used to access and manipulate them. Like layer parameters, they must be checked out (and in!) by effects which access them.
Vertices¶
Path vertices are more complex than simple points. All member variables are PF_FpLongs (doubles), and are in the layer's coordinate space.
PF_PathVertex¶
Member | Description |
---|---|
x |
The location of the vertex. |
y |
|
tan_in_x |
The incoming tangent point. |
tan_in_y |
|
tan_out_x |
The outgoing tangent point. |
tan_out_y |
PF_PathDataSuite¶
This suite provides information about paths (sequences of vertices).
Function |
Description |
---|---|
|
Returns
|
|
Retrieves the number of segments in the path.
N segments means there are segments
|
|
Retrieves the The range of points is
|
|
This fairly counter-intuitive function informs After Effects that you're going to ask for the length of a segment (using
|
|
Retrieves the length of the given segment.
|
|
Retrieves the location of a point lengthF along the given path segment.
|
|
Retrieves the location, and the first derivative, of a point If you're not sure why you'd ever need this, don't use it. Math is hard.
|
|
Call this when you're finished evaluating that segment length, so After Effects can properly clean up the
|
|
Returns
|
|
Retrieves the mode for the given path.
Mask mode is one of the following:
|
|
Retrieves the name of the path (up to
|
PF_PathQuerySuite1¶
This suite is used to identify and access the paths associated with the effect's source layer.
Function |
Purpose |
---|---|
|
Retrieves the number of paths associated with the effect's source layer.
|
|
Retrieves the PF_PathID for the specified path.
|
|
Acquires the PF_PathOutlinePtr for the path at the specified time.
|
|
Releases the path back to After Effects. Always do this, regardless of any error conditions encountered. Every checkout must be balanced by a checkin, or pain will ensue.
|