ジャンプ先: 概要. 戻り値. フラグ. Python 例.

概要

defaultNavigation([connectToExisting=boolean], [createNew=boolean], [defaultAttribute=boolean], [defaultTraversal=boolean], [defaultWorkingNode=boolean], [delete=boolean], [destination=name], [disconnect=boolean], [force=boolean], [ignore=boolean], [navigatorDecisionString=string], [quiet=boolean], [relatedNodes=boolean], [source=name], [unignore=boolean])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

defaultNavigation は、取り消し可能、照会不可能、および編集不可能です。

defaultNavigation コマンドは、ノード間の接続を作成または操作するとき、あるいはこの接続を介してノード間を移動するときの、既定の動作を定義します。このコマンドは、主にアトリビュート エディタ(Attribute Editor)で使用されます。

戻り値

stringまたは、文字配列

フラグ

connectToExisting, createNew, defaultAttribute, defaultTraversal, defaultWorkingNode, delete, destination, disconnect, force, ignore, navigatorDecisionString, quiet, relatedNodes, source, unignore
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
connectToExisting(ce) boolean create
接続先のアトリビュート(node.attribute または単なるノード)を既存の接続元に接続します。接続元が指定されていれば(node.attribute またはノードとして)、このコマンドは即座に処理されます。接続元が指定されていない場合、指定するよう求められます。接続元が指定したら、接続してユーザが何を行いたいかについて、接続元のタイプと接続先のタイプに基づいて、最適な推測が行われます。このコマンドは、ノードやアトリビュートを最適な推測に基づいて接続します。対象は destination フラグ、ソースは source フラグを使用して指定します。
createNew(cn) boolean create
新しいノードを作成し、destination フラグを使用して指定した node.attribute に接続ます。
defaultAttribute(da) boolean create
接続元(アトリビュート)と接続先(ノード)フラグを指定し、connectNodeToNode を接続するアトリビュート名を返します。文字列を返します。
defaultTraversal(dtv) boolean create
指定した接続先の node.attribute からの移動に最も重要なノード名を返します。対象は、destination フラグを使用して指定します。文字列を返します。
defaultWorkingNode(dwn) boolean create
接続先ノードのアトリビュートに関連があれば、ユーザが最も必要とするノード名を返します。対象は、destination フラグを使用して指定します。文字列を返します。
delete(delete) boolean create
destination フラグで指定した node.attribute に流れ込む接続を持つノードを削除します。
destination(d) name create
createNew または connectToExisting の既存の対象アトリビュートを指定します。
disconnect(dis) boolean create
使用した場合、接続先が切断されます(存在する場合)。
force(f) boolean create
true に設定されていれば、すでに接続元がある接続先アトリビュートに接続元アトリビュートを接続しようと試みられるため、既存の接続元の接続が解除され、新しい接続元が接続されます。既定は true です。
ignore(i) boolean create
destination フラグで指定した node.attribute に流れ込む接続を無視します。
navigatorDecisionString(nds) string create
ここで、実行する動作を決定するために役立つ文字列をナビゲータに渡します。
quiet(qt) boolean create
true に設定されていれば、どんな場合でも詳細は表示されません。既定は false です。
relatedNodes(ren) boolean create
コンセプトにおいて接続先で指定した node.attribute に関連するノードをリストします。関連するノードに直接または間接的に送信先に接続されたノードが含まれる場合もあります。対象は、destination フラグを使用して指定します。文字配列を返します。
source(s) name create
connectToExisting の既存のソース アトリビュートを指定します。
unignore(u) boolean create
destination フラグで指定した node.attribute に流れ込む接続を無視しないようにします。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

# Create a poly plane
cmds.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')

# This will open the Create Render Node window from which you can select a node that you want to connect to the existing lambert1.color attribute
cmds.defaultNavigation(createNew=True, destination='lambert1.color')

# Select the Checker Node, you will find "checker1.outColor" is connected to "lambert1.color"

# Break the connection between "checker1.outColor" and "lambert1.color" you have just established
cmds.disconnectAttr('checker1.outColor', 'lambert1.color')

# Connect "checker1" to "lambert1". Only node is specified here, but the command will make a best guess.
# So "checker1.outColor" and "lambert1.color" are connected
cmds.defaultNavigation(connectToExisting=True, source='checker1', destination='lambert1')