Mon, Sep 9, 6:05 AM 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 08 5:10 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: Vertex parenting script?


R_Hatch ( ) posted Sun, 08 April 2007 at 11:40 PM · edited Sat, 07 September 2024 at 8:47 PM

Seeing Cage's brilliant scripts for vertex-level editing made me think about the following: what if the boxes generated could be made to track the vertex they were created from, and then be used to parent objects to? For example, a nose ring that stays in place even when the face is morphed. Or a spike attached to a chin that stays put when the mouth is opened. The script would need to create two boxes: one for the vertex, and another placed at a user-defined distance from the first, along the vertex's normal (for point-at purposes). My idea for how to generate the boxes is as follows: the user selects several faces surrounding a single vertex, using the grouping tool. This would make it easier to precisely choose which vertex gets used.


adp001 ( ) posted Mon, 09 April 2007 at 11:39 AM

I think this idea has something :)

Probably the idea should be reworded to come to an easier solution.
"The possibility to parent a prop to a group of polygons of a certain actor".

I changed to a polygon group because such a group can easily be handled with Posers Group Editor and selected polygon groups are rechable via Poser Python.

One method of resolution:

*If a prop is parented to an actor and group-parented to a predefined group,  the (computed) centerpoint coordinates from the selected polygongroup are saved as a reference point.

On each WorldspaceCallback the actual parentgroups centerpoint is computed. The child prop is moved by group_saved_startingpoint - group_actual_position (if they differ) and group_actual_position is saved as the new group_saved_startingpoint (all local coordinates, because the prop is also parented to the actor).




Cage ( ) posted Tue, 10 April 2007 at 1:05 AM

*"what if the boxes generated could be made to track the vertex they were created from, and then be used to parent objects to?"

*I think Ockham did something like this in his pseudo-parenting script, whatever it's called, although he perhaps didn't take the idea as far as what you're suggesting.  Unless I'm getting confused again, I think he uses worldvertex postions as the point of reference when applying the parenting in his script.

Thanks for the compliment.  :-P  Now I'll get a swelled head, and mess up (I mean mess up even more).  If you look at the quality of my code, however, it should be clear that my scripts aren't brilliant.  I keep hoping that some of the more capable and talented people around here will look at some of the potential that's been overlooked in PoserPython.  The Blender community has some real geniuses who constantly write free scripted utilities, Ideasman being my personal hero among them.  The Poser community is similarly dedicated to sharing, but fewer people seem to jump in and try to expand PoserPython.  Alas.  Maybe it's because Poser has become more marketplace driven....

===========================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.


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.