it’s a problem since a while that from time to time materials lost the connection to the objects, only the material name is shown at the material properties. The Rhino command _selmaterialname allow to select the objects and reassign the materials. But it can be a lot of work to find the missing connections and to fix them. I hope some one could write a script that doe’s the job. (a new VfR build will not automatic fix the problem, if the scene is corrupted)
So does every piece of geometry lose the material or just some? Are you looking for something to systematically go through all the materials in the material editor, select all the objects with a given material name, and then reapply the material? If so, that can’t be done at the moment as far as I know, rhino script doesn’t see vray materials unless they were created in that session, and the vray subroutine has issues/doesn’t seem to work right.
I lost the connection of some materials some times only. Best would be if only this materials could be selected by a script and than selmaterialname … and assign Vray material with the same name would be done.
I suppose so the first part isn’t possible, so the repair function would be needed for all materials/objects.
How would the script know if a material is broken? Is there some way to detect the problem? Or maybe you’re saying there is no way to know, so the script had to reassign all materials…
Maybe a script could detect all materials where no VfR material is assigned and there it would recall the material name and reassign the VfR materials with the same name. The problem looks like at the screenshot.
since I need to jump back to old version because the random crash problem I need help for this problem again. Here an example file where I lost the connection between material and object, only the name exist so that the command _SelMaterialName still works.
I’m looking for a script that reassign the vray materials. A problem could be that in this example the problem is more worst than in the past. I can’t direct manual reassign the material, but it helps to assign “none” and than the old material again.
There is no hope to get the random crashes fixed and a lot of projects need to be done in the next time, so I hope to work with the old VfR version and some workarounds.