flagging everything in egg-optchar

is there a way to auto flag everything in a egg file using egg-optchar?

say I have an actor and I want to be able to access any piece of its geometry as a nodepath ( like with .find(**/" ) )

I’ve tried all the sensical things like:
egg-optchar -flag = -inplace myActor.egg
egg-optchar -flag * -inplace myActor.egg
egg-optchar -flagall -inplace myActor.egg (yeah, it wasn’t in the -h list but I thought I’d give it a go anyway)

Anyone have any pointers? Or a reason why this doesn’t exist?

thanks!

you could write a little python app that loops through all of the files in a directory and flags them.

Well, actually what I’m talking about is flagging the geometry inside one file. Although the suggestion still has merit- I could write app that just searches for Groups inside an egg and flags them (that would require knowing what -flag actually does to the egg but that’s easy to determine.

My question still stands though- is this something possible wtih egg-optchar? If not, is there a reason? Seems like there’s an ‘all’ operation for the other purposes of egg-optchar like -keepall, etc.

Thanks.

Uh… I don’t think there is.
You can open the .egg file and find all the available options and list them in the egg-optchar command… that’s how I did it.

I don’t think there’s such an option for egg-optchar, simply because no one here has ever needed such an option before.

You could add the option yourself, if you are comfortable with C++. :slight_smile:

You could also write a Python program that does the same thing, using the Egg library. Basically, you just need to load the egg file, and then recurse through all of its EggNodes. Every time you come across an EggPolygon, set its name to the name of its parent. That’s basically what -flag does.

David