ParentShapes It.txt

/*
ParentShapes
粘贴要被parent的物体
*/
string $promptDialogWnd = ` promptDialog -b "Go" -m "Parent It"`;//-b -button
string $sel[] = ` ls -sl `;//ls list -sl -seletion
for( $shapes in $sel ){
    string $lsRelatives[] = ` listRelatives -s $shapes `;//-s -shapes
    string $txtObj = ` promptDialog -q -t `; //-q -query -t -text
    parent $shapes $txtObj ;
    FreezeTransformations;
    parent -shape -add $lsRelatives $txtObj ;
    select $shapes;doDelete;
}




posted @ 2012-06-05 08:18  XE2011  阅读(96)  评论(0编辑  收藏  举报