View Full Version : add control point(s) to colorEntryList

03 March 2011, 03:20 AM
I need to know if there is a way to add a control point to an existing colorEntryList. I'm assuming that's what needs to be done in order to get the "Error: line 2: setAttr: No object matches name: ramp.colorEntryList[0].position //" to go away.

I need to add a few colors at certain positions on the ramp in order to make an eyeball. So far I've got it making a sphere and successfully ataching the shader to it, just can't figure out adding the other colors.


03 March 2011, 11:28 AM
I don't understand problem here.
Try something like this.

setAttr ramp1.colorEntryList[0].color -type "double3" 0 0 0;
setAttr ramp1.colorEntryList[0].position 0;

setAttr ramp1.colorEntryList[1].color -type "double3" 1 1 1;
setAttr ramp1.colorEntryList[1].position 0.5;

setAttr ramp1.colorEntryList[2].color -type "double3" 0 0 0;
setAttr ramp1.colorEntryList[2].position 1;

Where ramp1 is name of your ramp.

03 March 2011, 04:18 PM
Okay I figured it out.
didnt name the attributes correctly/

CGTalk Moderation
03 March 2011, 04:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.