Graphics

 View Only
  • 1.  Preview frames in XPression MOS plug-in

    Posted 02-03-2021 15:53

    Hello.  I have a template where I'm trying to change the preview displayed in the XPression MOS plug-in based on whether or not a text box is empty.  The script below I have in On Prepare (ignore the MOS string programming.  That bit is working.).  It's currently not showing the desired preview frame in the plug-in.  I'm sure I'm missing something.  Looking to the community for answers.  Thanks for the help!

    'declare variables
    dim txtAnimated, txtType, txtStyle, txtBkgd, txtMonth, txtDay, txtBody as xpTextObject
    dim director as xpSceneDirector
    dim track as xpSceneDirectorTrack
    'dim clip as xpSceneDirectorClip
    dim Animated, Type, Style as string

    'get scene object
    Self.GetObjectByName("Animate Graphic", txtAnimated)
    Self.GetObjectByName("Select Graphic Type", txtType)
    Self.GetObjectByName("Select FS Style", txtStyle)
    Self.GetObjectByName("Custom Background Text", txtBkgd)
    Self.GetObjectByName("Calendar Title", txtMonth)
    Self.GetObjectByName("Calendar Date", txtDay)
    Self.GetObjectByName("Text", txtBody)
    Self.GetSceneDirectorByName("Preview", director)
    director.GetTrackByName("PreviewTrack", track)

    'engine.DebugMessage("Selected Style = " & txtStyle.Text, 0)

    'set preview frame
    If txtBody.Text = "" Then
    track.Position = cdbl(40)
    Else
    track.Position = cdbl(115)
    End If

    'set type MOS string
    If txtType.Text = "Full Screen" Then
    Type = ""
    Else
    Type = "*LIVE VIDEO REQUIRED* | "
    End If

    'set style MOS string
    If txtStyle.Text = "0" Then
    Style = "Normal"
    Else
    Style = "Breaking"
    End If

    If txtBkgd.Text <> "" Then
    Style = right(txtBkgd.Text, len(txtBkgd.Text)-30)
    End If

    'set animated MOS string
    If txtAnimated.Text = "Animated" Then
    Animated = "Animated | "
    Else
    Animated = ""
    End If

    'engine.DebugMessage("Style = " & Style, 0)

    'set MOS string output
    If Type = "*LIVE VIDEO REQUIRED* | " Then
    Self.MOSDescription = "FS Timeline: " & Animated & Type & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text
    engine.DebugMessage("FS Timeline: " & Animated & Type & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text, 0)
    Else
    Self.MOSDescription = "FS Timeline: " & Animated & Type & Style & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text
    engine.DebugMessage("FS Timeline: " & Animated & Type & Style & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text, 0)
    End If


  • 2.  RE: Preview frames in XPression MOS plug-in

    Posted 03-19-2021 12:30

    Preview always comes from the default preview scene director and then you can just move the scene director to a different position.

    Here's a script that moves the scene director based on a drop down menu in the plugin and moves the default scene director where you want for different operator previews. 

    if text = "1" then
    scene.SceneDirector.Position = 0
    elseif text = "2" then
    scene.SceneDirector.Position = 60
    elseif text = "3" then
    scene.SceneDirector.Position = 120
    end if


    #XPression


  • 3.  RE: Preview frames in XPression MOS plug-in

    Posted 03-20-2021 01:40

    Hi Simon, thank you for this.  What if you had multiple scene directors?  Could you change the line to specify which scene director?

    scene.SceneDirector.SceneDirectorName.Position = 120

    Would the above work as well?

     


    #XPression


  • 4.  RE: Preview frames in XPression MOS plug-in

    Posted 03-20-2021 14:20

    No it doesn't really work like that, what exactly are you trying to achieve and I can probably write something. 

     


    #XPression


  • 5.  RE: Preview frames in XPression MOS plug-in

    Posted 03-20-2021 15:54

    Thanks Simon, I'm not really working on anything, I saw the post and I was just curious. Thank you for the quick reply.

    Cheers


    #XPression


  • 6.  RE: Preview frames in XPression MOS plug-in

    Posted 03-22-2021 10:52

    Ok the way to do it would be to change which scene director is default in the script so if you ever do need to do it let me know and I can help. 


    #XPression