Sorry if I am spamming here…
I have to share some of my code I guess. my code runs without producing an error. If I dont have a callback installed it seems to just rush through the end of the script and set the task as finished.
if I place in the callback loop it seems to be stuck forever at 2%cpu while not rendering a single pixel.
the same code runs perfectly fine locally though.
so at the beginning I am declaring the render process to be true
global DL_is_currently_rendering = true
callbacks.removeScripts id:#DL_Render_Start_End
callbacks.addScript #postRenderFrame "DL_is_currently_rendering = false" id:#DL_Render_Start_End
then comes the usual deadlineUtil stuff, then i am defining my listener rollout:
rollout dl_render_monitor_fl "render progress monitor"(
timer tim interval:1000
button stop_rend "stop current rendering (saving progress)"
label curr_statz "Deadline Render Status:"
local tim_c = 0
fn upd_status=(
if classof renderers.current as string == "CoronaRenderer" then(
num_passes = (CoronaRenderer.CoronaFp.getStatistic 0) as integer
time_rema = (((CoronaRenderer.CoronaFp.getStatistic 8)/1000.0)/60.0) as float
time_used = (((CoronaRenderer.CoronaFp.getStatistic 5)/1000.0)/60.0) as float
tot_passes = renderers.current.progressive_passLimit
progress = (time_used/((time_used+time_rema)*1.0))*100.0
status_ = ((num_passes as string) + "/" + (tot_passes as string) + " Passes done, " + (time_rema as string) + " minutes remaining")
deadlineUtil_Median.SetTitle(status_)
deadlineUtil_Median.SetProgress(progress)
curr_statz.caption = "Render status: "+status_
)
)
on tim tick do(
upd_status()
)
on dl_render_monitor_fl open do(
upd_status()
)
on stop_rend pressed do(
CoronaRenderer.CoronaFp.stopRender()
)
)
I do some preadaptations to the scene that are executed fine (as i can see in my log)
and then:
deadlineUtil_Median.SetTitle "Median Passbunch Job - RENDERING" --set the job title
slidertime = rendStart
createdialog dl_render_monitor_fl 350 48 20 20
max quick render
while DL_is_currently_rendering do(
sleep 5
)
destroydialog dl_render_monitor_fl
so as far as I see it, it would call the listener dialog (wich it does, I see it appearing on the blades) and immediately after start the rendering process - wich seems, it does not. The listener dialog is also frozen, you can not hit the stop button.
what I see and get is the status beeing reported to deadline, but this never gets updated, it stays at 0% all the time… most likely because it is indeed not rendering (CPU 2%) or because the listener dialog is frozen and the timer does not tick properly
like i said, this all works fine locally.
when I declare
global DL_is_currently_rendering = false
from the beginning and add another callback for renderstart It will just jump over the code and quickly finish without anything beeing rendered.
The same principle code:
global DL_is_currently_rendering = false
rollout dl_render_monitor_fl "render progress monitor"(
timer tim interval:1000
button stop_rend "stop current rendering (saving progress)"
label curr_statz "Deadline Render Status:"
local tim_c = 0
fn upd_status=(
if classof renderers.current as string == "CoronaRenderer" then(
if DL_is_currently_rendering then(
num_passes = (CoronaRenderer.CoronaFp.getStatistic 0) as integer
time_rema = (((CoronaRenderer.CoronaFp.getStatistic 8)/1000.0)/60.0) as float
time_used = (((CoronaRenderer.CoronaFp.getStatistic 5)/1000.0)/60.0) as float
tot_passes = renderers.current.progressive_passLimit
progress = (time_used/((time_used+time_rema)*1.0))*100.0
status_ = ((num_passes as string) + "/" + (tot_passes as string) + " Passes done, " + (time_rema as string) + " minutes remaining")
--deadlineUtil_Median.SetTitle(status_)
--deadlineUtil_Median.SetProgress(progress)
curr_statz.caption = "Render status: "+status_
print status_
)else(
curr_statz.caption = "Render status: not rendering"
)
)
)
on tim tick do(
upd_status()
)
on dl_render_monitor_fl open do(
upd_status()
)
on stop_rend pressed do(
CoronaRenderer.CoronaFp.stopRender()
)
)
createdialog dl_render_monitor_fl 350 48 20 20
callbacks.removeScripts id:#DL_Render_Start_End
callbacks.addScript #preRenderFrame "DL_is_currently_rendering = true" id:#DL_Render_Start_End
callbacks.addScript #postRenderFrame "DL_is_currently_rendering = false" id:#DL_Render_Start_End
max quick render
while DL_is_currently_rendering do(
sleep 5
)
destroydialog dl_render_monitor_fl
so this above - will work locally as intended. I have no clue why it behaves so differently on the farm. It seems that the callbacks do not work there
EDIT: also the callbacks do not work when defined to be persistent before submitting the job