RsAnim Plugin

Post Reply
User avatar
Posts: 4938
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

RsAnim Plugin

Post by trueBlue »

Finally figured out how to use the RsAnim Plugin
In this scene, the ProcClipActv were added to the Sphere and Cube with the Control In exported and hooked up to a Timer Event
AnimTime is being driven by the Timer's Frame attribute
Tip: The Sphere and Cube's Clips are Disabled so they do not interfere with any other animated objects
The Timer drives the Sphere and Cube's animation without the Animation Editor Playing, indefinitely
The Invisible Cube was animated to use the D3D Render to File
If you uncheck Local Time, the Clip will stop at the end of the object's animation
Prod Clip Activities.png
If you use this scene, you will need to Install, Load the plugin, and Restart trueSpace

RsAnimPlugin Example
- implementation of procedural animation clip activity node
- creating a toolbar when the package is loaded using plug-in manager
- working with animation structures ( clip node, keyframe data object, enumerating animation records, implementing put frame functionality)

This example shows implementation of procedural clip activity node and creating toolbar when package is loaded using plug-in manager. It also demonstrates working with animation structures such as clip node, keyframe data object used for storing keyframes and internal data object
structures animation records, streams and interpolators.

Toolbars are one of the UI elements which can be used to access and execute plug-in commands.
There are several ways to create and display toolbars. This plug-in example opens toolbar from template that is defined in the code and calls the method of function set to create internal structures representing toolbar frame and buttons UI elements in the windows manager. The second option (not shown here) allows assembling toolbar prototype in Link editor and creating toolbar from the prototype loaded in system Toolbar Prototype Encapsulator.
Animation plug-in creates toolbar when package is loaded in the plug-in manager. It proceeds the system message that is sent to all registered packages in system and send the IRcApCreateToolbar command asynchronously to kernel. Functionality for creating toolbar is defined in
Procedural clip activity node: Activities extend functionality of nodes. Activity nodes can perform actions and modify object constraint graph in the way the commands do. They have to implement IRsCommand interface that is used to execute requested actions by calling RsCommand::Execute method. Activity nodes may combine container and function features of nodes and ability to modify content into one unit,
making them ideal candidates for building complex behaviors. Activities are connected to each other using topological connections called control-flow links.
Example of procedural animation clip connected to the Timer Event node.
The purpose of the procedural clip activity node is to apply keyframe data supplied by input attribute KfAnimData at a time specified by attribute AnimTime. Keyframe data are applied in the animation space defined by the parent node of animation clip.
To create clip activity node, select animation clip and press leftmost button ‘Create Proc clip’ in the animation toolbar button (created by plugin). The command attached to the button creates a new procedural activity node and connects it to the selected clip. If selected object is not animation clip then new object is added as sub-object of selected object.
ProcClip Activities.RsScn
(1.5 MiB) Downloaded 12 times
Post Reply