Animated gui display by an uber noob to giveback 2 Panda3d

I have been part of forums and bbs’s since the eighties and the guys on this forum are some of the most helpful I have seen anywhere! I wasn’t even flamed for being a VB6 / Gambas2 programmer. :open_mouth:

SO following their lead, I wanted to try and be helpful rather than just deadweight so here is my little code.

I worked all day trying to get this to work and because I am a noob I really complicated it. SO in the end if I would have just typed what the manual said . . .

I wanted to place a animated sphere on my screen as part of my gui system.

So I created a animation in gimp of my animation, then using the gimp plugin save layers to files where I saved all the layers to a folder (it actually dumped them all in my home directory and I had to cut and paste them)

then I ran from my terminal in the folder I saved the png files:

egg-texture-cards -o flip.egg -fps 30 -p 240,240 frame*.png 

(Flip is the name of the geom model you are making just change it to what you want, and gimp saved my files as frame_0000 etc so that is what the frame means in the line above) This makes a geom node called flip.egg.

then I go into my game file and add this code:

plane0=loader.loadModel("flip.egg")
plane0.reparentTo(render2d)
plane0.setPos(-0, 8, 0) 

You may need to add a path to the egg file, for me my egg file was in the manabar directory of my game directory. so it read “manabar/flip.egg”

Play around with the setpos coordinates to get it place just right. BTW that simple command render2d was what I was missing all day long and so I thought I’d place this code to help another beginner like me see how easy it is to make animated gui or 2d sprites:)

Thanks and remember this is just a noob’s thoughts and Im sure a more advanced programmer will come along and correct me. But this worked for me.

JB SKaggs