Created
September 26, 2022 20:38
-
-
Save Psyda/132366bba6c55e010852a2dd54a34c62 to your computer and use it in GitHub Desktop.
This script changes every reference to an image in a Blend file from .png to .jpg. Useful for linking to compressed images
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
import bpy | |
for img in bpy.data.images: | |
img.filepath = img.filepath.replace('.png', '.jpg') | |
img.name = img.name.replace('.png', '.jpg') | |
img.reload() | |
print("Done! Save your blend file!") | |
#When it's finished make sure everything looks correct and save the blend file with a new name ie > Save-As "Packname_jpg.blend" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment