0
$\begingroup$

Preface: I have 4 objects in the scene. Two Controller Objects that each have a custom property "startTime" and two secondary objects that will receive the "startTime" from the Controller objects. This is a SUUUUPER common pattern in programming and game design, and I would like to keep it like this cause only one object should send a trigger event like a collision to tell its need to know objects to start animations. In game engines I typically also have a special property array(s) to handle linking objects instead of parenting and traversing as a note about "need to know" objects.

Issue: When I individually select a Controller object and submit its custom property "startTime" to the receiver object I get no errors. But when I perform the same in the loop system Animation Nodes provides I get Invalid Network

Below are screen shots, the loop works if the frame on "Object Action Output" is inputed from the origin object, but Invalid network if I feed it from the controller object. But if I do this outside of the loop it works fine

Question: Am I simply missing a core concept somewhere for data sharing?

good

bad

fine

here I explain the outline network outline

$\endgroup$
5
  • $\begingroup$ i think i didn't fully understand what you want...but why can't you just store your starttime in the scene-properties? $\endgroup$
    – Chris
    Jul 30, 2021 at 17:57
  • $\begingroup$ The custom property is on each individual Controller object. Each Contoller has its own startTime or delay time or trigger as each controllers point in time to trigger will be different from each. I would like to solve the "Invalid Network" error $\endgroup$ Jul 30, 2021 at 18:04
  • $\begingroup$ I would check it if you provide your blend file. But I will not try to understand your screenshots…sorry. $\endgroup$
    – Chris
    Jul 30, 2021 at 18:19
  • $\begingroup$ I mean sure I can do that but that seems a waste of your time. Its not a complicated concept, ill rephrase it as : Family has Parent, parent has many children. Parent has value to give children. Not allowed(Invalid Network). There are many Families. But i'm calling them Controller and Secondary in my explainer previously since I dont want to tie them together. The screen shot for the more complicated project would be more complex to read. What is posted is Animation Nodes basic loop system nothing fancy extra $\endgroup$ Jul 30, 2021 at 18:46
  • $\begingroup$ I consider this a design limitation and am just submitting it to git $\endgroup$ Jul 30, 2021 at 19:48

1 Answer 1

0
$\begingroup$

Animation nodes does not like a certain way for loops and even though its visually looking like multiple loops are in tandem, they are not. So you have to nest loops, BUT thats a SUPER mess of more nodes. So I used one loop, and then just wrote a custom script with a code loop instead to parse the parent/controller and sift for names objects and process. MUCH easier to figure out than poking at the various nodes.

g = list(controller.children)

#outText = len(g)
for i in g :
    if i.name.lower().startswith(nameFilter) :
        outText = "GREAT!"
        outObject = i
        break

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .