18
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MayaのFBXExportコマンド

Last updated at Posted at 2016-01-08

#これはなに?
Autodesk MayaのFBX書き出し用コマンドFBXExportについてのメモです

#MEL
公式のユーザーガイドだとこんなのがでてきます。

FBXExport -f [filename] [-s];

-s をつけると、選択オブジェクトを書き出し、です。
つけなかったらシーン全体。

#Python
Pythonだとこういう書き方になります

mc.FBXExport(['-f','/path/to/export/dir/scene.fbx','-s'])

もうちょっと…なんかこう…

##helpしてみる

FBXExport-help
import maya.cmds as mc
help(mc.FBXExport)

Help on function FBXExport in module maya.cmds:

FBXExport(*args, **keywords)

そっかぁ

##PyMEL
PyMELからだとこう

import pymel.core as pm
help(pm.FBXExport)
Help on function FBXExport in module pymel.internal.pmcmds:

FBXExport(*args, **kwargs)
    Derived from mel command `maya.cmds.FBXExport`

pymel.internal.pmcmdsに書かれた関数とな。
https://github.com/LumaPictures/pymel/blob/master/pymel/internal/pmcmds.py

##代替
上記の書き方よりも
fileコマンド使おうぜとかmel.eval使おうぜとか
そっちの方がよく見つかります。
これとか。

FBX Exporting, Batching files and Maya Python
http://tech-artists.org/forum/showthread.php?5058-FBX-Exporting-Batching-files-and-Maya-Python

#まとめ
洗練されたhelpと引数の渡し方を堪能しました。

#備考
fbxmayaっていうプラグイン内に用意されています。
fbxmaya.png

FBX関連コマンドはかなりいっぱいあります

maya.cmds.__dict__
for i in mc.__dict__.keys():
    if 'FBX' in i:
        print i

FBXLoadExportPresetFile
FBXResetImport
FBXLoadMBImportPresetFile
FBXImportHardEdges
FBXExportReferencedAssetsContent
FBXPushSettings
FBXExportBakeComplexEnd
FBXProperties
FBXExportScaleFactor
FBXImportQuaternion
FBXExportBakeComplexStep
FBXImport
FBXImportProtectDrivenKeys
FBXExportColladaFrameRate
FBXExportQuickSelectSetAsCache
FBXGetTakeComment
FBXExportAxisConversionMethod
FBXLoadImportPresetFile
FBXImportSkeletonDefinitionsAs
FBXGetTakeIndex
FBXExportSmoothMesh
FBXResamplingRate
FBXRead
FBXImportAutoAxisEnable
FBXImportUpAxis
FBXImportOCMerge
FBXExportUseSceneName
FBXExportLights
FBXProperty
FBXLoadMBExportPresetFile
FBXGetTakeName
FBXExportColladaTriangulate
FBXImportConvertUnitString
FBXImportSkins
FBXImportForcedFileAxis
FBXExportShowUI
FBXExportSmoothingGroups
FBXExportSplitAnimationIntoTakes
FBXExportInstances
FBXResetExport
FBXExportCameras
FBXImportConstraints
FBXImportSetLockedAttribute
FBXExportTriangulate
FBXExportBakeResampleAnimation
FBXGetTakeCount
FBXExportConvert2Tif
FBXExportSkins
FBXExportReferencedContainersContent
FBXExportConvertUnitString
FBXExportApplyConstantKeyReducer
FBXImportShapes
FBXExportUpAxis
FBXExportQuaternion
FBXExportBakeComplexAnimation
FBXExportAnimationOnly
FBXExportUseTmpFilePeripheral
FBXExportEmbeddedTextures
FBXImportLights
FBXImportAxisConversionEnable
FBXImportGenerateLog
FBXExportInAscii
FBXExportColladaSingleMatrix
FBXExportShapes
FBXClose
FBXExportTangents
FBXExportBakeComplexStart
FBXUICallBack
FBXUIShowOptions
FBXImportMergeBackNullPivots
FBXImportUnlockNormals
FBXImportSetMayaFrameRate
FBXPopSettings
FBXImportCameras
FBXExportHardEdges
FBXExportSkeletonDefinitions
FBXExportGenerateLog
FBXExportConstraints
FBXExportFinestSubdivLevel
FBXExportFileVersion
FBXImportFillTimeline
FBXImportMergeAnimationLayers
FBXImportResamplingRateSource
FBXImportConvertDeformingNullsToJoint
FBXExportInputConnections
FBXImportCacheFile
FBXImportScaleFactor
FBXExportCacheFile
FBXImportMode
FBXGetTakeReferenceTimeSpan
FBXExportDeleteOriginalTakeOnSplitAnimation
FBXImportShowUI
FBXGetTakeLocalTimeSpan
FBXExport

##参考?

How does Maya populate its maya.cmds package?
http://www.akeric.com/blog/?p=828

###FBX Wrapper (Gist)
Gistにラッパー書いてる人がいましたよ
https://gist.github.com/theodox/2b83b1c47a18448d3cbf

18
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?