Using eggObjectType with actors

This might be a code question, but it involves data import from Maya, so I figured it’d be more appropriate here.

I have an animated model with a couple of geometries that require special processing (attachment of modified textures, etc). To identify which geometries need this special attention, I’d like to tag the groups so that I can retrieve the tagged geometries with myActor.find("**/=myTag"). Usually (for static, non-animated models), I do this by adding an eggObjectType attribute in Maya (to create an attribute in the egg file) along with the corresponding translation for the objectType in my Config.prc file.

The issue I’m running into is that when an Actor is loaded, the information is lost. I tried adding the objectType in Maya and then running egg-optchar -flag to make the group containing the objectType available in the scene graph, but the NodePath that gets generated doesn’t have any of the attributes I specified with the objectType. It’s almost as if the NodePath created is unrelated to the that I flagged except in name.

Is there a way to cause the information contained in the tag for a to be present when a is flagged with egg-optchar? Alternatively, is there a better method of tagging components of an Actor model with identifiers that could denote special processing is needed after the Actor is loaded?


You could use the syntax “egg-optchar flag node1,node2,node3=myTag” to specify a particular name to give to your flagged nodes. Then search for that name, instead of for a tag, e.g. myActor.find(’**/myTag’).