PDA

View Full Version : setAttr on image plane


marioshungry
02-01-2011, 05:48 PM
Hello,

I want to list any of the image planes in a scene and turn off the Display Mode...any help?

Thank you.

this is what I have so farů

select `ls -type imagePlane`;

Thank you

pixelranger
02-01-2011, 06:10 PM
string $cameras[] = `ls -typ "camera"`;

for ( $i=0; $i<size($cameras); $i++){
string $camIP[] = `listConnections -d 1 ($cameras[$i] + ".imagePlane")`;
if (`size($camIP)`>0){
setAttr ($camIP[0] + ".displayMode") 0;
setAttr ($camIP[0] + ".type") 1;
print ("Disabled display of " + $camIP[0] + ".\n");
}
}

marioshungry
02-01-2011, 08:40 PM
Perfecto. Thank you.

EJ
02-01-2011, 09:21 PM
"ls" also takes a type "imagePlane"

cmds.ls(et='imagePlane')

marioshungry
02-03-2011, 06:21 PM
Thanks. I have someone who replied with this one that works as well.


$state = 0;
$imagePlanes = `ls -type imagePlane`;
for($plane in $imagePlanes){
setAttr ($plane+".displayMode") $state;
}

pixelranger
02-05-2011, 11:41 AM
Is this for rendering, or for while working in Maya?

CGTalk Moderation
02-05-2011, 11:41 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.