Skip to main content

Manipulate Guerilla transform stack as Python object.

Project description

guerilla-transform-stack

guerilla_transform_stack is a Python package to manipulate Guerilla transform stack as Python object.

This package expose TransformStack, a wrapper class around the Guerilla transform stack of a scene graph node.

Usage

The first step is to wrap the Guerilla node with TransformStack class:

>>> import guerilla
>>> import guerilla_transform_stack as gts
>>> node = guerilla.pynode('mynode')
>>> node_ts = gts.TransformStack(node)
>>> node_ts
TransformStack('mynode')

Then you can add, access and manipulate transforms:

>>> node_ts.is_empty
True
>>> euler = node_ts.add('euler')  # Create an euler transform.
>>> euler
TransformEuler('mynode|Euler')
>>> node_ts['Euler']  # Access transform from its name.
TransformEuler('mynode|Euler')
>>> target = node_ts.add('target')
>>> target.is_on_top  # New transform nodes are added on top.
True
>>> len(node_ts)  # Get transform count.
2
>>> target.move_down()
>>> target.move_up()
>>> node_ts.top
TransformTarget('mynode|Target')
>>> euler_tmp = node_ts.add('euler')
>>> euler_tmp.delete()  # Remove transform.

Transform stack object can be iterated (from bottom to top):

>>> for transform in node_ts:
...   print transform
...
TransformEuler('mynode|Euler')
TransformTarget('mynode|Target')

Original Guerilla node is accessible with the node property:

>>> node_ts.node
<guerilla.SceneGraphNode object at 0x7f34498eb490>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

guerilla_transform_stack-0.0.1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file guerilla_transform_stack-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: guerilla_transform_stack-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/2.7.16

File hashes

Hashes for guerilla_transform_stack-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b8119dbd2ff09db4014b3ad323d460b86ad4ff6b34eebb021a203b4bd01f363d
MD5 a811337d4f7a872c1c20168ae910c7fb
BLAKE2b-256 d70ea9b76e963aca49b8ea2fdd120c60d3cdb94d93016d0b2b37bc8f533ee1d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page