Forum: Poser Python Scripting


Subject: Dumb question of the day list unpacking

grichter opened this issue on Feb 03, 2011 ยท 5 posts


grichter posted Thu, 03 February 2011 at 12:57 AM

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"