Last active
August 7, 2018 14:21
-
-
Save retorillo/5198fb5c3a253fcf039c30c7d8cced56 to your computer and use it in GitHub Desktop.
[Blender] Duplicate background images from first one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Duplicate background images from first one | |
# Paste to Blender Python Console, and press ENTER twice | |
# Authored by Retorillo | |
# CC0 License, No Rights Reserved | |
# <START> | |
for a in bpy.data.screens['Default'].areas: | |
if a.spaces[0].type != 'VIEW_3D': | |
continue | |
bkg = a.spaces[0].background_images | |
if len(bkg) == 0: | |
raise Exception('background_images is empty') | |
bkg[0].view_axis = 'FRONT' | |
for axis in ['RIGHT', 'TOP']: | |
bi = bkg.new() | |
bi.view_axis = axis | |
bi.image = bkg[0].image | |
bi.offset_x = bkg[0].offset_x | |
bi.offset_y = bkg[0].offset_y | |
bi.size = bkg[0].size | |
bi.use_flip_x = bkg[0].use_flip_x | |
bi.use_flip_y = bkg[0].use_flip_y | |
bi.rotation = bkg[0].rotation | |
break | |
# <END> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment