Autodesk Maya 中的摄影机图像平面
Camera Image plane in Autodesk Maya
我正在尝试使用 Maya 2011 中的相机烘焙脚本,但出现图像平面错误。现在 Maya 似乎在图像平面上方放置了一个变换节点。我还看到现在有一个 imagePlane
过程。任何人对如何将现有图像平面附加到复制的相机或此变换节点的作用有任何想法?
string $oldCamera[] = `ls -l -sl` ;
string $results[] ;
string $curCam = $oldCamera[ 0 ] ;
string $listRelCam[] = `listRelatives -f -type "camera" $curCam` ;
string $newCamera[] = `duplicate -rr $curCam` ;
string $oldShape[] =`listRelatives -f -s $curCam` ;
string $newShape[] = `listRelatives -f -s $newCamera[ 0 ]` ;
// Attach an image plane
string $oldShape[] =`listRelatives -f -s $curCam` ;
string $newShape[] = `listRelatives -f -s $newCamera[ 0 ]` ;
string $imagePlanes[] = `listConnections -d 1 ( $oldShape[ 0 ] + ".imagePlane" )` ;
int $count = 0 ;
for ( $im in $imagePlanes ) {
connectAttr -f ( $im + ".message" )( $newShape[ 0 ] + ".imagePlane[ " + $count + " ]" ) ;
$count++ ;
}
我也试过这种方法,但没有成功。
int $count = 0 ;
for ( $im in $imagePlanes ) {
$tempName = `imagePlane -q -n $im` ;
connectAttr -f ( $tempName[ 0 ] + ".message" )( $newShape[ 0 ] + ".imagePlane[ " + $count + " ]" ) ;
$count++ ;
}
imagePlane -e -detach imagePlane1;
imagePlane -e -camera camera2;
我正在尝试使用 Maya 2011 中的相机烘焙脚本,但出现图像平面错误。现在 Maya 似乎在图像平面上方放置了一个变换节点。我还看到现在有一个 imagePlane
过程。任何人对如何将现有图像平面附加到复制的相机或此变换节点的作用有任何想法?
string $oldCamera[] = `ls -l -sl` ;
string $results[] ;
string $curCam = $oldCamera[ 0 ] ;
string $listRelCam[] = `listRelatives -f -type "camera" $curCam` ;
string $newCamera[] = `duplicate -rr $curCam` ;
string $oldShape[] =`listRelatives -f -s $curCam` ;
string $newShape[] = `listRelatives -f -s $newCamera[ 0 ]` ;
// Attach an image plane
string $oldShape[] =`listRelatives -f -s $curCam` ;
string $newShape[] = `listRelatives -f -s $newCamera[ 0 ]` ;
string $imagePlanes[] = `listConnections -d 1 ( $oldShape[ 0 ] + ".imagePlane" )` ;
int $count = 0 ;
for ( $im in $imagePlanes ) {
connectAttr -f ( $im + ".message" )( $newShape[ 0 ] + ".imagePlane[ " + $count + " ]" ) ;
$count++ ;
}
我也试过这种方法,但没有成功。
int $count = 0 ;
for ( $im in $imagePlanes ) {
$tempName = `imagePlane -q -n $im` ;
connectAttr -f ( $tempName[ 0 ] + ".message" )( $newShape[ 0 ] + ".imagePlane[ " + $count + " ]" ) ;
$count++ ;
}
imagePlane -e -detach imagePlane1; imagePlane -e -camera camera2;