itreevw.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: itreevw.h
00004 
00005     DESCRIPTION: Tree View Interface
00006 
00007     CREATED BY: Rolf Berteig
00008 
00009     HISTORY: Created 17 April 1995
00010              Moved into public SDK, JBW 5.25.00
00011              Extended by Adam Felt for R5
00012 
00013  *> Copyright (c) 1994-2002, All Rights Reserved.
00014  **********************************************************************/
00015 
00016 
00017 #pragma once
00018 #include "actiontable.h"
00019 #include "iFnPub.h"
00020 #include "point2.h"
00021 // forward declarations
00022 class Animatable;
00023 
00024 #define WM_TV_SELCHANGED            WM_USER + 0x03001
00025 #define WM_TV_MEDIT_TV_DESTROYED    WM_USER + 0x03b49
00026 
00027 // Sent to a track view window to force it to do a horizontal zoom extents
00028 #define WM_TV_DOHZOOMEXTENTS        WM_USER + 0xb9a1
00029 
00030 // Style flag options for Interface::CreateTreeViewChild
00031 #define TVSTYLE_MAXIMIZEBUT         (1<<0) // Has a maximize button for TV in a viewport.
00032 #define TVSTYLE_INVIEWPORT          (1<<1)
00033 //Setting the TVSTYLE_NAMEABLE flag will give the user maxscript access to your treeview through the trackviews.current interface.   
00034 //Set this flag if you want the user to be able to modify your trackview settings.
00035 #define TVSTYLE_NAMEABLE            (1<<2)
00036 #define TVSTYLE_INMOTIONPAN         (1<<3)
00037 #define TVSTYLE_SHOW_NONANIMATABLE  (1<<4)
00038 // this flag specifies the treeview child window contains a menu bar and toolbars. (R5 and later only)
00039 // if this style has been set you can use ITreeViewUI::GetHWnd() to get the handle to the window housing the CUI elements.
00040 // this automatically sets the TVSTYLE_NAMEABLE flag since UI macroScripts may depend in the window being scriptable
00041 #define TVSTYLE_SHOW_CUI            (1<<5)
00042 
00043 // Docking options for ITrackViewArray::OpenTrackViewWindow
00044 #define TV_FLOAT        0   // float window.  can't dock on top (the default)
00045 #define TV_DOCK_TOP     1   // dock on top
00046 #define TV_DOCK_BOTTOM  2   // dock on bottom.  can't dock on top
00047 #define TV_CAN_DOCK_TOP 3   // floating but able to dock on top
00048 
00049 // Major modes
00050 #define MODE_EDITKEYS       0
00051 #define MODE_EDITTIME       1
00052 #define MODE_EDITRANGES     2
00053 #define MODE_POSRANGES      3
00054 #define MODE_EDITFCURVE     4
00055 
00056 // Operations on keys can be performed on one of the following set types
00057 #define EFFECT_ALL_SEL_KEYS             0
00058 #define EFFECT_SEL_KEYS_IN_SEL_TRACKS   1
00059 #define EFFECT_ALL_KEYS_IN_SEL_TRACKS   2
00060 #define EFFECT_ALL_KEYS                 3
00061 
00062 
00063 class TrackViewFilter;
00064 class TrackViewPick;
00065 
00066 typedef Animatable* AnimatablePtr;
00067 
00068 //This is an interface into many of the UI layout functions of trackview.
00069 //You can get an instance of this class by calling ITreeView::GetInterface(TREEVIEW_UI_INTERFACE)
00070 //***********************************************************************************************
00071 #define TREEVIEW_UI_INTERFACE Interface_ID(0x1bcd78ef, 0x21990819)
00072 class ITreeViewUI : public FPMixinInterface
00073 {
00074 public:
00075     virtual HWND GetHWnd()=0;
00076 
00077     virtual MSTR GetMenuBar()=0;
00078     virtual void SetMenuBar(MSTR name)=0;
00079 
00080     virtual MSTR GetControllerQuadMenu()=0;
00081     virtual void SetControllerQuadMenu(MSTR name)=0;
00082     virtual MSTR GetKeyQuadMenu()=0;
00083     virtual void SetKeyQuadMenu(MSTR name)=0;
00084     
00085     virtual int ToolbarCount()=0;
00086     virtual void AddToolbar()=0;
00087     virtual void DeleteToolbar()=0;
00088     virtual bool AddToolbar(const MCHAR *name)=0;
00089     virtual bool DeleteToolbar(int index)=0;
00090     virtual bool DeleteToolbar(const MCHAR *name)=0;
00091     virtual const MCHAR* GetToolbarName(int index)=0;
00092     virtual void ShowToolbar(const MCHAR *name)=0;
00093     virtual void HideToolbar(const MCHAR *name)=0;
00094     virtual bool IsToolbarVisible(const MCHAR *name)=0;
00095     virtual void ShowAllToolbars()=0;
00096     virtual void HideAllToolbars()=0;
00097 
00098     virtual void ShowMenuBar(bool visible)=0;
00099     virtual bool IsMenuBarVisible()=0;
00100 
00101     virtual void ShowScrollBars(bool visible)=0;
00102     virtual bool IsScrollBarsVisible()=0;
00103 
00104     virtual void ShowTrackWindow(bool visible)=0;
00105     virtual bool IsTrackWindowVisible()=0;
00106 
00107     virtual void ShowKeyWindow(bool visible)=0;
00108     virtual bool IsKeyWindowVisible()=0;
00109 
00110     virtual void ShowTimeRuler(bool visible)=0;
00111     virtual bool IsTimeRulerVisible()=0;
00112 
00113     virtual void ShowKeyPropertyIcon(bool visible)=0;
00114     virtual bool IsKeyPropertyIconVisible()=0;
00115 
00116     virtual void ShowIconsByClass(bool byClass)=0;
00117     virtual bool ShowIconsByClass()=0;
00118 
00119     virtual void SaveUILayout()=0;
00120     virtual void SaveUILayout(const MCHAR* name)=0;
00121     virtual void LoadUILayout(const MCHAR* name)=0;
00122 
00123     virtual int LayoutCount()=0;
00124     virtual MSTR GetLayoutName(int index)=0;
00125     virtual MSTR GetLayoutName()=0; //the current layout
00126 
00130     virtual void ShowUnlockedIcon(bool visible)=0;
00133     virtual bool IsUnlockedIconVisible()=0;
00134 
00135     enum { tv_getHWnd, tv_getMenuBar, tv_setMenuBar, tv_getControllerQuadMenu, tv_setControllerQuadMenu,
00136             tv_getKeyQuadMenu, tv_setKeyQuadMenu,
00137             tv_getMenuBarVisible, tv_setMenuBarVisible, tv_getScrollBarsVisible, tv_setScrollBarsVisible,
00138             tv_getTrackWindowVisible, tv_setTrackWindowVisible, tv_getKeyWindowVisible, tv_setKeyWindowVisible,
00139             tv_getTimeRulerVisible, tv_setTimeRulerVisible, tv_showAllToolbars, tv_hideAllToolbars,
00140             tv_showToolbar, tv_hideToolbar, tv_getToolbarName, tv_deleteToolbar, tv_addToolbar, tv_toolbarCount,
00141             tv_saveUILayout, tv_saveCurrentUILayout, tv_loadUILayout, tv_layoutCount, tv_getLayoutName, tv_layoutName,
00142             tv_isToolbarVisible, tv_getKeyPropertyVisible, tv_setKeyPropertyVisible,
00143             tv_getIconsByClass, tv_setIconsByClass,tv_getUnlockedVisible,tv_setUnlockedVisible
00144         };
00145     #pragma warning (push)
00146     #pragma warning(disable:4238)
00147     BEGIN_FUNCTION_MAP
00148         RO_PROP_FN(tv_getHWnd, GetHWnd, TYPE_HWND);
00149         RO_PROP_FN(tv_layoutName, GetLayoutName, TYPE_TSTR_BV);
00150         PROP_FNS(tv_getMenuBar, GetMenuBar, tv_setMenuBar, SetMenuBar, TYPE_TSTR_BV);
00151         PROP_FNS(tv_getControllerQuadMenu, GetControllerQuadMenu, tv_setControllerQuadMenu, SetControllerQuadMenu, TYPE_TSTR_BV);
00152         PROP_FNS(tv_getKeyQuadMenu, GetKeyQuadMenu, tv_setKeyQuadMenu, SetKeyQuadMenu, TYPE_TSTR_BV);
00153         PROP_FNS(tv_getMenuBarVisible, IsMenuBarVisible, tv_setMenuBarVisible, ShowMenuBar, TYPE_bool);
00154         PROP_FNS(tv_getScrollBarsVisible, IsScrollBarsVisible, tv_setScrollBarsVisible, ShowScrollBars, TYPE_bool);
00155         PROP_FNS(tv_getTrackWindowVisible, IsTrackWindowVisible, tv_setTrackWindowVisible, ShowTrackWindow, TYPE_bool);
00156         PROP_FNS(tv_getKeyWindowVisible, IsKeyWindowVisible, tv_setKeyWindowVisible, ShowKeyWindow, TYPE_bool);
00157         PROP_FNS(tv_getTimeRulerVisible, IsTimeRulerVisible, tv_setTimeRulerVisible, ShowTimeRuler, TYPE_bool);
00158         PROP_FNS(tv_getKeyPropertyVisible, IsKeyPropertyIconVisible, tv_setKeyPropertyVisible, ShowKeyPropertyIcon, TYPE_bool);
00159         PROP_FNS(tv_getIconsByClass, ShowIconsByClass, tv_setIconsByClass, ShowIconsByClass, TYPE_bool);
00160         PROP_FNS(tv_getUnlockedVisible, IsUnlockedIconVisible, tv_setUnlockedVisible, ShowUnlockedIcon, TYPE_bool);
00161         VFN_0(tv_showAllToolbars, ShowAllToolbars);
00162         VFN_0(tv_hideAllToolbars, HideAllToolbars);
00163         VFN_1(tv_showToolbar, ShowToolbar, TYPE_STRING);
00164         VFN_1(tv_hideToolbar, HideToolbar, TYPE_STRING);
00165         FN_1(tv_getToolbarName, TYPE_STRING, GetToolbarName, TYPE_INDEX);
00166         FN_1(tv_deleteToolbar, TYPE_bool, fp_DeleteToolbar, TYPE_FPVALUE);
00167         FN_1(tv_addToolbar, TYPE_bool, AddToolbar, TYPE_STRING);
00168         FN_0(tv_toolbarCount, TYPE_INT, ToolbarCount);
00169         FN_1(tv_isToolbarVisible, TYPE_bool, IsToolbarVisible, TYPE_STRING);
00170         VFN_0(tv_saveCurrentUILayout, SaveUILayout);
00171         VFN_1(tv_saveUILayout, SaveUILayout, TYPE_STRING);
00172         VFN_1(tv_loadUILayout, LoadUILayout, TYPE_STRING);
00173         FN_0(tv_layoutCount, TYPE_INT, LayoutCount);
00174         FN_1(tv_getLayoutName, TYPE_TSTR_BV, GetLayoutName, TYPE_INDEX);
00175     END_FUNCTION_MAP
00176     #pragma warning (pop)
00177 
00178     FPInterfaceDesc* GetDesc() { return GetDescByID(TREEVIEW_UI_INTERFACE); }
00179         Interface_ID    GetID() { return TREEVIEW_UI_INTERFACE; }
00180 
00181 private:
00182     virtual bool fp_DeleteToolbar(FPValue* val)=0;
00183 
00184 };
00185 
00186 #define TREEVIEW_OPS_INTERFACE Interface_ID(0x60fb7eef, 0x1f6d6dd3)
00187 //These are the operations you can do on any open trackview
00188 //Added by AF (09/12/00)
00189 //*********************************************************
00194 class ITreeViewOps : public FPMixinInterface
00195 {
00196 protected:
00197         BOOL fpAssignControllerToSelected(ReferenceTarget* ctrl)
00198         {
00199             // upcast
00200             return AssignControllerToSelected((Animatable*)ctrl);
00201         }
00202         void fpZoomOn(ReferenceTarget* owner, int subnum)
00203         {
00204             // upcast
00205             ZoomOn((Animatable*)owner, subnum);
00206         }
00207         int fpGetIndex(ReferenceTarget* refAnim)
00208         {
00209             // upcast
00210             return GetIndex((Animatable*)refAnim);
00211         }
00212         void fpSelectTrack(ReferenceTarget* anim, BOOL clearSelection = TRUE)
00213         {
00214             // upcast
00215             SelectTrack((Animatable*) anim, clearSelection);
00216         }
00217     public:
00219         virtual ~ITreeViewOps() {}
00220 
00223         virtual int GetNumTracks()=0;
00226         virtual int NumSelTracks()=0;
00239         virtual void GetSelTrack(int i,AnimatablePtr &anim,AnimatablePtr &client,int &subNum)=0;
00246         virtual ReferenceTarget* GetAnim(int index)=0;
00252         virtual ReferenceTarget* GetClient(int index)=0;
00253 
00256         virtual BOOL CanAssignController()=0;
00262         virtual void DoAssignController(BOOL clearMot=TRUE)=0;
00269         virtual void ShowControllerType(BOOL show)=0;   
00270 
00272         virtual const MCHAR *GetTVName()=0;
00273         // added for scripter access, JBW - 11/11/98
00278         virtual void SetTVName(const MCHAR *)=0;
00280         virtual void CloseTreeView()=0;
00281 
00292         virtual void SetFilter(DWORD mask,int which, BOOL redraw=TRUE)=0;
00303         virtual void ClearFilter(DWORD mask,int which, BOOL redraw=TRUE)=0; 
00311         virtual DWORD TestFilter(DWORD mask,int which)=0; 
00312         
00313         // added for param wiring, JBW - 5.26.00
00321         virtual void ZoomOn(Animatable* owner, int subnum)=0;
00323         virtual void ZoomSelected()=0;
00325         virtual void ExpandTracks()=0;
00326 
00327         //added for completeness by AF (09/12/00) 
00333         virtual int GetIndex(Animatable *anim)=0;
00342         virtual void SelectTrackByIndex(int index, BOOL clearSelection=TRUE)=0;
00351         virtual void SelectTrack(Animatable* anim, BOOL clearSelection=TRUE)=0;
00362         virtual BOOL AssignControllerToSelected(Animatable* ctrl)=0;
00363 
00364         //added by AF (09/25/00) for MAXScript exposure
00380         virtual void SetEditMode(int mode)=0;
00393         virtual int GetEditMode()=0;
00394 
00395         //added by AF (09/25/00) for more MAXScript exposure
00396         //These differ from "active" because the trackview 
00397         //doesn't have to be selected for it to be the currently used trackview
00400         virtual BOOL IsCurrent()=0;
00403         virtual void SetCurrent()=0;
00404 
00405         enum {  tv_getName, tv_setName, tv_close, tv_numSelTracks, tv_getNumTracks, tv_getSelTrack, 
00406                 tv_canAssignController, tv_doAssignController, tv_assignController, tv_showControllerTypes, 
00407                 tv_expandTracks, tv_zoomSelected, tv_zoomOnTrack,
00408                 tv_getAnim, tv_getClient, tv_getSelAnim, tv_getSelClient, tv_getSelAnimSubNum, 
00409                 tv_getIndex, tv_selectTrackByIndex, tv_selectTrack,
00410                 tv_setFilter, tv_clearFilter, 
00411                 tv_setEditMode, tv_getEditMode, tv_setEditModeProp, tv_getEditModeProp,
00412                 tv_setCurrent, tv_getCurrent, tv_getUIInterface, tv_getModifySubTree, tv_setModifySubTree, 
00413                 tv_getModifyChildren, tv_setModifyChildren,
00414                 tv_launchUtilityDialog, tv_launchUtility, tv_getUtilityCount, tv_getUtilityName, tv_closeUtility,
00415                 tv_getInteractiveUpdate, tv_setInteractiveUpdate, tv_getSyncTime, tv_setSyncTime,
00416                 tv_setTangentType, tv_setInTangentType, tv_setOutTangentType,
00417                 tv_getFreezeSelKeys, tv_setFreezeSelKeys, 
00418                 tv_getFreezeNonSelCurves, tv_setFreezeNonSelCurves, tv_getShowNonSelCurves, tv_setShowNonSelCurves,
00419                 tv_getShowTangents, tv_setShowTangents, tv_getShowFrozenKeys, tv_setShowFrozenKeys,
00420                 tv_getEffectSelectedObjectsOnly, tv_setEffectSelectedObjectsOnly, 
00421                 tv_getAutoExpandChildren, tv_setAutoExpandChildren, tv_getAutoExpandTransforms, tv_setAutoExpandTransforms,
00422                 tv_getAutoExpandObjects, tv_setAutoExpandObjects, tv_getAutoExpandModifiers, tv_setAutoExpandModifiers, 
00423                 tv_getAutoExpandMaterials, tv_setAutoExpandMaterials, tv_getAutoExpandXYZ, tv_setAutoExpandXYZ,
00424                 tv_getAutoSelectAnimated, tv_setAutoSelectAnimated, tv_getAutoSelectPosition, tv_setAutoSelectPosition,
00425                 tv_getAutoSelectRotation, tv_setAutoSelectRotation, tv_getAutoSelectScale, tv_setAutoSelectScale,
00426                 tv_getAutoSelectXYZ, tv_setAutoSelectXYZ, tv_getManualNavigation, tv_setManualNavigation,
00427                 tv_getAutoZoomToRoot, tv_setAutoZoomToRoot, tv_getAutoZoomToSelected, tv_setAutoZoomToSelected,
00428                 tv_getAutoZoomToEdited, tv_setAutoZoomToEdited, tv_getUseSoftSelect, tv_setUseSoftSelect, 
00429                 tv_getSoftSelectRange, tv_setSoftSelectRange, tv_getSoftSelectFalloff, tv_setSoftSelectFalloff,
00430                 tv_getRootTrack, tv_setRootTrack, tv_restoreRootTrack, tv_getScaleValuesOrigin, tv_setScaleValuesOrigin,
00431                 tv_getIsolateCurve, tv_setIsolateCurve,
00432                 tv_updateList,
00433                 //symbolic enums
00434                 tv_enumEffectTracks, tv_enumKeyTangentType, tv_editModeTypes, tv_enumTangentDisplay,
00435             };
00436         #pragma warning(push)
00437         #pragma warning(disable:4100 4238)
00438         BEGIN_FUNCTION_MAP
00439             FN_0(tv_getName, TYPE_STRING, GetTVName);
00440             VFN_1(tv_setName, SetTVName, TYPE_STRING);
00441             VFN_0(tv_close, CloseTreeView);
00442             FN_0(tv_getNumTracks, TYPE_INT, GetNumTracks);
00443             FN_0(tv_numSelTracks, TYPE_INT, NumSelTracks);
00444             
00445             FN_0(tv_canAssignController, TYPE_BOOL, CanAssignController);
00446             VFN_0(tv_doAssignController, DoAssignController);
00447             FN_1(tv_assignController, TYPE_BOOL, fpAssignControllerToSelected, TYPE_REFTARG);
00448             VFN_1(tv_showControllerTypes, ShowControllerType, TYPE_BOOL);
00449             
00450             VFN_0(tv_expandTracks, ExpandTracks);
00451             VFN_0(tv_zoomSelected, ZoomSelected);
00452             VFN_2(tv_zoomOnTrack, fpZoomOn, TYPE_REFTARG, TYPE_INT);
00453 
00454             FN_1(tv_getAnim, TYPE_REFTARG, GetAnim, TYPE_INDEX);
00455             FN_1(tv_getClient, TYPE_REFTARG, GetClient, TYPE_INDEX);
00456 
00457             FN_1(tv_getSelAnim, TYPE_REFTARG, fpGetSelectedAnimatable, TYPE_INDEX);
00458             FN_1(tv_getSelClient, TYPE_REFTARG, fpGetSelectedClient, TYPE_INDEX);
00459             FN_1(tv_getSelAnimSubNum, TYPE_INDEX, fpGetSelectedAnimSubNum, TYPE_INDEX);
00460 
00461             FN_1(tv_getIndex, TYPE_INDEX, fpGetIndex, TYPE_REFTARG);
00462             VFN_2(tv_selectTrackByIndex, SelectTrackByIndex, TYPE_INDEX, TYPE_BOOL);
00463             VFN_2(tv_selectTrack, fpSelectTrack, TYPE_REFTARG, TYPE_BOOL);
00464 
00465             FN_VA(tv_setFilter, TYPE_BOOL, fpSetFilter);
00466             FN_VA(tv_clearFilter, TYPE_BOOL, fpClearFilter);
00467 
00468             VFN_1(tv_setEditMode, SetEditMode, TYPE_ENUM);
00469             FN_0(tv_getEditMode, TYPE_ENUM, GetEditMode);
00470             PROP_FNS(tv_getEditModeProp, GetEditMode, tv_setEditModeProp, SetEditMode, TYPE_ENUM);
00471             FN_0(tv_getCurrent, TYPE_BOOL, IsCurrent);
00472             VFN_0(tv_setCurrent, SetCurrent);
00473             // UI interface property
00474             RO_PROP_FN(tv_getUIInterface, fpGetUIInterface, TYPE_INTERFACE);
00475             // dope sheet mode property
00476             PROP_FNS(tv_getModifySubTree, ModifySubTree, tv_setModifySubTree, ModifySubTree, TYPE_BOOL);
00477             PROP_FNS(tv_getModifyChildren, ModifyChildren, tv_setModifyChildren, ModifyChildren, TYPE_BOOL);
00478             //trackview utility methods
00479             VFN_0(tv_launchUtilityDialog, LaunchUtilityDialog);
00480             VFN_1(tv_launchUtility, LaunchUtility, TYPE_TSTR_BV);
00481             VFN_1(tv_closeUtility, CloseUtility, TYPE_TSTR_BV);
00482             FN_0(tv_getUtilityCount, TYPE_INT, GetUtilityCount);
00483             FN_1(tv_getUtilityName, TYPE_TSTR_BV, GetUtilityName, TYPE_INDEX);
00484             // key tangent type methods
00485             VFN_2(tv_setTangentType, SetTangentType, TYPE_ENUM, TYPE_ENUM);
00486             VFN_2(tv_setInTangentType, SetInTangentType, TYPE_ENUM, TYPE_ENUM);
00487             VFN_2(tv_setOutTangentType, SetOutTangentType, TYPE_ENUM, TYPE_ENUM);
00488             // button state properties
00489             PROP_FNS(tv_getInteractiveUpdate, InteractiveUpdate, tv_setInteractiveUpdate, InteractiveUpdate, TYPE_BOOL);
00490             PROP_FNS(tv_getSyncTime, SyncTime, tv_setSyncTime, SyncTime, TYPE_BOOL);
00491             PROP_FNS(tv_getFreezeSelKeys, FreezeSelKeys, tv_setFreezeSelKeys, FreezeSelKeys, TYPE_BOOL);
00492             PROP_FNS(tv_getFreezeNonSelCurves, FreezeNonSelCurves, tv_setFreezeNonSelCurves, FreezeNonSelCurves, TYPE_BOOL);
00493             PROP_FNS(tv_getShowNonSelCurves, ShowNonSelCurves, tv_setShowNonSelCurves, ShowNonSelCurves, TYPE_BOOL);
00494             PROP_FNS(tv_getShowTangents, ShowTangents, tv_setShowTangents, ShowTangents, TYPE_ENUM);
00495             PROP_FNS(tv_getShowFrozenKeys, ShowFrozenKeys, tv_setShowFrozenKeys, ShowFrozenKeys, TYPE_BOOL);
00496             PROP_FNS(tv_getIsolateCurve, IsolateCurve, tv_setIsolateCurve, IsolateCurve, TYPE_BOOL);
00497             // soft selection properties
00498             PROP_FNS(tv_getUseSoftSelect, UseSoftSelect, tv_setUseSoftSelect, UseSoftSelect, TYPE_BOOL);
00499             PROP_FNS(tv_getSoftSelectRange, SoftSelectRange, tv_setSoftSelectRange, SoftSelectRange, TYPE_TIMEVALUE);
00500             PROP_FNS(tv_getSoftSelectFalloff, SoftSelectFalloff, tv_setSoftSelectFalloff, SoftSelectFalloff, TYPE_FLOAT);
00501             // workflow properties
00502             PROP_FNS(tv_getEffectSelectedObjectsOnly, EffectSelectedObjectsOnly, tv_setEffectSelectedObjectsOnly, EffectSelectedObjectsOnly, TYPE_BOOL);
00503             PROP_FNS(tv_getManualNavigation, ManualNavigation, tv_setManualNavigation, ManualNavigation, TYPE_BOOL);
00504             PROP_FNS(tv_getAutoExpandChildren, AutoExpandChildren, tv_setAutoExpandChildren, AutoExpandChildren, TYPE_BOOL);
00505             PROP_FNS(tv_getAutoExpandTransforms, AutoExpandTransforms, tv_setAutoExpandTransforms, AutoExpandTransforms, TYPE_BOOL);
00506             PROP_FNS(tv_getAutoExpandObjects, AutoExpandObjects, tv_setAutoExpandObjects, AutoExpandObjects, TYPE_BOOL);
00507             PROP_FNS(tv_getAutoExpandModifiers, AutoExpandModifiers, tv_setAutoExpandModifiers, AutoExpandModifiers, TYPE_BOOL);
00508             PROP_FNS(tv_getAutoExpandMaterials, AutoExpandMaterials, tv_setAutoExpandMaterials, AutoExpandMaterials, TYPE_BOOL);
00509             PROP_FNS(tv_getAutoExpandXYZ, AutoExpandXYZ, tv_setAutoExpandXYZ, AutoExpandXYZ, TYPE_BOOL);
00510             PROP_FNS(tv_getAutoSelectAnimated, AutoSelectAnimated, tv_setAutoSelectAnimated, AutoSelectAnimated, TYPE_BOOL);
00511             PROP_FNS(tv_getAutoSelectPosition, AutoSelectPosition, tv_setAutoSelectPosition, AutoSelectPosition, TYPE_BOOL);
00512             PROP_FNS(tv_getAutoSelectRotation, AutoSelectRotation, tv_setAutoSelectRotation, AutoSelectRotation, TYPE_BOOL);
00513             PROP_FNS(tv_getAutoSelectScale, AutoSelectScale, tv_setAutoSelectScale, AutoSelectScale, TYPE_BOOL);
00514             PROP_FNS(tv_getAutoSelectXYZ, AutoSelectXYZ, tv_setAutoSelectXYZ, AutoSelectXYZ, TYPE_BOOL);
00515             PROP_FNS(tv_getAutoZoomToRoot, AutoZoomToRoot, tv_setAutoZoomToRoot, AutoZoomToRoot, TYPE_BOOL);
00516             PROP_FNS(tv_getAutoZoomToSelected, AutoZoomToSelected, tv_setAutoZoomToSelected, AutoZoomToSelected, TYPE_BOOL);
00517             PROP_FNS(tv_getAutoZoomToEdited, AutoZoomToEdited, tv_setAutoZoomToEdited, AutoZoomToEdited, TYPE_BOOL);
00518             //root node methods
00519             PROP_FNS(tv_getRootTrack, GetRootTrack, tv_setRootTrack, SetRootTrack, TYPE_REFTARG);
00520             VFN_0(tv_restoreRootTrack, RestoreDefaultRootTrack);
00521             // scale values mode -- scale origin
00522             PROP_FNS(tv_getScaleValuesOrigin, ScaleValuesOrigin, tv_setScaleValuesOrigin, ScaleValuesOrigin, TYPE_FLOAT);
00523             VFN_0(tv_updateList, UpdateList);
00524         END_FUNCTION_MAP
00525         #pragma warning(pop)
00526         
00529             FPInterfaceDesc* GetDesc() { return GetDescByID(TREEVIEW_OPS_INTERFACE); }
00530             Interface_ID    GetID() { return TREEVIEW_OPS_INTERFACE; }
00531 
00532 //  private:
00533         //these methods are created to massage data into a format the function publishing system can interpret
00534         //these functions just call other public functions above
00535         //Added by AF (09/12/00)
00536         // LAM - 4/1/04 - made public. No access to SetTVDisplayFlag/GetTVDisplayFlag, which is needed for the 
00537         // AutoXXXX methods below.
00538         virtual Animatable* fpGetSelectedAnimatable(int index)=0;
00539         virtual Animatable* fpGetSelectedClient(int index)=0;
00540         virtual int fpGetSelectedAnimSubNum(int index)=0;
00541         virtual BOOL fpSetFilter(FPParams* val)=0;
00542         virtual BOOL fpClearFilter(FPParams* val)=0;
00543         
00544         // these are here so we don't break plugin compatibility
00545         // these can be called using FPInterface::Invoke()
00546 
00547         // Dope Sheet Mode effect children
00548         virtual BOOL ModifySubTree()=0;
00549         virtual void ModifySubTree(BOOL onOff)=0;
00550         virtual BOOL ModifyChildren()=0;
00551         virtual void ModifyChildren(BOOL onOff)=0;
00552 
00553         // Track View Utilities
00554         virtual void LaunchUtility(MSTR name)=0;
00555         virtual void LaunchUtilityDialog()=0;
00556         virtual void CloseUtility(MSTR name)=0;
00557         virtual int GetUtilityCount()=0;
00558         virtual MSTR GetUtilityName(int index)=0;
00559 
00560         // Update the viewport interactively, or on mouse up
00561         virtual BOOL InteractiveUpdate()=0;
00562         virtual void InteractiveUpdate(BOOL update)=0;
00563 
00564         // Sync Time with the mouse while clicking and dragging selections, keys, etc.
00565         virtual BOOL SyncTime()=0;
00566         virtual void SyncTime(BOOL sync)=0;
00567 
00568         // Button States
00569         virtual BOOL FreezeSelKeys()=0;
00570         virtual void FreezeSelKeys(BOOL onOff)=0;
00571         virtual BOOL FreezeNonSelCurves()=0;
00572         virtual void FreezeNonSelCurves(BOOL onOff)=0;
00573         virtual BOOL ShowNonSelCurves()=0;
00574         virtual void ShowNonSelCurves(BOOL onOff)=0;
00575 
00576         virtual int ShowTangents()=0;
00577         virtual void ShowTangents(int type)=0;
00578         virtual BOOL ShowFrozenKeys()=0;
00579         virtual void ShowFrozenKeys(BOOL onOff)=0;
00585         virtual void IsolateCurve(BOOL onOff)=0;
00588         virtual BOOL IsolateCurve()=0;
00589         // Soft selection
00590         virtual void UseSoftSelect(BOOL use)=0;
00591         virtual BOOL UseSoftSelect()=0;
00592         virtual void SoftSelectRange(TimeValue range)=0;
00593         virtual TimeValue SoftSelectRange()=0;
00594         virtual void SoftSelectFalloff(float falloff)=0;
00595         virtual float SoftSelectFalloff()=0;
00596 
00597         // Adjust the key tangent types
00598         virtual void SetTangentType(int type, int effect = EFFECT_ALL_SEL_KEYS)=0;
00599         virtual void SetInTangentType(int type, int effect = EFFECT_ALL_SEL_KEYS)=0;
00600         virtual void SetOutTangentType(int type, int effect = EFFECT_ALL_SEL_KEYS)=0;
00601 
00602         ITreeViewUI* fpGetUIInterface() { return (ITreeViewUI*)GetInterface(TREEVIEW_UI_INTERFACE); }
00603 
00604         // Workflow settings
00605         virtual BOOL EffectSelectedObjectsOnly()=0;
00606         virtual void EffectSelectedObjectsOnly(BOOL effect)=0;
00607 
00608         virtual BOOL ManualNavigation()=0;
00609         virtual void ManualNavigation(BOOL manual)=0;
00610 
00611         virtual BOOL AutoExpandChildren()=0;
00612         virtual void AutoExpandChildren(BOOL expand)=0;
00613         virtual BOOL AutoExpandTransforms()=0;
00614         virtual void AutoExpandTransforms(BOOL expand)=0;
00615         virtual BOOL AutoExpandObjects()=0;
00616         virtual void AutoExpandObjects(BOOL expand)=0;
00617         virtual BOOL AutoExpandModifiers()=0;
00618         virtual void AutoExpandModifiers(BOOL expand)=0;
00619         virtual BOOL AutoExpandMaterials()=0;
00620         virtual void AutoExpandMaterials(BOOL expand)=0;
00621         virtual BOOL AutoExpandXYZ()=0;
00622         virtual void AutoExpandXYZ(BOOL expand)=0;
00623             
00624         virtual BOOL AutoSelectAnimated()=0;
00625         virtual void AutoSelectAnimated(BOOL select)=0;
00626         virtual BOOL AutoSelectPosition()=0;
00627         virtual void AutoSelectPosition(BOOL select)=0;
00628         virtual BOOL AutoSelectRotation()=0;
00629         virtual void AutoSelectRotation(BOOL select)=0;
00630         virtual BOOL AutoSelectScale()=0;
00631         virtual void AutoSelectScale(BOOL select)=0;
00632         virtual BOOL AutoSelectXYZ()=0;
00633         virtual void AutoSelectXYZ(BOOL select)=0;
00634 
00635         virtual BOOL AutoZoomToRoot()=0;
00636         virtual void AutoZoomToRoot(BOOL zoom)=0;
00637         virtual BOOL AutoZoomToSelected()=0;
00638         virtual void AutoZoomToSelected(BOOL zoom)=0;
00639         virtual BOOL AutoZoomToEdited()=0;
00640         virtual void AutoZoomToEdited(BOOL zoom)=0;
00641 
00642         virtual ReferenceTarget* GetRootTrack()=0;
00643         virtual void SetRootTrack(ReferenceTarget* root)=0;
00644         virtual void RestoreDefaultRootTrack()=0;
00645 
00646         virtual float ScaleValuesOrigin()=0;
00647         virtual void ScaleValuesOrigin(float origin)=0;
00648         
00649         // force an update of the list
00650         virtual void UpdateList()=0;
00651 };
00652 
00653 
00661 class ITreeView : public IObject, public ITreeViewOps{
00662     public:
00663         
00665         virtual ~ITreeView() {}
00673         virtual void SetPos(int x, int y, int w, int h)=0;
00675         virtual void Show()=0;
00677         virtual void Hide()=0;
00681         virtual BOOL IsVisible()=0;
00686         virtual BOOL InViewPort()=0; 
00687 
00697         virtual void SetTreeRoot(ReferenceTarget *root,ReferenceTarget *client=NULL,int subNum=0)=0;
00704         virtual void SetLabelOnly(BOOL only)=0;
00705 
00713         virtual void SetMultiSel(BOOL on)=0;
00721         virtual void SetSelFilter(TrackViewFilter *f=NULL)=0;
00727         virtual void SetActive(BOOL active)=0;
00730         virtual BOOL IsActive()=0;
00732         virtual HWND GetHWnd()=0;
00740         virtual int GetTrackViewParent(int index)=0; // returns -1 if no parent is found
00741 
00744         virtual void Flush()=0;
00747         virtual void UnFlush()=0;
00749         virtual void SetMatBrowse()=0;
00751         virtual DWORD GetTVID()=0;
00752 
00753         //from IObject
00754         virtual MCHAR* GetIObjectName(){return _M("ITrackView");}
00755         virtual int NumInterfaces() { return IObject::NumInterfaces() + 1; }
00756         virtual BaseInterface* GetInterfaceAt(int index) {
00757                             if (index == 0)
00758                                 return (ITreeViewOps*)this; 
00759                             return IObject::GetInterfaceAt(index-1);
00760                         }
00761 
00762         virtual BaseInterface* GetInterface(Interface_ID id) 
00763                 { 
00764                     if (id == TREEVIEW_OPS_INTERFACE) 
00765                         return (BaseInterface*)this; 
00766                     else { 
00767                         return IObject::GetInterface(id);
00768                     }
00769                     return NULL;
00770                 } 
00771 
00772     };
00773 
00774 
00775 //Added by AF (09/07/00)
00776 //A CORE interface to get the trackview windows
00777 //Use GetCOREInterface(ITRACKVIEWS) to get a pointer to this interface
00778 //**************************************************
00779 #define ITRACKVIEWS Interface_ID(0x531c5f2c, 0x6fdf29cf)
00780 
00787 class ITrackViewArray : public FPStaticInterface
00788 {
00789 protected:
00790         BOOL fpTrackViewZoomOn(MSTR tvName, ReferenceTarget* anim, int subNum)
00791         {
00792             // upcast
00793             return TrackViewZoomOn(tvName, (Animatable*) anim, subNum);
00794         }
00795     public: 
00798         virtual int GetNumAvailableTrackViews();
00804         virtual ITreeViewOps* GetTrackView(int index);
00810         virtual ITreeViewOps* GetTrackView(MSTR name);
00813         virtual Tab<ITreeViewOps*> GetAvaliableTrackViews();
00816         virtual ITreeViewOps* GetLastActiveTrackView();
00817 
00823         virtual BOOL IsTrackViewOpen(MSTR name);
00829         virtual BOOL IsTrackViewOpen(int index);
00835         virtual BOOL OpenTrackViewWindow(
00836             MSTR name, 
00837             MSTR layoutName = _M(""), 
00838             Point2 pos = Point2(-1.0f,-1.0f), 
00839             int width = -1, 
00840             int height = -1, 
00841             int dock = TV_FLOAT);
00847         virtual BOOL OpenTrackViewWindow(int index);
00852         virtual BOOL OpenLastActiveTrackViewWindow();
00853 
00859         virtual BOOL CloseTrackView(MSTR name);
00865         virtual BOOL CloseTrackView(int index);
00873         virtual BOOL DeleteTrackView(MSTR name);
00881         virtual BOOL DeleteTrackView(int index);
00882 
00888         virtual const MCHAR* GetTrackViewName(int index);
00891         virtual const MCHAR* GetLastUsedTrackViewName();
00892 
00898         virtual BOOL IsTrackViewCurrent(int index);
00904         virtual BOOL IsTrackViewCurrent(MSTR name);
00910         virtual BOOL SetTrackViewCurrent(int index);
00916         virtual BOOL SetTrackViewCurrent(MSTR name);
00917 
00925         virtual BOOL TrackViewZoomSelected(MSTR tvName);
00936         virtual BOOL TrackViewZoomOn(MSTR tvName, Animatable* anim, int subNum);
00937     
00938         enum{ getTrackView, getAvaliableTrackViews, getNumAvailableTrackViews,
00939               openTrackView, closeTrackView, getTrackViewName, trackViewZoomSelected, trackViewZoomOn,
00940               setFilter, clearFilter, pickTrackDlg, isOpen, openLastTrackView, currentTrackViewProp,
00941               lastUsedTrackViewNameProp, deleteTrackView, isTrackViewCurrent, setTrackViewCurrent,
00942               doesTrackViewExist,
00943 
00944               dockTypeEnum,
00945             };
00946 
00947         DECLARE_DESCRIPTOR(ITrackViewArray);
00948         #pragma warning(push)
00949         #pragma warning(disable:4100 4238)
00950         BEGIN_FUNCTION_MAP
00951         FN_1(getTrackView, TYPE_INTERFACE, fpGetTrackView, TYPE_FPVALUE); 
00952         FN_0(getAvaliableTrackViews, TYPE_INTERFACE_TAB_BV, GetAvaliableTrackViews);
00953         FN_0(getNumAvailableTrackViews, TYPE_INT, GetNumAvailableTrackViews);
00954 
00955         FN_6(openTrackView, TYPE_BOOL, fpOpenTrackViewWindow, TYPE_FPVALUE, TYPE_TSTR_BV, TYPE_POINT2_BV, TYPE_INT, TYPE_INT, TYPE_ENUM);
00956         FN_1(closeTrackView, TYPE_BOOL, fpCloseTrackView, TYPE_FPVALUE);
00957         VFN_1(deleteTrackView, fpDeleteTrackView, TYPE_FPVALUE);
00958 
00959         FN_1(getTrackViewName, TYPE_STRING, GetTrackViewName, TYPE_INDEX);
00960         FN_1(trackViewZoomSelected, TYPE_BOOL, TrackViewZoomSelected, TYPE_TSTR);
00961         FN_3(trackViewZoomOn, TYPE_BOOL, fpTrackViewZoomOn, TYPE_TSTR, TYPE_REFTARG, TYPE_INDEX);
00962         FN_VA(setFilter, TYPE_BOOL, fpSetTrackViewFilter);
00963         FN_VA(clearFilter, TYPE_BOOL, fpClearTrackViewFilter);
00964         FN_VA(pickTrackDlg, TYPE_FPVALUE_BV, fpDoPickTrackDlg);
00965         FN_1(isOpen, TYPE_BOOL, fpIsTrackViewOpen, TYPE_FPVALUE);
00966         FN_0(openLastTrackView, TYPE_BOOL, OpenLastActiveTrackViewWindow);      
00967         RO_PROP_FN(currentTrackViewProp, GetLastActiveTrackView, TYPE_INTERFACE);
00968         RO_PROP_FN(lastUsedTrackViewNameProp, GetLastUsedTrackViewName, TYPE_STRING);
00969         FN_1(isTrackViewCurrent, TYPE_BOOL, fpIsTrackViewCurrent, TYPE_FPVALUE);
00970         FN_1(setTrackViewCurrent, TYPE_BOOL, fpSetTrackViewCurrent, TYPE_FPVALUE);
00971         FN_1(doesTrackViewExist, TYPE_BOOL, fpDoesTrackViewExist, TYPE_FPVALUE);
00972         END_FUNCTION_MAP
00973         #pragma warning(pop)
00974     private:
00975         // these functions are wrapper functions to massage maxscript specific values into standard values
00976         // These methods just call one of the corresponding public methods
00977         BOOL fpSetTrackViewFilter(FPParams* val);
00978         BOOL fpClearTrackViewFilter(FPParams* val);
00979         FPValue fpDoPickTrackDlg(FPParams* val);
00980         BOOL fpIsTrackViewOpen(FPValue* val);
00981         BOOL fpCloseTrackView(FPValue* val);
00982         void fpDeleteTrackView(FPValue* val);
00983         BOOL fpIsTrackViewCurrent(FPValue* val);
00984         BOOL fpSetTrackViewCurrent(FPValue* val);
00985         ITreeViewOps* fpGetTrackView(FPValue* val);
00986         BOOL fpOpenTrackViewWindow(FPValue* val,MSTR layoutName, Point2 pos, int width, int height, int dock);
00987         BOOL fpDoesTrackViewExist(FPValue* val);
00988     };
00989 
00990 
00991 #define TRACK_SELSET_MGR_INTERFACE Interface_ID(0x18f36a84, 0x1f572eb7)
00992 class TrackSelectionSetMgr : public FPStaticInterface
00993     {
00994 public:
00995     virtual BOOL    Create(MSTR name, Tab<ReferenceTarget*> tracks, Tab<MCHAR*> trackNames)=0;
00996     virtual BOOL    Delete(MSTR name)=0;
00997     virtual int     Count()=0;
00998     virtual MSTR    GetName(int index)=0;
00999     virtual void    SetName(int index, MSTR name)=0;
01000     virtual MSTR    GetCurrent(ITreeView* tv)=0;
01001     virtual void    GetTracks(MSTR name, Tab<ReferenceTarget*> &tracks, Tab<MCHAR*> &trackNames)=0;
01002     virtual BOOL    Add(MSTR name, Tab<ReferenceTarget*> tracks, Tab<MCHAR*> trackNames)=0;
01003     virtual BOOL    Remove(MSTR name, Tab<ReferenceTarget*> tracks)=0;
01004 
01005     enum { kCreate, kDelete, kCount, kGetName, kSetName, 
01006             kGetCurrent, kGetTracks, kAdd, kRemove,
01007         };
01008     };
01009 
01010 TrackSelectionSetMgr* GetTrackSelectionSetMgr();
01011 
01012 // Defines for the "open" argument to Interface::CreateTreeViewChild
01013 // *****************************************************************
01014 // "Special" windows are TreeViews whose data can not customized and is not saved.
01015 #define OPENTV_SPECIAL  -2
01016 // "Custom" windows are TreeViews whose data can be customized but is not saved.
01017 // R5.1 and later only. A TreeView will not be created if using this flag in a previous release.
01018 #define OPENTV_CUSTOM   -3  
01019 // These arguments should not be used by third party developers.  
01020 // They are used to create the saved trackviews that appear in the Graph Editors Menu.
01021 #define OPENTV_LAST     -1
01022 #define OPENTV_NEW      0
01023 // *****************************************************************
01024 
01025 // Sent by a tree view window to its parent when the user right clicks
01026 // on dead area of the toolbar.
01027 // Mouse points are relative to the client area of the tree view window
01028 //
01029 // LOWORD(wParam) = mouse x
01030 // HIWORD(wParam) = mouse y
01031 // lparam         = tree view window handle
01032 #define WM_TV_TOOLBAR_RIGHTCLICK    WM_USER + 0x8ac1
01033 
01034 // Sent by a tree view window when the user double
01035 // clicks on a track label.
01036 // wParam = 0
01037 // lParam = HWND of track view window
01038 #define WM_TV_LABEL_DOUBLE_CLICK    WM_USER + 0x8ac2
01039 
01050 class TrackViewActionCallback: public ActionCallback {
01051 public:
01059     BOOL ExecuteAction(int id);
01066     void SetHWnd(HWND hWnd) { mhWnd = hWnd; }
01067 
01068     HWND mhWnd;
01069 };
01070 
01071 //-----------------------------------------------------------------
01072 //
01073 // Button IDs for the track view
01074     
01075 #define ID_TV_TOOLBAR           200    // the toolbar itself (not valid in R5 and later)
01076 //#define ID_TV_DELETE          210
01077 #define ID_TV_DELETETIME        215
01078 #define ID_TV_MOVE              220
01079 #define ID_TV_SCALE             230
01080 #define ID_TV_SCALETIME         250
01081 //#define ID_TV_FUNCTION_CURVE  240
01082 #define ID_TV_SNAPKEYS          260
01083 #define ID_TV_ALIGNKEYS         270
01084 #define ID_TV_ADD               280
01085 //#define ID_TV_EDITKEYS            290
01086 //#define ID_TV_EDITTIME            300
01087 //#define ID_TV_EDITRANGE           310
01088 //#define ID_TV_POSITIONRANGE       320
01089 #define ID_TV_FILTERS           330
01090 #define ID_TV_INSERT            340
01091 #define ID_TV_CUT               350
01092 #define ID_TV_COPY              360
01093 #define ID_TV_PASTE             370
01094 #define ID_TV_SLIDE             380
01095 #define ID_TV_SELECT            390
01096 #define ID_TV_REVERSE           400
01097 #define ID_TV_LEFTEND           410
01098 #define ID_TV_RIGHTEND          420
01099 #define ID_TV_SUBTREE           430
01100 #define ID_TV_ASSIGNCONTROL     440
01101 #define ID_TV_MAKEUNIQUE        450
01102 #define ID_TV_CHOOSEORT         460
01103 #define ID_TV_SHOWTANGENTS      470
01104 #define ID_TV_SHOWALLTANGENTS   475
01105 #define ID_TV_SCALEVALUES       480
01106 #define ID_TV_REGION_TOOL       485 //!< Activate/Deactivate the Region Tool mode
01107 #define ID_TV_ISOLATE_CURVE     486 //!< Activate/Deactivate the Isolate Curve state
01108 #define ID_TV_BREAK_TANGENTS    487 //!< Break Tangents on selected keys
01109 #define ID_TV_UNIFY_TANGENTS    488 //!< Unify Tangents on selected keys
01110 #define ID_TV_FREEZESEL         490
01111 #define ID_TV_SHOWKEYSONFROZEN  495
01112 #define ID_TV_TEMPLATE          500 //Same as ID_TV_FREEZENONSELCURVES
01113 #define ID_TV_FREEZENONSELCURVES 500
01114 #define ID_TV_HIDENONSELCURVES  505
01115 #define ID_TV_LOCKTAN           510
01116 #define ID_TV_PROPERTIES        520
01117 #define ID_TV_NEWEASE           530
01118 #define ID_TV_DELEASE           540
01119 #define ID_TV_TOGGLEEASE        550
01120 #define ID_TV_CHOOSE_EASE_ORT   560
01121 #define ID_TV_CHOOSE_MULT_ORT   570
01122 #define ID_TV_ADDNOTE           580
01123 #define ID_TV_DELETENOTE        590
01124 #define ID_TV_RECOUPLERANGE     600
01125 #define ID_TV_COPYTRACK         610
01126 #define ID_TV_PASTETRACK        620
01127 #define ID_TV_REDUCEKEYS        630
01128 #define ID_TV_ADDVIS            640
01129 #define ID_TV_DELVIS            650
01130 #define ID_TV_TVNAME            660
01131 #define ID_TV_TVUTIL            670
01132 //watje
01133 #define ID_TV_GETSELECTED       680
01134 #define ID_TV_DELETECONTROL     690
01135 
01136 #define ID_TV_SETUPPERLIMIT     700
01137 #define ID_TV_SETLOWERLIMIT     701
01138 #define ID_TV_TOGGLELIMIT       702
01139 #define ID_TV_REMOVELIMIT       703
01140 #define ID_TV_COPYLIMITONLY     704
01141 #define ID_TV_PASTELIMITONLY    705
01142 
01143 #define ID_TV_EXPANDNODES       710
01144 #define ID_TV_EXPANDTRACKS      711
01145 #define ID_TV_EXPANDALL         712
01146 #define ID_TV_COLLAPSENODES     713
01147 #define ID_TV_COLLAPSETRACKS    714
01148 #define ID_TV_COLLAPSEALL       715
01149 #define ID_TV_SELECTALL         720
01150 #define ID_TV_SELECTINVERT      721
01151 #define ID_TV_SELECTNONE        722
01152 #define ID_TV_SELECTCHILDREN    723
01153 
01154 #define ID_TV_EDITTRACKSET      730
01155 #define ID_TV_TRACKSETLIST      731
01156 
01157 #define ID_TV_AUTOEXPAND_KEYABLE    750
01158 #define ID_TV_AUTOEXPAND_ANIMATED   751
01159 #define ID_TV_AUTOEXPAND_LIMITS     752
01160 #define ID_TV_AUTOEXPAND_LOCKED     753
01161 
01162 #define ID_TV_IGNORE_ANIM_RANGE     760
01163 #define ID_TV_RESPECT_ANIM_RANGE    761
01164 
01165 #define ID_TV_FILTER_SELECTEDTRACKS 770
01166 
01167 #define ID_TV_EDIT_TRACKSETS        800
01168 
01169 // Status tool button IDs
01170 #define ID_TV_STATUS            1000
01171 #define ID_TV_ZOOMREGION        1020
01172 #define ID_TV_PAN               1030
01173 #define ID_TV_VFITTOWINDOW      1040
01174 #define ID_TV_HFITTOWINDOW      1050
01175 #define ID_TV_SHOWSTATS         1060
01176 #define ID_TV_TIMETYPEIN        1070
01177 #define ID_TV_VALUETYPEIN       1080
01178 #define ID_TV_ZOOM              1090
01179 #define ID_TV_MAXIMIZE          1100
01180 #define ID_TV_SELWILDCARD       1110
01181 #define ID_TV_ZOOMSEL           1120
01182 
01183 // From accelerators
01184 #define ID_TV_K_SNAP            2000
01185 //#define ID_TV_K_LOCKKEYS      2010
01186 #define ID_TV_K_MOVEKEYS        2020
01187 #define ID_TV_K_MOVEVERT        2030
01188 #define ID_TV_K_MOVEHORZ        2040
01189 #define ID_TV_K_SELTIME         2050
01190 #define ID_TV_K_SUBTREE         2060
01191 #define ID_TV_K_LEFTEND         2070
01192 #define ID_TV_K_RIGHTEND        2080
01193 #define ID_TV_K_TEMPLATE        2090
01194 #define ID_TV_K_SHOWTAN         2100
01195 #define ID_TV_K_LOCKTAN         2110
01196 #define ID_TV_K_APPLYEASE       2120
01197 #define ID_TV_K_APPLYMULT       2130
01198 #define ID_TV_K_ACCESSTNAME     2140
01199 #define ID_TV_K_ACCESSSELNAME   2150
01200 #define ID_TV_K_ACCESSTIME      2160
01201 #define ID_TV_K_ACCESSVAL       2170
01202 #define ID_TV_K_ZOOMHORZ        2180
01203 #define ID_TV_K_ZOOMHORZKEYS    2190
01204 #define ID_TV_K_ZOOM            2200
01205 #define ID_TV_K_ZOOMTIME        2210
01206 #define ID_TV_K_ZOOMVALUE       2220
01207 //#define ID_TV_K_NUDGELEFT     2230
01208 //#define ID_TV_K_NUDGERIGHT        2240
01209 //#define ID_TV_K_MOVEUP            2250
01210 //#define ID_TV_K_MOVEDOWN      2260
01211 //#define ID_TV_K_TOGGLENODE        2270
01212 //#define ID_TV_K_TOGGLEANIM        2280
01213 #define ID_TV_K_SHOWSTAT        2290
01214 #define ID_TV_K_MOVECHILDUP     2300
01215 #define ID_TV_K_MOVECHILDDOWN   2310
01216 
01217 // Button IDs for the tangent type buttons
01218 #define ID_TV_TANGENT_FLAT      2320
01219 #define ID_TV_TANGENT_CUSTOM    2330
01220 #define ID_TV_TANGENT_FAST      2340
01221 #define ID_TV_TANGENT_SLOW      2350
01222 #define ID_TV_TANGENT_STEP      2360
01223 #define ID_TV_TANGENT_LINEAR    2370
01224 #define ID_TV_TANGENT_SMOOTH    2380
01225 
01226 //Button ID for the DrawCurves Mode button
01227 #define ID_TV_DRAWCURVES        2390
01228 
01229 // ID for the keyable property toggle action item (R5.1 and later only)
01230 #define ID_TV_TOGGLE_KEYABLE    2400
01231 
01233 #define ID_TV_TOGGLE_LOCKED 2401
01234 
01240 #define FILTER_SELOBJECTS       (1<<0)  //!< Selected objects
01241 #define FILTER_SELCHANNELS      (1<<1)  //!< Selected channels
01242 #define FILTER_ANIMCHANNELS     (1<<2)  //!< Animated channels
01243 
01244 #define FILTER_WORLDMODS        (1<<3)  //!< World Space Modifiers
01245 #define FILTER_OBJECTMODS       (1<<4)  //!< Object Space Modifiers
01246 #define FILTER_TRANSFORM        (1<<5)  //!< Transformations
01247 #define FILTER_BASEPARAMS       (1<<6)  //!< base parameters
01248 
01249 #define FILTER_POSX             (1<<7)  //!< X positions
01250 #define FILTER_POSY             (1<<8)  //!< Y positions
01251 #define FILTER_POSZ             (1<<9)  //!< Z positions
01252 #define FILTER_POSW             (1<<10) //!< W Positions
01253 #define FILTER_ROTX             (1<<11) //!< X rotations
01254 #define FILTER_ROTY             (1<<12) //!< Y rotations
01255 #define FILTER_ROTZ             (1<<13) //!< Z rotations
01256 #define FILTER_SCALEX           (1<<14) //!< X scaling
01257 #define FILTER_SCALEY           (1<<15) //!< Y scaling
01258 #define FILTER_SCALEZ           (1<<16) //!< Z scaling
01259 #define FILTER_RED              (1<<17) //!< Red
01260 #define FILTER_GREEN            (1<<18) //!< Green
01261 #define FILTER_BLUE             (1<<19) //!< Blue
01262 #define FILTER_ALPHA            (1<<20) //!< 
01263 
01264 #define FILTER_CONTTYPES        (1<<21) //!< 
01265 #define FILTER_NOTETRACKS       (1<<22) //!< 
01266 #define FILTER_SOUND            (1<<23) //!< 
01267 #define FILTER_MATMAPS          (1<<24) //!< 
01268 #define FILTER_MATPARAMS        (1<<25) //!< 
01269 #define FILTER_VISTRACKS        (1<<26) //!< 
01270 #define FILTER_GLOBALTRACKS     (1<<27) //!< 
01271 
01272 
01273 // More filter bits. These are stored in the 2nd DWORD.
01274 #define FILTER_GEOM             (1<<0)  //!<    All geometrical objects
01275 #define FILTER_SHAPES           (1<<1)  //!<    All shape objects
01276 #define FILTER_LIGHTS           (1<<2)  //!<    All lights
01277 #define FILTER_CAMERAS          (1<<3)  //!<    All cameras
01278 #define FILTER_HELPERS          (1<<4)  //!<    All helper objects
01279 #define FILTER_WARPS            (1<<5)  //!<    All space warps
01280 #define FILTER_VISIBLE_OBJS     (1<<6)  //!<    All visible objects
01281 #define FILTER_POSITION         (1<<7)  //!<    All position controllers
01282 #define FILTER_ROTATION         (1<<8)  //!<    All rotation controllers
01283 #define FILTER_SCALE            (1<<9)  //!<    All scaling controllers
01284 #define FILTER_CONTX            (1<<10) //!<    All X axis controllers
01285 #define FILTER_CONTY            (1<<11) //!<    All Y axis controllers
01286 #define FILTER_CONTZ            (1<<12) //!<    All Z axis controllers
01287 #define FILTER_CONTW            (1<<13) //!<    All W axis controllers
01288 #define FILTER_STATICVALS       (1<<14) //!<    All static values
01289 #define FILTER_HIERARCHY        (1<<15) //!<    Based on hierarchy
01290 #define FILTER_NODES            (1<<16) //!<    All nodes
01291 #define FILTER_BONES            (1<<17) //!<    
01292 #define FILTER_KEYABLE          (1<<18) //!<    corresponds to the "Keyable" checkbox in the Filters dialog in TrackView
01293 
01294 #define FILTER_ACTIVELAYER      (1<<19) //!<    
01295 
01296 #define FILTER_LOCKED           (1<<20)
01297 
01298 #define DEFAULT_TREEVIEW_FILTER0    (FILTER_WORLDMODS|FILTER_OBJECTMODS|FILTER_TRANSFORM| \
01299     FILTER_BASEPARAMS|FILTER_POSX|FILTER_POSY|FILTER_POSZ|FILTER_POSW|FILTER_ROTX|FILTER_ROTY|FILTER_ROTZ| \
01300     FILTER_SCALEX|FILTER_SCALEY|FILTER_SCALEZ|FILTER_RED|FILTER_GREEN|FILTER_BLUE|FILTER_ALPHA| \
01301     FILTER_NOTETRACKS|FILTER_MATMAPS|FILTER_MATPARAMS|FILTER_VISTRACKS|FILTER_SOUND|FILTER_GLOBALTRACKS)
01302 
01303 #define DEFAULT_TREEVIEW_FILTER1    (FILTER_POSITION|FILTER_ROTATION|FILTER_SCALE| \
01304     FILTER_CONTX|FILTER_CONTY|FILTER_CONTZ|FILTER_CONTW|FILTER_VISIBLE_OBJS|FILTER_STATICVALS| \
01305     FILTER_HIERARCHY|FILTER_NODES)
01306 
01307 
01308 // key tangent display setting
01309 #define DISPLAY_TANGENTS_NONE       1
01310 #define DISPLAY_TANGENTS_SELECTED   2
01311 #define DISPLAY_TANGENTS_ALL        3
01312 
01313