From 226b00844624cdc222bfcf0aac6c226b96de3550 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Dec 2015 12:09:10 +1100 Subject: Use Python3.5's unpacking generalizations --- io_anim_nuke_chan/import_nuke_chan.py | 2 +- io_scene_fbx/export_fbx.py | 8 +++++--- io_scene_x3d/export_x3d.py | 4 ++-- render_povray/render.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/io_anim_nuke_chan/import_nuke_chan.py b/io_anim_nuke_chan/import_nuke_chan.py index ed8528ab..48766e43 100644 --- a/io_anim_nuke_chan/import_nuke_chan.py +++ b/io_anim_nuke_chan/import_nuke_chan.py @@ -93,7 +93,7 @@ def read_chan(context, filepath, z_up, rot_ord, sensor_width, sensor_height): obj.keyframe_insert("rotation_quaternion") elif obj.rotation_mode == 'AXIS_ANGLE': tmp_rot = trns[1].to_axis_angle() - obj.rotation_axis_angle = (tmp_rot[1], ) + tmp_rot[0][:] + obj.rotation_axis_angle = (tmp_rot[1], *tmp_rot[0]) obj.keyframe_insert("rotation_axis_angle") del tmp_rot else: diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index 64d73908..ff39ff44 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -1907,9 +1907,11 @@ def save_single(operator, scene, filepath="", # Warning for scaled, mesh objects with armatures if abs(ob.scale[0] - 1.0) > 0.05 or abs(ob.scale[1] - 1.0) > 0.05 or abs(ob.scale[1] - 1.0) > 0.05: - operator.report({'WARNING'}, "Object '%s' has a scale of (%.3f, %.3f, %.3f), " \ - "Armature deformation will not work as expected " \ - "(apply Scale to fix)" % ((ob.name,) + tuple(ob.scale))) + operator.report( + {'WARNING'}, + "Object '%s' has a scale of (%.3f, %.3f, %.3f), " + "Armature deformation will not work as expected " + "(apply Scale to fix)" % (ob.name, *ob.scale)) else: blenParentBoneName = armob = None diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 819819c5..24bfbe1e 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -348,7 +348,7 @@ def export(file, loc, rot, scale = matrix.decompose() rot = rot.to_axis_angle() - rot = rot[0].normalized()[:] + (rot[1], ) + rot = (*rot[0].normalized(), rot[1]) ident_step = ident + (' ' * (-len(ident) + \ fw('%s\n" % \ - (world.horizon_color[:] + (1.0 - mist.intensity,))) + (*world.horizon_color, 1.0 - mist.intensity)) #tabWrite("fog_offset %.6f\n" % mist.start) #tabWrite("fog_alt 5\n") #tabWrite("turbulence 0.2\n") -- cgit v1.2.3