Maybe I’m using this wrong… but thats nuts :slight_smile:

Is there anyway to just call the folder to make the egg file? Or get wildcards to work? I have over 150 images (cute downable) to be place for a “boom” animation, but if I have to call each file… that be nuts XD. Any tricks to get them all called with out creating a big command line post to call em all?

I though wild cards did work at some point… maybe I’m just remembering wrong. Or it was something along the lines of img_###.png?

In any case I can’t quite remember. However, it’s very easy to use python to call egg-texture-cards with the correct arguments.

import subprocess,os
cmdList= os.listdir("DirWithImages")
cmdList= filter(lambda x: "ImagePrefix" in x, cmdList)

Wildcards, it turns out, work only on Cygwin, or on Mac or Unix. They don’t work in the native Windows command shell.

Bei’s suggestion is a good one, though.


Could we get a fixs for calling folders instead?

The work around ok for now, but it be a lot esier just to have it all in one instead of calling a scrip to make it.

Isn’t there a Windows API call somewhere that processes wildcards in command-line arguments?

I am really trying to find a way to get egg-texture-cards to work for me on windows and I happened across this forum post.

I don’t really have any experience with python (I am attempting to program my game in C++) but I am trying to make some animated billboards and this seems the recommended way to do it.

I have a bunch of textures named coin1.png through coin12.png

so I put them all in the panda3D-1.7.2/bin directory and I also made a file in the same directory and stuck this code in it:

import subprocess,os
cmdList= os.listdir("coin")
cmdList= filter(lambda x: "coin" in x, cmdList)

Then I save the file, right click on it and select open with python.exe

The resulting python console window stays open for only a split second. I don’t have any outeggFile in the panda directory afterwards.

Can somebody please tell me the proper way to do this?

thanks in advance

Why not just open a command window and type the command:

egg-texture-cards -o outeggFile.egg coin*.png

Seems a lot easier than constructing it by Python code. But if you really wanted to use Python code, you have to remember the “-o” before the output file name.


Alright thank you, I had been trying to do it from RUN but cmd is working much better.

this works:

egg-texture-cards -o coin.egg /c/coinFolder/coin1.png

and this works:

egg-texture-cards -o coin.egg /c/coinFolder/coin1.png /c/coinFolder/coin2.png

but this does not work:

egg-texture-cards -o coin.egg /c/coinFolder/coin*.png 

So my wildcards aren’t working, I am on windows vista if that makes any difference.

Try this:

egg-texture-cards -o coin.egg c:\coinFolder\coin*.png

Or this:

cd \coinfolder
egg-texture-cards -o coin.egg coin*.png


Neither of those seems to work.
Maybe this has to do with what was mentioned earlier.

Do you know if the special node created by egg-texture-cards is faster in-game than just swapping the texture on a regular node every frame with a new one from a textureCollection?

Yeah, and I was the one who made that previous observation, though I still don’t entirely believe it. But maybe I’ll accept it.

Of course, you could use Python (or a text editor, or the scripting language of your choice) to generate a .bat file that names all of the png files on a single command line, then run that .bat file in the command shell.

It’s about the same. The main advantage of egg-texture-cards is its convenience. It’s also good because you can specify per-texture properties like mipmapping and such. And it’s useful for passing through egg-palettize, which can actually be an important performance boost on its own (but it’s complicated to use, and many people don’t bother).