mirror of https://github.com/AxioDL/metaforce.git
Added split normals layer to extracted meshes
This commit is contained in:
parent
8221caac35
commit
9f05f40994
|
@ -17,22 +17,11 @@ void InitGeomBlenderContext(HECL::BlenderConnection::PyOutStream& os,
|
||||||
" bpy.context.scene.objects.unlink(ob)\n"
|
" bpy.context.scene.objects.unlink(ob)\n"
|
||||||
" bpy.data.objects.remove(ob)\n"
|
" bpy.data.objects.remove(ob)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Property to convey original vert indices in overdraw meshes\n"
|
"def loop_from_facevert(bm, face, vert_idx):\n"
|
||||||
"class CMDLOriginalIndex(bpy.types.PropertyGroup):\n"
|
|
||||||
" index = bpy.props.IntProperty(name='Original Vertex Index')\n"
|
|
||||||
"bpy.utils.register_class(CMDLOriginalIndex)\n"
|
|
||||||
"bpy.types.Mesh.cmdl_orig_verts = bpy.props.CollectionProperty(type=CMDLOriginalIndex)\n"
|
|
||||||
"\n"
|
|
||||||
"def loop_from_facevert(face, vert_idx):\n"
|
|
||||||
" for loop in face.loops:\n"
|
" for loop in face.loops:\n"
|
||||||
" if loop.vert.index == vert_idx:\n"
|
" if loop.vert[bm.verts.layers.int['CMDLOriginalPosIdxs']] == vert_idx:\n"
|
||||||
" return loop\n"
|
" return loop\n"
|
||||||
"\n"
|
"\n"
|
||||||
"def eq_normals(n1, n2):\n"
|
|
||||||
" if n1[0] == n2[0] and n1[1] == n2[1] and n1[2] == n2[2]:\n"
|
|
||||||
" return True\n"
|
|
||||||
" return False\n"
|
|
||||||
"\n"
|
|
||||||
"def add_triangle(bm, vert_seq, vert_indices, norm_seq, norm_indices, mat_nr, od_list):\n"
|
"def add_triangle(bm, vert_seq, vert_indices, norm_seq, norm_indices, mat_nr, od_list):\n"
|
||||||
" if len(set(vert_indices)) != 3:\n"
|
" if len(set(vert_indices)) != 3:\n"
|
||||||
" return None, None\n"
|
" return None, None\n"
|
||||||
|
@ -40,12 +29,7 @@ void InitGeomBlenderContext(HECL::BlenderConnection::PyOutStream& os,
|
||||||
" ret_mesh = bm\n"
|
" ret_mesh = bm\n"
|
||||||
" vert_seq.ensure_lookup_table()\n"
|
" vert_seq.ensure_lookup_table()\n"
|
||||||
" verts = [vert_seq[i] for i in vert_indices]\n"
|
" verts = [vert_seq[i] for i in vert_indices]\n"
|
||||||
" norms = [norm_seq[i] for i in norm_indices]\n"
|
" #norms = [norm_seq[i] for i in norm_indices]\n"
|
||||||
"\n"
|
|
||||||
" for i in range(3):\n"
|
|
||||||
" if not eq_normals(verts[i].normal, norms[i]):\n"
|
|
||||||
" verts[i] = bm.verts.new(verts[i].co, verts[i])\n"
|
|
||||||
" vert_seq.ensure_lookup_table()\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" # Make the face\n"
|
" # Make the face\n"
|
||||||
" face = bm.faces.get(verts)\n"
|
" face = bm.faces.get(verts)\n"
|
||||||
|
@ -80,12 +64,9 @@ void InitGeomBlenderContext(HECL::BlenderConnection::PyOutStream& os,
|
||||||
" else: \n"
|
" else: \n"
|
||||||
" face = bm.faces.new(verts)\n"
|
" face = bm.faces.new(verts)\n"
|
||||||
"\n"
|
"\n"
|
||||||
" # Apply normals\n"
|
|
||||||
" for i in range(3):\n"
|
" for i in range(3):\n"
|
||||||
" verts[i].normal = norms[i]\n"
|
" face.verts[i][ret_mesh.verts.layers.int['CMDLOriginalPosIdxs']] = vert_indices[i]\n"
|
||||||
"\n"
|
" face.loops[i][ret_mesh.loops.layers.int['CMDLOriginalNormIdxs']] = norm_indices[i]\n"
|
||||||
" for i in range(3):\n"
|
|
||||||
" face.verts[i].index = vert_indices[i]\n"
|
|
||||||
" face.material_index = mat_nr\n"
|
" face.material_index = mat_nr\n"
|
||||||
" face.smooth = True\n"
|
" face.smooth = True\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -123,59 +104,58 @@ void FinishBlenderMesh(HECL::BlenderConnection::PyOutStream& os,
|
||||||
"bpy.context.scene.objects.link(obj)\n"
|
"bpy.context.scene.objects.link(obj)\n"
|
||||||
"mesh.hecl_material_count = %u\n", meshIdx, matSetCount);
|
"mesh.hecl_material_count = %u\n", meshIdx, matSetCount);
|
||||||
|
|
||||||
os << "for material in materials:\n"
|
os << "mesh.use_auto_smooth = True\n"
|
||||||
" mesh.materials.append(material)\n"
|
"\n"
|
||||||
"\n"
|
"for material in materials:\n"
|
||||||
"# Preserve original indices\n"
|
" mesh.materials.append(material)\n"
|
||||||
"for vert in bm.verts:\n"
|
"\n"
|
||||||
" ov = mesh.cmdl_orig_verts.add()\n"
|
"# Merge OD meshes\n"
|
||||||
" ov.index = vert.index\n"
|
"for od_entry in od_list:\n"
|
||||||
"\n"
|
" vert_dict = {}\n"
|
||||||
"# Merge OD meshes\n"
|
"\n"
|
||||||
"for od_entry in od_list:\n"
|
" for vert in od_entry['bm'].verts:\n"
|
||||||
" vert_dict = {}\n"
|
" if len(vert.link_faces):\n"
|
||||||
"\n"
|
" copy_vert = bm.verts.new(vert.co, vert)\n"
|
||||||
" for vert in od_entry['bm'].verts:\n"
|
" vert_dict[vert[od_entry['bm'].verts.layers.int['CMDLOriginalPosIdxs']]] = copy_vert\n"
|
||||||
" if len(vert.link_faces):\n"
|
" copy_vert[orig_pidx_lay] = vert[od_entry['bm'].verts.layers.int['CMDLOriginalPosIdxs']]\n"
|
||||||
" vert_dict[vert.index] = bm.verts.new(vert.co, vert)\n"
|
"\n"
|
||||||
" ov = mesh.cmdl_orig_verts.add()\n"
|
" for face in od_entry['bm'].faces:\n"
|
||||||
" ov.index = vert.index\n"
|
" merge_verts = [vert_dict[fv[od_entry['bm'].verts.layers.int['CMDLOriginalPosIdxs']]] for fv in face.verts]\n"
|
||||||
"\n"
|
" if bm.faces.get(merge_verts) is not None:\n"
|
||||||
" for face in od_entry['bm'].faces:\n"
|
" continue\n"
|
||||||
" merge_verts = [vert_dict[fv.index] for fv in face.verts]\n"
|
" merge_face = bm.faces.new(merge_verts)\n"
|
||||||
" if bm.faces.get(merge_verts) is not None:\n"
|
" for i in range(len(face.loops)):\n"
|
||||||
" continue\n"
|
" old = face.loops[i]\n"
|
||||||
" merge_face = bm.faces.new(merge_verts)\n"
|
" new = merge_face.loops[i]\n"
|
||||||
" for i in range(len(face.loops)):\n"
|
" for j in range(len(od_entry['bm'].loops.layers.uv)):\n"
|
||||||
" old = face.loops[i]\n"
|
" new[bm.loops.layers.uv[j]] = old[od_entry['bm'].loops.layers.uv[j]]\n"
|
||||||
" new = merge_face.loops[i]\n"
|
" new[orig_nidx_lay] = old[od_entry['bm'].loops.layers.int['CMDLOriginalNormIdxs']]\n"
|
||||||
" for j in range(len(od_entry['bm'].loops.layers.uv)):\n"
|
" merge_face.smooth = True\n"
|
||||||
" new[bm.loops.layers.uv[j]] = old[od_entry['bm'].loops.layers.uv[j]]\n"
|
" merge_face.material_index = face.material_index\n"
|
||||||
" merge_face.smooth = True\n"
|
"\n"
|
||||||
" merge_face.material_index = face.material_index\n"
|
" od_entry['bm'].free()\n"
|
||||||
"\n"
|
"\n"
|
||||||
" od_entry['bm'].free()\n"
|
"bm.to_mesh(mesh)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Remove loose vertices\n"
|
"# Load split normal data\n"
|
||||||
"#to_remove = []\n"
|
"split_normals = []\n"
|
||||||
"#for vert in bm.verts:\n"
|
"for face in bm.faces:\n"
|
||||||
"# if not len(vert.link_faces):\n"
|
" for loop in face.loops:\n"
|
||||||
"# to_remove.append(vert)\n"
|
" split_normals.append(norm_list[loop[orig_nidx_lay]])\n"
|
||||||
"#bmesh.ops.delete(bm, geom=to_remove, context=1)\n"
|
"mesh.normals_split_custom_set(split_normals)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"bm.to_mesh(mesh)\n"
|
"bm.free()\n"
|
||||||
"bm.free()\n"
|
"\n"
|
||||||
"\n"
|
"# Remove redundant materials\n"
|
||||||
"# Remove redundant materials\n"
|
"present_mats = set()\n"
|
||||||
"present_mats = set()\n"
|
"for poly in mesh.polygons:\n"
|
||||||
"for poly in mesh.polygons:\n"
|
" present_mats.add(poly.material_index)\n"
|
||||||
" present_mats.add(poly.material_index)\n"
|
"for mat_idx in reversed(range(len(mesh.materials))):\n"
|
||||||
"for mat_idx in reversed(range(len(mesh.materials))):\n"
|
" if mat_idx not in present_mats:\n"
|
||||||
" if mat_idx not in present_mats:\n"
|
" mesh.materials.pop(index=mat_idx, update_data=True)\n"
|
||||||
" mesh.materials.pop(index=mat_idx, update_data=True)\n"
|
"\n"
|
||||||
"\n"
|
"mesh.update()\n"
|
||||||
"mesh.update()\n"
|
"\n";
|
||||||
"\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,15 +339,16 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
{
|
{
|
||||||
os << "# Begin bmesh\n"
|
os << "# Begin bmesh\n"
|
||||||
"bm = bmesh.new()\n"
|
"bm = bmesh.new()\n"
|
||||||
"\n";
|
"\n"
|
||||||
|
"# Overdraw-tracking\n"
|
||||||
|
"od_list = []\n"
|
||||||
|
"\n"
|
||||||
|
"orig_pidx_lay = bm.verts.layers.int.new('CMDLOriginalPosIdxs')\n"
|
||||||
|
"orig_nidx_lay = bm.loops.layers.int.new('CMDLOriginalNormIdxs')\n";
|
||||||
|
|
||||||
if (rp.first)
|
if (rp.first)
|
||||||
os << "dvert_lay = bm.verts.layers.deform.verify()\n";
|
os << "dvert_lay = bm.verts.layers.deform.verify()\n";
|
||||||
|
|
||||||
os << "# Overdraw-tracking\n"
|
|
||||||
"od_list = []\n"
|
|
||||||
"\n";
|
|
||||||
|
|
||||||
/* Pre-read pass to determine maximum used vert indices */
|
/* Pre-read pass to determine maximum used vert indices */
|
||||||
atUint32 matSecCount = 0;
|
atUint32 matSecCount = 0;
|
||||||
if (matSetCount)
|
if (matSetCount)
|
||||||
|
@ -612,17 +613,17 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
{
|
{
|
||||||
if (j==0 && matShortUVs)
|
if (j==0 && matShortUVs)
|
||||||
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
||||||
primVerts[c%3].uvs[j], primVerts[(c+2)%3].uvs[j], primVerts[(c+1)%3].uvs[j],
|
primVerts[c%3].uvs[j], primVerts[(c+2)%3].uvs[j], primVerts[(c+1)%3].uvs[j],
|
||||||
primVerts[c%3].pos, j,
|
primVerts[c%3].pos, j,
|
||||||
primVerts[(c+2)%3].pos, j,
|
primVerts[(c+2)%3].pos, j,
|
||||||
primVerts[(c+1)%3].pos, j);
|
primVerts[(c+1)%3].pos, j);
|
||||||
else
|
else
|
||||||
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
os.format(" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
||||||
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
||||||
primVerts[(c+2)%3].pos, j, primVerts[(c+2)%3].uvs[j],
|
primVerts[(c+2)%3].pos, j, primVerts[(c+2)%3].uvs[j],
|
||||||
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j]);
|
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j]);
|
||||||
|
@ -646,17 +647,17 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
{
|
{
|
||||||
if (j==0 && matShortUVs)
|
if (j==0 && matShortUVs)
|
||||||
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
||||||
primVerts[c%3].uvs[j], primVerts[(c+1)%3].uvs[j], primVerts[(c+2)%3].uvs[j],
|
primVerts[c%3].uvs[j], primVerts[(c+1)%3].uvs[j], primVerts[(c+2)%3].uvs[j],
|
||||||
primVerts[c%3].pos, j,
|
primVerts[c%3].pos, j,
|
||||||
primVerts[(c+1)%3].pos, j,
|
primVerts[(c+1)%3].pos, j,
|
||||||
primVerts[(c+2)%3].pos, j);
|
primVerts[(c+2)%3].pos, j);
|
||||||
else
|
else
|
||||||
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
os.format(" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
||||||
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
||||||
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j],
|
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j],
|
||||||
primVerts[(c+2)%3].pos, j, primVerts[(c+2)%3].uvs[j]);
|
primVerts[(c+2)%3].pos, j, primVerts[(c+2)%3].uvs[j]);
|
||||||
|
@ -692,17 +693,17 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
{
|
{
|
||||||
if (j==0 && matShortUVs)
|
if (j==0 && matShortUVs)
|
||||||
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
||||||
primVerts[0].uvs[j], primVerts[1].uvs[j], primVerts[2].uvs[j],
|
primVerts[0].uvs[j], primVerts[1].uvs[j], primVerts[2].uvs[j],
|
||||||
primVerts[0].pos, j,
|
primVerts[0].pos, j,
|
||||||
primVerts[1].pos, j,
|
primVerts[1].pos, j,
|
||||||
primVerts[2].pos, j);
|
primVerts[2].pos, j);
|
||||||
else
|
else
|
||||||
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
os.format(" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
||||||
primVerts[0].pos, j, primVerts[0].uvs[j],
|
primVerts[0].pos, j, primVerts[0].uvs[j],
|
||||||
primVerts[1].pos, j, primVerts[1].uvs[j],
|
primVerts[1].pos, j, primVerts[1].uvs[j],
|
||||||
primVerts[2].pos, j, primVerts[2].uvs[j]);
|
primVerts[2].pos, j, primVerts[2].uvs[j]);
|
||||||
|
@ -738,17 +739,17 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
{
|
{
|
||||||
if (j==0 && matShortUVs)
|
if (j==0 && matShortUVs)
|
||||||
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
os.format(" uv_tri = expand_lightmap_triangle(suv_list[%u], suv_list[%u], suv_list[%u])\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[0]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[1]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_tri[2]\n",
|
||||||
firstPrimVert.uvs[j], primVerts[c%3].uvs[j], primVerts[(c+1)%3].uvs[j],
|
firstPrimVert.uvs[j], primVerts[c%3].uvs[j], primVerts[(c+1)%3].uvs[j],
|
||||||
firstPrimVert.pos, j,
|
firstPrimVert.pos, j,
|
||||||
primVerts[c%3].pos, j,
|
primVerts[c%3].pos, j,
|
||||||
primVerts[(c+1)%3].pos, j);
|
primVerts[(c+1)%3].pos, j);
|
||||||
else
|
else
|
||||||
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
os.format(" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
|
||||||
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
" loop_from_facevert(last_mesh, last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
|
||||||
firstPrimVert.pos, j, firstPrimVert.uvs[j],
|
firstPrimVert.pos, j, firstPrimVert.uvs[j],
|
||||||
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
primVerts[c%3].pos, j, primVerts[c%3].uvs[j],
|
||||||
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j]);
|
primVerts[(c+1)%3].pos, j, primVerts[(c+1)%3].uvs[j]);
|
||||||
|
|
Loading…
Reference in New Issue