Alarm for V-ray (SOLVED)
-
-
-
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