From: Aaron M. <ajm...@al...> - 2009-09-22 16:41:43
|
Hello All, Try this little big of code: from visual import * a=helix() print a.color I notice that the color for each segment is returned as a numpy array. This is actually quite fun, since you can individually set the color along the helix, but leads to problems matching colors between objects, for instance: a=helix() b=sphere() b.color=a.color This gives the error: Traceback (most recent call last): File "<pyshell#17>", line 1, in <module> b.color=a.color ArgumentError: Python argument types in None.None(sphere, numpy.ndarray) did not match C++ signature: None(class cvisual::primitive {lvalue}, class cvisual::rgb) So, I would propose that somehow we preserve the ability to access the color array, say through an attribute "helix.colorarray" or something, but that a single color gets returned with the helix.color attribute. Aaron ------------------------------------------------------ Aaron J. Miller, Ph.D. Department of Physics 328 Palenske Hall Albion College, Albion, MI 49224 |