Help: Need to Refresh texture in Rhino. Server path doesn't auto update

I have made a script that draws and overwrites a PNG file, this updates instantly on my computer and in Rhino. So everything is fine for me, but my customer works on a server with a looong path and for some reason Rhino doesn’t register the change when the PNG is saved, so it keeps on showing the old version. If we save and revert (or close Rhino and open again) then the updated PNG is shown correctly.

I understand that this is a limitation when working on a server for a to me unknown reason, but is there a way we can script a workaround to automatically re-read the PNG, or refresh it?

Saving and reverting is working, but it isn’t a smooth operation to do a lot of times.

(And if I go into the material, remove the texture and assign it again Rhino still shows the old PNG, probably because it has the same name and uses it from memory)

Hi @Holo

Does the Rhino command RefreshAllTextures not work in this case? Perhaps you can work that into the script, though it make take time to update if your client is on a server.
RM

1 Like

Thanks, that works as a workaround!

Thanks, but that will be difficult since it is under NDA and this only happens for my customer, not for me. And I don’t have access to the server.

But if I find the time I will try to make a small script for you that simulates the problem on another file. That will take some effort though, so I am not sure when I can do that. Sorry.

I would like a tool to just refresh the selected image file though, preferably through Common. Would that be possible in the future you think?

I also think that removing a texture from a material and reassigning it should force a refresh of the file and not use the buffered data as it appears to do now.