The trajectory option displays the path that an object takes over time. Trajectory mode is selected by the user from the Motion panel UI element. The user can convert from splines into trajectories, from trajectories into splines, and to collapse any transform controller into editable keys.
In order for your object plug-in to support trajectories it must override the following methods from the Interface10 class.
The following example demonstrates how to use the APIs for trajectory by delegating the functionality to the CORE interface.
// virtual bool Interface10::GetTrajectoryMode()const =0; bool MyInterface::GetTrajectoryMode() const { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } return ip->GetTrajectoryMode(); } // virtual void Interface10::SetTrajectoryMode(bool flag) =0; bool MyInterface::SetTrajectoryMode(bool a_bFlag) { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } ip->SetTrajectoryMode(a_bFlag); return true; } // virtual bool Interface10::GetTrajectoryKeySubMode()const =0; bool MyInterface::GetTrajectoryKeySubMode() const { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } return ip->GetTrajectoryKeySubMode(); } // virtual void Interface10::SetTrajectoryKeySubMode(bool flag) =0; bool MyInterface::SetTrajectoryKeySubMode(bool a_bFlag) { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } ip->SetTrajectoryKeySubMode(a_bFlag); return true; } // virtual bool Interface10::GetTrajectoryAddKeyMode() const =0; bool MyInterface::GetTrajectoryAddKeyMode() const { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } return ip->GetTrajectoryAddKeyMode(); } // virtual void Interface10::DeleteSelectedTrajectoryKey() =0; bool MyInterface::DeleteSelectedTrajectoryKey(void) { Interface10 *ip = GetCOREInterface10(); if(ip == NULL){ return false; } ip->DeleteSelectedTrajectoryKey(); return true; }