Graphics

 View Only
Expand all | Collapse all

How to play a non-looping roll/crawl with unknown number of child scenes?

  • 1.  How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-12-2023 10:59
      |   view attached

    I have an event list I want to roll via a SceneGroup, driven by Datalinq. There are three scenes visible on screen at a time, so I've created 4 child scenes for safety in case the spacing changes. I'm feeding them via CSV text and n, n+1, n+2, n+3 for the row. When I loop the roll, it works perfectly - shows all the lines I have in my text file, then loops to the beginning (have to keep 'Blank Page on End' off or you'll get a gap after the number of child scenes in the SceneGroup). 

    However, if I want to only show the list once (no loop), but don't know ahead of time how many entries will be there (a producer can update this immediately prior to going live), it only shows the # of child scenes I've created; it won't iterate through the entire list. Also if there are only two entries, but I have four child scenes, it will show each of the two entries twice (four total items) before stopping. This prevents me from creating dozens of child scenes just in case the list is long.

    I can't use global margins to create a gap after the last entry, as that's between child scenes, and the 'Treat Last Page as Full' option doesn't work when looping. 'Blank Page on End' puts a blank after the last child scene, not the last row, so also unhelpful.

    Thanks for any help or suggestions. Test project attached (v8.7)

    #XPression



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------

    Attachment(s)

    zip
    EventRoll.zip   2.32 MB 1 version


  • 2.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 09:04

    Personally at this stage, I'd probably write a script to do this instead. 

    Do you have any experience in this? 



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



  • 3.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 10:33

    I can read and modify script; haven't written many from scratch but did some VB coding in a past life.

    There aren't any Datalinq methods in the SDK so I doubt you can query the number of rows in a source, or iterate through rows within a single script. Perhaps you could read the text property of a presumed unique row before it goes online, save it to an array (but where?), then compare it to anything already in the array to determine if a loop has started. 

    How would you approach this with scripting? I know there are manual ways for the operator to grab and massage the data prior to going live, but it wouldn't always be possible or practical without setting limitations on external updates, which kinda defeats the point of XPression and Datalinq in the first place.



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------



  • 4.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 10:39

    In the past I've either had a manual entry or if I have access to the data I've had them add a field with a number of rows / nodes that I can check.

    I then use a datalinq key to keep count which I update with a scripting during each animation. 

    At the rest point of each animation I copy between text objects from the one connected to data to the visible one. 



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



  • 5.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 10:50

    We should have access to the data. Using the datalinq key method you described, how would you set up the scenes or scene group to iterate through data rows?



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------



  • 6.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 10:52

    I wouldn't use any of that stuff at all I would just use a normal scene.

    Then I'd use a datalinqkey

    Then where you have the <n+1>  I would replace that with <%datalinqKeyName%>

    Then I would use script on a scene director to increment that by 1 each time the text moves up the screen. 



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



  • 7.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 10:53

    dim keys as xpDatalinqKeys

    dim key as xpDatalinqKey

     

    Scene.GetDataLinqKeys(keys)

    keys.GetKeyByName("datakey", key)

    key.asString = cInt(key.AsString) + 1

    Scene.refreshdatalinqs



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



  • 8.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 11:01

    Brilliant. I'll play with this. Thank you!



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------



  • 9.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 11:19

    no worries, what you want on the scene director in in the same script but after the above script,

    or on another script event just after is the copying of the script. 

    dim disp, data as xpTextObject

    Scene.GetObjectByName("Disp", disp)
    Scene.GetObjectByName("Data", data)

    disp.Text = data.Text



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



  • 10.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-13-2023 11:21

    At the point when you copy you'll want you animation to be in a state where the text isn't visible or you'll see it jump when it updates. 



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



  • 11.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-20-2023 02:22

    Hi, Simon. I got this working and am pretty happy with it.

    There's one thing I'm not sure I understood correctly - the section on copying text fields ("disp.Text = data.Text"). I'm not sure what 'disp' and 'data' represented in your example, so I did the following.

    Since we're grabbing two fields from each row, I created one set of text objects (set to static) that are visible and animated, and a second set that isn't visible but has the source set to datalinq. In this example, only one row (pair of text fields) is visible at a time.

    On the first frame of the scene director I set the visible text fields to the datalinq text fields with a copy script (dim statements omitted for readability):

    Scene.GetObjectByName("DL_Event", eventData)
    Scene.GetObjectByName("DL_Person", personData)
    Scene.GetObjectByName("EventName", eventText)
    Scene.GetObjectByName("PersonFullName", personText)
     
    eventText.Text = eventData.Text
    personText.Text = personData.Text

    When the first set of fields is center screen, a check script compares the datalink key with the 'FinalRow' user input value - if it's equal or greater, I pause the scene; otherwise I increment the key, refresh DL and continue the animation off the screen.

    Scene.GetDataLinqKeys(keys)
    keys.GetKeyByName("Row", key)
    Scene.GetObjectByName("LastRow", lastRow)
    Scene.GetObjectByName("DLK", dlk_Row)
    Scene.GetSceneDirectorByName("default",sd)
     
    if key.AsString >= lastRow.Text
      sd.Pause
    Else
      key.asString = cInt(key.AsString) + 1
      dlk_Row.Text = key.AsString
      Scene.RefreshDatalinqs
    End If

    When the text is finally off the screen, I use an event to loop to the beginning, where the copy script resets the visible text objects to the new datalinq values.

    Is this the process you were describing? Is there a more efficient way to do the above? If I want more than one row on screen, I'll just create another pair of text objects and adjust the timing to loop through and update each of them.

    Thanks again for your help and support.



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------



  • 12.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-20-2023 02:53

    disp is short for display (visible) and data is the object I have tied to data. 

    What you have created is exactly what I was describing, nice work!



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



  • 13.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-20-2023 03:06

    LOL - I was just going to update my post to say you seem extremely busy (based on your comments in all the other posts) and I'm good. And you replied anyway. You're amazing and a huge testament to Ross support. I hope you get all your actual work finished as well! 



    ------------------------------
    Bryan Block
    Malick Media
    ------------------------------



  • 14.  RE: How to play a non-looping roll/crawl with unknown number of child scenes?

    Posted 10-20-2023 03:16

    haha! no worries happy to help, yup getting my own stuff sorted lol! 



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