I have been facing a problem loading materials from Proxy objects, especially from previous versions like 3.6. Would there be a way to reload these materials in V-Ray 4.2 or newer, using the ruby console from the .vrmat file created from the proxy? I noticed that there was an update to this .vrmat file in the new versions. Thanks
@konstantin_chaos Is it possible to create a ruby script that allows you to change the materials in a list in the proxy? For example, I have a blue fabric material and I want to select a red fabric, which is in my list of materials, and change it in the selected proxy model. I consulted the V-Ray API, but it is still a bit limited and I did not find a function that would allow this change. Could you help me? Thanks
Hi @henriqueb ,
What you’re after is possible.
I’ll try to put together an example script and share it.
Konstantin
Here’s a very simple example -
It finds a proxy called “Proxy1” and replaces it’s materials with 2 materials called “red_material” and “blue_material”.
Before:
After:
Hope that helps
ReplaceProxyMaterial_01.zip (374 Bytes)
Simplified / improved version of the script -
ReplaceProxyMaterial_02.zip (345 Bytes)
Hi Konstantin, many thanks. I will try it.


