Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.05 KB

File metadata and controls

31 lines (20 loc) · 1.05 KB

Shadow File IO for Python

Build Status codecov

Introduction

Python module to read a Shadow take.

Quick Start

import shadow.fileio

# Search for the most recent take in our ~/Documents/Motion folder.
prefix = shadow.fileio.find_newest_take()

# Read the binary stream header, list of nodes, and big pool of frame data.
with open('{}/data.mStream'.format(prefix), 'rb') as f:
    info, node_list, data = shadow.fileio.read_stream(f)

# Use the list of nodes and the take definition (JSON text) to create a string
# name and channel mapping into the frame data.
with open('{}/take.mTake'.format(prefix)) as f:
    node_map = shadow.fileio.make_node_map(f, node_list)

License

This project is distributed under a permissive BSD License.