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.
-
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.
-
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.
-