i can add new band with
elements[0].color = [0.0, 0.0, 0.32, 1.0] # Blue Dark
but when the index goes => 2
i get an error on index
how can it go higher then 2 ?
thanks
i can add new band with
elements[0].color = [0.0, 0.0, 0.32, 1.0] # Blue Dark
but when the index goes => 2
i get an error on index
how can it go higher then 2 ?
thanks
any one can help with this problem ?
or is a bug or not impemented ?
thanks
Maybe you need to add a new element? Perhaps the default object creation gives you three? Once you exceed that you need to create a new? Just guessing…
http://www.blender.org/documentation/blender_python_api_2_68_release/bpy.types.ColorRampElements.html?highlight=elements#bpy.types.ColorRampElements.new
a color ramp got 2 elements by default from what i can see, you need to add more elements if needed.
The .new() method takes a position and returns a color ramp element. Set its .color attribute to a Color4 or sequence of length 4. You can also changethe .position attribute later on.
in the example i saw it did not show how to add new elements
have to see how to add new elements and work with these
usualy when you add a new ramp it comes with 2 bands by default
tested it and now it works fine
thanks