Forum: Poser Python Scripting


Subject: Parsing Classes part 2

tromnek opened this issue on Jan 06, 2005 ยท 1 posts


tromnek posted Thu, 06 January 2005 at 10:20 PM

Here are a few classes that let you define what parameters you want to extract or use from a poser file, and allows you to execute user defined functions with them. Basically, a linked list is created that has regular expressions to match levels in the heirarchy. Grouping is used in the rexp to retrieve what you want from that level. That stuff is stored in a dictionary so that you can use it at any level in the hierarchy. Besides the rexp, each item in the linked list can contain a method that will be executed if it is not 'None'. That method is pass the current dictionary. When I filter a .pz2 file to make a partial pose, I use a hierarchy like this: actor->channel->parameter->keys->k(???) Run the demo and read the source code comments before you give up on my poor explanation.