Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Getting the current index of an Object List or Hierarchy Node

  • Getting the current index of an Object List or Hierarchy Node

    Posted by Ryan Paterson on March 31, 2018 at 2:09 pm

    Hi, I always run into this problem with Xpresso and I think it’s time I finally got it figured out once and for all. How can I get the current index from an object list to use as a multiplier? For example let’s say I have 4 cubes in an object list and I want them to be offset 100 units from each other, all I want to do is take the current index of the object and multiply it by 100, so the first cube is at 0, next one at 100, next is 200, etc. Why is this so hard to accomplish?? What am I missing?

    Ryan Paterson replied 8 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Brian Jones

    March 31, 2018 at 2:53 pm

    use the Object Index node (it’s in General). The main thing to note is, use the Object Index’s Instance output to pass the instance along with the index to a single Object node so each cube gets processed properly. If you tried the same thing with 4 separate object nodes (one for each cube if you dragged them all into the XP editor) they all end up in the end position.

    12305_xpobjectindex.c4d.zip

  • Steve Bentley

    March 31, 2018 at 6:43 pm

    And remember that first one in the list has an index of 0 not 1.
    The indexing might also be flaky – I’ve done this a billion times and about a million times I’ve just rebuilt the nodes and links because what normally works, wasn’t. Thinking it was a carbon based error I saved the one that worked and the one that didn’t and forensically compared them. Identical.
    So when you think you are doing it all right, you might just be.

  • Ryan Paterson

    March 31, 2018 at 10:16 pm

    Aaaaah yes thank you! Object Index is the missing link. And Steve ya I know what you mean I built a setup earlier using an Iterator and an Object List which worked perfectly and then randomly just stopped, had to rebuild the whole damn thing!

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