Cinema 4D Tutorial 19 – Advanced User Data and Xpresso with COFFEE

In this tutorial we use the Xpresso COFFEE node in Cinema 4D to create several ‘if statements’ to create a nice Xpresso tool. This is incredibly simple to do and incredibly useful.

If you have any questions please let me know! I love helping out the community! I also am quite interested in putting time into more tutorials like these so do expect them. Requests are always warmly welcomed and almost always made into tutorials!

 

Code:

main(){

if(Input1 == 0){
Output1 = Input2;
}
if(Input1 == 1){
Output1 = Input3;
}
if(Input1 == 2){
Output1 = Input4;
}

}

 

February 29th, 2012 12 Comments Featured

  • Fred4d

    yes, more cooffe and python

    • http://www.creatingfilm.com/ SamWelkerTV

      I’m not a python developer and I’m not very good at Coffee but as always I’ll be sure to share as much as I can with the community. You can certainly expect more coffee, python is still quite a ways out for me.

  • Pingback: Advanced User data in Cinema 4D with Xpresso & COFFEE

  • Pingback: Cinema 4d Advanced User data and Xpresso with COFFEE Tutorial

  • DNW1710

    Thanks for the tutorial. It was useful but I would plead with you to move a little slower and also to show the things that you talk about in full. For instance, the final example that you give sounds great, but you don’t actually show how to do it. Also, when you run through the different input/outputs for COFFEE, it would again be useful to see a worked through example. Still helpful though!

    • http://www.creatingfilm.com/ SamWelkerTV

      I’ll work on that, sorry I move at a fast pace.

  • Chupinsky27

    Your COFFEE node is doing the exact same function as the Condition node. Plus, the Condition node saves you the trouble of having to add and rewrite lines of code for every input object. Just set the data type in the Condition node to object, add as many inputs as you need, and make the proper connections.

    • http://www.creatingfilm.com/ SamWelkerTV

      I’m aware of this, however the Coffee node has far more power if you choose to add more code to this and this was meant to help break people into COFFEE a bit more.

  • Boatengben

    Is there another tutorial on C.O.F.F.E.E. i really need to learn them

    • http://www.creatingfilm.com/ SamWelkerTV

      I haven’t made more tutorials just yet, I need to learn more before I can create more training. What do you need to use it for?

  • Reverend Fish

    Nice little script, just what I was looking for. In reference to what you asked in your tutorial, YES! Absolutely, yes, make the series. Personally I’d like to see how to pick an item (sphere, cube, spline, whatever) have that object appear and then the parameters for that object show up below for editing.

    • http://www.creatingfilm.com/ SamWelkerTV

      I will try, can’t promise it right now. Python is definitely a better way to go on top of things. If you have questions I can shoot you the right way though :)

Creating new worlds before breakfast

Advertisement

Where I shop for software and plugins

The Toolfarm

Enter your email address to subscribe to this blog and receive notifications of new posts by email. It's a good idea, we promise!

Join 48 other subscribers

© 2012 Sneek
Powered by WordPress, Endless & Sneek
Managed by Sam Welker