![]() |
![]() |
![]() |
![]() |
Interface InfoAvailability LightWave 6.0 Component LayoutHeader lwrender.h The interface info global returns information about the state of Layout's user interface. The data is read-only, but you can set the parameters using selection, navigation and display commands. Global Call LWInterfaceInfo *intinfo; intinfo = global( LWINTERFACEINFO_GLOBAL, GFUSE_TRANSIENT );The global function returns a pointer to an LWInterfaceInfo. typedef struct st_LWInterfaceInfo { LWTime curTime; const LWItemID *selItems; unsigned int (*itemFlags) (LWItemID); LWFrame previewStart, previewEnd, previewStep; int dynaUpdate; void (*schemaPos) (LWItemID, double *x, double *y); int (*itemVis) (LWItemID); unsigned int displayFlags; unsigned int generalFlags; int boxThreshold; int (*itemColor) (LWItemID); int alertLevel; int autoKeyCreate; } LWInterfaceInfo;
selItems flags = itemFlags( item ) LWITEMF_SELECTED LWITEMF_SHOWCHILDREN LWITEMF_SHOWCHANNELS LWITEMF_LOCKED dynaUpdate LWDYNUP_OFF LWDYNUP_DELAYED LWDYNUP_INTERACTIVE visibility = itemVis( item ) LWOVIS_HIDDEN LWOVIS_BOUNDINGBOX LWOVIS_VERTICES LWOVIS_WIREFRAME LWOVIS_FFWIREFRAME LWOVIS_SHADED LWOVIS_TEXTUREDOther item types are limited to LWIVIS_HIDDEN and LWIVIS_VISIBLE. LWDISPF_MOTIONPATHS LWDISPF_HANDLES LWDISPF_IKCHAINS LWDISPF_CAGES LWDISPF_SAFEAREAS LWDISPF_FIELDCHART LWGENF_HIDETOOLBAR LWGENF_RIGHTTOOLBAR LWGENF_PARENTINPLACE LWGENF_FRACTIONALFRAME LWGENF_KEYSINSLIDER LWGENF_PLAYEXACTRATE LWGENF_AUTOKEY color_index = itemColor( item )
alertLevel LWALERT_BEGINNER LWALERT_INTERMEDIATE LWALERT_EXPERTautoKeyCreate In LightWave 7.5, the autoKeyCreate field was added, along with the LWGENF_AUTOKEY generalFlags definition. Example This code fragment collects information about the currently selected items. #include <lwserver.h> #include <lwrender.h> LWInterfaceInfo *intinfo; LWItemInfo *iteminfo; LWTime t; LWItemID *id; int i, f, type; intinfo = global( LWINTERFACEINFO_GLOBAL, GFUSE_TRANSIENT ); iteminfo = global( LWITEMINFO_GLOBAL, GFUSE_TRANSIENT ); if ( !intinfo || !iteminfo ) return AFUNC_BADGLOBAL; t = intinfo->curTime; id = intinfo->selItems; for ( i = 0; id[ i ]; i++ ) { f = intinfo->itemFlags( id[ i ] ); type = iteminfo->type( id[ i ] ); switch ( type ) { case LWI_OBJECT: ... |