Forum: Poser - OFFICIAL


Subject: Vertex-level editing via Poser Python

Cage opened this issue on Mar 21, 2007 · 42 posts


Cage posted Sat, 24 March 2007 at 10:41 PM

*"Nope. Exception handling works perfectly well."

*Well, bummer.  It was a definite error, at any rate.  The try-except within the callback seems to be common practice.  It's used in the various sample scripts for Poser callbacks which I was able to locate.  I think it may be done to prevent Poser Python from trying to print out any errors - the callback seems to break the print functions, and you just get a blank console popping up.

*"Changing something inside a callback function shouldn't generate another callback!"

*Interesting.  I seem to be confused, then, about what is and what isn't a callback.  I'm generally confused about a lot of things at any given moment....

*"Maybe I find the time to look a bit deeper inside your script tomorrow, surely monday."

*Ahh...   if you really want to.  Prepare yourself for spaghetti!  :-P  I don't write code on your level, understand.  I'm sure you could maybe get a good laugh from it, anyway.  :)  But any assistance or pointers could only improve the script.

*"Another nice way is this: To make a dialog stay on top, some people are using a timer interrupt to get control back. If only the screen is updated, anything may work fine. If callbacks are used there is a great chance to end in a crash (sooner or later). "

*That's kind of the method currently in use.  It works, mostly, but I have had some lockups and I do see evidence that it may not be the best way....  Perhaps that is ultimately the cause of the lockups from too many vertex boxes?  Hmm, hmm.

This update fixes the Numeric omission and the incorrect line in the callback loop.  Beyond that, it only makes minor, behind-the-scenes tweaks.  I spent two days trying to get the methods to cooperate with scaling and rotation of body parts and ultimately ended up realizing that the code I'd posted previously was the best of my various efforts so far.  It looks like all the body part scaling and rotation issues are due to interactions with joint parameters.  In the body part bend and scaling zones, you will end up with mis-positioned vertex boxes if your actor is bent or scaled.  This seems unavaoidable, short of switching to some method which works with props or proxy figures somehow.  The script can be used when you have scaled or rotated body parts, if you can work with the box offsets. 

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.