ag_types module

Module ag_types defines a set of types for making it more convenient to write pixel processors, dynamic values and functions.
It provides the definition of the classes:
class autograph.ag_types.TypeInfo(base_type, vector_size=1)

Bases: object

Class representing type information

static type_to_string(a)
class autograph.ag_types.Type(new_node, fn_ctx, type_info)

Bases: object

Base class for all sbs types

class autograph.ag_types.VectorType(new_node, fn_ctx, type_info)

Bases: Type

Base class for scalar and vector arithmetic types (float, int)

class autograph.ag_types.FloatType(new_node, fn_ctx, type_info)

Bases: VectorType

Base class for float scalar and vector arithmetic types

class autograph.ag_types.Float1(new_node, fn_ctx)

Bases: FloatType

Scalar float node type

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Float2(new_node, fn_ctx)

Bases: FloatType

Float vector 2

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Float3(new_node, fn_ctx)

Bases: FloatType

Float vector 3

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Float4(new_node, fn_ctx)

Bases: FloatType

Float vector 4

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.IntType(new_node, fn_ctx, type_info)

Bases: VectorType

Base class for int types

class autograph.ag_types.Int1(new_node, fn_ctx)

Bases: IntType

Int scalar type

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Int2(new_node, fn_ctx)

Bases: IntType

Int vector 2 type

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Int3(new_node, fn_ctx)

Bases: IntType

Int vector 3 type

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Int4(new_node, fn_ctx)

Bases: IntType

Int vector 4 type

static constant(x, fn_ctx)
static variable(name, fn_ctx)
class autograph.ag_types.Boolean(new_node, fn_ctx)

Bases: Type

Boolean type, always scalar

static constant(x, fn_ctx)
static variable(name, fn_ctx)
autograph.ag_types.create_constant(fn_node, type_enum, val, vector_size)

Creates a constant

Parameters:
  • fn_node (SBSFunction) – The function to create the constant in

  • type_enum (FunctionEnum) – The type of constant to create

  • val (numeric type or list of numeric types) – Constant value

  • vector_size (int) – Size of vector

Returns:

Type

autograph.ag_types.create_variable(fn_node, type_enum, name)

Creates a variable (i.e a named input reference)

Parameters:
  • fn_node (SBSFunction) – The function to create the variable in in

  • type_enum (FunctionEnum) – The type of variable to create

  • name (string) – Name of variable

Returns:

Type