Thu, Dec 26, 1:11 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 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: Applying a pose


Borkum ( ) posted Sat, 23 November 2002 at 6:41 AM · edited Wed, 25 December 2024 at 1:30 PM

I've tried applying a pose to a figure by using scene.LoadLibraryPose but when I grab the vertices from the actor geometries they haven't changed from the default position. Is there something I am missing? Why don't the vertices positions reflect the pose of the figure? Thanks, Michael


Josiah ( ) posted Mon, 25 November 2002 at 7:50 AM

If I am not mistaken in what you are saying, I ran into this when I tried to create a script that moved the vertices of a figures bent elbow objects into alignment with an ideally shaped bent elbow object made in 3dsmax. I used this approach because it is hard to create a morph on a straight peice that looks the way you want it when bent. Anyway, instead of moving the vertices of the mesh I saw in the scene, it moved the verts from the "original" object which in turn doubled the bend! It seems that the Poser keeps two versions of the object meshes, the original object and the modified "virtual" object you see in the scene.I believe Poser creates a new pose or new morph by moving the vertices you see in the scene(not the ones in the base object). However when you try to get a vertex coordinates, Poser wants to give you the ones of the unaltered base object and not of the "virtual" one you see in the scene. I can't say I know away around this. I wish I did! If I am off base here on what you mean, this script will load a pose; ####################################################### scene = poser.Scene() scene.LoadLibraryFigure("Runtime:Libraries:character:People:Business Man.cr2") scene.LoadLibraryPose("Runtime:Libraries:Pose:Action Sets:Stalker.pz2") scene.DrawAll() ####################################################### (paths for Poser 4, 4 lines of code, all start with "scene"). I hate these little reply boxes!


Borkum ( ) posted Mon, 25 November 2002 at 9:58 AM

You nailed the problem exactly. I want the "altered" vertices - not the unmodified ones that Poser wants to give me. Guess I'll have to keep digging to see if I can find a way to do this. Thanks, Michael


Josiah ( ) posted Mon, 25 November 2002 at 1:09 PM

This is frustrating because the info must exist, but we can't get to it. Without this, a method of collision detection via python wouldn't be possible. I tried "WorldVertex()" also and got the same results as with "Vertex()". I tried each method with the casual business man using this script; ########################################### scene = poser.Scene() actor = scene.Actor("Left Forearm") geom = actor.Geometry() vertMS = geom.Vertex(22) vertWS = geom.WorldVertex(22) print "model position: ", vertMS.X(), vertMS.Y(), vertMS.Z() print "world position: ", vertWS.X(), vertWS.Y(), vertWS.Z() v = actor.Parameter("Bend") v.SetValue(-100) print "moved model position: ", vertMS.X(), vertMS.Y(), vertMS.Z() print "moved world position: ", vertWS.X(), vertWS.Y(), vertWS.Z() ########################################### This script prints out the model space and world space xyz coordinates of vertex #22 in the left forearm before and after the forearm is moved. In each case, the locations remain the same. If you do figure out a solution to this, please post it! josiah


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.