This is my code :-
for i in range(53):
planet = objekt[i]
col = colour[i]
col = 'vector'+col[1:3]+','+col[3:4]+','+col[4:6]
print planet, col
planet = sphere(pos=vector(xcoord[i]*KM, ycoord[i]*KM, zcoord[i]*KM), radius=radii[i], color=col)
objekt is an array filled with planet names, colour is an array filled with color attributes e.g. (1,0,0) which is RED
I put the print statement in to see if the correct instruction is being set for color=, but I get the following :-
>>>
Sun vector(1,1,0)
Traceback (most recent call last):
File "C:\Python27\Planet Orbits\SolarSystem-MajorandMinorPlanets(b).py", line 66
planet = sphere(pos=vector(xcoord[i]*KM, ycoord[i]*KM, zcoord[i]*KM), radius=radii[i], color=col)
File "C:\Python27\Lib\site-packages\visual_common\primitives.py", line 93, in __init__
self.process_init_args_from_keyword_dictionary( keywords )
File "C:\Python27\Lib\site-packages\visual_common\primitives.py", line 192, in process_init_args_from_keyword_dictionary
self.color = keywords['color']
ArgumentError: Python argument types in
None.None(sphere, str)
did not match C++ signature:
None(class cvisual::primitive {lvalue}, class cvisual::rgb)
>>>
Any ideas ? can this be done ? the other attributes work just fine.
Cheers,
Pete