Graphics

 View Only
  • 1.  Scripting Published Objects

    Posted 02-12-2014 22:26
    First of all, this setup is for a newsroom that is editing the scenes via MOS Gateway. This is NOT for someone who knows how to use the sequencer, as 100% of employees that aren't me have ever seen the sequence side of the program.

    My news director approached me the other day to see if it was possible to take our different variations of a lower third, and write that down into a single scene. I would then just script some responsive design in order to have the scene set itself up based on what the user input.

    e.g., I have 3 lines of text in a lower third; top, main, and bottom. If there is no text in the top, but main and bottom have text, the top line is invisible:

    if Len(top.Text) = 0 then

    top.Visible = False


    If there is only text in the main line, I change the scene to rebuild itself to look good with only one line:

    if Len(top.Text) = 0 and Len(bottom.Text) = 0 then

    main.PosY = value

    main.ScaleY = value


    ...etc

    That's doable. It'll take some time, but doable.

    Now for the big one, I'd like to apply this idea to more scenes. In sports for example, we have a scene for "1-game review," "2-game review," and the same for up to 5 games. I would like to create a non-visible text object asking "How many games?" If the user inputs 1, then they only see all the text objects they need for 1 game; away name & score, home name & score, records, a field for "notes" or stats. Now if I increase this to 3 games, there's no longer space on-screen for the notes and stats, so I want those objects to go away visually.

    Here's my visualization:

    if NumberOfGames.Text = 1 then

    NotesAndStats.Published = True

    elseif NumberOfGames.Text = 3 then

    NotesAndStats.Published = False

    end if


    Is there any method of doing this?


  • 2.  RE: Scripting Published Objects

    Posted 02-12-2014 23:09
    Dan,

    you would probably want to toggle the visibility of the group object containing all of the elements for each score line. I'm not sure dynamically enabling or disabling publishing will work but visibility definitely will. You will want to write this in the onSetText event on the text object itself.

    In this this event's subroutine certain variables are already declared like the string value of the text object itself as "text" so your script would look like this

    if text = "1" then

    scoreline1.visible = true

    scoreline2.visible = false

    etc.

    #XPression


  • 3.  RE: Scripting Published Objects

    Posted 02-12-2014 23:32
    The visibility will definitely be a built in, as most of the text objects have another material object to support it. For example, the live text has an animated background, so I put the text object (called LIVE) and the animation (LIVE_ANIM) into a group (LIVE_GROUP). Then:

    if Len(LIVE.Text) = 0 then

    LIVE_GROUP.Visible = False

    elseif Len(LIVE.Text) > 0 then

    LIVE_GROUP.Visible = True

    end if


    I was more thinking about the data input side of things. If they're only inputting 1-4 text/image objects, do they need to see all 40 background objects that don't impact the scene they're working with? If I only need an away/home team name/score for one game, I don't need to see the objects for #2-4; they would just clutter the screen.

    And if this idea would be applied to multiple scenes. I like to think of it as ultimate fool-proofing. And I will write a script to automate these features in order to make sure the right template is always used happily. Heck, if the user inputs two fields that contradict, I could even build in a "THIS SCENE IS NOT COMPATIBLE" graphic in OnPreviewRender that would stop them from breaking things.

    #XPression


  • 4.  RE: Scripting Published Objects

    Posted 02-12-2014 23:35
    Another thought was every time a user changes scenes, they lose the data input. For example, if they're working in our 4-line fullscreen, and realize they need a 5th line, they change to the 5-line fullscreen, and all entered text is lost. I'm trying to find a way to "change the scene" without actually changing scenes. Saving some keystrokes for the newsroom by doing it all up-front for them.

    #XPression


  • 5.  RE: Scripting Published Objects

    Posted 02-12-2014 23:54
    I'll try and give a more specific example:

    We use the same background image for all of our lower thirds, regardless of content. We occasionally add things to it if needed. Currently, we have a different scene for all of these variables:

    live

    live mobile

    twitter handle

    additional top bar of text

    single anchor

    double anchor

    triple anchor

    In order to build this scene into one, I would need to list the following text objects:

    Live? y/n

    Mobile Live? y/n

    Twitter? y/n

    Number of people? 0-3

    Top bar text (if needed)

    Line 1

    Line 2

    Twitter handle

    Person 1 line 1

    Person 1 line 2

    Person 2 line 1

    Person 2 line 2

    Person 3 line 1

    Person 3 line 2


    I would really like to have the "number of people" line control the visibility of line 1, line 2, and all six person lines. If the number entered is 0, then 1.1, 1.2, 2.1, 2.2, 3.1, and 3.2 are all not in the published list, while line 1 and line 2 are. If the number is 2, then line 1/2 are not visible, 1.1, 1.2, 2.1, and 2.2 are, and 3.1 & 3.2 are not.

    If they say 1 person, and yes it is a Twitter handle, then the object for the Twitter handle and its supporting graphics are there, but the rest of the objects go away. Makes it clearer to do the text input. Much easier than trying to find the Twitter 2-line variation of the scene. Then if they're out on mobile live, trying to find the "Twitter 2-line mobile live" scene.

    I just want them to be able to put in the the data, then have a script take care of the rest.

    #XPression


  • 6.  RE: Scripting Published Objects

    Posted 02-13-2014 01:59
    Hi Dan,

    Just a quick comment with regards to you saying that every time they change the scene they need to retype all of the data.. In the MOS plugin, if you hold down SHIFT while you double-click the new scene (e.g. the 5 line), all the data you typed into the 4 line scene will be pre-populated into the 5 line scene. It will copy the data from one scene to the other based on the naming of the text objects..

    #XPression


  • 7.  RE: Scripting Published Objects

    Posted 02-13-2014 14:31
    Brian...

    Where were you over three years ago when we started using XPression? Holy crap, that's awesome. Been a thorn in our side for a while, and no one ever thought to ask if there was another way to do it.

    I think I love you.

    #XPression