9.5.2

Table Of Contents
1112 CHAPTER 22
XPRESSO EDITOR 1113
C.O.F.F.E.E.
This node enables you to integrate C.O.F.F.E.E. code with your XPresso expression. You can add any
number of input ports to the node and rename them via the node’s context menu. However, you
cannot change the type of a port. If you add a port of the wrong type, you must delete it (double-click
it) and add a new port of the correct type.
The input ports are declared automatically as variables there is no need to declare them in the node.
For example, the default C.O.F.F.E.E. node has two input ports (Input 1 and Input 2) that are used in
the code without rst being declared. As with the input ports, you can add output ports of varying
type and you can rename them freely.
You can enter the expression directly into the Script box in the Attribute manager, or for more space
you may prefer to use the C.O.F.F.E.E. editor instead. To open the C.O.F.F.E.E. editor, in the Attribute
manager, click the Open C.O.F.F.E.E. Editor button. From this editor, you can also compile the program
and run it.
The Protect button enables you to protect your expression by means of a password. The contents will
then be hidden. Only by entering the correct password can the user gain access to the contents of
the XGroup. If you’re the type of person who doesn’t like remembering passwords, why not just keep
your own unprotected copy of the expression?
Keep in mind that some restrictions apply when using C.O.F.F.E.E. programs in C.O.F.F.E.E. nodes. In
particular, neither the project nor the objects in the scene can be accessed directly by the C.O.F.F.E.E.
code. Instead, pass the desired information — such as an object’s position — to the C.O.F.F.E.E. node
via another node.
The C.O.F.F.E.E. node is designed primarily for evaluating math expressions and for adding simple
programming structures to the XPresso expression, such as the if/then/else statement. Complex
expressions should be written as standard C.O.F.F.E.E. expressions instead.
For more information on C.O.F.F.E.E., visit www.plugincafe.com.