2
$\begingroup$

Is it possible to get vector of the x or y axis of face's normal orentation?

I know it's possible to get z axis of face's orientation like this

bpy.data.objects["Cube"].data.polygons[0].normal

However, I can't find a way to access x or y axis vector of normal orientation.

An expression like bpy.data.objects["Cube"].matrix_world (this express object local orientation) is also ok.

If these is no direct access, is these a way to calculate it?

Sorry for poor English

$\endgroup$
1
$\begingroup$
obj = bpy.context.active_object
obj.data.calc_tangents()

print(obj.data.loops[obj.data.polygons[0].loop_indices[0]].tangent)
print(obj.data.loops[obj.data.polygons[0].loop_indices[0]].bitangent)

I could find a solution by myself. Thanks!

| improve this answer | |
$\endgroup$

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.