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
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
I got this to work after reading this post