MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Getting the current index of an Object List or Hierarchy Node

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Paterson
Getting the current index of an Object List or Hierarchy Node
on Mar 31, 2018 at 2:09:46 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?


Return to posts index

Brian Jones
Re: Getting the current index of an Object List or Hierarchy Node
on Mar 31, 2018 at 2:53:27 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


Return to posts index

Steve Bentley
Re: Getting the current index of an Object List or Hierarchy Node
on Mar 31, 2018 at 6:43:58 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.



Return to posts index


Ryan Paterson
Re: Getting the current index of an Object List or Hierarchy Node
on Mar 31, 2018 at 10:16:36 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!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]