From 1a45c5c8f49e265adaffdcb57a85c7233251c4e7 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Wed, 18 Aug 2010 07:14:32 +0000 Subject: [PATCH] update for rna api changes --- io_export_directx_x.py | 2 +- io_export_unreal_psk_psa.py | 2 +- io_import_scene_mhx.py | 8 ++++---- io_import_scene_unreal_psk.py | 2 +- render_povray/render.py | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/io_export_directx_x.py b/io_export_directx_x.py index 6019941d5..3fc636900 100644 --- a/io_export_directx_x.py +++ b/io_export_directx_x.py @@ -400,7 +400,7 @@ def WriteMeshNormals(Config, Mesh): if Config.CoordinateSystem == 1: Vertices = Vertices[::-1] for Vertex in [Mesh.vertices[Vertex] for Vertex in Vertices]: - if Face.smooth: + if Face.use_smooth: Normal = Config.SystemMatrix * Vertex.normal else: Normal = Config.SystemMatrix * Face.normal diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index 8b6160841..1f12cc733 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -1104,7 +1104,7 @@ def parse_animation(blender_scene, blender_armatures, psa_file): cur_frame_index = 0 #print(dir(bpy.data.actions)) - #print(dir(bpy.context.scene.set)) + #print(dir(bpy.context.scene.background_set)) #list of armature objects for arm in blender_armatures: diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index cf0c178e9..e0fb8f65b 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -730,7 +730,7 @@ def parseDriverTarget(var, nTarget, rna, args, tokens): targ.id = loadedData['Object'][args[0]] for (key, val, sub) in tokens: defaultKey(key, val, sub, 'targ', [], globals(), locals()) - #print("Targ", targ, targ.id, targ.data_path, targ.id_type, targ.bone_target, targ.use_local_space_transforms) + #print("Targ", targ, targ.id, targ.data_path, targ.id_type, targ.bone_target, targ.use_local_space_transform) return targ @@ -1180,14 +1180,14 @@ def parseFaces2(tokens, me): if key == 'ft': f = me.faces[n] f.material_index = int(val[0]) - f.smooth = int(val[1]) + f.use_smooth = int(val[1]) n += 1 elif key == 'ftall': mat = int(val[0]) smooth = int(val[1]) for f in me.faces: f.material_index = mat - f.smooth = smooth + f.use_smooth = smooth return @@ -1718,7 +1718,7 @@ def parseLatticePoints(args, tokens, points): v.y = y v.z = z - v = points[n].deformed_co + v = points[n].co_deform (x,y,z) = eval(val[1]) v.x = x v.y = y diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py index e1080d411..3b518f1fe 100644 --- a/io_import_scene_unreal_psk.py +++ b/io_import_scene_unreal_psk.py @@ -489,7 +489,7 @@ def pskimport(infile): me_ob.vertices.foreach_set("co", unpack_list(verts)) me_ob.faces.foreach_set("vertices_raw", faces) - me_ob.faces.foreach_set("smooth", [False] * len(me_ob.faces)) + me_ob.faces.foreach_set("use_smooth", [False] * len(me_ob.faces)) me_ob.update() #=================================================================================================== diff --git a/render_povray/render.py b/render_povray/render.py index f37fab59f..ae222da25 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -102,7 +102,7 @@ def write_pov(filename, scene=None, info_callback=None): # 'phong 70.0 ' - if material.raytrace_mirror.enabled: + if material.raytrace_mirror.use: raytrace_mirror = material.raytrace_mirror if raytrace_mirror.reflect_factor: file.write('\treflection {\n') @@ -224,10 +224,10 @@ def write_pov(filename, scene=None, info_callback=None): if elem.type not in ('BALL', 'ELLIPSOID'): continue # Not supported - loc = elem.location + loc = elem.co stiffness = elem.stiffness - if elem.negative: + if elem.use_negative: stiffness = - stiffness if elem.type == 'BALL': @@ -319,7 +319,7 @@ def write_pov(filename, scene=None, info_callback=None): for fi, f in enumerate(me.faces): fv = faces_verts[fi] # [-1] is a dummy index, use a list so we can modify in place - if f.smooth: # Use vertex normals + if f.use_smooth: # Use vertex normals for v in fv: key = verts_normals[v] uniqueNormals[key] = [-1] @@ -492,7 +492,7 @@ def write_pov(filename, scene=None, info_callback=None): indicies = ((0, 1, 2),) for i1, i2, i3 in indicies: - if f.smooth: + if f.use_smooth: file.write(',\n\t\t<%d,%d,%d>' %\ (uniqueNormals[verts_normals[fv[i1]]][0],\ uniqueNormals[verts_normals[fv[i2]]][0],\ -- GitLab