Replacing one material with another (2.8)

I tried to paste the actual path in windows-
C:\tmp\Test\20170913_AliasShaders_OVERVIEW_200513.blend

But it didn work… thats the error i get

Traceback (most recent call last):
File “\ReplaceMat01.py”, line 6, in
OSError: load: C:\tmp\Test70913_AliasShaders_OVERVIEW_200513.blend failed to open blend file
Error: Python script failed, check the message in the system console

What am i doing wrong???

Either properly escape the path using \ instead of \ or
import os
the_path = os.path.join("\".split(the_path))

what do you mean with escape the path?
Would you mind to actually use the path i used as an example of the proper “syntax”?

NOw I get what you were saying :slight_smile:
you meant exchanging the backslash with forwardslash-
Hurray it worked !!! Thats really awsome- and will save me a lot of time the next time I have to import Data from Alias :slight_smile:
Muchas Gracias!

I believe I just had a problem similar to what you’re describing with duplicate materials in a SketchUp import. I was able to solve it by going to the master materials list in the file.
Change from “View Layer” to “Blender File” in the Outliner Window
Under “Blender File” there should be a materials dropdown menu
Right click the duplicate Material, Then click “Remap Users”
Then select the original material in the dropdown next to “New ID”
Hit OK, and Delete the duplicate texture.

Hope this helps and feel free to respond with questions!

-Walter

2 Likes

dude, I created this account to say thank you very much, you helped me a lot, hug

1 Like

Thank you soo much Walter!

I wish I knew that earlier.