rBrady
04-10-2008, 04:13 PM
I am working on a tool that will allow you to set a renderable frame range for any camera in a scene. So far I have a UI that adds a script to a camera along with 10 in and out points that are stored as attributes on the camera. It works fine when I scrub the time line. The camera becomes active and inactive at the correct times. But when I render I get the following error.
Warning: (Mayatomr.Scene) : no render camera found, final scene will be incomplete and can't be rendered
Error: No object matches name: .i0
Error: An execution error occured in the expression render_cameraShape1.
This is the expression that gets written to the camera.
int $step = 0;
int $in = 0;
int $out = 0;
setAttr cameraShape1.renderable 0;
while ( $step < 10 )
{
$in = `getAttr cameraShape1(".i" + $step)`;
$out = `getAttr cameraShape1(".o" + $step)`;
if ( frame > $in && frame < $out)
{
setAttr cameraShape1.renderable 1;
}
$step = $step + 1;
Any help would be appreciated.
Warning: (Mayatomr.Scene) : no render camera found, final scene will be incomplete and can't be rendered
Error: No object matches name: .i0
Error: An execution error occured in the expression render_cameraShape1.
This is the expression that gets written to the camera.
int $step = 0;
int $in = 0;
int $out = 0;
setAttr cameraShape1.renderable 0;
while ( $step < 10 )
{
$in = `getAttr cameraShape1(".i" + $step)`;
$out = `getAttr cameraShape1(".o" + $step)`;
if ( frame > $in && frame < $out)
{
setAttr cameraShape1.renderable 1;
}
$step = $step + 1;
Any help would be appreciated.
