file [-anyModified] [-buildLoadSettings] [-channels boolean] [-cleanReference string] [-command string] [-constraints boolean] [-constructionHistory boolean] [-copyNumberList] [-defaultExtensions boolean] [-defaultNamespace] [-deferReference boolean] [-editCommand string] [-errorStatus] [-executeScriptNodes boolean] [-exists] [-expandName] [-exportAll] [-exportAnim] [-exportAnimFromReference] [-exportAsReference] [-exportSelected] [-exportSelectedAnim] [-exportSelectedAnimFromReference] [-expressions boolean] [-flushReference string] [-force] [-groupLocator] [-groupName string] [-groupReference] [-ignoreVersion] [-import] [-importReference] [-lastFileOption] [-lastTempFile] [-list] [-loadAllDeferred boolean] [-loadAllReferences] [-loadNoReferences] [-loadReference string] [-loadReferenceDepth string] [-loadSettings string] [-location] [-lockContainerUnpublished boolean] [-lockFile boolean] [-lockReference] [-modified boolean] [-namespace string] [-newFile] [-open] [-options string] [-parentNamespace] [-postSaveScript string] [-preSaveScript string] [-preserveReferences] [-prompt boolean] [-reference] [-referenceDepthInfo uint] [-referenceNode string] [-removeReference] [-rename string] [-renameAll boolean] [-renameToSave boolean] [-renamingPrefix string] [-renamingPrefixList] [-returnNewNodes] [-save] [-saveDiskCache string] [-saveReference] [-saveTextures string] [-sceneName] [-selectAll] [-shader boolean] [-sharedNodes string] [-sharedReferenceFile] [-shortName] [-strict boolean] [-swapNamespace string string] [-type string] [-uiConfiguration boolean] [-unloadReference string] [-unresolvedName] [-usingNamespaces] [-withoutCopyNumber] [-writable]
string
file は「元に戻す」が可能、「照会」が可能、「編集」が可能です。
ファイルのオープン、インポート、エクスポート、参照、保存、名前の変更を行う このコマンドには、実行するアクションを指定するメイン フラグが 1 つ必要です。 一部のメイン フラグには、そのアクションを修正するオプションの 2 次フラグが続くものもあります。cr | ea | ean | ear | eas | er | esa | es |
esn | ex | fr | i | ir | l | lr | |
loc | ltf | mf | new | o | op | ot | pmt |
r | rdi | rn | rr | rts | s | sa | sdx |
st | stx | typ | uc | ur | w |
f | lad | lad | lnr | rnn |
ch | chn | con | exp | sh |
dns | dr | gr | gl | gn | ns | rfn | rpr | sns | srf | shd | rnn |
dns | dr | gr | gn | pr | ra | rdn | rnn | rpr | sns |
f |
ns | rpr |
f | pr |
f |
f | rfn |
amf | ch | chn | con | dr | err | ex | exn |
exp | l | loc | ltf | mf | ns | op | ot |
pmt | pns | r | rfn | rpl | rpr | rts | sdc |
sh | sn | stx | typ | uc | w |
rfn |
un | shn | wcn |
string | 大部分のアクションでは、指定したファイルの名前です。 |
戻り値の型は照会モードでは照会フラグが基になります。
ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
---|---|---|---|---|
-anyModified(-amf)
|
|
|||
|
||||
-buildLoadSettings(-bls)
|
|
|||
|
||||
-command(-c)
|
string
|
|||
|
||||
-constructionHistory(-ch)
|
boolean
|
|||
|
||||
-channels(-chn)
|
boolean
|
|||
|
||||
-copyNumberList(-cnl)
|
|
|||
|
||||
-constraints(-con)
|
boolean
|
|||
|
||||
-cleanReference(-cr)
|
string
|
|||
|
||||
-editCommand(-ec)
|
string
|
|||
|
||||
-defaultExtensions(-de)
|
boolean
|
|||
|
||||
-defaultNamespace(-dns)
|
|
|||
|
||||
-errorStatus(-err)
|
|
|||
|
||||
-deferReference(-dr)
|
boolean
|
|||
|
||||
-exportAll(-ea)
|
|
|||
|
||||
-exportAnim(-ean)
|
|
|||
|
||||
-exportSelectedAnim(-eas)
|
|
|||
|
||||
-exportAnimFromReference(-ear)
|
|
|||
|
||||
-exportAsReference(-er)
|
|
|||
|
||||
-exportSelected(-es)
|
|
|||
|
||||
-exportSelectedAnimFromReference(-esa)
|
|
|||
|
||||
-executeScriptNodes(-esn)
|
boolean
|
|||
|
||||
-exists(-ex)
|
|
|||
|
||||
-expandName(-exn)
|
|
|||
|
||||
-expressions(-exp)
|
boolean
|
|||
|
||||
-force(-f)
|
|
|||
|
||||
-flushReference(-fr)
|
string
|
|||
|
||||
-groupLocator(-gl)
|
|
|||
|
||||
-groupName(-gn)
|
string
|
|||
|
||||
-groupReference(-gr)
|
|
|||
|
||||
-ignoreVersion(-iv)
|
|
|||
|
||||
-lockReference(-lck)
|
|
|||
|
||||
-lockFile(-lf)
|
boolean
|
|||
|
||||
-lockContainerUnpublished(-lcu)
|
boolean
|
|||
|
||||
-import(-i)
|
|
|||
|
||||
-importReference(-ir)
|
|
|||
|
||||
-list(-l)
|
|
|||
|
||||
-loadReferenceDepth(-lrd)
|
string
|
|||
|
||||
-loadAllDeferred(-lad)
|
boolean
|
|||
|
||||
-loadAllReferences(-lar)
|
|
|||
|
||||
-loadNoReferences(-lnr)
|
|
|||
|
||||
-location(-loc)
|
|
|||
|
||||
-loadReference(-lr)
|
string
|
|||
|
||||
-loadSettings(-ls)
|
string
|
|||
|
||||
-lastTempFile(-ltf)
|
|
|||
|
||||
-modified(-mf)
|
boolean
|
|||
|
||||
-newFile(-new)
|
|
|||
|
||||
-namespace(-ns)
|
string
|
|||
|
||||
-open(-o)
|
|
|||
|
||||
-options(-op)
|
string
|
|||
|
||||
-lastFileOption(-lfo)
|
|
|||
|
||||
-prompt(-pmt)
|
boolean
|
|||
|
||||
-parentNamespace(-pns)
|
|
|||
|
||||
-preserveReferences(-pr)
|
|
|||
|
||||
-preSaveScript(-prs)
|
string
|
|||
|
||||
-postSaveScript(-pos)
|
string
|
|||
|
||||
-reference(-r)
|
|
|||
|
||||
-renameAll(-ra)
|
boolean
|
|||
|
||||
-referenceDepthInfo(-rdi)
|
uint
|
|||
|
||||
-referenceNode(-rfn)
|
string
|
|||
|
||||
-rename(-rn)
|
string
|
|||
|
||||
-returnNewNodes(-rnn)
|
|
|||
|
||||
-renamingPrefixList(-rpl)
|
|
|||
|
||||
-renamingPrefix(-rpr)
|
string
|
|||
|
||||
-removeReference(-rr)
|
|
|||
|
||||
-renameToSave(-rts)
|
boolean
|
|||
|
||||
-save(-s)
|
|
|||
|
||||
-saveReference(-sr)
|
|
|||
|
||||
-selectAll(-sa)
|
|
|||
|
||||
-saveDiskCache(-sdc)
|
string
|
|||
|
||||
-shader(-sh)
|
boolean
|
|||
|
||||
-sharedNodes(-shd)
|
string
|
|||
|
||||
-shortName(-shn)
|
|
|||
|
||||
-sceneName(-sn)
|
|
|||
|
||||
-swapNamespace(-sns)
|
string string
|
|||
|
||||
-sharedReferenceFile(-srf)
|
|
|||
|
||||
-strict(-str)
|
boolean
|
|||
|
||||
-saveTextures(-stx)
|
string
|
|||
|
||||
-type(-typ)
|
string
|
|||
|
||||
-uiConfiguration(-uc)
|
boolean
|
|||
|
||||
-usingNamespaces(-uns)
|
|
|||
|
||||
-unresolvedName(-un)
|
|
|||
|
||||
-unloadReference(-ur)
|
string
|
|||
|
||||
-writable(-w)
|
|
|||
|
||||
-withoutCopyNumber(-wcn)
|
|
|||
|
: コマンドの作成モードで使用可能なフラグ | : コマンドの編集モードで使用可能なフラグ |
: コマンドの照会モードで使用可能なフラグ | : 1 つのコマンドで複数回使用可能なフラグ |
// save the current scene to an ascii file named "fred.ma" // file -rename "fred.ma"; file -save -type "mayaAscii"; // save the current scene to an ascii file without the ".ma" extension // file -rename "tmp"; file -save -de 0 -type "mayaAscii"; // open the file fred.ma, using the default load settings. Any references will // be brought in in the same state they were in when fred.ma was last saved. // file -o "fred.ma"; // reference the file wilma.ma // file -r "C:/mystuff/wilma.mb"; // reference the file barney.mb into a namespace called "rubble". // file -r -type "mayaAscii" -namespace "rubble" "C:/maya/projects/default/scenes/barney.ma"; // change the namespace containing barney.mb. // file -e -namespace "purpleDinosaur" "C:/maya/projects/default/scenes/barney.ma"; // retrieve a string array of all files referenced in the scene // file -q -l; // Result: C:/maya/projects/default/scenes/fred.ma C:/mystuff/wilma.mb C:/maya/projects/default/scenes/barney.ma // Select "betty" and export betty to a separate file called "betty.mb". // Reference the new betty file into this scene, replacing the // previous betty object from this scene with the reference to betty. // file -type "mayaBinary" -namespace "rubble" -er "c:/mystuff/betty.mb"; // Select all the objects associated with file betty.mb // file -sa "c:/mystuff/betty.mb"; // Result: rubble:betty // Remove the reference file betty.mb. All nodes in betty.mb will // be removed from the scene file -rr "c:/mystuff/betty.mb"; // Query whether the file named "foo.mb" exists on disk // file -q -ex "foo.mb"; // Result: 0 // // Query whether the reference node "rubble:betty is deferred loaded. // Note, -rfn flag has to come before -q flag. file -rfn rubble:betty -q -dr; // Query the last temp file during file save // file -q -lastTempFile; ///////////////////////////////////////////////////////////////////////// /// Example for the '-buildLoadSettings' and '-loadSettings' flags /// ///////////////////////////////////////////////////////////////////////// // Build load settings for "ref.ma" file -o -buildLoadSettings "ref.ma" // Edit those settings, to indicate that some reference should // be brought in unloaded. // Note: the following command is primarily intended for internal // use. It may not be easy to determine the numeric ID of a given // reference ("2" in this case) . file -loadSettings -e -deferReference 1 "2" // Use the edited settings when opening the file file -o -loadSettings "implicitLoadSettings" "ref.ma"; ///////////////////////////////////////////////////////////////////////// /// Example for the '-cleanReference' and '-editCommand' flags /// ///////////////////////////////////////////////////////////////////////// // Create a simple reference to a sphere // file -f -new; polySphere; file -rename "ref.ma"; file -f -type "mayaAscii" -save; file -f -new; file -r -ns "ref" "ref.ma"; // Scale the sphere // setAttr ref:pSphere1.s 5 5 5; getAttr ref:pSphere1.s; // Result: 5 5 5 // // The 'cleanReference' and 'editCommand' flags only work on // unloaded references. // file -unloadReference "refRN"; // Query the setAttr edits: // reference -rfn "refRN" -q -editCommand; // Result: setAttr ref:pSphere1.s -type "double3" 5 5 5 setAttr ref:lightLinker1.lnk -s 2 // // Remove all setAttr edits on refRN: // file -cleanReference "refRN" -editCommand "setAttr"; reference -rfn "refRN" -q -editCommand; // Note that nothing is returned file -loadReference "refRN"; getAttr ref:pSphere1.s; // Result: 1 1 1 // // Note that scale has returned to 1 1 1