Graphics

 View Only
Expand all | Collapse all

Election system output takes scene to air, but skips scene director

KTVN Production

KTVN Production05-07-2014 21:33

  • 1.  Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 21:22
    When my election system outputs, it does a write page with the fields that fill in the template, then creates a take item ID, then does a read take item ID. When this happens the first time, all is good. Scene Director runs and everything looks good.

    Next page is sent while first page is online. It is set up to output to the same Take ID. This time, however, the fields just change (cut) and new data pops into the text fields. Scene Director does not run, animation does not run.

    I'm assuming this is because the scene it is taking is already online. Therefore, scene director doesn't play.

    Any idea how to get scene director to play each time the take ID is activated even though it's already online?

    Election system is NewsTicker.

    Thanks!


  • 2.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 21:37
    Hello,

    Since your Newsticker system is using the CII Gateway we can use CII Scripts to trigger the scene director of the scene that is online.

    dim scene1 as xpScene

    dim anim as xpSceneDirector

    dim output as xpOutputFramebuffer

    Engine.GetOutputFramebuffer(0, output)

    output.getSceneOnLayer(0, scene1)

    scene1.getSceneDirectorByName("SceneDirector1", anim)

    anim.playrange(0, 200)

    This script should be copied to this location:

    XPression > Edit > Scripting > CII > OnPageRead

    (This script will trigger the scene director of the scene on XPression output 1 - layer 0 whenever a CII Page Read command is received)

    There are two variables you may want to change in the script:

    Engine.GetOutputFramebuffer(0, output)

    - The 0 in the brackets refers to which output the engine will look for the online scene (0 = output #1, 1 = output #2)

    output.getSceneOnLayer(0, scene1)

    - The 0 in the brackets refers to the layer of the output the engine will look for the online scene (0 refers to layer zero, 1 refers to layer one, etc..)

    Note that this script is only tested to work on systems running XPression 5.15 build 2561 and higher.

    #XPression


  • 3.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 21:56
    That worked.

    One small issue, however. The data changes a split second before the animation begins.

    Scene should look like this: Full screen animated graphic, dissolves off after 20 frames to layers animating on screen.

    Scene actually looks like: Current page data changes to new page just as full screen animation goes full screen, then the rest happens as it should.

    The data change needs to be delayed slightly until the full screen animation is playing. How do I accomplish that?

    Thanks a bunch!!

    #XPression


  • 4.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 22:15
    Actually, never mind. I had something set wrong on an animation controller. It's all good now.

    Thanks for your help!!

    #XPression


  • 5.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 22:17
    I figure you didn't have the animation controller (or a keyframe) at frame 0 of the scene director?

    Glad to hear it's all working!

    #XPression


  • 6.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-06-2014 23:07
    What would be the scripting to make this happen with only a specific TakeID or scene? I only want this to occur with the election pages, not all CG templates that have a read command sent to the CII gateway. I had to take the script out because it was interfering with other CG pages that we use for news. So, can I limit this CII script to only if a certain scene is online?

    #XPression


  • 7.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-07-2014 04:58
    You can try putting this script into the OnSetText script event of a text object that is in the in election scene:

    dim anim as xpSceneDirector

    Scene.getSceneDirectorByName("SceneDirector1", anim)

    anim.playrange(0, 200)

    I have occasionally had trouble with that script on certain versions of XPression, which is why I suggested the CII script first.

    If that script doesn't work I would put your election scene on a different layer than your other graphics. Change the election scenes default layer to something like 99 and then alter the CII OnPageRead script to only play the scene director of the scene that is on layer 99.

    #XPression


  • 8.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-07-2014 21:02
    It worked to move my scene to another layer. I changed the CII script to reflect that layer.

    Thanks for that.

    When the scene is being built by information coming to the CII gateway in this fashion, does that mean that script events on the template don't work at all? I have added things to happen in the OnOnline script, but they don't happen. I've included a script to turn off layer groups when there is no text in the candidate name, for example. When I don't have a candidate, I want the graphic behind the text to not be visible. This happens when there are more candidates for a race that fit on one page, so you might have only one candidate on the second page. My script looks like this (which I have used successfully in other templates for news):

    dim cand2 as xpTextObject

    dim cand3 as xpTextObject

    dim elexgrp2 as xpbaseobject

    dim elexgrp3 as xpbaseobject

    self.getobjectbyname("Candidate 2", cand2)

    self.getobjectbyname("Candidate 3", cand3)

    self.getobjectbyname("Candidate 2 grp", elexgrp2)

    self.getobjectbyname("Candidate 3 grp", elexgrp3)

    if Len(cand2.text) < 1 then

    elexgrp2.visible = false

    end if

    if Len(cand3.text) < 1 then

    elexgrp3.visible = false

    end if

    What am I missing?

    Thanks for your help!

    #XPression


  • 9.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-07-2014 21:07
    Does that script work correctly if you manually put the scene in the sequencer and put it online?

    #XPression


  • 10.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-07-2014 21:33
    Yes
    ..........
    #XPression


  • 11.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-07-2014 21:35
    The only thing I could think of is that through CII instead of writing an empty field, it is writing a blank space or something. Try changing the "Len(cand2.text) < 1" part to something like "Len(Trim(cand2.text)) < 1".. Try examining the Template Data field of a take item that was written through CII and see what Newsticker wrote to the field? (a bunch of spaces?)

    #XPression


  • 12.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-08-2014 04:22
    Newsticker is writing data to the field. When I look at the item in the sequencer, all the fields are populated and I can see them. It just seems that it's bypassing the template scripts entirely.

    If I can't run scripts that are in the template, this is going to cause me to have other problems as well. I'm just getting to the other scripts I wanted to run.

    Can the scene director call to a script? Since the scene director seems to run fine, may I can have an event in the scene director cause scripts to run. Any ideas there?

    #XPression


  • 13.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-08-2014 13:44
    I think I misunderstood your scenario.. OnOnline only runs when a scene is going online the first time. If it is already online and you update text in the scene that isn't considered "going online" so the script doesnt run again. If you were ping-ponging between two different take id's in the sequencer then the script would run each time (and the scene director would play again). I've read of other people in this forum doing it that way.

    You can attach a script to the scene director. Just right click on a track and choose Add->Script.

    #XPression


  • 14.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-08-2014 16:58
    That makes sense. I think I will try to add the script in the scene director and see if that works for me.

    Thanks!

    #XPression


  • 15.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-08-2014 17:43
    OK. I'm creating a script event to affect certain objects. My script includes:

    dim cand2 as xpTextObject

    dim cand3 as xpTextObject

    dim grp2 as xpbaseobject

    dim grp3 as xpbaseobject

    self.getobjectbyname("Candidate 2", cand2)

    self.getobjectbyname("Candidate 3", cand3)

    self.getobjectbyname("Candidate 2 grp", grp2)

    self.getobjectbyname("Candidate 3 grp", grp3)

    if Len(cand2.text) < 1 then

    grp2.visible = false

    end if

    if Len(cand3.text) < 1 then

    grp3.visible = false

    end if

    I am getting an error when compiling: Name 'self' is not declared.

    Am I going to be able to do this as a script event?

    #XPression


  • 16.  RE: Election system output takes scene to air, but skips scene director

    Posted 05-08-2014 17:52
    For a scene director script, there is no variable called "self".. Just change "self" to "scene" in all cases in that script and it should work.

    #XPression