Public Member Functions

ITrackViewNode Class Reference

This reference page is linked to from the following overview topics: Undo System Best Practices.


Search for all occurrences

Detailed Description

See also:
Class ReferenceTarget, Class Interface, Class Control, Class ImageFilter, Class TVNodeNotify.

Description:
This class provides an interface to Track View Nodes. A Track View Node is simpy a class that has zero or more sub-track view nodes and zero or more sub-controllers. This is mainly used to provide a place for Global Variable tracks (labeled "Global Tracks" in Track View) and Video Post tracks (labelled "Video Post" in Track View).

The TrackViewNode sub-nodes and sub-controllers are identified by a unique ID in the form of a Class_ID variable. This does not necessarily have to be the Class_ID of an existing plug-in, however plug-ins may wish to use their Class_ID for any items they add to be sure they are unique.

The Interface class provides access to the root track view node:

virtual ITrackViewNode *GetTrackViewRootNode()=0;

From the root track view node, new nodes may be added. There are two defined sub nodes identified by the following #defined Class_IDs:

#define GLOBAL_VAR_TVNODE_CLASS_ID Class_ID(0xb27e9f2a, 0x73fad370)

#define VIDEO_POST_TVNODE_CLASS_ID Class_ID(0x482b8d30, 0xb72c8511)

These can be retreived by calling GetNode() on the track view root node and passing in one of the above IDs.

All methods of this class are implemented by the system.

Note: Developers can also create their own track view node using the following global function:

#include <tvnode.h>

Inheritance diagram for ITrackViewNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  AddNode (ITrackViewNode *node, MCHAR *name, Class_ID cid, int pos=TVNODE_APPEND)=0
virtual void  AddController (Control *c, MCHAR *name, Class_ID cid, int pos=TVNODE_APPEND)=0
virtual int  FindItem (Class_ID cid)=0
virtual void  RemoveItem (int i)=0
virtual void  RemoveItem (Class_ID cid)=0
virtual Control GetController (int i)=0
virtual Control GetController (Class_ID cid)=0
virtual ITrackViewNode GetNode (int i)=0
virtual ITrackViewNode GetNode (Class_ID cid)=0
virtual int  NumItems ()=0
virtual void  SwapPositions (int i1, int i2)=0
virtual MCHAR *  GetName (int i)=0
virtual void  SetName (int i, MCHAR *name)=0
virtual void  RegisterTVNodeNotify (TVNodeNotify *notify)=0
virtual void  UnRegisterTVNodeNotify (TVNodeNotify *notify)=0
virtual void  HideChildren (BOOL chide)=0

Member Function Documentation

virtual void AddNode ( ITrackViewNode node,
MCHAR *  name,
Class_ID  cid,
int  pos = TVNODE_APPEND 
) [pure virtual]
Remarks:
This method is used to add a track view node. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
ITrackViewNode *node

Points to the Track View Node to add.

MCHAR *name

The name for the node that appears in Track View.

Class_ID cid

The Class_ID which identifies the plug-in that added the node.

int pos=TVNODE_APPEND

The position in the list of nodes where this one is added. If this defaults to TVNODE_APPEND the node is added at the end of the list.

Implemented in Wrangler.

virtual void AddController ( Control c,
MCHAR *  name,
Class_ID  cid,
int  pos = TVNODE_APPEND 
) [pure virtual]
Remarks:
This method is used to add a track view controller. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
Control *c

Points to the controller to add.

MCHAR *name

The name that will appear in Track View.

Class_ID cid

The Class_ID of the plug-in that adds the controller.

int pos=TVNODE_APPEND

The position in the list where the controller is added. If this defaults to TVNODE_APPEND the controller is added at the end of the list.

Implemented in Wrangler.

virtual int FindItem ( Class_ID  cid ) [pure virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method returns the index into the table of the node or controller whose Class_ID is passed. If the Class_ID could not be found then -1 is returned.
Parameters:
Class_ID cid

The Class_ID to find.

Implemented in Wrangler.

virtual void RemoveItem ( int  i ) [pure virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method removes the 'i-th' sub-node or sub-controller of the table. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
int i

The zero based index into the table of the item to remove.

Implemented in Wrangler.

virtual void RemoveItem ( Class_ID  cid ) [pure virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method removes the sub-node or sub-controller whose Class_ID is passed from the table. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
Class_ID cid

The Class_ID used when the node or controller was added.

Implemented in Wrangler.

virtual Control* GetController ( int  i ) [pure virtual]
Remarks:
This method returns a pointer to the 'I-th' sub-controller.
Parameters:
int i

The zero based index of the sub-controller.

Implemented in Wrangler.

virtual Control* GetController ( Class_ID  cid ) [pure virtual]
Remarks:
This method returns a pointer to the sub-controller whose Class_ID is passed.
Parameters:
Class_ID cid

The Class_ID used when the controller was added.

Implemented in Wrangler.

virtual ITrackViewNode* GetNode ( int  i ) [pure virtual]
Remarks:
This method returns a pointer to the 'i-th' sub-node.
Parameters:
int i

The zero based index of the sub-node.

Implemented in Wrangler.

virtual ITrackViewNode* GetNode ( Class_ID  cid ) [pure virtual]
Remarks:
This method returns a pointer to the sub-node whose Class_ID is passed.
Parameters:
Class_ID cid

The Class_ID used when the controller was added.

Implemented in Wrangler.

virtual int NumItems ( ) [pure virtual]
Remarks:
This method returns the total number of sub-nodes and/or sub-controllers in the table.

Implemented in Wrangler.

virtual void SwapPositions ( int  i1,
int  i2 
) [pure virtual]
Remarks:
This method is used to rearrange the elements in the table so item i1 is where i2 was and i2 is where i1 was. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
int i1

The zero based index into the table of one of the items to swap.

int i2

The zero based index into the table of the other item to swap.

Implemented in Wrangler.

virtual MCHAR* GetName ( int  i ) [pure virtual]
Remarks:
Returns the name of the 'i-th' sub-node or sub-controller.
Parameters:
int i

The zero based index into the table of the item whose name to return.

Implemented in Wrangler.

virtual void SetName ( int  i,
MCHAR *  name 
) [pure virtual]
Remarks:
Sets the name of the 'i-th' sub-node or sub-controller to the name passed.
Parameters:
int i

The zero based index into the table of the item whose name to set.

MCHAR *name

The new name for the sub-node or sub-controller.

Implemented in Wrangler.

virtual void RegisterTVNodeNotify ( TVNodeNotify notify ) [pure virtual]
Remarks:
Registers the track view notify callback object so it recieves reference messages.
Parameters:
TVNodeNotify *notify

Points to the callback object to register.

Implemented in Wrangler.

virtual void UnRegisterTVNodeNotify ( TVNodeNotify notify ) [pure virtual]
Remarks:
Un-Registers the track view notify callback object.
Parameters:
TVNodeNotify *notify

Points to the callback object to register.

Implemented in Wrangler.

virtual void HideChildren ( BOOL  chide ) [pure virtual]
Remarks:
This method is available in release 4.0 and later only.

This may be used to prevent child nodes from showing up in Track View.
Parameters:
BOOL chide

Pass TRUE to have children hidden; FALSE to have them visible.

Implemented in Wrangler.


ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode
ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode ITrackViewNode