ジャンプ先: 概要. 戻り値. フラグ. Python 例.
sound(
[objects]
, [endTime=time], [file=string], [length=boolean], [mute=boolean], [name=string], [offset=time], [sourceEnd=time], [sourceStart=time])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
sound は、取り消し可能、照会可能、および編集可能です。
サウンド スクラブおよび再生中のサウンドをサポートする soundControl や timeControl などの UI コマンドで使用できるオーディオ ノードを作成します。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
endTime, file, length, mute, name, offset, sourceEnd, sourceStart
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# Create an audio node for a sound file, and have it
# start at time 10. This command will return the name
# of the created node, something like "audio1".
#
cmds.sound( offset=10, file='ohNo.aiff' )
# In order to have this sound displayed in a
# timeControl widget (like the timeSlider) use a
# command like this one, where the global MEL variable
# $gPlayBackSlider is the name of the widget to display
# the sound in.
#
import maya.mel
gPlayBackSlider = maya.mel.eval( '$tmpVar=$gPlayBackSlider' )
cmds.timeControl( gPlayBackSlider, edit=True, sound='audio1' )