Converting vray material to rhino - how to avoid the slash prefix in the rhino name?

hi there,
we discovered this phenomenon that after converting vray materials to rhino materials all materials get a slash “/” in front. the next thing happens by saving it to a windows folder, then the slash ist automatically replaced by a “_”.
we need the same namings because of replacing materials with newer settings in scenes with a lot of materials, e.g. by just drag and drop objects with the same material name with adjusted settings and using materials from our own team shared material library in a windows network folder.

is there a solution to tell rhino not to rename materials with this slash?
or if not, is it possible to rename multiple materials at once? (search & replace)
(renaming manually is a very timeconsuming option, because it has to be done in more than 300 scene files)

for a better understanding some screenshots:

1 - vray naming
2 - rhino naming
3 - windows naming
4 - rhino naming_02

thank you :slight_smile:

regards laurentz

we use rhino 6 and vray 3.6

@moderators could someone help us out please? :slight_smile:

i found a script in this topic:

i tried to modify it by my self, on my side it looks like its doing its job:
(replace “x” and “y” values for your needs)
if a errormessage comes up, be shure, that the asterixes " are the same as show below!

 import scriptcontext as sc

mats = sc.doc.Materials
for m in mats:
    m.Name = m.Name.replace("x", "y")

to use it in a button you have to implement it like this in the command section:
(on my side it works also with multiple changes at once: / to none and # to _)

-_RunPythonScript (
 import scriptcontext as sc

mats = sc.doc.Materials
for m in mats:
    m.Name = m.Name.replace("/", "")
    m.Name = m.Name.replace("#", "_")