[Closed] Renderer plugin called repeatedly while material editor is open?
Hi,
I’m writing a renderer plugin and a set of material plugins for Max 2015/2016.
It appears that when the compact material editor is open, my plugin’s Open() and Render() methods are called all the time, which of course slows down Max’s UI quite a bit.
I’m aware of the inMtlEdit flag of the RendParams structure passed to Open(), but it just tells me that I’m rendering a material preview and in itself is not sufficient to prevent useless re-rendering of all material previews, all the time.
What’s the accepted solution to this problem?
I’m not speaking from experience, but it sounds like that shouldn’t happen. Perhaps find out why it is being called all the time? Are you properly settings the validity intervals of your material?
@lo, thanks for your input, it triggered me to have another look at my Update() method to ultimately discover that I was calling NotifyDependents() unconditionally, which caused the continuous rendering problem.
I had added that call to NotifyDependents() to fix a viewport refresh bug but it turned out I needed to do a little more: http://forums.cgsociety.org/showthread.php?p=8175660#post8175660 .