egg-texture-cards- no loops

I am using an animating .egg file created by an egg-texture-card.
I want the texture to cycle through only once - no looping.
Can this be done?

It’s a question of how you load the model.

model = loader.loadModel('sequence.egg')

The key call here is play(), which starts at the beginning and stops at the end. (The default is loop(), which loops continuously. You can also do stop(), pose(), and several other control methods.)


Thanks D.

I tried this one


but I get an error.

AttributeError: ‘libpanda.SequenceNode’ object has no attribute ‘status’

I want to be able to tell when the animation ends.

Pardon me. I have to change my browser. It isn’t allowing me to use the icons above.[/b]

If you check out the “Reference” link at the top of the page, and click on SequenceNode, you’ll see the interfaces for SequenceNode. There you’ll see that SequenceNode inherits from AnimInterface, and if you click on that link, you’ll see that it has a method called isPlaying().


The reference is helpful, but I sometimes don’t know which topic to look to find certain stuff. Thanks

if you are unsure what the object is

print type(your object) 

then go search for that type in the reference to know all about it
another cool thing is

print dir(your object)

which tells you what members and methods the object has
and then less usfull is

print help(your object)

which might give you the doc for it but not always.

Thanks treeform!!!
This is very informative.
When you say ‘object’ though, what do you mean?


Look up “Object-Oriented Programming”. It’s a way of thinking about programming that treats programs as a system of virtual entities (objects) interacting with one another instead of just a series of instructions. I strongly suggest you look into it… it’ll broaden your way of thinking about how to write code. It’s especially essential for Python, since Python is object-oriented in design. Everything you create and use in Python is (or at least is supposed to be) an object.

:blush: :blush: :blush: