ColorAtPointThruNurb

From scripting
Revision as of 05:15, 22 April 2017 by Nickpisca (talk | contribs) (Created page with " global proc vector colorAtPointThruNurb(string $ObjName, float $UVal, float $VVal) { //Author Nick Pisca 0001d 2009 string $TRel[] = `listRelatives $ObjName`; string $TCon...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
global proc vector colorAtPointThruNurb(string $ObjName, float $UVal, float $VVal) {
//Author Nick Pisca 0001d 2009
string $TRel[] = `listRelatives $ObjName`;
string $TCon[] = `listConnections $TRel[0]`;
string $TB[] = `listHistory $TCon[0]`; 
string $TBOutput = $TB[2];
float $CAPArr[2] = `colorAtPoint -o RGB -u $UVal -v $VVal $TBOutput`;
vector $CAPVec = <<$CAPArr[0], $CAPArr[1], $CAPArr[2]>>;
return $CAPVec;
}


More information on navigating shader nodes, read pages 133-134 in YSYT.