ICVS: ----------------------------------------------------------------------
import OBJ dosnt raise a Py Error when no image is given for a material export FBX works much better, tested 179 models and dosnt crash on any now. tested import export with large scene, 375,000 tri's. Mesh.py doc note about UV coords,, editmesh_add minor typo
This commit is contained in:
@@ -1615,7 +1615,7 @@ Objects: {''')
|
||||
''' MultiLayer: 0
|
||||
MultiTake: 1
|
||||
Shading: Y
|
||||
Culling: "CullingOff"hr
|
||||
Culling: "CullingOff"
|
||||
TypeFlags: "Null"
|
||||
}''')
|
||||
|
||||
@@ -1698,7 +1698,7 @@ Objects: {''')
|
||||
UV: ''')
|
||||
|
||||
i = -1
|
||||
ii = 0
|
||||
ii = 0 # Count how many UVs we write
|
||||
for f in me.faces:
|
||||
for uv in f.uv:
|
||||
|
||||
@@ -1711,11 +1711,11 @@ Objects: {''')
|
||||
i=0
|
||||
file.write(',%.6f,%.6f' % tuple(uv))
|
||||
i+=1
|
||||
ii+=1
|
||||
ii+=1 # One more UV
|
||||
|
||||
file.write('\n UVIndex: ')
|
||||
i = -1
|
||||
for j in xrange(len(me.faces)):
|
||||
for j in xrange(ii):
|
||||
if i == -1:
|
||||
file.write('%i' % j)
|
||||
i=0
|
||||
|
||||
@@ -209,23 +209,29 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
|
||||
context_material.setAlpha(float(line_split[1]))
|
||||
elif line_lower.startswith('map_ka'):
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Ka')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Ka')
|
||||
elif line_lower.startswith('map_ks'):
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Ks')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Ks')
|
||||
elif line_lower.startswith('map_kd'):
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Kd')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Kd')
|
||||
elif line_lower.startswith('map_bump'):
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Bump')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'Bump')
|
||||
elif line_lower.startswith('map_d') or line_lower.startswith('map_tr'): # Alpha map - Dissolve
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'D')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'D')
|
||||
|
||||
elif line_lower.startswith('refl'): # Reflectionmap
|
||||
img_filepath= line_value(line.split())
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'refl')
|
||||
if img_filepath:
|
||||
load_material_image(context_material, context_material_name, img_filepath, 'refl')
|
||||
mtl.close()
|
||||
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ class MVert:
|
||||
v.no= no
|
||||
@type no: vector
|
||||
@ivar uvco: The vertex texture "sticky" coordinates (x, y),
|
||||
B{Note}: These are not seen in the UV editor and they are not a part of UV a UVLayer. Use face UV's for that.
|
||||
if present. Available for MVerts only.
|
||||
Use L{Mesh.vertexUV} to test for presence before trying to access;
|
||||
otherwise an exception will may be thrown.
|
||||
|
||||
@@ -1225,7 +1225,7 @@ void add_primitiveMesh(int type)
|
||||
add_numbut(0, NUM|INT, "Vertices:", 2, 500, &tot, NULL);
|
||||
add_numbut(1, NUM|FLO, "Radius:", 0.001*G.vd->grid, 100*G.vd->grid, &dia, NULL);
|
||||
add_numbut(2, NUM|FLO, "Depth:", 0.001*G.vd->grid, 100*G.vd->grid, &d, NULL);
|
||||
add_numbut(3, TOG|INT, "Cap Ends", 0, 0, &(fill), NULL);
|
||||
add_numbut(3, TOG|INT, "Cap End", 0, 0, &(fill), NULL);
|
||||
if (!(do_clever_numbuts("Add Cone", 4, REDRAW))) return;
|
||||
d/=2;
|
||||
ext= 0;
|
||||
|
||||
Reference in New Issue
Block a user