0

I am trying to convert an .obj file to fbx with maya's python interpreter in a docker image. I have tried the following 3 commands and none seem to work. In the docker image I mayapy is the python interpreter and I am running my command like:

mayapy maya_pipeline.py arg1

COMMANDS and ERRORS

Mm.eval('FBXExportInAscii -v true')

Error: line 1: Cannot find procedure "FBXExportInAscii".
Traceback (most recent call last):
  File "maya_pipeline.py", line 251, in <module>
    Mm.eval('FBXExportInAscii -v true')
 RuntimeError: Error occurred during execution of MEL script

pymel.core.other.FBXExport("/house")

Traceback (most recent call last):
  File "maya_pipeline.py", line 251, in <module>
    pymel.core.other.FBXExport("/house")
AttributeError: 'module' object has no attribute 'core'

Mm.eval('FBXExport -f "/house"')

Error: line 1: Cannot find procedure "FBXExport".
Traceback (most recent call last):
  File "maya_pipeline.py", line 249, in <module>
    Mm.eval('FBXExport -f "/house"')
RuntimeError: Error occurred during execution of MEL script
line 1: line 1: Cannot find procedure "FBXExport".

Imported libraries

import sys
import os
from maya import standalone, cmds
import maya.cmds
from collections import defaultdict
import maya.mel as Mm
import maya.standalone
maya.standalone.initialize(name='python')
import pymel
luii
  • 319
  • 3
  • 5
  • 16
  • Do you have fbx sdk installed? It is available on autodesk website. In sdk (python not others) are scripts you need. – Zydnar Jul 12 '17 at 17:45
  • maya has that built into it already – luii Jul 12 '17 at 17:46
  • Make sure you have right sdk (there are many fbx versions/standards) Maya module seems to need something more, you haven't imported. – Zydnar Jul 12 '17 at 17:54
  • there are resources you may also need. fbx: http://download.autodesk.com/us/fbx/20112/FBX_SDK_HELP/index.html?url=WS1a9193826455f5ff453265c9125faa23bbb5fe8.htm,topicNumber=d0e8312 and maya: http://help.autodesk.com/view/MAYAUL/2015/ENU/?guid=__py_ref_index_html – Zydnar Jul 12 '17 at 18:05
  • Can you verify that the FBX plugin is installed and loaded? Does it show up if you run `cmds.pluginInfo(q=True, ls=True)` – theodox Jul 13 '17 at 00:04

1 Answers1

1

I got this to work after reading this post

luii
  • 319
  • 3
  • 5
  • 16