Page 1 of 1
Multiple change texture path???
Posted: Tue Jul 27, 2010 3:10 am
by cooler_inc
After some changes with my comp partition D: totaly was removed and some blend files in blendigo with texture path are pointed to old location that doesn't exist any more. It's simple to change for 10-20 materials, but I've got more than 60
is there any way to automate the process with changing the texture path?
I tried to edit the blend file with AkelPad, but it's not opening in blender after that

Maybe blendigo developers can implement a little option for this kind of operation?
Re: Multiple change texture path???
Posted: Tue Jul 27, 2010 3:50 pm
by Soup
I suggested over on
this thread to make a batch file that would read and convert the materials. Since they're simple XML that can be opened in any word editor, a simple find/replace function should work fine.
I wish I knew exactly how to write that batch file, however

Re: Multiple change texture path???
Posted: Tue Jul 27, 2010 6:32 pm
by cooler_inc
I can write batch file, but that's not what I need.
The question is how to change texture path inside blender?
Re: Multiple change texture path???
Posted: Tue Jul 27, 2010 6:59 pm
by Borgleader
cooler_inc wrote:I can write batch file, but that's not what I need.
The question is how to change texture path inside blender?
I'm not sure I get your problem. So please correct me if I'm wrong.
a) Your partition died
b) Your texture paths are now wrong
c) You need to change the material settings of materials inside blendigo
d) You want the exporter to automatically change the path from :
D:\Rudolph\The\Awesome\Reindeer\HasMyTexture.jpg to
C:\Kitteh\Does\Not\HaveMyTexture.jpg
?
P.S: Please forgive the examples, I'm tired

Re: Multiple change texture path???
Posted: Tue Jul 27, 2010 7:25 pm
by cooler_inc
Borgleader wrote:
I'm not sure I get your problem. So please correct me if I'm wrong.
a) Your partition died
b) Your texture paths are now wrong
c) You need to change the material settings of materials inside blendigo
d) You want the exporter to automatically change the path from :
D:\Rudolph\The\Awesome\Reindeer\HasMyTexture.jpg to
C:\Kitteh\Does\Not\HaveMyTexture.jpg
?
P.S: Please forgive the examples, I'm tired

Yes, you understood right

Re: Multiple change texture path???
Posted: Tue Jul 27, 2010 11:05 pm
by cooler_inc
Opened once more with AkelPad and replaced the path with another drive letter, blend file works fine
Thx for attention

Re: Multiple change texture path???
Posted: Wed Jul 28, 2010 12:16 am
by cooler_inc
My happiness wasn't too long

if you open any blend file in AkelPad and manually change the path, after saving this file will be
incomplete
need script or smth like that
Re: Multiple change texture path???
Posted: Wed Jul 28, 2010 2:23 am
by dag
Install
http://www.autohotkey.com/download/Auto ... nstall.exe
Paste this into notepad...
Code: Select all
#ifWinActive Blender
ESC::
MouseClick,, 240, 355,, 0
send {Left}{Shift Down}{Right 5}{Shift Up}C:\Example\Path\
MouseClick,, 240, 190,, 0
Change the 5 in {Right 5} to the amount of characters you want changed.
Add the new path after {Shift Up}.
Save as change_texture_paths_in_blendigo_because_my_partition_died.ahk
Open the ahk file (with AutoHotkey).
In blendigo you need to select a material, click ESC, select a material...
Close AHK if you want your ESC key back.
Written for blendigo 2.4.5 where the material input field is at 240x355.
Re: Multiple change texture path???
Posted: Wed Jul 28, 2010 6:22 pm
by cooler_inc
thx dag, but cannot understand how it works
I think I have to do all manualy
Re: Multiple change texture path???
Posted: Wed Jul 28, 2010 11:53 pm
by dag
With this method it is just like doing it manually, except you use esc to automatically change the texture path in blendigo.
What don't you understand?
Re: Multiple change texture path???
Posted: Thu Jul 29, 2010 12:08 am
by cooler_inc
oh, now I see

but after one hour I corrected all the paths manually
thx anyway, but for the future it's preferred to have an option in blendigo or script