Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-12-08 04:09:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-08 04:09:10 +0300
commit226b00844624cdc222bfcf0aac6c226b96de3550 (patch)
tree1295d92c937af1a4ffb2aef79c5417a365e00bbd
parent80853daea9394b9135bef342eefa0150a1c1a5f8 (diff)
Use Python3.5's unpacking generalizations
-rw-r--r--io_anim_nuke_chan/import_nuke_chan.py2
-rw-r--r--io_scene_fbx/export_fbx.py8
-rw-r--r--io_scene_x3d/export_x3d.py4
-rw-r--r--render_povray/render.py2
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<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 f75069ae..f115a931 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")