This gist contains several Python scripts using class VerseLayer
from module
Verse Entities: https://github.com/verse/verse-entities
The script that is used for creating new layer is called verse_layer_create.py
.
This script creates new Node, then this node is moved to the parent of scene nodes.
Thus this node will not be destroyed after client logout. New layer is created in
the node and layer is filled with values. Custom types of node and layer are passed
to the script as command line arguments. New values are passed to script as
arguments too as Python dictionary.
Example:
python3 ./verse_layer_create.py --username joe --password mysecret \
--node_ct 4444 --layer_ct 5555 --values '{0: (0.0, ), 1: (1.0,)}'
When we want to change layer with specific ID in node with specific ID, then the
script verse_layer_inc_01.py
is example, how to do it. This script includes
subclass of VerseSession
that includes custom callback method
_receive_layer_set_value
. Values of layer are incremented in this method.
This variant of script includes subclass of VerseLayer
with custom callback
class method _receive_layer_set_value
. This variant does not change values
in specifica node and layer, but it changes values in all nodes and layer with
specific combination of custom types.