0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

結合されていないメッシュの頂点座標を左右対称にする

Posted at

結合されているメッシュは、メッシュの編集→シンメトリや反転で左右入れ替えできるが
結合されていないメッシュは、メッシュの編集→シンメトリや反転が使えないので
以下のようなMELを作った。他にも何か標準機能でのやり方があるかもしれないけど…。

右と左のオブジェクトを選択して実行

global proc vertexL_to_vertexR()
{
   string $sl[] = `ls -sl`;
    string $ver1[] = `polyListComponentConversion -toVertex $sl[0]`;
    string $ver1E[] = `filterExpand -selectionMask 31 $ver1`;
    
    string $ver2[] = `polyListComponentConversion -toVertex $sl[1]`;
    string $ver2E[] = `filterExpand -selectionMask 31 $ver2`;
    //print($ver2E);
    
    int $i = 0;
    for($obj in $ver1E)
    {
        float $pos[] = `xform -q -ws -t $obj`;
        xform -ws -t (-1*$pos[0]) $pos[1] $pos[2] $ver2E[$i];
        $i++;
    } 
}
vertexL_to_vertexR();
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?