doc: add doc.
- finish uv section of doc. - fix issue about the wrong calc of coordinate system axis vector in flatten uv (change it from left hand to right hand). - fix rail uv display text.
This commit is contained in:
@ -437,10 +437,13 @@ def _flatten_face_uv(face: bmesh.types.BMFace, uv_layer: bmesh.types.BMLayerItem
|
||||
vec1.normalize()
|
||||
|
||||
# get z axis
|
||||
new_z_axis: mathutils.Vector = new_y_axis.cross(vec1)
|
||||
new_z_axis: mathutils.Vector = vec1.cross(new_y_axis)
|
||||
new_z_axis.normalize()
|
||||
if not any(round(v, 7) for v in new_z_axis): # if z is a zero vector, use face normal instead
|
||||
# if z is a zero vector, use face normal instead
|
||||
# please note we need use inverted face normal.
|
||||
if not any(round(v, 7) for v in new_z_axis):
|
||||
new_z_axis = typing.cast(mathutils.Vector, face.normal).normalized()
|
||||
new_z_axis.negate()
|
||||
|
||||
# get x axis
|
||||
new_x_axis: mathutils.Vector = new_y_axis.cross(new_z_axis)
|
||||
|
@ -6,7 +6,7 @@ from . import UTIL_virtools_types, UTIL_icons_manager, UTIL_functions
|
||||
class BBP_OT_rail_uv(bpy.types.Operator):
|
||||
"""Create UV for Rail as Ballance Showen (TT_ReflectionMapping)"""
|
||||
bl_idname = "bbp.rail_uv"
|
||||
bl_label = "Create Rail UV"
|
||||
bl_label = "Rail UV"
|
||||
bl_options = {'UNDO'}
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user