PlugIn.CreatePreview called (apparently) unnecessarily

Implementing PlugIn.CreatePreview, and it just seems crazy how often a preview (for a material) gets refreshed for no apparent reason.

It shouldn’t. Make sure you are only changing the return value of RenderHash when something is really different.

I am not overriding that, I am only putting my data in Fields, and setting Child content, and you should be able to reproduce this in v7 if you use Rhino as current renderer, with cycles rendering previews.

Ok…but I’m not seeing crazy updates in V7. Can you give me some steps to reproduce an unnecessary update?

Sure, using 7.0.20147.12475, 05/26/2020:

  1. open v7
  2. file > new, use no template to eliminate variables
  3. open materials panel, make sure preview pane is open
  4. make sure rhino is current renderer
  5. draw a cube
  6. create a rhino plastic material (don’t even assign it)
  7. move the cube, material preview is refreshed
  8. hide the cube, material preview is refreshed
  9. undo hiding the cube, refreshed again

In v7 I am not seeing refresh on opening properties, nor when renaming the cube.

https://mcneel.myjetbrains.com/youtrack/issue/RH-58767

Can’t see the linked page, but thanks for taking a look, Andy.

Hi @jdhill,

I have adjusted the permissions so you should be able to see the page now. I will look into this problem later today.

John

1 Like

RH-58767 is fixed in the latest WIP