Python Script

Write Python scripts inside Smode

This tool allow you code your own script inside Smode.

Code execution

The parameter Launch Mode define the way to execute your code. It's by default set to "Manual", which means that you need to trig the Execute parameter
Here are the other way to execute the code
  • Manual : Executed everytime the Execute trigger is pressed
  • At Preload : Executed when this one is preloaded
  • At Activation : Executed when the script is activated
  • At Parameter Change : Executed everytime a script's parameter change
  • At Every Update : Executed every frame
  • At Deactivation : Executed whent the script is deactivated
  • At Unload : Executed whent the script is Unloaded

The output Console of Smode is also refreshed by the execution of the code.

Create Parameters

Navigate through elementTree

Create Layers

In order to create layers, you need to know it's name.
check the layers Class names list for informations.
  1. Instantiate your layer
  2. Define the type
  3. Place it in the Element tree

Example with a compo layer
MyLayer = Oil.createObject("Compo")
LayerType = SmodeSDK.TextureLayer(generator=MyLayer)
script.rootElement.layers.append(LayerType)

Set a parameter for a layer

Get a parameter from a layer

Interface Commands

Navigate through media directories

Install Libraries

Parameters

See Also: