Alarm for V-ray (SOLVED)
-
An extension witch plays some music or pop a msgbox once V-ray has finished render.
Any aproach ideas on this?I found no prints of it on SU console but it has its own "V-ray progress window":
Could we acess/detect its last logs?obs: I use V-ray 3.6 on SU2018 on Win10-64bits
Thanks
-
Just realized V-ray changes its toolbar icons while rendering:
bet the best aproach would be an observer; would appreciate help on coding it.
-
Realized that eventually it may end up on UI::Command class matter.
So I'm thinking about a simplier (even shitty) workaround:1º aproach: observer
2º aproach: toolbar class?
3º aproach: pixel color <<<New questions: (assuming its always gonna be the same pixel coord)
- How to read screen pixels? directly?
- Screenshot? how to write and read?
- is "color check at every 10s" a good practice? better suggestion?
-
(SOLVED)
It`s actually pretty simple. Thanks to DanRathbun on:
https://forums.sketchup.com/t/how-to-tell-if-v-ray-render-has-finished/133293if VRay;;LiveScene.active.rendering? @Timer = UI.start_timer(5,true) { if !VRay;;LiveScene.active.rendering? print "Render is complete." UI.beep UI.stop_timer(@Timer) break end print "V-ray render check" } else print "Render hasn't started. Try again." end
Works like a charm!
-
Just a note that calling the
==
method with atrue
orfalse
argument for a Boolean conditional expression is considered poor practice.Ie, ...
if VRay::LiveScene.active.rendering? == false
... it is completely unnecessary to make a method call here as theVray::LiveScene
method calls return a Boolean result and the interpretersif
evaluates the Boolean expression.So the interpreter must evaluate an extra expression that is either:
false == false
ortrue == false
-
Thanks, its fixed now.
You always pro
Advertisement