[Closed] Update texture in viewport after calling setPixels
After I call setPixels on my texture bitmap nothing happens in the viewport. For the texture to be updated there I have to do something like toggling off and on the show map in viewport button in the Material Editor. I tried finding an updateBitmap like method but I didn’t find anything like. Is there any?
Thanks
How about a code snippet so that we can see everything that you are doing. Have you saved the file for instance? To refresh the bitMap you might just have to load it again into the material that it is in.
The code is quite simple, I just call a setPixels inside a change handler. This is the relevant section of the code:
when transform sr changes handleAt:#redrawViews sr do
(
/* ... */
setPixels normalMap.bitmap ni.texel #(c)
)
I just do that.
To refresh the bitMap you might just have to load it again into the material that it is in.
How can I do that in code? Perhaps that is what I need to do.
Thanks.