Volumetric Evaluation Shelf Functions Globals Table of Contents

List Info

Availability  LightWave® 9.2.1
Component  Layout
Header  lwrender.h

This interface provides access functions for managing the internal lists of objects maintained by LightWave Layout.

Global Call

   LWListInfo *liFunc;
   liFunc = global( LWLISTINFO_GLOBAL, GFUSE_TRANSIENT );

The global function returns a pointer to a LWListInfo structure.

    typedef struct st_LWListInfo {
        int          (*index)(LWItemID object);
        int          (*reorder)(LWItemID *list);
        int          (*swap)(LWItemID *list);
        int          (*splice)(LWItemID point, LWItemID* list);
    } LWListInfo;

Exported ListInfo Functions

index = index( id )
This function will map the provided LWItemID to the owning object's linear index value in the internal array. If the identifier is invalid, then the return value is LI_Failure.
result = reorder( list[] )
Provided a list of LWItemIDs (terminated by a LWITEM_NULL), this function will arrange the internal array to match the ordering found within the list. Any LWItemIDs not found in the list will be appended to the end of the internal array in the order in which they currently exist.

Possible result values are:
LI_Success The operation completed successfully.
LI_MixedTypes The item types in the provided list are not all the same.
LI_InvalidBoneParent The parent object of a provided Bone identifier is invalid.
LI_MixedBones Bones in the list are from different parent objects.

result = swap( list[] )
This function allows a finer granularity of control over the movement of objects within the list. The caller provides a list of LWItemID pairs, and the objects found at those offsets within the specificed internal array for the item type will switch places. list should be terminated with an LWITEM_NULL entry.

Possible result values are:
LI_Success The operation completed successfully.
LI_InvalidItemType The type of the identifier could not be determined.
LI_MixedTypes The item types in the provided list are not all the same.
LI_InvalidBoneParent The parent object of a provided Bone identifier is invalid.
LI_MixedBones Bones in the list are from different parent objects.
LI_InvalidPair A matched pair of identifiers is identical.
LI_OutOfBounds The number of pairs provided exceeds the size of the type array.

result = splice( point, list[] )
Splicing takes the provided LWITEM_NULL-terminated list of LWItemIDs and inserts them into the internal array at the indicated insertion point. The item occupying the insertion point, and all entries following it, will be moved "down" in the array to make room for the spliced collection of identifiers.

The point identifier can have the value SPLICE_HEAD, which indicates to the splice() function that the list items should be inserted at beginning of the array. In addition, a point value of SPLICE_TAIL will cause the items in the list to be appended to the end of the internal array.

Possible result values are:
LI_Success The operation completed successfully.
LI_MixedTypes The item types in the provided list are not all the same.
LI_ItemTypeMismatch The type of the insertion point identifier does not match the type of the first element in the list.
LI_CyclicInsertionPoint The provided insertion point identifier is a member of the provided list.
LI_InvalidBoneParent The parent object of a provided Bone identifier is invalid.
LI_InvalidItemType The type of the identifier could not be determined.
LI_InvalidInsertionPoint The provided insertion point identifier could not be found.
LI_MixedBones Bones in the list are from different parent objects.