Tue, Nov 26, 12:30 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Is there a Python script to zero just Head expression morphs or Head only morphs


Jaager ( ) posted Wed, 06 August 2014 at 1:57 PM · edited Mon, 25 November 2024 at 10:08 PM

In this case, the figure is V4, but it would be useful for any figure?

I am processing my collection of V4 facial expression morphs.  Using Ockham's wonderful "Delete Zero" script, gets the pose files stripped to just the active channels. It makes it practical to open the file and delete any non-expression channels (Why Lengthen Lashes orPBMCC_18 or Paul are considered expressions is beyond me. Never mind the shape morphs that are often present.).

Most of the community provided poses do not have descriptive names. Indeed, many have such imaginative names as Face1, Face2, etc. It is necessary to run thru the poses to find something useful.

The down side is that a clear morphs pose is needed between each, since there are not any zeroed channels in the pose.  I have "Zero Morphs" scripts.  But these do the whole figure. Thinking about the problems involved with targeting a specific group of channels -whose names vary between figures: A script to zero the morphs on Head only would get us 95% the way there and be generic for any figure.  The only price would be that it would also zero my spawned character morph, but that is just one morph to reset.  I have a Python scripts menu open In the Pose screen, so a script there is easier to get to than a zero all .fc2

A tedious and awful alternative would be to set up a character with just expression channels and apply the poses to it and resave - thereby getting the zero channels back in.


EnglishBob ( ) posted Wed, 06 August 2014 at 5:44 PM

The problem with making a generalised script is that there's no real internal distinction between morph channels that are for expressions and those that are for face shaping. Every figure has them named differently. I saw something that attempted to do this somewhere, but it had to use a configuration file which listed the head morphs for the figure in use.

The alternative, as you note, is to make a bespoke zeroing morph - not too tedious or awful if you use a Poser file editor of some description. And there's absolutely nothing you can do about those vendors that insist on using expression morphs as part of their character's face shape. Well, there is a solution, but it's probably against the forum TOS. :)


Jaager ( ) posted Wed, 06 August 2014 at 6:44 PM · edited Wed, 06 August 2014 at 6:54 PM

I agree that expression morphs should be excluded from a character head shape, but its effect might be minimal after the character Face is spawned into a single morph.  It will still probably play havoc with the result of expression poses.

I looked at Ockham's products and found that his "ZeroMorphs" script provides the option to choose which group to zero.  That gets the job done.  It does have an odd behavior : the morphs do not zero until the group selected for the character on stage is changed.  It would save a few clicks if a script dedicated to just the head was available.  It is still better than processing a few hundred .FC2 files to add back the zero key expression channels.  I guess I am mimicing Scrooge McDuck by hording what is probably mostly useless and polyreplicated stuff.

I do wonder about the frustration effect when an expression pose is used on a character made up of dial settings and the expression pose has shape morph data in it.  I don't think the stores have strict enough standards about the make up of Library files.  Not telling the vendor and not getting them to fix it does not make the product any less amateurish.


EnglishBob ( ) posted Thu, 07 August 2014 at 4:15 AM

file_506408.txt

Sorry, I got straight onto my high horse without reading your post properly. The attached script should zero all morphs in the head actor of the currently selected figure, if it has one.

Replace the .TXT extension with .PY first, of course.  


Jaager ( ) posted Thu, 07 August 2014 at 10:39 AM

Thank you, kind Sir.

You are a gentleman and a scholar.  The script works like a champ.  One click pose, one click removed, could not be easier.


EnglishBob ( ) posted Fri, 08 August 2014 at 3:25 AM

You're welcome! Glad to hear it did the trick.


PhilC ( ) posted Fri, 08 August 2014 at 4:53 AM

Or....

Load the figure.

Apply required character morphs/dials.

Select the head.

Go to Edit > Memorize > Object


Apply expressions as required.


To remove expressions but retain character go to:
Edit > Restore > Object

Saving the figure back to the library will retain the memorization.

Hope that helps.


Jaager ( ) posted Fri, 08 August 2014 at 6:11 AM

Thanks Phil,

I had not absorbed or retained the significance of the Memorize / Restore function.

In my case, because I do not wish to lug arround a character cr2 with unnecessary shape morphs, once it is defined, I turn it into a pair of spawned PMD files.  So I am guessing that navigating to Head and resetting 1 morph (min 0/max 1, tracking scale 1) is 6 of one or a half dozen of the other, as far as the work involved.

But in forming a new character from shape morphs, Mem / Rest looks to be a CYA if used frequently liberally.  To paraphrase Oddball: it is good to be able to get out of trouble faster than you got into it.


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.