Graphics

 View Only
  • 1.  Is there a way to check if a Scene is Online through Script?

    Posted 20 days ago

    I'm trying to do something through script  where it only happens when another specific scene is Online. I managed to reference said scene by GetSceneByID, but trying to check if it's online with .IsOnline is only returning me false. Is there a proper way to do this or i'm doing it wrong?



    ------------------------------
    Eyriam Crespo
    ------------------------------


  • 2.  RE: Is there a way to check if a Scene is Online through Script?

    Posted 19 days ago

    By default, GetSceneByID gets a copy of the scene. 

    Public Function GetSceneByID( _
       ByVal ID As Long, _
       ByRef Scene As xpScene, _
       Optional ByVal AsCopy As Boolean = True _
    ) As Boolean
    

    Set the third parameter to False to get the original. If you have multiple copies of the scene, you might need to take a different approach.



    ------------------------------
    JohnCorigliano
    Senior Software Engineer
    ISC
    ------------------------------



  • 3.  RE: Is there a way to check if a Scene is Online through Script?

    Posted 19 days ago

    Hello Eyriam,

    Couple of questions:

    Are you on Studio or Tessera? The method varies a bit between the two. 

    Is your 'other Scene' the only one that goes online on that layer? 



    ------------------------------
    Rob Chronister
    Graphic Designer/Programmer
    Rocket Surgery
    United States
    ------------------------------



  • 4.  RE: Is there a way to check if a Scene is Online through Script?

    Posted 18 days ago

    Hi.
    Try the script below.

            Dim fb As xpOutputFrameBuffer
            engine.GetOutputFrameBuffer(0, fb)
            Dim checkscene As xpScene
            If fb.GetSceneOnLayer(0, checkscene) Then
                If checkscene.Name = "Name" Then 'The name of your specific  scene
                    'Your scrip
                End If
            End If

    And the second sctript. You should set it into OnSceneOnline engine. The script will only run when a specific scene is launched.

            If OnlineScene.Name = "Name" Then 'The name of your specific scene
                'your script
            End If


    ------------------------------
    Roman Yaroshenko
    chief specialist
    RBC-TV
    Moscow Russian Federation
    ------------------------------