Hello again all,
I'm working on what will eventually be a mesh tool that will handle mirroring, defining snap points, etc. I'm trying to get the API down as I go.
So far, I've got it copying the basics of the mesh just fine (and it drops down to the object space, so it doesn't need to worry about transforms that have been applied)
However, I've started in on setting more options, and when I try to set the specified normals, I get the following error:
# Traceback (most recent call last):
# File "d:/Users/weidenba/Documents/maya/scripts\meshtool.py", line 174, in getInfo
# cObj.create()
# File "d:/Users/weidenba/Documents/maya/scripts\meshtool.py", line73, in create
# meshObj.setFaceVertexNormals(normalsArr, faceArr, vertArr)
# File "E:\workspace\bre-maya-2014ext-w7\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 1539, in <lambda>
# File "E:\workspace\bre-maya-2014ext-w7\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 54, in _swig_getattr
# AttributeError: setFaceVertexNormals
I also tried meshObj.setNormals with similar results. It doesn't say anything in the API docs about this not working in Python, and Wing autocompletes it for me, so not sure what I'm doing wrong.
I do have a vague recollection of needing to use an MItVertex for changing attributes in another case, but that might also have been to get more detailed data, I honestly can't remember now (but then it's late).
Any ideas would be helpful :)
Thanks,
Joe