Help us understand the problem. What is going on with this article?

MayaのFBXExportコマンド

More than 3 years have passed since last update.

これはなに?

Autodesk MayaのFBX書き出し用コマンドFBXExportについてのメモです

MEL

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

http://download.autodesk.com/global/docs/maya2013/ja_jp/files/GUID-C3BC4E4B-44DA-47D5-9E6F-265E80907F47.htm

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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした