From Lua to Python Guide

General

Most Lua functions or methods have a direct equivalent in Python.

Mixing Lua and Python

To convert a lua value/object in python:

fromLua(foo)

To convert a python value/object in lua:

toLua(foo)

Modifier

To start a modification:

with Modifier() as mod:
    pass # perform operations using mod

Later if you want to retrieve the current modification context:

mod = Modifier.get()

See also

guerilla.Modifier for details

Document

Retrieve scene filename:

d = Document(); d.filename

Retrieve Preference node:

d = Document(); p = d.Preferences

Perform scene manipulation:

Node

New Object properties:

New Object iterators:

New Object methods:

Object methods (use the current Modification context):

Plug

New Object properties:

New Object methods:

Object methods (use the current Modification context):

command

A command in Guerilla can be created by subclassing the command class and implementing:

See also

guerilla.command for an example.