Alarm for V-ray (SOLVED)

Alarm for V-ray (SOLVED)

Postby Tax » Sat Sep 04, 2021 1:44 am

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":
V-ray progress window.png

Could we acess/detect its last logs?

obs: I use V-ray 3.6 on SU2018 on Win10-64bits

Thanks
0
Last edited by Tax on Sun Sep 05, 2021 6:08 pm, edited 1 time in total.
"Between cause and consequence, lots of connivance."
"Never felt being on same level as others; just bc Ive never been."
User avatar
Tax 
PluginStore Author
PluginStore Author
 

Re: How to code an alarm for V-ray?

Postby Tax » Sat Sep 04, 2021 9:34 am

Just realized V-ray changes its toolbar icons while rendering:
V-ray toolbar.png


bet the best aproach would be an observer; would appreciate help on coding it.
0
"Between cause and consequence, lots of connivance."
"Never felt being on same level as others; just bc Ive never been."
User avatar
Tax 
PluginStore Author
PluginStore Author
 

Re: How to code an alarm for V-ray?

Postby Tax » Sun Sep 05, 2021 2:27 am

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 <<<

v-ray stop.png


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?
0
"Between cause and consequence, lots of connivance."
"Never felt being on same level as others; just bc Ive never been."
User avatar
Tax 
PluginStore Author
PluginStore Author
 

Re: How to code an alarm for V-ray?

Postby Tax » Sun Sep 05, 2021 6:05 pm

(SOLVED)

It`s actually pretty simple. Thanks to DanRathbun on:
https://forums.sketchup.com/t/how-to-tell-if-v-ray-render-has-finished/133293
Code: Select all
if VRay::LiveScene.active.rendering? == false
   print "Render hasn't started. Try again."
else
   @Timer = UI.start_timer(5,true) {
   if VRay::LiveScene.active.rendering? == false

      print "Render is complete."
      UI.beep

      UI.stop_timer(@Timer)
      break
   end
   print "V-ray render check"
}
end

Works like a charm!
1
"Between cause and consequence, lots of connivance."
"Never felt being on same level as others; just bc Ive never been."
User avatar
Tax 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 13 guests