Forum: Poser Python Scripting


Subject: Moving morphs between different figures

Cage opened this issue on Dec 20, 2006 · 1232 posts


Spanki posted Wed, 14 February 2007 at 3:02 AM

Ahh, hey Cage.  Yup - I'm still here, just tied up with other work atm.

Neighboring body parts... hmm... I don't recall off-hand if you can determine neighboring actors from Poser-Python... actually, I guess there is a way to GetParent() and/or GetChildren(), so you should be able to determine which actors are connected.

Of course the eyes are children of the head, and you wouldn't want to parse those for head matches, so I'm not sure how to detect that situation (avoiding hard-coded actor names, if possible).  I think V4 also has lower-jaw and tongue as children of the head... I guess you'd want to parse those when doing teeth/gums and tongue matching, but not for the head skin.  I don;t think you can rely on materials either, since the back of V4's noggin is SkinNeck or something (it's not in front of me.. maybe it's Scalp?).  So in some cases you'll want to match between different materials.

Maybe the best course of action would be to run the test... at the end, look through the xpolys list to see if you have misses.  If so, then check to see if they are on 'edge polys' (I think you have a way to look that up already).  If so, then determine parent and children actors and just bring up a list, for the user to select from... let the user decide which other actors to match against.

Basically, I don't think I'd complicate things by trying to scan all potential actors at once (keeping track of various vertex index ordering, etc).  I'd just do the first one, then if you determine that some edge vertices were missed, bring up a short list of additional actors for the user to select from and run additional scan(s) on that/those.

If you want to keep the file format the same, you just write out separate files for each pairing, and possibly add an "other_actors:" record (listing additional source actors, for this target) to the format to hint to the script that more than one file needs to be looked at when creating morphs.

I dunno... personally, I think I'd look into doing the combined file approach, with multiple groups of w records, separated by "actors:" records.  I'd also move the vertex count totals fom the header record to the "actors:" record, for each pairing.  Then when reading the file, you just build multiple tables and call the transfer_moprh() multiple times with different actors.

Sorry, these are just some random thoughts because you asked 😄... I don't really have the time to sit down and think it through yet.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.