Meta.modifier

EvalModifier

class lxu.meta.modifier.EvalModifier

Base class for defining EvalModifier server. The client will subclass this base class, filling in the methods that they require.

bind(item, ident)

Implement this method to bind custom channels that aren’t part of the channels metaclass. Call the next function to add them.

change_test()

Any changes to custom channels will automatically trigger modifier invalidation. Implement this method to invalidate for other changes.

eval()

Implement this method to evaluate inputs and write outputs.

include_item(item)

Implement this method for modifiers that apply to all items. Return a list of indices, if nodes are to be created for this item.

mod_add_chan(item, chan, type)

Call this method to add a named custom channel.

mod_attr()

Call this method to get the Attributes object.

mod_cust_index(index)

Call this method to get the attribute index of a custom channel.

mod_cust_value(index)

Call this method to get the value of a custom channel.

mod_cust_write(index)

Call this method to get the writable value of a custom channel.

mod_eval()

Call this method to get the Evaluation object.

mod_index()

Call this method to get the identifing index for this modifier node.

mod_item()

Call this method to get the item for this modifier node.

mod_read_attr()

Call this method to read channels defined in the Channels metaclass.

mod_result(res)

Call this method to return a result other than e_OK.

Evaluator

class lxu.meta.modifier.Evaluator

We can also implement alternate forms of evaluation, which can take over part of the eval process.

bind(mod)
eval(mod)

ItemsByTest

class lxu.meta.modifier.ItemsByTest

Iteration by test function: walks all items in the scene and returns as many nodes as requested by the client.

next()

ItemsByType

class lxu.meta.modifier.ItemsByType

Iteration by item type: returns one node per item, all index 0

next()

Meta

class lxu.meta.modifier.Meta

The base class for metaclass nodes defines their core features. They have a type given by one of the pre-defined type strings, they have an optional name, and an optional guid. The are arranged into a tree, and the tree can be searched for matching meta nodes.

add(sub)

Add another meta object as a child of this one.

alloc()

Return the signature for this metaclass. Depends on type.

dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

MetaEvaluator

class lxu.meta.modifier.MetaEvaluator

Alternate evaluators are under the eval modifier metaclass.

add(sub)

Add another meta object as a child of this one.

alloc()

Return the signature for this metaclass. Depends on type.

dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

MetaInterface

class lxu.meta.modifier.MetaInterface

The interface meta node is a sub-interface for an object or server of the same guid.

add(sub)

Add another meta object as a child of this one.

alloc()

Return the signature for this metaclass. Depends on type.

dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

MetaServer

class lxu.meta.modifier.MetaServer

The server meta node defines a plug-in server. The name and class guid must be specified, and the alloc() method (defined by the client, returns the server class. There is also a dictionary of server tags.

add(sub)

Add another meta object as a child of this one.

add_tag(key, value)
alloc()

Return the signature for this metaclass. Depends on type.

dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

set_username(base, key)
test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

Meta_EvalModifier

class lxu.meta.modifier.Meta_EvalModifier

This is the metaclass for the Falloff object type.

add(sub)

Add another meta object as a child of this one.

add_dependent_graph(graphname)

Modifiers can be automatically invalidated for changes related to named graphs.

add_dependent_type(typename)

Modifiers can be automatically invalidated for changes related to other item types.

add_tag(key, value)
alloc()

Internal metaclass method.

dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_all_items()

A modifier associated with an item type will allocate one modifier node for each item of that type. Calling get_all_items() will instead configure the modifier to process all items, adding zero or more nodes for each.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

invalidate(scene, reset)

Any change (other than item types or graphs) that require the modifier nodes to be refreshed should invalidate the modifier. If ‘reset’ is true then the results of all modifier nodes are cleared regardless.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

set_itemtype(typename)

If there’s a package server in the meta tree then that’s automatically set as the main item type for the modifier. That can be overridden with this call.

set_simulation()

Call to set the modifier to be a simulation.

set_username(base, key)
test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

Meta_ObjectEvaluation

class lxu.meta.modifier.Meta_ObjectEvaluation

This is the metaclass for the Object evaluator.

add(sub)

Add another meta object as a child of this one.

alloc()
dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.

ObjectEvaluation

class lxu.meta.modifier.ObjectEvaluation

One alternate form of evaluation is to create an object and write it to an OBJREF channel. The object can be allocated directly or using a metaclass.

alloc_obj(mod)

Implement this method to allocate and return a new object.

init_obj(mod, obj)

Implement this method to initialize an object alloced by metaclass.

Simulation

class lxu.meta.modifier.Simulation

Co-class for evaluating an EvalModifier in a simulation context.

cleanup_sim()
enabled(chanRead)
init_sim(time, sample)
step(dt)
step_size()

impl_EvalModifier

class lxu.meta.modifier.impl_EvalModifier

This internal class implements the actual EvalModifier server. It basically iterates through items to determine what noes to add, and allocates them.

eval_Alloc(item, index, eval)
eval_Next()
eval_Reset(scene)

impl_Modifier

class lxu.meta.modifier.impl_Modifier

This internal class implements the actual Modifier object.

init_node(item, ident, eval)
mod_Evaluate()
mod_Free(cache)
mod_Invalidate(item, index)
mod_Required(index)
mod_RequiredCount()
mod_Test(item, index)
mod_Validate(item, index, rc)

impl_ObjectEvaluation

class lxu.meta.modifier.impl_ObjectEvaluation
bind(mod)
eval(mod)

impl_Simulation

class lxu.meta.modifier.impl_Simulation

Implementation for Simulation. This just gets the instance from the Modifier implementation.

inherit(modimpl)
sim_Bake(time)
sim_Cleanup()
sim_Enabled(chanRead)
sim_Initialize(time, sample)
sim_Step(dt)
sim_StepSize()

meta_Modifier

class lxu.meta.modifier.meta_Modifier

This internal class is the metaclass for the Modifier nodes. Its _meta is the EvalModifier metaclass. Very meta.

meta_Simulation

class lxu.meta.modifier.meta_Simulation

Metaclass for Simulation. This is added under a Modifier.

add(sub)

Add another meta object as a child of this one.

alloc()
dump(prefix)

Output the contents of the meta node tree with indenting.

find_any(type, guid, miss)

Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.

find_sub(type, guid)

Find first node with a matching type/guid under this node.

flatten()

Return this meta and all sub-metas in a list.

get_ifcs(guid)

Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)

init_ifcs(guid)

Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.

pre_init()

Do any self-modification or other steps before initialization. Return true as long as there is more to do.

test(type, guid)

Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.