Mon, Oct 21, 10:33 PM CDT

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: Looking at each point in geometry mesh


Anthony Appleyard ( ) posted Wed, 24 May 2017 at 12:19 AM · edited Fri, 06 September 2024 at 5:35 AM

If I call a Poser Python script on a model, how could the script look at any one of the mesh vertexes and find (1) that vertex's unposed original coordinates as was in the mesh file, and also (2) where Poser posing has moved that vertex to? I may need both at the same time, for a project that I have in mind.


PhilC ( ) posted Wed, 24 May 2017 at 1:30 AM

geometry = poser.Scene().CurrentActor().Geometry()

geometry.Vertex(index) Returns the local space Poser vertex object with the designated index.

geometry.WorldVertex(index) Returns a world space vertex object by specifying its index. If no world space data is available, the function will return None.


Anthony Appleyard ( ) posted Wed, 24 May 2017 at 3:37 AM · edited Wed, 24 May 2017 at 3:42 AM

Thanks.

If I call geometry.Vertex(i) on point i and it yields (x,y,z), how on my Poser run's stage could the script move that vertex to position (u,v,w) ?

Would thus moving a vertex, automatically also update that vertex's stored geometry.WorldVertex(index) value?


Allstereo ( ) posted Wed, 24 May 2017 at 4:47 AM

Hello Anthony,

As a basis for writing your script, you can use my script Vertex Viewer Python Script to be found in the free stuff section. The link is: Vertex Viewer script

Allstereo


PhilC ( ) posted Wed, 24 May 2017 at 7:14 AM

Once you have defined the vertex you can use its Set method to change its position.

vertex.SetX(value) Sets the X coordinate of the vertex to the value given.

Suggest checking its WorldVertex before and after making a change to see if that updates. I'm pretty sure that it does.


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.