Graphics

 View Only
Expand all | Collapse all

Script

  • 1.  Script

    Posted 03-04-2025 15:05

    I am trying to learn VB scripting and I was wondering if anyone could help me/let me know if the following is possible.

    I would like the script to automatically fire a scene but only if two other scenes are on air and then play the out when one of the two scenes clears.



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------


  • 2.  RE: Script

    Posted 03-04-2025 15:35

    yeah its possible. 

    Can you confirm the scene should fire when the second of the two "Main" scenes comes online?



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Script

    Posted 03-04-2025 15:37

    Yes sir!  I can confirm that.



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------



  • 4.  RE: Script

    Posted 03-04-2025 15:46
      |   view attached

    Please see attached. 

    Both scene have this on their onOnline sp they check if the other is present. Let me know what performance is like though as it hangs a little for me. Maybe I can think of something else. 

    dim fb as xpOutputFrameBuffer
    dim scene as xpScene
    dim take as xpTakeItem
     
    engine.GetOutputFrameBuffer(0, fb)
     
    if fb.GetSceneOnLayer(1, scene) = true
    engine.Sequencer.GetTakeItemByID(1000, take)
    end if
     
    take.Execute


    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------

    Attachment(s)

    xpf
    autoTakeScene.xpf   9 KB 1 version


  • 5.  RE: Script

    Posted 03-04-2025 16:06

    I really appreciate your help.  I used your code on my scenes and it didn't work. I opened the project you provided and it did work but like you said, it did hang.  It was more like a delay on firing the animation.



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------



  • 6.  RE: Script

    Posted 03-04-2025 16:24
      |   view attached

    yeah it seems to hang. 

    Try this new one, I moved the scripts to SceneDirectors. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------

    Attachment(s)

    xpf
    autoTakeSceneOnSd.xpf   9 KB 1 version


  • 7.  RE: Script

    Posted 03-04-2025 17:10

    Now we're getting somewhere!  You are a wizzard!  
    I did find that when I fire scene 1 and then scene 2, scene 3 fires correctly but when I fire scene 2 first it fires scene 3 before scene 1 is fired.



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------



  • 8.  RE: Script

    Posted 03-05-2025 06:11

    I my scene it works as intended, did you perhaps copy the same script to both scenes? 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 9.  RE: Script

    Posted 03-05-2025 16:24

    I didn't but my scene 1 & 3 are on framebuffer 2 and my scene 2 is on framebuffer 1.  Would that effect it?



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------



  • 10.  RE: Script

    Posted 03-05-2025 18:38

    Yeah you'll need to adjust the framebuffer part of the script. 

    Current I am getting the first frame buffer (0) if you want to get the second you need to change it to (1) and (2) for the 3rd. It's always -1 from the one you want. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 11.  RE: Script

    Posted 03-10-2025 18:00

    I got it all working!  Thanks again for your assistance.



    ------------------------------
    Allen Evans
    Production Editor
    Milestone Church
    ------------------------------