Created
February 17, 2023 11:02
-
-
Save Psyda/1a7b211f9adfef8288540dd6c83c3966 to your computer and use it in GitHub Desktop.
Renames file extension paths from PNG to JPG. Also Tells the file to search for a folder called "Renamemetopackname" instead of the normal 4k folder.
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.filepath = img.filepath.replace('4k', 'Renamemetopackname') #Rename that to whatever you renamed the 4k folder to. ie. CyberDistrict | |
img.name = img.name.replace('4k', 'Renamemetopackname') #Rename that to whatever you renamed the 4k folder to. ie. CyberDistrict | |
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