Forum: Poser - OFFICIAL


Subject: PoserParser.pm : Perl Extension status report

_dodger opened this issue on May 13, 2003 ยท 6 posts


_dodger posted Tue, 13 May 2003 at 10:03 AM

As a note, as of now (this posting) the above link is updated and the getObjects, listObjects, getActors, listActors and GetStringRes methods now work. getObjects and getActors return either a list of blessed references to the subparts asked for or a blessed hashref to the same, depending on whether it's called in list or scalar mode. The hashref is keyed by the object ID (ie, lToe:2, gun_1, or whatever). The list isn't keyed, but the ID can be retrieved by the _id property of each object returned. The listObjects and listActors methods simply return a list of IDs or, in scalar mode, an integer which means the number that being called in list mode would have returned. The distinction between 'object' and 'actor' here is a simple one of what is returned. objects returns all actors, props, cameras, lights, waves, magnets, bases, and spherezones. Actors returns only actors. Other specific methods will be built for the others but I'm going to refine how I do this to avoid near-duplicate methods bloating the code (these initial ones are just to test the algorithm, though the result will use the same syntax or allow an expanded one). GetStringRes works exactly as any Poser hacker would expect it to. Thanks be to RBTWhiz. Note that this module is coded in English, so the results of GetStringRes are in English, too. Not havnig a lot of reason to mess around with multilingual Perl, I don't know a lot about the use of the Locate pragma or how to code methods to be Locale-compliant.