diff --git a/release/io/export_obj.py b/release/io/export_obj.py index b2d4af7c517..d52ee8ec158 100644 --- a/release/io/export_obj.py +++ b/release/io/export_obj.py @@ -118,8 +118,8 @@ def write_mtl(scene, filename, copy_images): if mat: file.write('Ns %.6f\n' % ((mat.specular_hardness-1) * 1.9607843137254901) ) # Hardness, convert blenders 1-511 to MTL's file.write('Ka %.6f %.6f %.6f\n' % tuple([c*mat.ambient for c in worldAmb]) ) # Ambient, uses mirror colour, - file.write('Kd %.6f %.6f %.6f\n' % tuple([c*mat.diffuse_reflection for c in mat.diffuse_color]) ) # Diffuse - file.write('Ks %.6f %.6f %.6f\n' % tuple([c*mat.specular_reflection for c in mat.specular_color]) ) # Specular + file.write('Kd %.6f %.6f %.6f\n' % tuple([c*mat.diffuse_intensity for c in mat.diffuse_color]) ) # Diffuse + file.write('Ks %.6f %.6f %.6f\n' % tuple([c*mat.specular_intensity for c in mat.specular_color]) ) # Specular if hasattr(mat, "ior"): file.write('Ni %.6f\n' % mat.ior) # Refraction index else: @@ -129,7 +129,7 @@ def write_mtl(scene, filename, copy_images): # 0 to disable lighting, 1 for ambient & diffuse only (specular color set to black), 2 for full lighting. if mat.shadeless: file.write('illum 0\n') # ignore lighting - elif mat.specular_reflection == 0: + elif mat.specular_intensity == 0: file.write('illum 1\n') # no specular. else: file.write('illum 2\n') # light normaly diff --git a/release/io/export_x3d.py b/release/io/export_x3d.py index 30a4b1483b0..3661d78a343 100644 --- a/release/io/export_x3d.py +++ b/release/io/export_x3d.py @@ -770,7 +770,7 @@ class x3d_class: for i in range(alltexture): tex = alltextures[i] - if tex.type != 'IMAGE': + if tex.type != 'IMAGE' or tex.image == None: continue namemat = tex.name diff --git a/release/io/import_3ds.py b/release/io/import_3ds.py index 0269219b63d..f2dc99d5b7e 100644 --- a/release/io/import_3ds.py +++ b/release/io/import_3ds.py @@ -463,7 +463,8 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH): ''' if contextMatrix_rot: - ob.matrix = [x for row in contextMatrix_rot for x in row] + # ob.matrix = [x for row in contextMatrix_rot for x in row] + ob.matrix = contextMatrix_rot # ob.setMatrix(contextMatrix_rot) importedObjects.append(ob) diff --git a/release/io/import_obj.py b/release/io/import_obj.py index 484be6d54b4..34f6575dba2 100644 --- a/release/io/import_obj.py +++ b/release/io/import_obj.py @@ -715,7 +715,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l # face_mapping= me.faces.extend([f[0] for f in faces], indexList=True) if verts_tex and me.faces: - me.add_uv_layer() + me.add_uv_texture() # me.faceUV= 1 # TEXMODE= Mesh.FaceModes['TEX'] diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index e1744bb3d23..f1a46b199b4 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -981,10 +981,13 @@ static void rna_def_mface(BlenderRNA *brna) // XXX allows creating invalid meshes prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 4); + /* RNA_def_property_flag(prop, PROP_DYNAMIC); RNA_def_property_dynamic_array_funcs(prop, "rna_MeshFace_verts_get_length"); RNA_def_property_int_funcs(prop, "rna_MeshFace_verts_get", "rna_MeshFace_verts_set", NULL); + */ RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED); diff --git a/source/blender/python/intern/bpy_array.c b/source/blender/python/intern/bpy_array.c index f11c95e7ed5..4459c7c313f 100644 --- a/source/blender/python/intern/bpy_array.c +++ b/source/blender/python/intern/bpy_array.c @@ -1,5 +1,5 @@ /** - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 8395e5c82e4..49105422325 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -545,9 +545,6 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v int len = RNA_property_array_length(ptr, prop); if (len > 0) { - /* char error_str[512]; */ - int ok= 1; - #ifdef USE_MATHUTILS if(MatrixObject_Check(value)) { MatrixObject *mat = (MatrixObject*)value; @@ -559,10 +556,7 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v PyErr_Format(PyExc_TypeError, "%.200s RNA array assignment expected a sequence instead of %.200s instance.", error_prefix, Py_TYPE(value)->tp_name); return -1; } - /* done getting the length */ - ok= pyrna_py_to_array(ptr, prop, data, value, error_prefix); - - if (!ok) { + else if (!pyrna_py_to_array(ptr, prop, data, value, error_prefix)) { /* PyErr_Format(PyExc_AttributeError, "%.200s %s", error_prefix, error_str); */ return -1; }