Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Loop through inputs and outputs in coffee

  • Loop through inputs and outputs in coffee

    Posted by David Gruwier on August 15, 2016 at 10:55 am

    So basically I want to add a one math operation to several different values in xpresso. Instead of using one xpresso math node for every single value, I’ve been told I could maybe do it with a coffee script and an array/list and a for-loop. I know what those are, but not how to write and use them.

    Lets say I need to add 10 to every value. Basically I need a version of this, that doesn’t have every value spelled out individually, but just has the math operation written out once, then automatically goes through and applies that operation to however many inputs and outputs there are to and from the node.

    main()
    {
    Output1 = Input2 + 10;
    Output2 = Input2 + 10;
    Output3 = Input3 + 10;
    Output4 = Input4 + 10;
    }

    Just knowing this one thing would vastly simplify all my xpresso scripts. Any thoughts?

    David Gruwier replied 9 years, 9 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy