Re: [Maya-Python] api delete issues

26 views
Skip to first unread message
Message has been deleted

Ravi Jagannadhan

unread,
Nov 19, 2018, 4:44:27 PM11/19/18
to python_in...@googlegroups.com
Do you have a scene and some code that people can look at?

"There are no dumb questions" - Carl Sagan.

> On Nov 19, 2018, at 13:14, mahmoodhas...@gmail.com wrote:
>
> hi!
>
> maya api does not delete componnents...
> ...
> meshFn.deleteFace( index )
> ...
> does not work!
>
> PM:
> P L E A S E H E L P.
> 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/57037449-7906-4efd-bad4-62ce3982a0a6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

mahmoodhas...@gmail.com

unread,
Nov 20, 2018, 4:21:36 PM11/20/18
to Python Programming for Autodesk Maya
no, almost!!!
this is my code:

MObject oThis = thisMObject();

MDataHandle origMeshSrcHandle = data.inputValue(inMeshAttr);
MObject inMesh = origMeshSrcHandle.asMesh();
//inMesh:
MFnMesh inMesh_fn(inMesh, &stat);

MFnMeshData meshDataFn;
MObject outMeshObj = meshDataFn.create();
MFnMesh outMeshFn;
outMeshFn.copy(inMesh, outMeshObj);

outMeshFn.deleteFace(12);

MPlug oMPlug(oThis, outMeshAttr);
oMPlug.selectAncestorLogicalIndex(0, outsAttr);
oMPlug.setMObject(outMeshObj);

Reply all
Reply to author
Forward
0 new messages