Hello guys
Please take a look at this and guide me.
We have a FinalModel that is referenced in a scene for rig. In the rig scene, meshes get skin and rigging stuffs.
after that i want to save the scene using code (Here using Pyblish’s Plugin) that use this code:
cmds.file(path,
force=True,
typ="mayaAscii",
exportSelected=True,
preserveReferences=True,
shader=True,
expressions=False,
constructionHistory=True)
The code will save the selected group in a new file and their connections in a new .ma file fine, but when we open the scene meshes does not show their shaders and just show us wireframe, while, meshes have materials connected to ShadingGroup.
This event happen when i export selection manually with maya menu.
make sense?
thanks
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/87371f12-d4e8-4e4f-9ea0-46e7cc28814e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAGhqNn%3DguYo8n7Zi%2BjFvhohNHFYqgf-%3D8ecH0krQWcC%3DryHEjg%40mail.gmail.com.
Hey again
i test this snippet but this does not work:
from maya import cmds
dir_path = 'C:/test/test.ma'
cmds.file(rename=dir_path)
cmds.file(s=True, f=True, typ="mayaAscii")
and gave this error:# Error: RuntimeError: file <maya console> line 3: An invalid path was specified. #
any idea?!
I think using exportAll will solve the problem
cmds.file(path,
force=True,
typ="mayaAscii",
exportAll=True,
preserveReferences=True,
shader=True,
expressions=False,
constructionHistory=True)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPamJi_YPKxA1vXX0P5kXrtY6ERTXidCJcULKJQvj8vNo_273Q%40mail.gmail.com.