From b6c3f3f3527407f81eb8098aabcedf2e0355db8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 3 Apr 2006 21:48:18 +0000 Subject: [PATCH] fixed error in boneweight copy and type in obj export. --- release/scripts/mesh_boneweight_copy.py | 7 ++++++- release/scripts/obj_export.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/release/scripts/mesh_boneweight_copy.py b/release/scripts/mesh_boneweight_copy.py index ca1841cb1d8..edb0a3822d4 100755 --- a/release/scripts/mesh_boneweight_copy.py +++ b/release/scripts/mesh_boneweight_copy.py @@ -61,7 +61,12 @@ def copy_bone_influences(_from, _to): upidx= from_vec_idx+1 loidx= from_vec_idx-1 - uselo=useup= True # This means we can keep seeking up/down. + # Set uselo/useup. This means we can keep seeking up/down. + if upidx >= len_vecs: useup= False + else: useup= True + + if loidx < 0: uselo= False + else: uselo= True # Seek up/down to find the closest v to seek vec. while uselo or useup: diff --git a/release/scripts/obj_export.py b/release/scripts/obj_export.py index 74bbce169f0..43f91e5e949 100644 --- a/release/scripts/obj_export.py +++ b/release/scripts/obj_export.py @@ -84,7 +84,7 @@ def getMeshFromObject(scn, ob, name=None, mesh=None, EXPORT_APPLY_MODIFIERS=True type = ob.getType() dataname = ob.getData(1) - if EXPORT_APPLY_MODIFIERS: + if EXPORT_APPLY_MODIFIERS or type != 'Mesh': try: mesh.getFromObject(ob.name) except: @@ -557,7 +557,7 @@ def write_ui(filename): ('Edges', EXPORT_EDGES, 'Edges not connected to faces.'),\ ('Normals', EXPORT_NORMALS, 'Export vertex normal data (Ignored on import).'),\ ('UVs', EXPORT_UV, 'Export texface UV coords.'),\ - ('Materials', EXPORT_MTL, 'Write a seperate MTL file with the OBJ.'),\ + ('Materials', EXPORT_MTL, 'Write a separate MTL file with the OBJ.'),\ ('Context...'),\ ('Selection Only', EXPORT_SEL_ONLY, 'Only export objects in visible selection. Else export whole scene.'),\ ('All Scenes', EXPORT_ALL_SCENES, 'Each scene as a seperate OBJ file.'),\