saveShelf(
string string
)
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
saveShelf は 「元に戻す」が可能、「照会」が不可能、「編集」が不可能 です。
このコマンドは指定されたシェルフ(1 番目の引数)を指定されたファイル(2 番目の引数)に保存します。boolean | 成功の場合は true です。 |
import maya.cmds as cmds # Create a window with a shelf in it. # window = cmds.window() tabs = cmds.tabLayout() shelf = cmds.shelfLayout() cmds.shelfButton( '\"Hello\\n\"")', image1='commandButton.xpm', command='("print' ) cmds.tabLayout( tabs, edit=True, tabLabel=(str(shelf),'Example Shelf') ) cmds.showWindow( window ) # At this point the example would be made more interesting if you # put some additional items on this shelf. # Now save the shelf in the temp directory. # tempDir = cmds.internalVar( userTmpDir=True ) cmds.saveShelf( shelf, (tempDir + 'ExampleShelf') );