Xpresso Tutorial – Which Data Type?

When you are working with Xpresso in Cinema4D it is often important to choose the correct datatype. This is particularly true when you are creating user data for your objects.

Open the user data manager and choose to add data. The next thing you need to do is select the data type. Unfortunately if you go back to edit existing user data later you cannot change the data type specified, so it is preferable to create the correct data type in the first place.

Xpresso Tutorial - Which Data Type?

User Data Manager

Another time you need to know the correct data type could be if you are working with XGroups and need to specify your input and output ports. Again you will be presented with a list of names and all you really want to do is add a port for perhaps position, rotation or colour, etc.

XGroup Ports - Xpresso Tutorial - Which Data Type?

XGroup Ports

One of the simplest methods to find the required data type is to add an xpresso node that already has a similar port. For instance, you may wish to add user data to an object to control position, to adjust radius or to create a checkbox.

Create a cube and drag it to the Xpresso window and add the ports like the images below. Then as you mouse over the ports, take a look at the lower left of the Xpresso window. Cinema4D will display some text that gives you the name of the port and also the data type used.

Kai Pederson made a very valid point in his comment below which definitely deserves a mention.

“Personally I hate having to look down there when I’m mousing over a port so I turn on bubble help, this way when I mouse over a port or a wire, it will show that information in the bubble help right where my mouse is.”

Thanks for the tip Kai.

Position : Vector - Xpresso Tutorial - Which Data Type?

Position : Vector

 

Radius : Real - Xpresso Tutorial - Which Data Type?

Radius : Real

 

Checkbox : Bool - Xpresso Tutorial - Which Data Type?

Checkbox : Bool

So if you are unsure of the correct data type, simply find a node or object that has a similar type of parameter. You can then drag this object into Xpresso and create a port for that parameter. The status bar will then let you know the data type.

If all of this seems like a bit of a long winded method to find out this information, don’t worry! There is actually a really quick way to do this. If you have an object that already has the type of user interface that you need. Be this a checkbox, vector field, colour chooser, etc.

Copy User Data Interface - Xpresso Tutorial - Which Data Type?

Copy User Data Interface

Right click on the element in the Attribute Manager, choose Copy User Data Interface. Now instead of choosing User Data > Manage User Data, choose Paste User Data Interface. The user data manager will open and the element you copied will be already created. You just need to adjust the parameters so they are more suitable for your needs.


Xpresso Tutorial – Which Data Type?

Author: Tim

3 Comments

  1. Kai Pedersen
    Kai Pedersen On January 4, 2010 at 6:08 AM

    Great article Tim.

    one thing I’d love to add for your section on mousing over ports to see what they are in the status bar. Personally I hate having to look down there when I’m mousing over a port so I turn on bubble help, this way when I mouse over a port or a wire, it will show that information in the bubble help right where my mouse is.

  2. […] This post was mentioned on Twitter by MAXON, topsy_top20k and Tim Clapham, topsy_top20k_en. topsy_top20k_en said: Cinema4D : Which Data Type? Selecting the correct data type when working with Xpresso and User Data http://bit.ly/6UFJct […]

  3. Tim
    Tim On January 4, 2010 at 6:36 PM

    Good point Kai, I updated the post to include your comment. Thanks.

Leave a Reply