I’ve been struggling a lot with trying to get the name from a ramp.. What need the scrript to do is get the ramp name, and change a few attributes… I would like to have this dynamically in case I have more than one particle group..
//I would like to get the ramp name to change the color to a particular ramp.
current Ramp = I think the arrayMapper could give that name (arrayMapper); I just don't know how to get it..
removeMultiInstance -break true XXXX.colorEntryList;
setAttr "XXXX.colorEntryList.color" -type double3 1 1 1 ;
setAttr "XXXX.colorEntryList.color" -type double3 0 0 0 ;
With out knowing too much about your scene you try either:
Create a brand new ramp to hook up:
string $newRamp = `shadingNode -asTexture ramp`;
if you already have ramps in your scene that you want to connect up.
string $allRamps = `ls -type “ramp"`; // -n “” // to give it a name
for ($x in $allRamps)
if (`gmatch $x “name to look for"`) // hopfully you have named your ramps with something to do with your partical system.
$theRampImLookingFor = $x;