Continuation of the last post, found the issue, don't know if something I'm missing or a legit bug...
Modified the VideoBanner project again, putting these lines between SetVideo() and end sub:
m.top.findNode("bannerGroup").createChild("Rectangle").id = "bottomRectangle2"
PrintChildren(m.top,"")
print m.top.findNode("textTimer").id ' Prints textTimer as it should
print m.top.findNode("colorchangeRectangle").id ' Prints colorchangeRectangle as it should
print m.top.findNode("bannerGroup").GetChild(3).id ' Prints bottomRectangle2 as it should
print m.top.findNode("bannerGroup").findNode("bottomRectangle2") ' Print invalid, even tho we can see the node as GetChild(3)
print m.top.findNode("bottomRectangle2") ' Again prints invalid
Also this references a new debugging subroutine:
function PrintChildren(node, prefix)
print Prefix+"["+Node.id+"]"+", "+Node.GetChildCount().ToStr()+", "+Node.subType()
for count = 0 to Node.GetChildCount()-1
if Node.ID<>"musicvideos" printChildren(Node.GetChild(Count),prefix+" ")
' Video doesnt traverse well with this routine, unrelated issue so ignoring it
end for
end function
Here is the output, bottomRectangle2 is the 3rd item under bannerGroup, but the last 2 lines (invalid) are the ones that make no sense to me:
[], 2, videobannerScene
[], 0, Poster
[LayerRoot], 3, RenderableNode
[Layer], 0, RenderableNode
[Layer], 4, RenderableNode
[musicvideos], 2, Video
[bannerGroup], 4, RenderableNode
[bottomRectangle], 1, Rectangle
[colorchangeAnimation], 1, Animation
[colorchangeRectangle], 0, ColorFieldInterpolator
[bottomLabel], 1, Label
[scrollbackAnimation], 1, Animation
[scrollbackLabel], 0, Vector2DFieldInterpolator
[channelPoster], 1, Poster
[fadeinoutAnimation], 1, Animation
[fadeinoutPoster], 0, FloatFieldInterpolator
[bottomRectangle2], 0, Rectangle
[warningRectangle], 1, Rectangle
[warningLabel], 0, Label
[textTimer], 0, Timer
[Layer], 0, RenderableNode
textTimer
colorchangeRectangle
bottomRectangle2
invalid
invalid
Seems this all has nothing to do with animations at all, I was chasing a symptom. The node tree itself has an issue that is affecting the animations ability to link the nodes up.
Any thoughts would be appreciated.