Notifications
Clear all

[Closed] need a delay in #postRenderFrame

I have a function that I’m calling with #postRenderFrame to preform a task on the just-rendered image.
The problem is that I am getting an error because the function is running before the image has had a chance to be written.
Is there a way to have my function get called after the frame is written? or perhaps a way to have a small delay put in?

5 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

probably you a first person i see who wants to make render slower…
is no way to do post-render operation in memory and after that save it to disk? can you render all frames first and do post-process later? can a dotnet solution be appropriate for you?

believe me, any abstract delay will not solve the problem. there is no way to predict for sure when the system puts a file on disk.

Try sleep() function.

sleep() won’t work.
The frame isn’t being written during that time either, so when it comes out of sleep(), my function still fires first.

LOL

I was thinking of just calling some dotNet, but was hoping for a quick solution inside Max. I’ll just have a function from doNet assembly that waits to see the frame show up, then do stuff to it.
In a more general sense, it’s probably a better idea to offload the tasks anyway so Max can cruise along to the next frame.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

if you are OK with .net check FileSystemWatcher Class. i remember that i posted some samples on this forum how to use it.