Thu, Jan 2, 5:52 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: 'PropGoto+' and ' Smart+' scripts completed - feedback?


3dcheapskate ( ) posted Tue, 22 May 2012 at 12:33 AM · edited Sun, 22 December 2024 at 12:16 AM

I've finally got round to releasing these two scripts as part of my 'S.E.Asian Duel' freebie - it didn't make sense to release them alone since they include hard-coded parameters for hand poses, designed to grip a specific prop. Downloads via the freebie links in my siggy. Many thanks to everybody on this (and other) forums who's been patient enough to answer my (sometimes, often?, stupid) questions.

The scripts basically turn a prop into a smartprop (i.e. position, orient and parent it correctly in the selected hand of the selected figure), and automatically apply the hand pose to grasp the prop (that's the 'plus' part). The 'PropGoto+' script is for use on a prop already in the scene, whereas the ' Smart+' version loads the prop first (it's identical to the 'PropGoto+' script except that there's an additional 'LoadLibraryProp()' called right at the start).

 There are two main areas I know of where the scripts won't/may not work:

  • I forgot to make the filename/path corrections so they'd work on a MAC.

  • I used the Poser 6 UI so they may not work on Poser 7+ (I can only test on Poser 6 at present), but I included versions with the UI stripped out in the hope that they may work

 The scripts are in plain text format, so you can examine, modify, laugh, or whatever. Personally I'm really pleased, because the scripts do exactly what I wanted. I can see plenty of room for tidying/improvement/adaption, and was hoping to open a discussion on how to improve these scripts if anybody's interested...

(N.B. the scripts are 'do-whatever-you-want-with-them' type licence/copyright, so you're more than welcome to adapt them on your own and use them as you see fit)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Wed, 06 June 2012 at 10:42 PM

I was just reading through my PMs and noticed one saying that the previous (and first) PoserPython script I did (the 'Set Tiling' script in the FreeStuff) worked fine in Poser 9! I'm a bit puzzled because that script used the Poser 6 UI, which I thought caused problems in Poser 7+?

 

Still hoping for feedback on whether my 'PropGoto+' and 'Dha Smart+' scripts work:

a) in Poser 7+ / PoserPro

b) on a MAC


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



estherau ( ) posted Sun, 08 July 2012 at 10:51 PM

Okay, i've got a mac and only just saw this thread.  I'll try it if you like.

Love esther

MY ONLINE COMIC IS NOW LIVE

I aim to update it about once a month.  Oh, and it's free!


estherau ( ) posted Sun, 08 July 2012 at 10:56 PM

have u got some links please.

love esther

MY ONLINE COMIC IS NOW LIVE

I aim to update it about once a month.  Oh, and it's free!


3dcheapskate ( ) posted Fri, 20 July 2012 at 4:52 AM · edited Fri, 20 July 2012 at 4:52 AM

Apologies for the delay in responding Esther - I've had very little opportunity to access the internet over the past month.

The link's via the 'My Renderosity Freebies' link in my signature. The script is part of the 'S.E.Asian Duel' freebie, for reasons explained in the original post.

Direct link to the S.E. Asian Duel freebie - http://www.renderosity.com/mod/freestuff/details.php?item_id=68397

TIA


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



estherau ( ) posted Fri, 20 July 2012 at 5:24 AM

It's okay.  actually this week has been a real life nightmare as far as work goes (and I am working next 3/7 too somewhat unexpectedly) and then working rest of next week, so I wouldn't have time anyway. I iwll try and check it out soon.

Love esther

MY ONLINE COMIC IS NOW LIVE

I aim to update it about once a month.  Oh, and it's free!


3dcheapskate ( ) posted Mon, 23 July 2012 at 5:13 AM

No worries

Time is an illusion. Lunchtime doubly so.

P.S. The scripts work fine in Poser 8 (tested that myself, since I now have a copy)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Tue, 06 November 2012 at 9:02 PM

Just grabbed a copy of Poser 9 for the bargain price of $69.99, and the scripts work fine in that to (on a PC).

Next set of props to use these scripts is almost ready - a set of three S.E.Asian style shields...


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Tue, 06 November 2012 at 9:13 PM · edited Tue, 06 November 2012 at 9:16 PM

file_488355.png

*(Fur Loincloths and hairstyles courtesy of ShareCG! Sarongs and Asian hairstyles are on my to-do list!)*

I've added one extra bit to the scripts for these shields - the hands of The Freak and Behemoth are too big, so each shield has a 'Fit Freak-Behemoth Hand' morph. When using the 'Smart+' script to load the shield into The Freak's/Behemoth's hand the script automagically sets the morph as well.

Just doing some final tidying up and testing - it may still be a couple of weeks though...


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Thu, 13 December 2012 at 10:18 PM · edited Fri, 04 September 2015 at 10:24 PM

Advice Please!

I'm planning to move the data for figure matching, positioning/orienting the prop, and hand posing into an external file. Here's three code snippets from the relevant parts of my current PropGoto+ script showing how the data is currently hard-coded in the script:

Figure recognition:

# Simple list (tuple) of options for figure selection drop-down   
optlist = ("Aiko 3","Antonia")   
# Expanded list (tuple of tuples) for figure name matching   
# The second,third, etc parameters in each inner tuple are the alternative CR2 filenames and figure names from within the CR2 - that's what I use to match figure.   
optlist2 = (("Aiko 3","blAiko3"),("Antonia","Antonia"))   

Prop translation/orientation parameters:

# Tuple of x,y,z rotations and translations to position the prop correctly in the right hand of the zeroed figure   
elif action == optlist[0]: # Aiko 3 RH values   
(yR,xR,zR,xT,yT,zT) = (-5.90536,0.929067,-102.083,-0.278811,0.544785,0.0365292)   
elif action == optlist[1]: # Antonia RH values   
(yR,xR,zR,xT,yT,zT) = (-47.868999,-8.78641,-97.023598,-0.267093,0.614172,0.045245)   

Handgrip:

# aHR is a tuple of hand rotations, aKR is a tuple of tuples of knuckle rotations (five fingers, three knuckles per finger, three rotations per knuckle)   
if action == optlist[0]: # Aiko 3 DhaGrip RH values   
aHR = (0.647785,-8.1833,0.823158)   
aKR = (((48,6.09101,1),(54.9843,-18.9889,-0.0454721),(-0.00697216,-38.0285,-0.40209)),((-15.1137,-11.0771,47.2888),(0,0,84),(0,0,29)),((-15.1075,0.0805138,65.969),(-0.0826297,0.0885081,61.9591),(-0.0392733,-0.0291215,47.426)),((-10.0911,5.37818,76.9863),(0,0.0285995,55),(-0.0134865,0.220874,48)),((-11.0294,3.9855,89.9653),(-0.0317562,-0.0216579,36.8822),(-0.0353459,-0.104162,33.2371)))   
elif action == optlist[1]: # Antonia DhaGrip RH values   

The source data for these arrays/tuples is currently in a spreadsheet. I have formulae in the spreadsheet to create the lines of code, and I cut-and-paste these into my scripts.

When I only had the PropGoto+ script and a single Smart+ prop (the original S.E.Asian sword), updating two files to add new figure support/improve the hand poses didn't seem to difficult. But I now have an additional three Smart+ props (S.E.Asian shields) and plans to create a lot more. Manually updating each file is less and less attractive!

An obvious solution is to put the data into an external file and to have the scripts populate the tuples from that file. I have my own thoughts about the file format and file parsing, but I'd really appreciate suggestions/recommendations/cautions before I start...

TIA!


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



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.