Hi Miruna Vecerdi,
The problem is that Rhino lets a plugin know that a material is deleted only after it is deleted. So there is nothing we can do to protect the material in advance. From Rhino’s perspective it is all OK (as you said).
There is a way, of course, to “protect” a fur/clipper material from being purged - if we assign such a material of interest to a certain object in the scene, and then Rhino will not see it as redundant.
However that has its drawbacks:
- There is an assignment during purge… that will involve a firing callbacks to other plugins, as well as updating any running Interactive renderers (this itself my hurt a bit, since it may fetch files from remote locations, which may be missing… etc.)
- How to choose a “certain” object to temporarily assign the material to ? That object must not be the sole assignment of any other material, that will be purged accidentally
- What if there aren’t any objects in the scene at all ?
- Creating a temporarily hidden object and assigning to it - is not a good idea due to 1)
- Creating a temporarily invisible layer and assigning to it is also a not a good idea due to 1)
- It is a matter of philosophical discussion how to do the things in a correct way.
In principle a platform (Rhino) shall let a plugin (V-Ray for Rhino + the rest) know that a given material instance is about to be deleted, and the plugin shall reply back if that is OK or not, due to plugin-specific reasons (the material is used internally). However this has its own implications as well - performance, plugin not being loaded, inability to purge a material at all (remember AutoCAD proxies?), and many more.
For now we’re all stuck with the current situation.
I can suggest a workarounds:
- define a block and assign the material to it. You don’t need to have the block instanced in the scene, but it will hold onto the material
- make a layer, assign the material to it, and turn it off