PDA

View Full Version : how to change ramp control point's focus ?


mossin
01-12-2011, 09:34 AM
I m trying to change focus of ramp node's control points using MEL, but it doesnt allow me to do that
MEL allows to change "selecedColor" and "selectedPosition" but it doesnt change "ramp's control point". is there any trick so that i can change focus of control point?

pixelranger
01-12-2011, 09:48 AM
you can modify the colorEntryList items by index:
setAttr ($ramp + ".colorEntryList[0].color") -type double3 0 0 0 ;

Maybe you can tell from this example (http://andrehitsoy.tumblr.com/post/1481716178/03-adding-fresnel-reflection-ramp-to-shaders).

mossin
01-12-2011, 10:12 AM
pixelranger

"you can modify the colorEntryList items by index:

Code:
setAttr ($ramp + ".colorEntryList[0].color") -type double3 0 0 0 ;"

thanks for quick reply

My problem is i want to select "control point" (circular icons) on ramp under attribute editor.
it is possible to select "selected Color " and "selected position" slider under attribute editor, but
i m not getting how to select control point.

NaughtyNathan
01-12-2011, 11:18 AM
the rampColorPort command's -selectedPositionControl flag may be what you're after, you'll just have to find out the UI control name of the ramp port you want to affect... although I'm not sure why you would want to select these via a script?

:nathaN

mossin
01-12-2011, 12:31 PM
thanks NaghtyNathan, i will check it

mossin
01-13-2011, 06:34 AM
hi all,
correct me if i m wrong.
i think changing focus of ramp's control point is impossible, because ramp is derived from "gradientControl" command & it doesnt contain any flag "-currentKeyColorValue", "-currentKey" which is in "gradientControlNoAttr".
any reply will be appreciated

CGTalk Moderation
01-13-2011, 06:34 AM
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.