移動先: 概要 戻り値 フラグ Python の例

概要

hilite( [objects] , [replace=boolean], [toggle=boolean], [unHilite=boolean])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

hilite は「元に戻す」が可能、「照会」が不可能「編集」が不可能です。

指定したオブジェクトのハイライトを設定または設定解除します。オブジェクトのハイライトを設定すると、オブジェクトのコンポーネントを選択できるようになります。オブジェクトが指定されていない場合、セレクション リストが使われます。

戻り値

なし

フラグ

replace, toggle, unHilite
ロング ネーム(ショート ネーム) 引数型 プロパティ
unHilite(u) boolean create
ハイライト リストから指定したオブジェクトを削除します。
replace(r) boolean create
指定したオブジェクトにハイライトを設定します。前にハイライトされていたオブジェクトは、ハイライトされなくなります。
toggle(tgl) boolean create
指定したオブジェクトのハイライトの状態を切り替えます。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python の例

import maya.cmds as cmds

#    Create a few objects.
#
sphere = cmds.sphere()
cmds.move( 0, 0, 3, relative=True )
cone = cmds.cone()
cmds.move( 0, 0, -3, relative=True )
cylinder = cmds.cylinder()

#    Select the sphere.
#
cmds.select( sphere, replace=True )

#    Add the cone and cylinder to the hilite list.
#
cmds.hilite( cone[0], cylinder[0] )

#    Toggle the hilite state of the cylinder.
#
cmds.hilite( cylinder[0], toggle=True )

#    Replace the hilite list with the current selected objects.
#
cmds.hilite( replace=True )