ToolList

Attributes:

Methods:

class Leap.ToolList

The ToolList class extends the Python array to represent a list of Tool objects.

Get a ToolList object from Frame.tools.

all_the_tools = frame.tools
for tool in all_the_tools:
    # ... Use the tool

New in version 1.0.

classmethod ToolList()

Constructs an empty list.

Get ToolLists containing tracked tools from a Frame object.

all_the_tools = frame.tools

New in version 1.0.

is_empty
Type:boolean

Reports whether the list is empty.

if not frame.tools.is_empty:
    #Use the tools

New in version 1.0.

frontmost
Type:Tool

The item in this list with the smallest z coordinate.

most_forward_tool = frame.tools.frontmost

New in version 1.0.

leftmost
Type:Tool

The item in this list with the smallest x coordinate.

tool_with_smallest_x = frame.tools.leftmost

New in version 1.0.

rightmost
Type:Tool

The item in this list with the largest x coordinate.

tool_with_largest_x = frame.tools.rightmost

New in version 1.0.

append(other)

Appends the members of the specifed ToolList to this ToolList.

Parameters:other (ToolList) – A ToolList object containing Tool objects to append to the end of this ToolList.

New in version 1.0.