00001 /********************************************************************* 00002 *< 00003 FILE: SetKeyMode.h 00004 00005 DESCRIPTION: Interface to set-key mode related APIs 00006 00007 CREATED BY: Rolf Berteig 00008 00009 HISTORY: Created November 29, 2000 00010 00011 *> Copyright (c) 2000, All Rights Reserved. 00012 **********************************************************************/ 00013 00014 #pragma once 00015 #include "maxheap.h" 00016 #include "baseinterface.h" 00017 #include "strclass.h" 00018 // forward declarations 00019 class INode; 00020 class Animatable; 00021 00022 #define I_SETKEYMODE 0x00002000 00023 00024 #define SETKEY_IK_PARAMS (1<<1) 00025 #define SETKEY_POS (1<<2) 00026 #define SETKEY_ROT (1<<3) 00027 #define SETKEY_SCALE (1<<4) 00028 #define SETKEY_MODIFIER (1<<5) 00029 #define SETKEY_MATERIAL (1<<6) 00030 #define SETKEY_ATTRIBUTES (1<<7) 00031 #define SETKEY_SELECTED_NODES (1<<8) 00032 #define SETKEY_OBJPARAMS (1<<9) 00033 #define TIMESLIDER_RBUTTON_DOWN (1<<10) 00034 00035 #define HOTKEY_ALL_POSROTSCALE (1<<11) 00036 00037 #define HOTKEY_ALL_POS (1<<12) 00038 #define HOTKEY_ALL_POSX (1<<13) 00039 #define HOTKEY_ALL_POSY (1<<14) 00040 #define HOTKEY_ALL_POSZ (1<<15) 00041 00042 #define HOTKEY_ALL_ROT (1<<16) 00043 #define HOTKEY_ALL_ROTX (1<<17) 00044 #define HOTKEY_ALL_ROTY (1<<18) 00045 #define HOTKEY_ALL_ROTZ (1<<19) 00046 00047 #define HOTKEY_ALL_SCALE (1<<20) 00048 #define HOTKEY_ALL_SCALEX (1<<21) 00049 #define HOTKEY_ALL_SCALEY (1<<22) 00050 #define HOTKEY_ALL_SCALEZ (1<<23) 00051 #define SETKEY_SETTING_KEYS (1<<24) 00052 00053 // defined for release 6 and later only 00054 #define HOTKEY_ALL (1<<25) 00055 #define SETKEY_ALL (1<<26) 00056 #define SETKEY_OTHER (1<<27) 00057 00058 00059 // Gets a pointer to the SetKeyModeInterface interface, the caller should pass a pointer to "Interface" 00060 #define GetSetKeyModeInterface(i) ((SetKeyModeInterface*)i->GetInterface(I_SETKEYMODE)) 00061 00062 00063 class SetKeyModeCallback : public InterfaceServer { 00064 public: 00065 virtual void SetKey()=0; // Called when user executes set key command 00066 virtual void ShowUI()=0; // Display set key floater window 00067 virtual void SetKeyModeStateChanged()=0;// Called when user enters or exits set-key mode 00068 }; 00069 00070 class SetKeyModeInterface : public InterfaceServer { 00071 public: 00072 virtual void RegisterSetKeyModeCallback(SetKeyModeCallback *cb)=0; 00073 virtual void UnRegisterSetKeyModeCallback(SetKeyModeCallback *cb)=0; 00074 00075 virtual void ActivateSetKeyMode(BOOL onOff)=0; 00076 virtual void AllTracksCommitSetKeyBuffer()=0; 00077 virtual void AllTracksRevertSetKeyBuffer()=0; 00078 virtual BOOL AllTracksSetKeyBufferPresent()=0; 00079 00080 virtual void SetSKFlag(DWORD mask) =0; 00081 virtual void ClearSKFlag(DWORD mask) =0; 00082 virtual BOOL TestSKFlag(DWORD mask) =0; 00083 00084 virtual BOOL CreateTransformKeysIfBuffersNotPresent(TimeValue, INode *, BOOL ) =0; 00085 virtual void SetKeyCommit(void ) =0; 00086 virtual void RecursiveSetKeyCommit(const TimeValue& t, Animatable* anim, const MSTR& characterSetName, UINT recursiveFlags = FALSE) =0; 00087 virtual void CommitSetKeys(const BOOL &selectOveride = FALSE) =0; 00088 virtual void UpdateSetKeyButton(void)=0; 00089 }; 00090 00091 class ISetKey: public MaxHeapOperators { 00092 public: 00093 virtual void SetKeyWithoutBuffer(const TimeValue &t) =0; 00094 virtual int &SetKeyFlags(void) = 0; 00095 #pragma warning(push) 00096 #pragma warning(disable:4100) 00097 virtual void ResetKeyTimes(const TimeValue& src, const TimeValue& dst) {}; 00098 #pragma warning(pop) 00099 virtual void SetCurrentValue(void *v) = 0; 00100 }; 00101 00102 00103