Notifications
Clear all
[Closed] write a text file after render each frame
Jul 12, 2014 3:34 am
hi Guys,
i need help. How can i write a textfile, if the last images render finish.
i try
if currenttime == animationsRange.End then ()
but this code don´t work for each frame.
mfg
hot chip
2 Replies
Jul 12, 2014 3:34 am
Maxscript has tools to execute scripts before or after render (each frame or whole sequence).
Launched via callbacks it can do what you want
fn createLog = (
f = ( (getdir #scripts) + "\\log.txt" )
if doesFileExist f then
(
st = openFile f mode:"a"
)else(
st = createFile f
)
format "- TimeStamp [%] %
" currenttime timestamp() to:st
close st
)--end fn
-- #preRender --Sent before rendering is started.
-- #preRenderFrame --Sent just before each frame is rendered by the renderer.
-- #postRenderFrame --Sent just after each frame is rendered by the renderer.
-- #PostRender --Sent after rendering has finished.
callbacks.removeScripts id:#doLog
callbacks.addScript #postRender "createLog()" id:#doLog
Jul 12, 2014 3:34 am
ah cool, thank you for you help. i will test it.
edit: Yes it works!