disguise developers

Designer Plugins

Plugins for Disguise Designer software.

Utilities

Globally available utility functions and types which are unique to Designer.

Execution context and understanding errors

When executing Python code, your script is indented and embedded within a function called userScript. Errors within the userScript are caught and reported with context about the line number and the specific error that occurred. The userScript function body starts on line 10 of the overall script, so when an error occurs, it will reference this offset line number. For example, an error referencing line 10 actually refers to the first line of your script.

Debugging tip: When an error occurs, add print() statements to trace execution and help identify what went wrong.

For more information about the execution environment, see the Python Environment page.

Types

In the API reference, Type always refers to a Python type. There is no Type class. The class names themselves are valid types. For example, Vec is a valid Type value.

ReflectionValue

ReflectionValue is equivalent to Python’s Any type and accepts any value.

FieldInfo

Access as follows: getattr(ClassName.property.fget, 'field', None). If field is not found, it is incompatible with getting the FieldInfo.

Vector types

Note that Vec and Vec3 are the same class object, aliased under different names.

TaskPython
Create a 2D float vectorVec2(x, y) - see Vec2
Create a 3D float vector (for position, size, etc.)Vec(x, y, z) or Vec3(x, y, z) - see Vec
Create a 4D float vectorfloat4(x, y, z, w) - see float4
Create a 2D integer vector (for resolution, etc.)Int2(width, height) - see Int2

Timecode

PropertyAccess
Timecode time in secondstc.t - see Timecode