So the solution is to change the materials and images names, but for +200 materials It's a tedious and inefficient task. So a script is better, even If I fail several times trying to get it work

Procedure:
- Copy the script and paste it into your blender text editor
- Fill in variables the characters you want to replace (can be a combination of characters too).
- Hit Alt + p
- (This applies to the texture script) Change the names of your images in your HDD using other batch renaming program. (like Filetools or File Comander)
Here is the material script:
Code: Select all
# Material name changer, useful in case sensitive programs
# Made by CGgap in blendeartist, Curious Guy in Octane forums
#Known issues:
# - Takes all scene materials (not only the ones from selected objects)
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
############## Variables #####################
# Tipe the character you want to change (Between the quotemarks)
old = " "
# Tipe the character that will replace the old one (Between the quotemarks)
new = "_"
##############################################
import Blender
from Blender import Material
print "--------------------------------------"
Mat = Material.Get()
leM = len(Mat)
for Cma in range( 0, leM, 1 ):
Smat = Mat[Cma]
MatName = Smat.getName()
NewMat = MatName.replace(old,new)
Smat.setName(NewMat)
print "Changed " +MatName+ " -> " + NewMat + " ...Or didn't?"
Code: Select all
# Image texture name changer, useful in case sensitive programs
# Made by CGgap in blendeartist, Curious Guy in Octane forums
#Known issues:
# - Your blender image name must be equal to your HDD image name
# - Mess with your images names (resets them)
# - Takes all scene images textures (not only the ones from selected objects)
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
############## Variables #####################
# Tipe the character you want to change (Between the quotemarks)
old = " "
# Tipe the character that will replace the old one (Between the quotemarks)
new = "_"
##############################################
import Blender
from Blender import Texture,Image,Material
print "--------------------------------------"
Mat = Material.Get()
leM = len(Mat)
for Cma in range( 0, leM, 1 ):
Smat = Mat[Cma]
Ltex = Smat.getTextures()
ET = Smat.enabledTextures
for Ntex in ET:
Tsel = Ltex[Ntex]
if Tsel.tex.type == Texture.Types.IMAGE:
Img = Tsel.tex.getImage()
Imgname = Img.getName()
Imgpath = Img.getFilename()
Newname = Imgname.replace(old,new)
Newpath = Imgpath.replace(Imgname,Newname)
Img.setName(Newname)
Img.setFilename(Newpath)
print "Changed " +Imgname+ " -> " + Newname + " ...Or didn't?"
Feel free to use and modify.
EDIT: Missed a line in the first code