formZ SDK | 5.0 API Reference | Project | Modeling | Animation

fz_anim_node_copy

Description

Copies the source animation node in the animation node hierarchy as a new child of the given parent. The recursive flag specifies whether or not to copy all the children nodes of the source entity also.

If the source node is an entity, the dst_parent may be NULL (which represents the root). Also, the entity itself will be copied, and the destination animation node will correspond to the copied entity. For example, if an object called "Object 1" is animated, copying the object's animation node will create, not only a second animation node, but also the object in the Object palette to which it corresponds.

If the source node is a track, the dst_parent may NOT be NULL. Multiple tracks of the same type are not meaningful at this point in time, so the dst_parent should be a different parent than the source's parent, and the track must be compatible (see fz_anim_node_trac_is_compatible).

If the source node is a controller, the dst_parent may NOT be NULL. The dst_parent must be a track. Multiple Bezier controllers as children to a single track parent is not meaningful at this point in time, so the dst_parent should be a different parent than the source's parent for Bezier controllers. Other controller types can have the same parent.

Plugin Prototype

fzrt_error_td fz_anim_node_copy(

fzrt_int

src_windex,

fz_anim_node_ptr

src_node,

fzrt_int

dst_windex,

fz_anim_node_ptr

dst_parent,

fzrt_boolean

recursive,

fz_anim_node_ptr *

dst_node )

Parameters

src_windex [Input]

source project window index

src_node [Input]

source animation node to copy

dst_windex [Input]

destination project window index

dst_parent [Input]

parent node of the destination copy

recursive [Input]

whether or not to copy the source node's children also

dst_node [Result, Optional]

destination copy

Returns

Error codes

Availability

6.1.0.0

Example Files

util_anim_animate_enty.fsl
util_anim_cntl_bezier.fsl
util_anim_dfrm.fsl

Function Set

fz_anim_fset


Defined in

fz_anim_api.h