Egg Post Parser (Collision tags)

I got sick of manually adding collision geometry tags to my models so I wrote a small script to do it for me. Thought it might come in handy for someone at some point.

Perhaps if people find it useful they could look into integrating it into blender as a plugin / chicken.

You can find it[[Egg%20Post%20Parser]] < there

Have fun

Hate to say this considering the effort you put in, but Chicken already allows you to add object type tags to output - by setting an ‘ObjectType’ tag to ‘barrier’ you will achieve what you want. It admittedly doesn’t support the collide way of doing it, but its just as powerful - maybe I should add this way as well, just for completeness. I’ve been meaning to add a non-relative filename warning though…

May i recommend eggOctree for collisions?

@lethe, I was hoping when I posted this someone would point out that chicken already supports this sort of thing. thanks :wink:

treeform, I tried eggOctree but couldn’t get it to work.

lethe, you sparked my curiosity, so I went ahead and added my functionality into the chicken exporter. An example: in blender you go to the logic panel and add a property to your object

Name: Collide
Value: Polyset Keep Descend

This causes my tweaked chicken file to output

<Collide> { Polyset Keep Descend }

for that object.

There is also a button that you can toggle to make all texture paths relative. The code is not ready to merge with the current svn work, it uses globals when making texture path’s relative (I didn’t want to pass the flag from the button through all the classes), and it doesn’t save your settings for that button (I couldn’t understand the settings code).

If you wanna fix up my implementation and add this to the chicken exporter, go ahead! If not, I can understand :wink: Either way, my changes are all preceded by the comment

# XXX aurilliance

So it should be easy to see what I’ve changed.

Code as follows: EDIT, it’s now in a download, phpbb didn’t like a 1600 line post. Can’t think why not… :stuck_out_tongue:


I shall have a look and add it in:-) Though next time learn to use a patch - a lot shorter than 1600 lines and saves me wondering through the file working out what you have replaced. And yes, the config system is nightmarish in its implementation. It actually executes the config file as a python file, which is perverse beyond belief. Won’t happen instantly though - currently working on my fps thing, once that has the basics working (Another week or two.) I’m going to burst through all the stuff people have requested for Chicken.

Lol ok lethe. Next time I’ll teach myself about patches. Mind you, if you use a svn diff program, you should be able to locate my changes in a minute or two, theres only about 11 lines, if worst comes to worst, just search the file for every instance of ^ # XXX aurilliance - that will show you where all my changes are.

Lol nightmarish - glad i didn’t bother with trying to figure it out too much! Ah don’t feel pressed for time, I’m not in any hurry to see it in there, but will keep my eyes open in future releases :wink: