On Tue, Jun 2, 2009 at 18:49, AK Eric wrote:
>
> If I re-order the .addFlag's, whichever one is listed first won't be
> captured. So if I list the radius first, anything I pass in via -r or
> -radius simply won't be seen.
How are you determining that is it not "seen"?
Does Maya give you an err
I've been testing some new Python reimport code. One of the goals of
this was to get python code changes to work in a running Maya session.
It also has a convenient function to locate all modules that have
changed on disk.
I've gotten good feedback from friends, now I'm looking for a wider
audien
Hi Chad,
thank you for you help!
I checked the docs, but i'm still confused:
i can get points(arrMesh.getPoint(i)) from vertexes, but the
normalvector calculated(i suppose) from middle of a meshFace,
so i need the middle point from meshface
like
arrMesh.getVertexNormal(i)
arrMesh.getVertexNormalCo
you could get the position of all surrounding vertices and average them
together to get the face center:
from operator import add
center = reduce(add, arrMesh.getPoints()) / arrMesh.polygonVertexCount()
- Ofer
www.mrbroken.com
On Wed, Jun 3, 2009 at 6:05 AM, Dimitry wrote:
>
> Hi Chad,
> than
Hi Ofer!
thank you for the reply!
can you please describe this method(from operator import add)
how can you divide array of points by int?
if i'm using arrMesh.getFaceNormalIds(faceIndex=1)
i can get array of 4 vertexes(because my mesh is rectangle) [0, 1, 2,
3], but how i can get the middle po
ok i got it
for item in arrCount:
objFace=arrMesh.getPolygonVertices(arrCount[item])
pt1=arrMesh.vtx[objFace[0]].getPosition()
pt2=arrMesh.vtx[objFace[2]].getPosition()
centerPt=[ (pt1.x+pt2.x)/2,(pt1.y+pt2.y)/2,(pt1.z+pt2.z)/2 ]
thank you Ofer and Chad for great
Ofer, Chad,
but anyway it's interested how it's possible to get mesh middle point
- centroid of each poly in a mesh
it is possible to get it in the similar way as arrMesh.f[0].getNormal
()
arrMesh.f[0].centroid() - something like this?
all the best!
Dimitry
--~--~-~--~~~
Just a FYI:
# Note - the following commands must be executed all at once in order
to cause a
# crash. If you execute each command one at a time, no crash will
occur.
import maya.cmds as cmds
polyCube = cmds.polyCube()[0]
subd = cmds.polyToSubdiv(polyCube)[0]
select(subd + '.sme[*][*]')
--~--~--
The nice thing about using pymel is that it returns objects that usually
support common operations in a more intuitive form.So in this instance
meshFace.getPositions() returns a list of pymel Vector objects, which
support operations such as addition, scalar division and multiplications (so
you don'