Fri, Jan 24, 4:55 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 24 4:20 pm)



Subject: PoserParser.pm : Perl Extension status report


_dodger ( ) posted Wed, 14 May 2003 at 1:39 PM · edited Mon, 29 July 2024 at 8:17 AM

Attached Link: http://www.dodger.org/ttt/poserParser/PoserParser.pm

Heirarchies are read and parsed now. Some accessor methods are defined. Here's the interim documentation:
new
    my $pz3 = new PoserParser;
    my $pz3 = poserParser->new;

  Constructor method. Returns a PoserParser object.

read
    $pz3->read($file);

  Reads in a Poser document and parses it.

refID
    $pz3->refID($pz3->{actor}->{parent});

  Takes any parsed Poser Ref data and returns a string in standard Poser ID
  format. For instance, 'bodyPart:1' or 'prop_2' or 'smartProp_1:3'.

addChild
    $pz3->addChild($child, $parent);

  Takes in two Poser IDs and adds to the internal heirarchy structure so that
  the child is a child node of the parent. This does NOT affect the parent or
  smartParent properties of the object the ID refers to!

writePZ3
    $pz3->writePZ3($format, $filename);
NOT DONE YET!

  Takes two arguments, format and filename, and writes a Poser file with the
  specified format to the specified filename. If filename is not defined, uses
  the name of the file read in. If format is not defined, chooses the format
  based on the file extension. If this cannot be determined, defaults to 'PZ3'
  format. Returns undef if no _filename property exists.

writeXML
    $pz3->writeXML($format, $filename);
NOT DONE YET!

  Takes two arguments, format and filename, and writes an XML file defining
  the Poser document. Note that Poser cannot read this document!

writeHTML
    $pz3->writeHTML($format, $filename);
NOT DONE YET!

  Takes two arguments, format and filename, and writes an HTML file defining
  the Poser document in an HTML approximation. Very similar to writeXML.

listActors
    my @actorIDs = $pz3->listActors;

  Returns a list of Object IDs of type actor. Identical to
  listObjects(['actor']);

listObjects
    my @objectIDs = $pz3->listObjects;
    my @deformerIDs = $pz3->listObjects([qw(waveDeformerProp magnetDeformerProp)]);

  Returns a list of Object IDs of types specified by an arrayref supplied as an
  argument to it. If this arrayref is not defined, returns a list of all Poser
  Object IDs.

getActors
    my @actors = $pz3->getActors;

  Returns a list of blessed references to actor type Objects. Identical to
  getObjects(['actor'])

getObjects
    my @objects = $pz3->getObjects;
    my @deformers = $pz3->getObjects(['waveDeformerProp','magnetDeformerProp']);

  Returns a list of blessed references to objects of types specified in
  an arrayref supplied to the method. If the arrayref is not defined, returns a
  list of references to ALL Poser Objects in the document.

getObject
    my $object = $pz3->getObject('lFoot:1');

  Returns a reference to the object which has the Poser ID specified. Is a
  PoserParser Object.

getObjectByName
    my $object = $pz3->getObjectByName('Left Foot');
NOT DONE YET!!

  Returns a reference to the object which has the specified name. If more than
  one object has this name, returns an arrayref of all mathcing objects. Is
  a PoserParser Object.

getChannels
    my $channels = $pz3->getChannels('lFoot:1');

  Returns a hashref containing all channels in the specified Object as
  specified by Poser ID. Hashref is keyed by channel type, and each channel
  type is a hashref keyed by dial name. Is a PoserParser object.

getChannelType
    my $TwistYs = $pz3->getChannelType('lFoot:1','TwistY');

  Returns a hashref containing all channels of the specified type belonging
  to the specified ID. Hashref is keyed by dial name. Is a PoserParser object.

getChannel
    my $NoseBig = $pz3->getChannel('head:1','NoseBig');

  Returns a channel object (hashref) for the dial specified by name belonging
  to the Poser Object specified by ID. Object is a PoserParser object.

getFigures
    my @figures = $pz3->getFigures;

  Returns a list of figures in the document. Fogures are PoserParser
  objects. If only one, returns the same in list or scalar mode. If more
  than one, returns a list in list mode or an arrayref in scalar mode.
  Arrayref is NOT a PoserParser Object, but arrayref items are.

getFigure
    my $figure = $pz3->getFigure(3);

  Returns a PoserParser object reference to the figure specified by ID.

getFigureByName
    my $figure = $pz3->getFigureByName('Figure 1');

  Returns a PoserParser object reference to the figure specified by name.
  If more than one figure exists withthe same name, returns a list (in list
  mode) or an arrayref (in scalar mode) containing all matching figures.
  Arrayref is not a PoserParser object if one is returned, but items in it
  are.

GetStringRes
    print "The dial name is ", $pz3->GetStringRes(1024,8), "n";

  Returns a string corresponding to the arguments specified. The string
  returned will be (as fas as I know) the same string Poser itself will
  return from its own GetStringRes() function.

The module is at the link


onnetz ( ) posted Wed, 14 May 2003 at 4:24 PM

Looks pretty good. I will have to mess around with it later...

Handle every stressful situation like a dog.

If you can't eat it or play with it,

just pee on it and walk away. :-)

....................................................

I wouldnt have to manage my anger

if people would manage their stupidity......

 


hogwarden ( ) posted Wed, 14 May 2003 at 5:37 PM

Clever bugger!! (Shhh... else CL will think you're re-writing Poser! LOL!!!) Might not be a bad idea, though!! Howard:)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.