List Info

class lwsdk.LWListInfo(self)

Bases: object

Proxy of C++ PCore::LWListInfo class

 index(LWItemID id) → int

This function will map the provided id to the owning object's linear index value in the internal array. If the identifier is invalid, then the return value is lwsdk.LI_Failure.

 reorder(LWItemID list[]) → int

Provided a list of LWItemIDs (terminated by a lwsdk.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:
  lwsdk.LI_Success
    The operation completed successfully.
  lwsdk.LI_MixedTypes
    The item types in the provided list are not all the same.
  lwsdk.LI_InvalidBoneParent
    The parent object of a provided Bone identifier is invalid.
  lwsdk.LI_MixedBones
  Bones in the list are from different parent objects.

 splice(LWItemID point, LWItemID list[]) → int

Splicing takes the provided lwsdk.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 lwsdk.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 lwsdk.SPLICE_TAIL will cause the items in the list to be appended to the end of the internal array.

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

 swap(LWItemID list[]) → int

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 lwsdk.LWITEM_NULL entry.

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

Previous topic

Node Utility Funcs

Next topic

Item Info

This Page