batchcam icon indicating copy to clipboard operation
batchcam copied to clipboard

How did you manage to loop render calls

Open deshudiosh opened this issue 7 years ago • 4 comments

Hello Sergo.

Can you give me a hint how did you manage to make maxscript run sequence of render() calls?

I tried using 3ds max #postRender callback, but I get:

-- Runtime error: unable to open renderer, possible recursion

deshudiosh avatar Oct 11 '18 17:10 deshudiosh

Hi, it's not clear what you are trying to do in #postRender callback. Looks like you are trying to render in that call, that why it raises recursion error maybe?

I simply do max quick render call in simple for loop. You can also use render() call, it should not matter.

usakhelo avatar Oct 12 '18 03:10 usakhelo

https://github.com/usakhelo/batchcam/blob/cb9592398f46da5f3ab39182baba31db816da400/BatchCameraRender.ms#L774

usakhelo avatar Oct 12 '18 03:10 usakhelo

Thanks for a response!

I just managed to resolve the problem right now, while still keeping the #postRender callback approach. The recursion error doesn't rise if render() is called from delayed dotnet Timer callback:

https://github.com/deshudiosh/PG.Ms/blob/master/PG.Render.ms#L39

deshudiosh avatar Oct 12 '18 12:10 deshudiosh

Good decision.

usakhelo avatar Oct 13 '18 01:10 usakhelo