Mesh normals empty?

Share your scripts with other members
lowang
Posts: 1
Joined: Wed Nov 26, 2008 10:34 am

Mesh normals empty?

Postby lowang » Wed Nov 26, 2008 10:36 am

Hi all,

I'm playing with python scripting, looking for mesh internal data.
I manage to get the data, but the normal I get is always empty

Look at my script below :

Code: Select all

meshes = []
meshes = scene.getMeshes()
for mesh in meshes :
    vertexes = []
    faces = []
    (vertexes, faces) = mesh.getGeometry()
    for vertex in vertexes :
        # OK, Position contains data.
        position = vertex.getPosition()
        # OK, uv contains data.
        uv = vertex.getTextureCoordinates()
        # No OK, normal always = (0,0,0), Why?
        normal = vertex.getNormal()

Did I get someting wrong?
If someone can help me, thanks in advance!


Return to “User Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest