looping egg texture interval

I want to do a frame to frame loop on an egg texture I have parented to a DirectLabel. I have this:

            self.buttonPosIV = self.button.posInterval(5.0,Point3(-0.35,0,0.1))
            self.buttonHprIV = self.button.hprInterval(5.0,Vec3(0,0,90))
            self.buttonAniIV = self.button.find('**/+SequenceNode').node().loop("", fromFrame = 1, toFrame = 7) 
            self.buttonNameSeq = Parallel(self.buttonNamePosIV,self.buttonHprIV,self.buttonAniIV)
            self.buttonSeq.loop()

I get this error:

TypeError: loop() takes 2 or 4 arguments (3 given)

What’s the code for the loop?

Did you directly copy/paste the code above? If so, its probably that your Parallel is self.buttonNameSeq but you’re trying to loop() self.buttonSeq.

OOps! Sorry, I made a few errors. I was making some changes and got a few things mixed up. For example, those quotation marks should not be in the code. that’s something I tried after. Here is the correct code:

            self.buttonPosIV = self.button.posInterval(5.0,Point3(-0.35,0,0.1)) 
            self.buttonHprIV = self.button.hprInterval(5.0,Vec3(0,0,90)) 
            self.buttonAniIV = self.button.find('**/+SequenceNode').node().loop(fromFrame = 1, toFrame = 7) 
            self.buttonSeq = Parallel(self.buttonPosIV,self.buttonHprIV,self.buttonAniIV) 
            self.buttonSeq.loop()

You are confusing intervals with sequence nodes.

The value returned by:

self.button.find('**/+SequenceNode').node()

is a SequenceNode. This does indeed have a method called loop(), but it’s a different method than the similar method on Interval, and it takes different parameters. You probably want:

self.button.find('**/+SequenceNode').node().loop(True, 1, 7)

However, this is still a SequenceNode, not an Interval. So you can’t add it to a Parallel, like you try to do in the next statement. It loops all by itself, without having anything to do with the interval system.

David

Thanks D. It’s working.
Where can I find the info you give me in the API refs. I looked under several topics, but didn’t find anything on it.