SplitMeshWithProjectedCurve fails in Maya Standalone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a plugin that should work with maya standalone.
Unfortunately I just realized that SplitMeshWithProjectedCurve doesn't work in the standalone mode.
If I run the same commands within Maya, instead, it works flawlessly.
Here is a simple example that shows the problem
import maya.standalone maya.standalone.initialize("Python") from maya import cmds cube = cmds.polyCube()[0] curve = cmds.curve(degree=1, point=((0, 1, 1), (0, -1, 1))) projected_curve = cmds.polyProjectCurve(cube, curve, direction=(0, 0, -1)) cmds.select(cube, projected_curve) cmds.SplitMeshWithProjectedCurve() try: cmds.polySeparate("pCube2") except Exception as e: print(e) cmds.file(rename="test_polyseparate.mb") cmds.file(save=True, type="mayaAscii")
Note: Of course the firsts 2 lines are required in the standalone only and not inside maya. Also the last 2 lines are required just to save the standalone result.
While the script inside maya works, the standalone will fail on the cmds.polySeparate line because the last function didn't split the mesh (you can check that from the saved file. It will be saved inside C:/Users/YOURUSER/Documents/maya/projects/default/scenes/ ).
Can someone tell me if this is normal? Or a workaround?
I can tell that it's like this, at least, since maya 2016, don't know if it worked before that.
Here you can see the screen taken from both executions: (the first one is from the standalone)