📄 animtbl.h
字号:
/**********************************************************************
*<
FILE: animtbl.h
DESCRIPTION: Defines Animatable Classes
CREATED BY: Rolf Berteig & Dan Silva
HISTORY: created 9 September 1994
*> Copyright (c) 1994, All Rights Reserved.
**********************************************************************/
#ifndef _ANIMTBL_H_
#define _ANIMTBL_H_
#define ANIMTYPE_NODE 1
#define ANIMTYPE_ROOTNODE 3
#define ANIMTYPE_CONTROL 2
/*---------------------------------------------------*/
class TreeListExp;
class AnimEnum;
class ReferenceTarget;
class DWORDTab;
class IObjParam;
class INodeTab;
class AppDataChunk;
class IParamBlock2;
// The maximum number of track views that can be opened. Each
// animatable stores 3 bits for each track to identify it's open/close
// state and selection state.
#define MAX_TRACK_VIEWS 16
#define ALL_TRACK_VIEWS 0xffff
// The maximum number of track view selection sets
#define MAX_TRACKVIEW_SELSETS 16
// Values for flags in aflag
#define A_EVALUATING 1
#define A_NOTIFYDEP (1<<1)
#define A_CHILD_TREE_OPEN (1<<2)
#define A_SUBANIM_TREE_OPEN (1<<3)
#define A_OBJECT_REDUCED (1<<4)
// BITS 5-11 are reserved for specific sub-class use.
// Atmospheric flags
#define A_ATMOS_DISABLED (1<<5)
// OBJECT flags
#define A_OBJ_CREATING (1<<5) // The object is being created. It doesn't want to snap to itself.
#define A_OBJ_BEING_EDITED (1<<7)
#ifdef _OSNAP
#define A_OBJ_LONG_CREATE (1<<6) // Persists throughout the wholle creation process as
// opposed to the previous flag which gets cleared as
// as the object is added to the scene.
#endif
// MODIFIER flags .
#define A_MOD_DISABLED (1<<5) // Modifier flag
#define A_MOD_BEING_EDITED (1<<6)
#define A_MOD_USE_SEL (1<<7) // Modifier flag (use sub-ob selection)
#define A_MOD_DISABLED_INVIEWS (1<<8) // Modifier is disabled in viewports only
// MODAPP flags.
#define A_MODAPP_DISABLED (1<<5) // ModApp flag
#define A_MODAPP_SELECTED (1<<6) // ModApp flag (parent node is selected)
#define A_MODAPP_DISPLAY_ACTIVE (1<<7) // ModApp flag
#define A_MODAPP_DYNAMIC_BOX (1<<8) // ModApp flag
#define A_MODAPP_RENDERING (1<<9) // Render begin turns this on and render end turns it off
// Derived Object Flags
#define A_DERIVEDOBJ_DONTDELETE (1<<9) // When the last modifier is deleted form this derived object, don't delete the derived object
// CONTROL flags
#define A_ORT_MASK 7
#define A_ORT_BEFORESHIFT 5 // Uses bit 5,6,7,8,9 and 10 to store ORT
#define A_ORT_AFTERSHIFT 8
#define A_CTRL_DISABLED (1<<11)
#define A_ORT_DISABLED A_SUPERCLASS1 // indicates that the ORT is disabled
// INODE flags
#define A_INODE_IK_TERMINATOR (1<<5) // Terminates the top of an IK chain
#define A_INODE_IK_POS_PINNED (1<<6)
#define A_INODE_IK_ROT_PINNED (1<<7)
#ifdef _OSNAP
#define A_INODE_CLONE_TARGET (1<<8)
#endif
#define A_COMPONENT_LOCKED (1<<19) // needed for CompositeBase and its children
// Flags for Hold and Restore logic, for "lazy holding",
// to avoid multiple holding.
#define A_HELD (1<<12)
#define A_SET (1<<13)
// Deleted but kept around for UNDO
#define A_IS_DELETED (1<<14)
// To prevent AutoDelete from being re-entered.
#define A_BEING_AUTO_DELETED (1<<15)
// Reserved for superclass use
#define A_SUPERCLASS1 (1<<20)
#define A_SUPERCLASS2 (1<<21)
// These are reserved for use by the plug-in. No should will set these flags (except the plug-in class itself)
#define A_PLUGIN1 (1<<22)
#define A_PLUGIN2 (1<<23)
#define A_PLUGIN3 (1<<24)
#define A_PLUGIN4 (1<<25)
// Used to test for a dependency
#define A_DEPENDENCY_TEST (1<<26)
// Ref target isn't deleted when dependents goes to 0 if this flag is set.
#define A_LOCK_TARGET (1<<27)
#define A_WORK1 (1<<28)
#define A_WORK2 (1<<29)
#define A_WORK3 (1<<30)
#define A_WORK4 (1<<31)
#define A_OPENFLAG(t) ((t==0)?A_CHILD_TREE_OPEN:A_SUBANIM_TREE_OPEN)
class TimeMap {
public:
virtual TimeValue map(TimeValue t)=0;
virtual TimeValue prevmap(TimeValue t)=0;
};
class TrackHitRecord {
public:
DWORD hit;
DWORD flags;
TrackHitRecord(DWORD h=0,DWORD f=0) {hit=h;flags=f;}
};
typedef Tab<TrackHitRecord> TrackHitTab;
// Flags passed to MapKeys and DeleteKeys
#define TRACK_DOSEL (1<<0)
#define TRACK_DOALL (1<<1) // ignore selection
#define TRACK_SLIDEUNSEL (1<<2) // Slide unselected keys to the right
#define TRACK_RIGHTTOLEFT (1<<3) // Enumerate right to left. If TRACK_SLIDEUNSEL is set, keys will slide to the left.
#define TRACK_DOSUBANIMS (1<<4) // This flag is only passed to MapKeys
#define TRACK_DOCHILDNODES (1<<5) // This flag is only passed to MapKeys
#define TRACK_MAPRANGE (1<<6) // The range, if not locked to first and last key, should be mapped as well.
// Flags passed to EditTimeRange
#define EDITRANGE_LINKTOKEYS (1<<0) // This means if one of the ends of the interval is at a key, link it to the key so that if the key moves, the interval moves.
// Flags passed to hit test tracks and fcurves.
#define HITTRACK_SELONLY (1<<0)
#define HITTRACK_UNSELONLY (1<<1)
#define HITTRACK_ABORTONHIT (1<<2)
#define HITCURVE_TESTTANGENTS (1<<3)
#define HITTRACK_SUBTREEMODE (1<<4) // Subtree mode is on so the anim is being asked to hittest itself in one of its ancestor's tracks
// Flags passed to SelectKeys
// Either SELECT, DESELECT, or a combination of CLEARKEYS and CLEARCURVE
// will be specified.
#define SELKEYS_SELECT (1<<0)
#define SELKEYS_DESELECT (1<<1)
#define SELKEYS_CLEARKEYS (1<<2)
#define SELKEYS_CLEARCURVE (1<<3)
#define SELKEYS_FCURVE (1<<4) // indicates that were operating on keys of a function curve, not a track
// Flags passed to GetTimeRange
#define TIMERANGE_SELONLY (1<<0) // The bounding interval of selected keys
#define TIMERANGE_ALL (1<<1) // Whatever the channel's time range is - usually the bunding interval of all keys.
#define TIMERANGE_CHILDNODES (1<<2) // A node's time range should include child nodes.
#define TIMERANGE_CHILDANIMS (1<<3) // A animatable's child anim ranges should be included
// Passed to the functions that modify a time range such as copy,paste,delete,reverse
#define TIME_INCLEFT (1<<10) // Include left endpoint
#define TIME_INCRIGHT (1<<11) // Include right endpoint
#define TIME_NOSLIDE (1<<12) // Delete any keys in the interval but don't actually remove the block of time.
// In addition to the TIME_ flags above, the following flag may be passed to PasteTrck()
#define PASTE_RELATIVE (1<<20) // Add the keys relative to existing keys
// Flags passed to AddKey
#define ADDKEY_SELECT (1<<0) // Select the new key and deselect any other selected keys
#define ADDKEY_INTERP (1<<1) // Init the new key to the interpolated value at that time. Otherwise, init the key to the value of the previous key.
#define ADDKEY_FLAGGED (1<<2) // Flag the newly created key as if FlagKey() was called for it
// Flags passed to CopyKeysFromTime()
#define COPYKEY_POS (1<<0) // These filter flags are passed to a tm controller. The tm
#define COPYKEY_ROT (1<<1) // can decide what to do with them... they have obvious meaning
#define COPYKEY_SCALE (1<<2) // For the PRS controller.
// Flags passed to GetNextKeyTime()
#define NEXTKEY_LEFT (1<<0) // Search to the left.
#define NEXTKEY_RIGHT (1<<1) // Search to the right.
#define NEXTKEY_POS (1<<2)
#define NEXTKEY_ROT (1<<3)
#define NEXTKEY_SCALE (1<<4)
// Flags passed to IsKeyAtTime
#define KEYAT_POSITION (1<<0)
#define KEYAT_ROTATION (1<<1)
#define KEYAT_SCALE (1<<2)
// Flags passed to PaintTrack and PaintFCurves
#define PAINTTRACK_SHOWSEL (1<<0)
#define PAINTTRACK_SHOWSTATS (1<<1) // Show for selected keys
#define PAINTCURVE_SHOWTANGENTS (1<<2) // Show for selected keys
#define PAINTCURVE_FROZEN (1<<3) // Curve is in a frozen state
#define PAINTCURVE_GENCOLOR (1<<4) // Draw curve in generic color
#define PAINTCURVE_XCOLOR (1<<5) // Draw curve in red
#define PAINTCURVE_YCOLOR (1<<6) // Draw curve in green
#define PAINTCURVE_ZCOLOR (1<<7) // Draw curve in blue
#define PAINTTRACK_SUBTREEMODE (1<<8) // Subtree mode is on so the anim is being asked to paint itself in one of its ancestor's tracks
#define PAINTTRACK_HIDESTATICVALUES (1<<9) // Indicates that static values shouldn't be displayed in tracks.
// Flags passed to GetFCurveExtents
#define EXTENTS_SHOWTANGENTS (1<<0) // Tangents are visible for selected keys
// Values returned from PaintTrack, PaintFCurve and HitTestTrack
#define TRACK_DONE 1 // Track was successfully painted/hittested
#define TRACK_DORANGE 2 // This anim has no track. Draw/hittest the bounding range of it's subanims
#define TRACK_ASKCLIENT 3 // Ask client anim to paint the track
// Values returned from HitTestFCurve
#define HITCURVE_KEY 1 // Hit one or more keys
#define HITCURVE_WHOLE 2 // Hit the curve (anywhere)
#define HITCURVE_TANGENT 3 // Hit a tangent handle
#define HITCURVE_NONE 4 // Didn't hit squat
#define HITCURVE_ASKCLIENT 5 // Ask client to hit test fcurve.
// These flags are passed into PaintFCurves, HitTestFCurves, and GetFCurveExtnents
// They are filters for controllers with more than one curve
// NOTE: RGB controllers interpret X as red, Y as green and Z as blue.
#define DISPLAY_XCURVE (1<<29)
#define DISPLAY_YCURVE (1<<30)
#define DISPLAY_ZCURVE (1<<31)
// Values returned from GetSelKeyCoords()
#define KEYS_NONESELECTED (1<<0)
#define KEYS_MULTISELECTED (1<<1)
#define KEYS_COMMONTIME (1<<2) // Both of these last two bits
#define KEYS_COMMONVALUE (1<<3) // could be set.
// Flags passed to GetSelKeyCoords()
#define KEYCOORDS_TIMEONLY (1<<0)
#define KEYCOORDS_VALUEONLY (1<<1)
// Variable definitions for SetSelKeyCoordsExpr()
#define KEYCOORDS_TIMEVAR _T("n")
#define KEYCOORDS_VALVAR _T("n")
// Return values from SetSelKeyCoordsExpr()
#define KEYCOORDS_EXPR_UNSUPPORTED 0 // Don't implement this method
#define KEYCOORDS_EXPR_ERROR 1 // Error in expression
#define KEYCOORDS_EXPR_OK 2 // Expression evaluated
// Returned from NumKeys() if the animatable is not keyframeable
#define NOT_KEYFRAMEABLE -1
// Flags passed to AdjustTangents
#define ADJTAN_LOCK (1<<0)
#define ADJTAN_BREAK (1<<1)
// Flags passed to EditTrackParams
#define EDITTRACK_FCURVE (1<<0) // The user is in the function curve editor.
#define EDITTRACK_TRACK (1<<1) // The user is in one of the track views.
#define EDITTRACK_SCENE (1<<2) // The user is editing a path in the scene.
#define EDITTRACK_BUTTON (1<<3) // The user invoked by choosing the properties button. In this case the time parameter is NOT valid.
#define EDITTRACK_MOUSE (1<<4) // The user invoked by right clicking with the mouse. In this case the time parameter is valid.
// These are returned from TrackParamsType(). They define how the track parameters are invoked.
#define TRACKPARAMS_NONE 0 // Has no track parameters
#define TRACKPARAMS_KEY 1 // Entered by right clicking on a selected key
#define TRACKPARAMS_WHOLE 2 // Entered by right clicking anywhere in the track.
// Flags passed into RenderBegin
#define RENDERBEGIN_IN_MEDIT 1 // Indicates that the render is occuring in the material editor.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -