Buildmesh handler keeps being called when nothing changed


I have a simple object plugin that creates a not very complex mesh and handles several other things. after the last time I changed it, the on buildmesh handler is being called every frame without stopping. it kills the performance even with only one instance of the plugin in the scene.
is there a way to figure out what triggers the handler? or what has changed that the build mesh handler had to update the mesh?


for us not without seeing your code.


is’t there a function or something that would tell me what changed since last time build mesh was triggered?


Either you’re not returning a proper validity interval, or a reference is sending a notification triggering a validity reset. You can examine reference notifications in your SimpleObject’s NotifyRefChanged function.


i just can guess (because we can’t see your exact code as Klvnk mentioned) some of parameters that your mesh plugin uses are animatable and currently have a controller. So they have to send a notification up to dependency graph including your plugin instance every time as time changed. And it doesn’t matter that their values were changed or not.

So for you is only solution (and it’s how I do it) is to HASH the last values that made the current mesh and check against the current values’ HASH… if hashes are different the mesh needs to be rebuilt.