Trying to import model to Blender 2.67 using guide:


But importing normals doesn't work.

Code sample:

mesh = bpy.data.meshes.new(obname)
mesh.from_pydata(vlist, edges, faces)

from bpy_extras import object_utils
object_utils.object_data_add(context, mesh, operator=None)
vindex = 0
for vertex in mesh.vertices:
    vertex.normal = (0, 0, 1)
    vindex += 1

All normals must be oriented along z, but they seems to be random.

enter image description here


It seems like importing normals is impossible with 2.67 version of Blender. Blender recalculates them manually.

But for version 2.74 you can import custom normals using code sample:

normals2 = []
for l in mesh.loops:
mesh.use_auto_smooth = True
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.