Hey Michael,
There was a thread recently about the API and undo.
- https://groups.google.com/forum/#!topic/python_inside_maya/fqX9mNfg5j0
My takeaway is that you’re exactly right; there is few (if any) ways of
integrating with Maya’s undo other than implementing a command plug-in. In
the thre
Yeah I was worried that might be the only way to do it without PyMel or
cmds. I imagine there are cases where the PyMel solution would be slow
enough to warrant writing a plugin command like that.
On Tuesday, 10 April 2018 02:52:45 UTC+10, justin hidair wrote:
>
> how about dat ? It requires a c
how about dat ? It requires a command tho .
import maya.api.OpenMaya as om
''' following the declaration of a class for a command '''
def doIt(self):
compFn = om.MFnSingleIndexedComponent()
compObj = compFn.create(om.MFn.kMeshPolygonComponent)
compFn.addElements(faceIds)
sList =
So far, my best idea is to use PyMel:
import pymel.core as pm
pmMesh = pm.PyNode(meshFn.fullPathName())
pmFaces = pm.MeshFace(pmMesh, faceIds)
pm.select(pmFaces)
On Monday, 9 April 2018 15:12:03 UTC+10, Michael Boon wrote:
>
> It looks like the appropriate C++ function is MGlobal::selectCommand,
It looks like the appropriate C++ function is MGlobal::selectCommand, but
that isn't available in Python.
On Monday, 9 April 2018 14:32:12 UTC+10, Michael Boon wrote:
>
> Hi,
>
> If I change the selection using the API, for example:
>
> import maya.api.OpenMaya as om
> # meshFn is a MFnMesh attac