Sun, Dec 22, 10:08 PM 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 Dec 02 3:16 pm)

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: Access to joint data?


colorcurvature ( ) posted Mon, 03 October 2011 at 1:48 AM · edited Sun, 22 December 2024 at 10:05 PM

Is there any way to read/write joint data through python? I want to move the joint centers  with a script. I saw something that looks like one could read weight maps, but not write, and for joints the text search didnt hit much in the manual :/.

Thanks!


PhilC ( ) posted Mon, 03 October 2011 at 3:19 AM

There is SetOrigin(x,y,z) and SetEndPoint(x,y,z)

Alternatively you could use Python to write and apply a pose file that will do the trick.


adp001 ( ) posted Mon, 03 October 2011 at 3:25 AM

parmX=actor.Parameter("xOffset") parmY=actor.Parameter("yOffset") parmZ=actor.Parameter("zOffset") parmX.SetValue(myNewValue) ...




colorcurvature ( ) posted Mon, 03 October 2011 at 3:32 AM

Aaaah super! Thanks so much.

And even one more question: Can one morph the core geometry? (Not make a morph target, but the .OBJ the figure refers to?)

So if you have a figure where all joint zones are converted to weight maps, then one could morph core geometry and joint centers on-the-fly to adapt shape and rig?


PhilC ( ) posted Mon, 03 October 2011 at 3:46 AM

You can set individual vertex locations with:

SetX(value)
SetY(value)
SetZ(value)

So yes you can.

If you are getting serious about creating Python scripts for Poser you may find this publication of interest.


colorcurvature ( ) posted Mon, 03 October 2011 at 3:56 AM

I was able to gather some python experience, thanks in any case Phil. What I already did was to make the posed-morph-loader, and now I think of exporting core .OBJ files with the joint centers contained in them as stand-alone-vertices so I can also just move them in an external modeller, and not having to worry about the joint-influence-zones. In my  understanding the use of vert maps locks the influence values to the vertices, and thus one can move them around in a modeller, without destroying the rig entirely.

E.g. I wanted to "blend" a weight-mapped V4 to a weight-mapped M4 and see what happens. Genesis for the poor, so to say.

As scaling seems to have some odd effects on bending in general, I thought scaling could be replaced by morphing the core geometry along with move of joint centers and using weightmaps.

 


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.