Quick question about eggObjectTypes (SOLVED)

Sorry, this question is most likely quite simple, but I’m not sure whats the issue…

// The maya2egg converter will look for eggObjectTypes* attributes and
// insert the line "<ObjectType> { value }" for each one found, where
// "value" is the particular value you have selected from the
// pull-down menu.  Eventually, when the egg loader loads the egg file
// into Panda (either by loading the egg file interactively into a
// Panda session, or via an egg2bam command), the <ObjectType> line
// will be replaced with arbitrary egg syntax defined by your
// Config.prc file with a line like this:
//
//   egg-object-type-value  [your egg syntax here]

Following this, I added this code to config.prc:

egg-object-type-ObjectSide <Tag> CollisionCategory {Object}

With ObjectSide being the name of the eggObjectType, and my objective being to add a tag onto the object called CollisionCategory.

But… … It doesn’t work… Doesn’t even detect I think… Am I doing it wrong?

Since the egg syntax is case-insensitive, but config variables are case-sensitive, it is necessary to use lowercase in the config variable name. Try “egg-object-type-objectside” in your Config.prc file instead.

David

Well… It now looks like this…

egg-object-type-objectside <Tag> CollisionCategory {Object}

And it still doesn’t work…

Am I supposed to change the real eggObjectType value in Maya to objectside as well?

And is the CollisionCategory being capitalized okay?

Thanks alot.

Yeah, that should work. You don’t need to change the case of the value you apply within Maya, and the egg syntax doesn’t matter.

Examine the egg file you produced with maya2egg. It should contain a line of the form:

<ObjectType> { ObjectSide }

in your object wherever you set that flag in Maya. If it doesn’t, then something went wrong with setting the appropriate eggObjectFlag. If it does have this, and you’re not getting the tag set in your model, then something is still wrong with your config.prc.

Note that you may need to clear your cache (or generate a new egg file) after editing Config.prc, or you may still be loading the old egg file from the cache.

David

AH! SO THATS THE PROBLEM!

I forgot to generate a new egg file… … Can’t believe I made such an elementary mistake.

Now it works like a charm. Of sorts. Thanks alot once again drwr!