PDA

View Full Version : Store name of Ramp frm RadiusPP


RaGzMaN
03-31-2006, 07:09 PM
wassup!

How can I, within my script, find out the name of the ramp that is created when i choose to make a ramp to an added radiusPP atttribute.

Presently i have this which is storing the name of the arraymapper but not the name of the Ramp.


string $arrayMapper1 = "arrayMapper -target $partShapeNode[0] -destAttr radiusPP -inputV ageNormalized -type ramp";
$results = `eval($arrayMapper1)`;

If i run:


listHistory -pdo 1 $results;



I get the name of the arrayMapper and the ramp but im looking to just store the ramp name.

Another method might be to store that return value inside a string array and then access the [1] element. Wondering if there is a better method?

cheers

JFFORTIN
03-31-2006, 07:58 PM
i don t have maya here but u could create a string who create a ramp.
and use that string in ur radiusPp and in the same time easy to find it.

RaGzMaN
03-31-2006, 08:20 PM
ive basically implemented my mentioned method of getting the name from the array [1] element like this:

//Add Array Mapper to Radius PP
string $arrayMapperString = "arrayMapper -target $partShapeNode[0] -destAttr radiusPP -inputV ageNormalized -type ramp"; //String holding command to make arrayMapper
$evalArrayResults = `eval($arrayMapperString)`; //Execute script to create Arraymapper + store the name.
string $evalHistoryArray[] = `listHistory -pdo 1 $evalArrayResults`; //Look through the history of the Array mapper and get the name of it and the Ramp its connected to.
string $arrayRampName = $evalHistoryArray[1]; //Extract the Name of the Ramp
so $arrayRampName is holding the name of the ramp.

This works, but seems like a long way round if there is a better solution.

cheers.

CGTalk Moderation
03-31-2006, 08:20 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.