Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
# Written by PhilC<br></br>
# <a href="http://www.philc.net">http://www.philc.net</a><br></br>
# Use at your own risk
#------------------------<br></br>
# Start user edit
# Set name of dial here. (Use external name)<br></br>
dialName = "twist"
# Random number will be a floating point number between
one and zero.<br></br>
# Multiply this by a factor if higher or lower values are
required.<br></br>
# Note that factor may be negative.<br></br>
factor = 20
# End user edit<br></br>
#------------------------
import poser<br></br>
import random<br></br>
import string
scene = poser.Scene()
# make all lower case<br></br>
dialName = string.lower(dialName)
def main():<br></br>
fig = scene.CurrentFigure()<br></br>
if not fig:<br></br>
print "Please
select a figure."<br></br>
return<br></br>
for actor in fig.Actors():<br></br>
for parm in
actor.Parameters():<br></br>
if string.lower(parm.Name()) == dialName:<br></br>
dialValue = random.random() * factor<br></br>
parm.SetValue(dialValue)<br></br>
<br></br>
main()<br></br>
scene.DrawAll()<br></br>
Semidieu has the Advanced Figure Randomizer over at RDNA & I think there might be a free one here as well, ockham would be a good person to start your search with.
Then of course PhilC might be persuaded to pop in with the exact thing you're after written in seconds. hehehe :thumbupboth:
Windows 7 64Bit
Poser Pro 2010 SR1
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.
Before I went reinventing this particular wheel I though I'd check to see if somebody had already done it.
I need to randomize the value of a particular dial that is in a bunch of body parts. Basically creating (psudo)random movements. Just changing each instance or the "random" dial to a random number.