Module vrAEBase :: Class vrAEBase
[frames] | no frames]

Class vrAEBase

 object --+    
          |    
??.instance --+
              |
             vrAEBase
Known Subclasses:

Base class for all actions and events.

The vrAEBase classes purpose is to add own behavior that needs to be updated every frame or receive events to VRED. For example, all the interpolation classes are derived from this class. Simply derive from this class and overload the loop-method like the following example does.

Example:

       See also example key-action.py, render.py and frame.py
Instance Methods
 
__init__()
The constructor of the vrAEBase class.
 
__reduce__()
 
addLoop()
Adds this object to the global behavior loop.
 
callAllConnected()
All actions connected to this object will be called.
bool
connect(o, arg1, arg2)
Connects various callback functions with this object.
bool
connectSignal(signal, slot, arg1, arg2)
Connects a special signal method with various callback functions.
 
emitSignal(signal, arg1, arg2)
Emits a signal, if you want to implement your own signal method.
 
getModuleName()
bool
isActive()
Returns the activation state of this object.
 
loop()
This method is called every render frame when the object has been added to the global event loop with addLoop().
 
recEvent(state)
This method is called when an event occurs.
 
removeConnections()
 
setActive(state)
Sets the state of an action or event.
 
setUpdateGUIEnabled(state)
Enables GUI updates.
 
subLoop()
Subtracts this object from the global behavior loop.

Inherited from unreachable.instance: __new__

Class Variables
  __instance_size__ = 136
Method Details

__init__()
(Constructor)

 

The constructor of the vrAEBase class.

Overrides: object.__init__

__reduce__()

 
Overrides: object.__reduce__
(inherited documentation)

addLoop()

 

Adds this object to the global behavior loop. Now the loop-function will be called once every render frame (when the object is active).

connect(o, arg1, arg2)

 

Connects various callback functions with this object. Actually, there are three methods to connect something to this object:

connect(o) connects this object with a python function or a python command string.

connect(o,arg1) connects this object to a python function with a single parameter or to a class with a recEvent method and a toggle state.

connect(o,arg1,arg2) connects this object to a python function with two parameters.

Returns true on success, false otherwise.

Parameters:
  • o (boost::python::object) - The python function or python object or python command string.
  • arg1 (boost::python::object) - The first optional parameter.
  • arg2 (boost::python::object) - The second optional parameter.
Returns: bool
Success/Failure.

connectSignal(signal, slot, arg1, arg2)

 

Connects a special signal method with various callback functions.

Returns true on success, false otherwise.

Parameters:
  • signal (string) - The name of the signal method.
  • slot (boost::python::object) - The slot function.
  • arg1 (boost::python::object) - The first optional parameter.
  • arg2 (boost::python::object) - The second optional parameter.
Returns: bool
Success/Failure.

emitSignal(signal, arg1, arg2)

 

Emits a signal, if you want to implement your own signal method.

Parameters:
  • signal (string) - The name of the signal method.
  • arg1 (boost::python::object) - The first optional parameter.
  • arg2 (boost::python::object) - The second optional parameter.

isActive()

 

Returns the activation state of this object.

Returns: bool
The state: Active/Inactive.

loop()

 

This method is called every render frame when the object has been added to the global event loop with addLoop(). Add functionality that has to be updated every frame within this method.

recEvent(state)

 

This method is called when an event occurs.

Parameters:
  • state (integer) - The state: SWITCH_ON, SWITCH_OFF, SWITCH_TOGGLE.

setActive(state)

 

Sets the state of an action or event.

Parameters:
  • state (integer) - The state: SWITCH_TOGGLE, SWITCH_ON, SWITCH_OFF, true, false.

setUpdateGUIEnabled(state)

 

Enables GUI updates.

Parameters:
  • state (boolean) - The state: Enabled/Disabled.

subLoop()

 

Subtracts this object from the global behavior loop. Its loop-function will no longer be called every render frame.