Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
The material internal number system is always in inches.
So the conversion from inches to meters is multiply by .0254.
Convert from meters to inches, multiply by 39.37.
If you like .00018 meters, then in the script use .00018 * 39.37 - no need for a calculator - scripts are calculators.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
You can write a little script to get the internal value from the dial. No conversion needed, just run the script and red the number .
I have my units in feet and the conversion factor is 8.6- 1 poser unit = 8.6 feet = 102 inches.
act = poser.Scene().CurrentActor()
print act.ParameterByCode(poser.kParmCodeXTRAN).Value()
like that
Quote - The material internal number system is always in inches.
So the conversion from inches to meters is multiply by .0254.
Convert from meters to inches, multiply by 39.37.
If you like .00018 meters, then in the script use .00018 * 39.37 - no need for a calculator - scripts are calculators.
Didn't know it was always in inches. I assumed it was some special internal scale. Thanks for that information.
Currently working in meters becuase the props for the scene were made and are postioned in meters. Normally I work in feet or inches. Easy enough to write a script that takes an input value and coverts.
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"
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.
I searched and search and search last night looking for the following and surprised it is not here.
Bump and Displacement are converted to some base number based on how you have your units set in your prefs. Which makes total sense. Currently I am on meters becasue I am woking with some purchased props that I can move around in 3 meter increments to get them to fit next to each other.
The bump in the material room reads 0.000100. Yet to duplicate that number and load via a script the number is 0.00393701 Meaning my script has to say InputByInternalName("Bump").SetFloat(BumpS) where BumpS equals 0.00393701 to show up in the material room as 0.000100.
So lets say I change the bump in the material room to .0001800 and like that better. To alter the script so the next time I run it to effect many material zones, I have to break out my calculator to get the number to edit my script with.
Surprised I couldn't find a thread with a reference to a script laying around to do the conversion for me.
Anybody know where one is? If not. (it's beyond my feeble mind) who is is going to create it? :woot:
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"