MoonDoggie
05-28-2008, 09:58 PM
Friends,
I'm creating a sort of render settings checker for our shop and I've registered a callback to evaluate a function at #preRender but the problem is it doesn't halt the rendering waiting for user response. There must be a simple way to do it, can I unhook the render from taking place until a user clicks "Continue Rendering" or something?
I found a way that works as intended, adding a "QueryBox" halts the rendering, but isn't what I need because it doesn't allow the user to press any buttons in the rollout or anything, take a look. Run the script and press render.
-- Rollouts
global rlt_SceneChecker
-- Functions
global VRayRenderCheck
-- Variables
-- Callbacks
callbacks.removeScripts id:#VRRenderChk
callbacks.addScript #preRender "VRayRenderCheck()" id:#VRRenderChk
try(destroyDialog rlt_SceneChecker)catch()
fn VRayRenderCheck = (
if true then ( -- if a problem is found then create the dialog and allow the user to click "Fix" on problem areas
print "VRayRenderCheck in Progress..."
createDialog rlt_SceneChecker 300 200
)
)
rollout rlt_SceneChecker "Scene Checker v1.0" (
listbox lst_SceneErrors "Problems: "
button btn_Fix "Fix Problems"
on rlt_SceneChecker open do (
)
on btn_Fix pressed do (
-- something
)
)
Thanks!
-Colin
I'm creating a sort of render settings checker for our shop and I've registered a callback to evaluate a function at #preRender but the problem is it doesn't halt the rendering waiting for user response. There must be a simple way to do it, can I unhook the render from taking place until a user clicks "Continue Rendering" or something?
I found a way that works as intended, adding a "QueryBox" halts the rendering, but isn't what I need because it doesn't allow the user to press any buttons in the rollout or anything, take a look. Run the script and press render.
-- Rollouts
global rlt_SceneChecker
-- Functions
global VRayRenderCheck
-- Variables
-- Callbacks
callbacks.removeScripts id:#VRRenderChk
callbacks.addScript #preRender "VRayRenderCheck()" id:#VRRenderChk
try(destroyDialog rlt_SceneChecker)catch()
fn VRayRenderCheck = (
if true then ( -- if a problem is found then create the dialog and allow the user to click "Fix" on problem areas
print "VRayRenderCheck in Progress..."
createDialog rlt_SceneChecker 300 200
)
)
rollout rlt_SceneChecker "Scene Checker v1.0" (
listbox lst_SceneErrors "Problems: "
button btn_Fix "Fix Problems"
on rlt_SceneChecker open do (
)
on btn_Fix pressed do (
-- something
)
)
Thanks!
-Colin
