Announcement

Collapse
No announcement yet.

Push a plugin button from Template WIzard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Push a plugin button from Template WIzard

    Hi Guys,

    I am trying to figure out how to push the Browser CEF Snapshot button through template wizard. This is the command in the commands window "FUNCTION*BrowserCEF*snap" but how do i push that button from template wizard?

  • #2
    I have done it like this for a previewsnapshot in another template. You can change the code but its a method of the same procedure. In the scene I added a script on a font and a controltext on top of that.In the ControlText InputValue I added the text SNA; \\Mypath\MyFolder\Snapshot. If at some point it says SNAP in the textbox it will run a function called snapMe. and then set the text back to blank.
    Code:
    sub OnInit()
        This.Geometry.RegisterTextChangedCallback()
    end sub
    
    sub OnGeometryChanged(geom As Geometry)
        snapMe()
    end sub
    
    Sub snapMe()
        dim snapPath as Array[string]
        this.geometry.text.split(";", snapPath)
        if snapPath[0] = "SNAP" then
            system.sendCommand("RENDERER SNAPSHOT " & snapPath[1] )
        end if
    end sub
    In templatewizard i have a textbox called txtSnapPath holding the target destination folder and a button called btnSnapshot with an onclick event for the doSnap. Then in the script I have the following code
    Code:
    '---------------SNAPSHOT FUNKTION-------------
    dim preview_render
    preview_render = "MyPreviewEngineIPAddress"
    
    sub doSnap(Sender)
               dim mins
               mins = Minute(Now())
               if Len(mins) = 1 then
                      mins = "0" & mins
               end if
            txtSnapScriptTrigger.Text = "SNAP;" & txtSnapPath.text & "\_BarChart_" & Hour(Now()) &"_" & mins & ".png RGB 1920 1080"
            SnapShow(Sender)
    end sub
    
    
    Sub SnapShow(Sender)
        dim SnapFolder
            SnapFolder = "" & txtSnapPath.text & ""
        dim objWSH
            Set objWSH = createObject("WScript.Shell")
            objWSH.Run SnapFolder
            Set objWSH = Nothing
            scSnap.text = ""
    End Sub
    '---------------END SNAPSHOT FUNKTION-------------
    Attached Files

    Comment


    • #3
      Thanks Lars,

      I got it working. I can save the browser to a folder from TW. I would like to save it to Viz One instead of a folder so it eliminates a step for the producer. I can't seem to connect to Viz One though. I can see and drop images manually in the Viz One import folder but not from the plugin. Could be a network issue but just need some advice on that.

      Thanks for the help so far!!!!

      Comment


      • #4
        Ok so everything works at my artist station but not on the pilot test page through the preview server. I have the IP for the preview server but its not acting the same as it does when Artist is the preview server. Is there something different that needs to be done to get a snapshot from the preview server?

        Comment


        • #5
          Another question: Is the Snap button supposed to Snap the image or just open the location of where the image is? When I hit it it just opens up the folder.

          Comment


          • #6
            The entire setup here is based on a normal preview in the ActiveX. This Preview is what I snap and save to a folder, The preview engine only does frames not run scripts etc so make sure directors are lined up as intended when it makes the snapshot. Thats probably the reason for the different behaviour. Try to go to the console of your preview server and do a
            send RENDERER*TREE*$MyContainerHoldingCEF*FUNCTION*BrowserCEF*snap just to see if it understands what to do.

            In the snapMe scriptpart of the scene, it just sends the snapshot command to the engine if the text says SNAP.Its just a trigger.

            Code:
            if snapPath[0] = "SNAP" then
               system.sendCommand("RENDERER SNAPSHOT " & snapPath[1] )
            end if
            The ShowSnap part of the template code is where it opens the folder with the saved image, so if it hasnt made the snapshot correctly it will still just open the folder for you. You can always just disable that ShowSnap if you dont want it to open. It was a help for our weather people so they didnt have to browse around for the saved images.

            Comment


            • #7
              Ok so I was able to save the images to the preview server computer itself in a folder but cant seem to get it to Viz One. It is a network folder and the password is set so it does not require one. But cant send to the Viz One import folder. Is there some syntax that is needed to save to a network folder?

              Comment


              • #8
                That part I dont know, we dont use Viz One

                Comment


                • #9
                  Ok thanks, Im so close. This is the last bit i need. Thanks for helping me get this far. Much appreciated.

                  Comment


                  • #10
                    Try the manual, I reckon its a detectives job but you might get lucky.
                    http://documentation.vizrt.com/pilot...arameters.html
                    http://documentation.vizrt.com/viz-e...iz_engine.html


                    Comment


                    • #11
                      Hi Lars,
                      Ok so i finally got what i needed. I made a networked drive to point to the Viz One folder. Then Enabled Linking in the preview server so that it could see the networked drive. Once that happened i was able to get the browser plugin using your Snap in the scene to get a snapshot from the browser to Viz One. Thanks for all your help!!!!!

                      Comment

                      Working...
                      X