[Bf-extensions-cvs] [226b008] master: Use Python3.5's unpacking generalizations
Campbell Barton
noreply at git.blender.org
Tue Dec 8 02:52:01 CET 2015
Commit: 226b00844624cdc222bfcf0aac6c226b96de3550
Author: Campbell Barton
Date: Tue Dec 8 12:09:10 2015 +1100
Branches: master
https://developer.blender.org/rBA226b00844624cdc222bfcf0aac6c226b96de3550
Use Python3.5's unpacking generalizations
===================================================================
M io_anim_nuke_chan/import_nuke_chan.py
M io_scene_fbx/export_fbx.py
M io_scene_x3d/export_x3d.py
M render_povray/render.py
===================================================================
diff --git a/io_anim_nuke_chan/import_nuke_chan.py b/io_anim_nuke_chan/import_nuke_chan.py
index ed8528a..48766e4 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 64d7390..ff39ff4 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 819819c..24bfbe1 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<Viewpoint ' % ident)))
@@ -395,7 +395,7 @@ def export(file,
loc, rot, sca = matrix.decompose()
rot = rot.to_axis_angle()
- rot = rot[0][:] + (rot[1], )
+ rot = (*rot[0], rot[1])
fw(ident_step + 'translation="%.6f %.6f %.6f"\n' % loc[:])
# fw(ident_step + 'center="%.6f %.6f %.6f"\n' % (0, 0, 0))
diff --git a/render_povray/render.py b/render_povray/render.py
index f75069a..f115a93 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -4240,7 +4240,7 @@ def write_pov(filename, scene=None, info_callback=None):
tabWrite("fog {\n")
tabWrite("distance %.6f\n" % mist.depth)
tabWrite("color rgbt<%.3g, %.3g, %.3g, %.3g>\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")
More information about the Bf-extensions-cvs
mailing list