patch from michael williamson, export multiple UV layers to lightwave
[#18575] remove unused local variables
This commit is contained in:
@@ -351,11 +351,14 @@ def generate_vmad_vc(mesh):
|
||||
# === Generate Per-Face UV Coords (VMAD Chunk) ===
|
||||
# ================================================
|
||||
def generate_vmad_uv(mesh):
|
||||
layers = mesh.getUVLayerNames()
|
||||
org_uv = mesh.activeUVLayer
|
||||
for l in layers:
|
||||
mesh.activeUVLayer = l
|
||||
data = cStringIO.StringIO()
|
||||
data.write("TXUV") # type
|
||||
data.write(struct.pack(">H", 2)) # dimension
|
||||
data.write(generate_nstring("Blender's UV Coordinates")) # name
|
||||
|
||||
data.write(generate_nstring(l)) # name
|
||||
for i, f in enumerate(mesh.faces):
|
||||
if not i%100:
|
||||
Blender.Window.DrawProgressBar(float(i)/len(mesh.faces), "Writing UV Coordinates")
|
||||
@@ -368,6 +371,8 @@ def generate_vmad_uv(mesh):
|
||||
data.write(struct.pack(">H", v)) # vertex index
|
||||
data.write(struct.pack(">H", i)) # face index
|
||||
data.write(struct.pack(">ff", U, V))
|
||||
|
||||
mesh.activeUVLayer = org_uv
|
||||
return data.getvalue()
|
||||
|
||||
# ======================================
|
||||
|
||||
@@ -44,7 +44,6 @@ static bNodeSocketType outputs[]= {
|
||||
static void valuefn(float *out, float *coord, bNode *node, bNodeStack **in, short thread)
|
||||
{
|
||||
float coord1[3], coord2[3];
|
||||
float x, y, z;
|
||||
|
||||
tex_input_vec(coord1, in[0], coord, thread);
|
||||
tex_input_vec(coord2, in[1], coord, thread);
|
||||
|
||||
Reference in New Issue
Block a user