Graphics

 View Only
Expand all | Collapse all

Field text to Sequencer item name

  • 1.  Field text to Sequencer item name

    Posted 10-09-2025 10:41

    Hey everyone,

    Is there a way to automate the Sequencer name item to reflect a certain text field. For example, my lower third contains a name field "Jose Martinez". I would like the name of the sequencer item to be called "Jose Martinez L3".

    That would save me from manually renaming many sequencer items. 

    Thanks!



    ------------------------------
    Paulo Dias
    ------------------------------


  • 2.  RE: Field text to Sequencer item name

    Posted 10-09-2025 10:50

    What a great question, I dunno why I have never though to do this, anyway I was so intriged I decided to go write a test and got it first time and it seems pretty robost. 

    I only tested this with a simple scene so go steady as I could see it potentially cause some slowness. 

    Put this script "OnPreviewRender"

    dim item as xpTakeItem
    dim text as xpTextObject
     
    self.GetObjectByName("Text1", text)
     
    text.text = text.text +1



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



  • 3.  RE: Field text to Sequencer item name

    Posted 10-09-2025 11:10

    Thanks Simon, that works perfectly.

    All I added was  + " L3" on the  last line.

    Appreciate the fast response!



    ------------------------------
    Paulo Dias
    ------------------------------



  • 4.  RE: Field text to Sequencer item name

    Posted 10-09-2025 11:12

    Happy to help, actually useful for my own projects as well. 



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



  • 5.  RE: Field text to Sequencer item name

    Posted 10-10-2025 01:48

    Could you please upload some screenshots of how you did it and one of your results?

    Thank you.



    ------------------------------
    Alejandro Galvan
    LA36 LOS ANGELES TV ACCESS
    ------------------------------



  • 6.  RE: Field text to Sequencer item name

    Posted 10-11-2025 13:56
    Here it goes.
    The result was:
    "L3 Joe Smith, Jack Furly, Tina Robson"


    ------------------------------
    Paulo Dias
    ------------------------------



  • 7.  RE: Field text to Sequencer item name

    Posted 10-12-2025 05:48

    I would use ampersand "&" instead of plus "+" in future just incase you get into doing mathematics, using plus symble will get confusing, other than that, nice one!



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



  • 8.  RE: Field text to Sequencer item name

    Posted 10-12-2025 16:34

    Hey Simon, I appreciate the feedback, will switch it to "&".

    This reminds me that I have another scene in the same project in which I need to do some math script for. I tried it in Visual Logic but it seems like the logic is only working after the scene goes online and the scene updates (wrongfully) mid air.

    Basically I need a script that grabs the value of textField1 (Datalinqed) and places into textField2 after adding a plus "1". 

    Example, if textField1 contains "2", textField2 should read "3".

    Is scripting the way to go for this?

    Thank you!



    ------------------------------
    Paulo Dias
    ------------------------------



  • 9.  RE: Field text to Sequencer item name

    Posted 10-13-2025 04:46

    I would have an onOnline script for this yes. 

    Dim text As xpTextObject
    Dim num As Integer
     
    Self.GetObjectByName("Text1", text)
     
    ' Convert the text to a number
    num = CInt(text.Text)
     
    ' Add 1
    num = num + 1
     
    ' Set the new value back as text
    text.Text = CStr(num)



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



  • 10.  RE: Field text to Sequencer item name

    Posted 10-14-2025 06:49

    Thanks Simon, I'm still having trouble with this. The script worked but for some reason it broke some other functionality.

    Currently, the data is driven by a Datalinq key (manual input). I'm trying to automate it.

    Another thing I could try - Is there anyway to auto populate this object (after running the script math) into a Datalinq key? That could solve my issue.



    ------------------------------
    Paulo Dias
    ------------------------------



  • 11.  RE: Field text to Sequencer item name

    Posted 10-15-2025 15:47

    I'll hop in to offer one more improvement:

    Instead of using Engine.Sequencer.GetFocusedTakeItem (which could theoretically end up changing the wrong take item, if another program asked for a preview render while you were focused on something else), you can just use Self.GetTakeItem(item) which will always pull the take item that this scene is attached to (if it is attached to one)



    ------------------------------
    Zachary Fradette
    United States
    ------------------------------



  • 12.  RE: Field text to Sequencer item name

    Posted 10-20-2025 08:36

    How would you type in the title if its not in focus :P 

    I do agree though it's probably safer. 



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



  • 13.  RE: Field text to Sequencer item name

    Posted 10-27-2025 12:49

    So I was discussing with a fellow rocket surgery person and turns out we were both working on this, he has a particularly advanced one but that might be a bit much fore here however, I do have a version I thought suitable. its a loop that you can put on a keygress or gpi that won't require you to go to each item. 

    Dim item As xpTakeItem
    Dim text As xpPublishedObject
    Dim val As String
     
    For i As Integer = 1 To 10
        engine.Sequencer.GetTakeItemByID(i, item)
        item.GetPublishedObjectByName("Text1", text)
        text.GetPropertyString(0, val)
        item.Name = val
    Next





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



  • 14.  RE: Field text to Sequencer item name

    Posted 10-27-2025 13:43

    Slightly different option, this will loop through all your groups

    If you wanted it to say stop after 10 groups so you could have a group it dosn't apply this to you could change 99 to 10.

    Dim group As xpTakeItemGroup
    Dim itemFirst As xpTakeItem
    Dim itemLast As xpTakeItem
    Dim item As xpTakeItem
    Dim text As xpPublishedObject
    Dim val As String
    Dim valFirst As Integer
    Dim valLast As Integer
    Dim i As Integer
    Dim g As Integer
    For g = 0 To 99 
        engine.Sequencer.GetGroup(g, group)
        
        If group Is Nothing Then
            Exit For  
        End If
        group.GetFirstTakeItem(itemFirst)
        group.GetLastTakeItem(itemLast)
        If Not itemFirst Is Nothing And Not itemLast Is Nothing Then
            
            valFirst = itemFirst.ID
            valLast = itemLast.ID
            itemFirst.GetPublishedObjectByName("Text1", text)
            If Not text Is Nothing Then
                text.GetPropertyString(0, val)
                itemFirst.Name = val
            End If
            For i = valFirst To valLast
                engine.Sequencer.GetTakeItemByID(i, item)
                
                If Not item Is Nothing Then
                    item.GetPublishedObjectByName("Text1", text)
                    If Not text Is Nothing Then
                        text.GetPropertyString(0, val)
                        item.Name = val
                    End If
                End If
            Next
        End If
    Next



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