Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Found my problem using what I assumed would work. Based on conditions I import various other scripts and had a typo, that for the life of me I couldn't see. So the original problem is mute. But you examples make things even easier when I want to pick one out of the list or tuple.
Thanks a million
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.
Semi rookie
But
InColorValue = [0.607843, 0.686275, 0.811765]
and print InColorValue returns
0.607843
0.686275
0.811765
to unpack the list I have tried several methods I have found on the net which lead me to believe this should work.
r1, g1, b1 = InColorValue
But based on all the various ways I have found on the net about unpacking tupols or lists I keep getting the following TypeError: unpack non-sequence
So I am doing something very basic wrong. What is it?
I want to feed the values into a material node using a .SetColor(r1,g1,b1)
Thanks in advance for any tips or suggestions
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"