3ds Max C++ API Reference
Loading...
Searching...
No Matches
Flag Bits for Keys

General Key Flags

#define IKEY_SELECTED   (1<<0)
 
#define IKEY_XSEL   (1<<1)
 
#define IKEY_YSEL   (1<<2)
 
#define IKEY_ZSEL   (1<<3)
 
#define IKEY_WSEL   (1<<30)
 
#define IKEY_FLAGGED   (1<<31)
 
#define IKEY_TIME_LOCK   (1<<14)
 
#define IKEY_ALLSEL   (IKEY_SELECTED|IKEY_XSEL|IKEY_YSEL|IKEY_ZSEL|IKEY_WSEL)
 
#define IKEY_VALLOCK_SHIFT   16
 
#define IKEY_VALX_LOCK   (1<<IKEY_VALLOCK_SHIFT)
 
#define IKEY_VALY_LOCK   (1<<(IKEY_VALLOCK_SHIFT+1))
 
#define IKEY_VALZ_LOCK   (1<<(IKEY_VALLOCK_SHIFT+2))
 
#define IKEY_VALA_LOCK   (1<<(IKEY_VALLOCK_SHIFT+3))
 

TCB-specific Key Flags

#define TCBKEY_QUATVALID   (1<<4)
 Angle/axis is derived from the quat instead of vice/versa.
 

Bezier-specific Key Flags

#define BEZKEY_XBROKEN   (1<<4)
 Broken means not locked.
 
#define BEZKEY_YBROKEN   (1<<5)
 Broken means not locked.
 
#define BEZKEY_ZBROKEN   (1<<6)
 Broken means not locked.
 
#define BEZKEY_WBROKEN   (1<<21)
 Broken means not locked.
 

In and Out types

Stored in bits 7-13

#define BEZKEY_NUMTYPEBITS   3
 
#define BEZKEY_INTYPESHIFT   7
 
#define BEZKEY_OUTTYPESHIFT   (BEZKEY_INTYPESHIFT+BEZKEY_NUMTYPEBITS)
 
#define BEZKEY_TYPEMASK   7
 

Bezier Tangeant Types

#define BEZKEY_SMOOTH   0
 
#define BEZKEY_LINEAR   1
 
#define BEZKEY_STEP   2
 
#define BEZKEY_FAST   3
 
#define BEZKEY_SLOW   4
 
#define BEZKEY_USER   5
 
#define BEZKEY_FLAT   6
 
#define NUM_TANGENTTYPES   7
 

Key Flagbit Macros

#define BEZKEY_CONSTVELOCITY   (1<<15)
 Interpolated using arclength as the interpolation parameter.
 
#define BEZKEY_UNCONSTRAINHANDLE   (1<<20)
 Determines whether a user handle is limited.
 
#define TangentsLocked(f, j)   (!(f&(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)))
 Interpolated using arclength as the interpolation parameter.
 
#define SetTangentLock(f, j, l)   {if (l) (f)=(f)&(~(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)); else (f)|=(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN);}
 Interpolated using arclength as the interpolation parameter.
 

Macros to Access Hybrid Tangent Types

#define GetInTanType(f)   int(((f)>>BEZKEY_INTYPESHIFT)&BEZKEY_TYPEMASK)
 
#define GetOutTanType(f)   int(((f)>>BEZKEY_OUTTYPESHIFT)&BEZKEY_TYPEMASK)
 
#define SetInTanType(f, t)   {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_INTYPESHIFT)))|(t<<BEZKEY_INTYPESHIFT);}
 
#define SetOutTanType(f, t)   {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_OUTTYPESHIFT)))|(t<<BEZKEY_OUTTYPESHIFT);}
 
#define HITKEY_INTAN   (1<<22)
 
#define HITKEY_OUTTAN   (1<<23)
 
#define HITKEY_TIME   (1<<24)
 
#define HITKEY_KEY   (1<<25)
 
#define HITKEY_ANY   (HITKEY_INTAN|HITKEY_OUTTAN|HITKEY_TIME|HITKEY_KEY)
 

Detailed Description

Macro Definition Documentation

◆ IKEY_SELECTED

#define IKEY_SELECTED   (1<<0)

◆ IKEY_XSEL

#define IKEY_XSEL   (1<<1)

◆ IKEY_YSEL

#define IKEY_YSEL   (1<<2)

◆ IKEY_ZSEL

#define IKEY_ZSEL   (1<<3)

◆ IKEY_WSEL

#define IKEY_WSEL   (1<<30)

◆ IKEY_FLAGGED

#define IKEY_FLAGGED   (1<<31)

◆ IKEY_TIME_LOCK

