sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Alarm for V-ray (SOLVED)

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 2 Posters 6.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TaxT Offline
      Tax
      last edited by Tax

      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

      "Between cause and consequence, lots of connivance."
      "Never felt being on same level as others; just bc Ive never been."

      1 Reply Last reply Reply Quote 0
      • TaxT Offline
        Tax
        last edited by

        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.

        "Between cause and consequence, lots of connivance."
        "Never felt being on same level as others; just bc Ive never been."

        1 Reply Last reply Reply Quote 0
        • TaxT Offline
          Tax
          last edited by

          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?

          "Between cause and consequence, lots of connivance."
          "Never felt being on same level as others; just bc Ive never been."

          1 Reply Last reply Reply Quote 0
          • TaxT Offline
            Tax
            last edited by Tax

            (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

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

            "Between cause and consequence, lots of connivance."
            "Never felt being on same level as others; just bc Ive never been."

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              Just a note that calling the == method with a true or false 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 the Vray::LiveScene method calls return a Boolean result and the interpreters if evaluates the Boolean expression.

              So the interpreter must evaluate an extra expression that is either:
              false == false or true == false

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • TaxT Offline
                Tax
                last edited by

                Thanks, its fixed now.

                You always pro 😄

                "Between cause and consequence, lots of connivance."
                "Never felt being on same level as others; just bc Ive never been."

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement