forked from LeenkxTeam/LNXSDK
Blender 2.8 - 4.5 Support
This commit is contained in:
@ -2,8 +2,7 @@
|
||||
Exports smaller geometry but is slower.
|
||||
To be replaced with https://github.com/zeux/meshoptimizer
|
||||
"""
|
||||
from typing import Optional
|
||||
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
import bpy
|
||||
from mathutils import Vector
|
||||
import numpy as np
|
||||
@ -21,7 +20,12 @@ else:
|
||||
class Vertex:
|
||||
__slots__ = ("co", "normal", "uvs", "col", "loop_indices", "index", "bone_weights", "bone_indices", "bone_count", "vertex_index")
|
||||
|
||||
def __init__(self, mesh: bpy.types.Mesh, loop: bpy.types.MeshLoop, vcol0: Optional[bpy.types.Attribute]):
|
||||
def __init__(
|
||||
self,
|
||||
mesh: 'bpy.types.Mesh',
|
||||
loop: 'bpy.types.MeshLoop',
|
||||
vcol0: Optional['bpy.types.MeshLoopColor' if bpy.app.version < (3, 0, 0) else 'bpy.types.Attribute']
|
||||
):
|
||||
self.vertex_index = loop.vertex_index
|
||||
loop_idx = loop.index
|
||||
self.co = mesh.vertices[self.vertex_index].co[:]
|
||||
|
Reference in New Issue
Block a user