Sun, Feb 2, 2:38 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: Change internal dial names?


Ajax ( ) posted Fri, 28 November 2003 at 3:36 PM · edited Sat, 25 January 2025 at 10:59 AM

Noggin has a really cool idea of making a script that would go through a crosstalk suffering figure in a scene and adjust all of it's ERC dial names to kill the crosstalk. Does anybody know a way to change the internal names of valueParm dials (or any othe dial for that matter)?


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


ockham ( ) posted Tue, 02 December 2003 at 11:53 AM

It's easy enough. Do you want an entry blank to specify a new name for each, or an automatic change that adds a standard set of letters to each valueParm?

My python page
My ShareCG freebies


ockham ( ) posted Tue, 02 December 2003 at 12:11 PM

Attached Link: http://ockhamsbungalow.com/Python/SetInternalNames.zip

Here's a quickie implementation of the latter idea.

My python page
My ShareCG freebies


Ajax ( ) posted Tue, 02 December 2003 at 4:37 PM

Aha! So the command is "SetInternalName". That's very useful. Thanks ockham! I don't have Poser on this machine to try the script but I'll give it a go later on. Glancing through the code it looks exactly like what I was after. Thanks again.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


ockham ( ) posted Tue, 02 December 2003 at 4:51 PM

One clarification: in the Readme I gave some stepwise instructions, concluding with "save the new CR2". Obviously you don't really need to do that.... the most likely use for this script would be for -transitory- modifications in a figure.

My python page
My ShareCG freebies


noggin ( ) posted Wed, 03 December 2003 at 3:56 PM

Hi Ockham_ Ajax alerted me to the fact that you'd come up with this_ I'll download and play with it shortly. Your absolutely right_what I'd wanted was a script that would do it on the fly so, for example, I could load in repeat copies of a bird model_ and change the cross-talk pre-fixes that Ajax's Underground allows you to add, so that each bird would have a different prefix (eg NP1,NP2,NP3)for the various easi-pose dials. I'm off to see if thats what you achieved!! Thanks eversomuch! Nigel/noggin


noggin ( ) posted Wed, 03 December 2003 at 4:20 PM

hhhmmm! Maybe I'm doing something wrong (bear in mind that python=voodoo to me)_ but when I applied the script and added letters in the dialogue box_all that seemed to happen was that all the easi-pose was disabled in the second figure. Help!!!


noggin ( ) posted Wed, 03 December 2003 at 4:34 PM

file_86308.jpg

Well that's wierd_ this time I loaded the 1st bird in and ran the script before I imported the second bird_ and found it worked perfectly and I could then load as many birds as I wanted. This a real boon Ockham_ thankyou so much. A flock is now possible in Pro Pack!


Ajax ( ) posted Wed, 03 December 2003 at 4:49 PM

Hmmm.....Now I stop to think about it for a(nother) moment, if the dial names are changed without the slave references also being changed the ERC links will be broken. The script would need to hunt down the slave dials and change the fourth of the "five magic lines" in the ERC code. I can't see that happening anywhere in the script and I can't off the top of my head think of a way to do it without saving the figure, processing it as text, deleting the copy in the scene and opening the new one. Are you sure this is working, Noggin? I don't have Pro Pack to test with. I have a feeling the time it seemed to work is the one off and your original finding that it destroyed the ERC relationships is what's going to happen normally.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


ockham ( ) posted Wed, 03 December 2003 at 5:26 PM

Matching refs: I wondered about that, but wasn't really thinking, just following the original instructions. Fixing the refs would indeed require saving the new figure as CR2 then editing. Python can certainly do that, and it would probably be faster and more reliable than hand-editing.

My python page
My ShareCG freebies


noggin ( ) posted Thu, 04 December 2003 at 2:30 AM

I've done a more thorough test on your script Okham and can confirm that it DOES work but ONLY when the script is applied BEFORE the next identical figure is imported to the scene. So: If you import Figure(F)1, F2,F3 and then apply the script to each figure, Easi-pose works for F1 but F2 and F3 crosstalk (inspite of having the script applied). If you import F1, apply the script and then import F2 & F3 and then apply the script to F2&F3: F2 functions independently but F3 crosstalks with F2. Finally if you import F1, run script, import F2, run script on it and then import F3 and run script they all work independently. Hope that helps.


Ajax ( ) posted Thu, 04 December 2003 at 2:44 AM

Ack. Not owning Pro Pack, there's nothing I can do to test this out myself. Maybe if you save the cr2s back to the library and send them to me I'll be able to work out what's going on. Tell you what though, this is getting interesting. Are you rememebering to change the new text sequence in between figures? I'm guessing maybe the SetInternalName method is smarter than I would have expected (ie it is actually tracking down the slave references) and also there's some small error in the script that results in the dial names being changed the same way when you load multiple figures before applying the script.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


noggin ( ) posted Thu, 04 December 2003 at 3:34 AM

ok Ajax_ I'll send you the Cr2's_ I'll e-mail you.


ockham ( ) posted Thu, 04 December 2003 at 10:51 AM

Attached Link: http://ockhamsbungalow.com/python/internalnames2.zip

I seriously doubt that the SetInternalName is that smart! Here's a variation that might be easier to fiddle with. This script automatically gives each figure a different suffix. The first figure it encounters gets _QXZ1 and the second gets _QXZ2 and so on. When I try it with a pair of Koshinis, it does NOT solve crosstalk.

My python page
My ShareCG freebies


noggin ( ) posted Thu, 04 December 2003 at 5:00 PM

The four birds in the picture above (rendered in ProPack) all had different three letter sequences added into the prompt line of the script. As you can see they all have different poses (only using master-slave dials). I'll IM you Ockham with a link to my model and you can try and re-produce my success. Nigel


ockham ( ) posted Thu, 04 December 2003 at 5:22 PM

Ok, thanks. This is an unusual reversal..... Most of the time, scripts work fine for me but fail totally when others try them!

My python page
My ShareCG freebies


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.