« How to read mental ray output messages | Main | FBX 2010 for Maya - please read. »

03/06/2009

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Hi owen.
How do you Trigger an event when you change an attribute if the file is referenced.The script will be in the file i will reference.But pCube1.fruity will get a namespace say Ex:pCube1.fruity.
so i store pCube1 into a string variable.

It gives a error cannot find attribute pCube1.fruity because The line int $index = ` scriptJob -attributeChange ($cube+".fruity") is out side the global proc.
It works fine if i dont reference the file.

My script

int $switch = `scriptJob -kws -ac (ctrl+".Mesh") "selection" ` ;

proc selection()
{
string $ctrlT[0] = `ls-sl `;
$namespace = `match ".*:"$ctrlT[0]`;
$ctrl = $ctrlT[0];
select -r $ctrl;
int $a = `getAttr ($ctrl +".Mesh")`;
if($a == 1)
{
print "ok";
;
}
else
{
print "notOk";

}
}

The comments to this entry are closed.

RSS Feed

  • Subscribe

Share

  • Bookmark and Share