#define IKEY_TIME_LOCK   (1<<14)

◆ IKEY_ALLSEL

#define IKEY_ALLSEL   (IKEY_SELECTED|IKEY_XSEL|IKEY_YSEL|IKEY_ZSEL|IKEY_WSEL)

◆ IKEY_VALLOCK_SHIFT

#define IKEY_VALLOCK_SHIFT   16

◆ IKEY_VALX_LOCK

#define IKEY_VALX_LOCK   (1<<IKEY_VALLOCK_SHIFT)

◆ IKEY_VALY_LOCK

#define IKEY_VALY_LOCK   (1<<(IKEY_VALLOCK_SHIFT+1))

◆ IKEY_VALZ_LOCK

#define IKEY_VALZ_LOCK   (1<<(IKEY_VALLOCK_SHIFT+2))

◆ IKEY_VALA_LOCK

#define IKEY_VALA_LOCK   (1<<(IKEY_VALLOCK_SHIFT+3))

◆ TCBKEY_QUATVALID

#define TCBKEY_QUATVALID   (1<<4)

Angle/axis is derived from the quat instead of vice/versa.

◆ BEZKEY_XBROKEN

#define BEZKEY_XBROKEN   (1<<4)

Broken means not locked.

◆ BEZKEY_YBROKEN

#define BEZKEY_YBROKEN   (1<<5)

Broken means not locked.

◆ BEZKEY_ZBROKEN

#define BEZKEY_ZBROKEN   (1<<6)

Broken means not locked.

◆ BEZKEY_WBROKEN

#define BEZKEY_WBROKEN   (1<<21)

Broken means not locked.

◆ BEZKEY_NUMTYPEBITS

#define BEZKEY_NUMTYPEBITS   3

◆ BEZKEY_INTYPESHIFT

#define BEZKEY_INTYPESHIFT   7

◆ BEZKEY_OUTTYPESHIFT

#define BEZKEY_OUTTYPESHIFT   (BEZKEY_INTYPESHIFT+BEZKEY_NUMTYPEBITS)

◆ BEZKEY_TYPEMASK

#define BEZKEY_TYPEMASK   7

◆ BEZKEY_SMOOTH

#define BEZKEY_SMOOTH   0

◆ BEZKEY_LINEAR

#define BEZKEY_LINEAR   1

◆ BEZKEY_STEP

#define BEZKEY_STEP   2

◆ BEZKEY_FAST

#define BEZKEY_FAST   3

◆ BEZKEY_SLOW

#define BEZKEY_SLOW   4

◆ BEZKEY_USER

#define BEZKEY_USER   5

◆ BEZKEY_FLAT

#define BEZKEY_FLAT   6

◆ NUM_TANGENTTYPES

#define NUM_TANGENTTYPES   7

◆ BEZKEY_CONSTVELOCITY

#define BEZKEY_CONSTVELOCITY   (1<<15)

Interpolated using arclength as the interpolation parameter.

◆ BEZKEY_UNCONSTRAINHANDLE

#define BEZKEY_UNCONSTRAINHANDLE   (1<<20)

Determines whether a user handle is limited.

◆ TangentsLocked

#define TangentsLocked (   f,
 
)    (!(f&(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)))

Interpolated using arclength as the interpolation parameter.

◆ SetTangentLock

#define SetTangentLock (   f,
  j,
 
)    {if (l) (f)=(f)&(~(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)); else (f)|=(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN);}

Interpolated using arclength as the interpolation parameter.

◆ GetInTanType

#define GetInTanType (   f)    int(((f)>>BEZKEY_INTYPESHIFT)&BEZKEY_TYPEMASK)

◆ GetOutTanType

#define GetOutTanType (   f)    int(((f)>>BEZKEY_OUTTYPESHIFT)&BEZKEY_TYPEMASK)

◆ SetInTanType

#define SetInTanType (   f,
 
)    {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_INTYPESHIFT)))|(t<<BEZKEY_INTYPESHIFT);}

◆ SetOutTanType

#define SetOutTanType (   f,
 
)    {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_OUTTYPESHIFT)))|(t<<BEZKEY_OUTTYPESHIFT);}

◆ HITKEY_INTAN

#define HITKEY_INTAN   (1<<22)

◆ HITKEY_OUTTAN

#define HITKEY_OUTTAN   (1<<23)

◆ HITKEY_TIME

#define HITKEY_TIME   (1<<24)

◆ HITKEY_KEY

#define HITKEY_KEY   (1<<25)

◆ HITKEY_ANY

#define HITKEY_ANY   (HITKEY_INTAN|HITKEY_OUTTAN|HITKEY_TIME|HITKEY_KEY)