Graphics

 View Only
  • 1.  3-point loop in template video

    Posted 08-19-2015 22:19
    I use 3-point loops for animations frequently. However, that seems to work well using the scene director to make the loop. What happens when you want to use a 3-point loop on a template where the clip being looped is being dynamically changed in the newsroom system? I can't put it on the scene director, and selecting loop for the "dummy clip" is looping the entire clip, not just the portion I want looped.

    I thought about scripting for the clip to loop and placing the script on the scene director at the appropriate place, but I'm not sure how to script it.

    Anyone have ideas?

    Thanks!


  • 2.  RE: 3-point loop in template video

    Posted 08-20-2015 15:00
    Not sure if this is 100% what you need but it might be a start, I frequently have a clip that has a 3-point loop underneath other elements that animate independently from the loop.

    To start, I make two scene directors: "Loop" & "Animation", make sure you set "Animation" as your default SD.

    In the "Loop" SD I only put in the clip I want to 3-point loop and the Event to make it loop properly. Everything else goes in the "Animation" SD and it can include pretty much anything; pauses, other clips, animation controllers...

    Then add the script to your scene in OnOnline:

    dim sd as xpSceneDirector

    self.GetSceneDirectorByName("Loop", sd)

    sd.PlayRange(0, sd.Duration)

    Just make sure that "Loop" matches whatever you call your scene director with the 3-point loop in it.

    #XPression


  • 3.  RE: 3-point loop in template video

    Posted 08-20-2015 20:08
    I appreciate your reply. However, the issue I'm having is that the scene director would only be able to loop the specific clip that is put on it. What do you do about a clip that is selected by the ENPS plug-in and is replacing a "dummy clip" that is on the template. A scene director can't loop a clip it doesn't know about.

    Your example would be a good idea for having two independently looping clips, not a looping clip that is dynamically changing in the sequencer.

    What would be a script that calls to the active clip that's playing?

    #XPression


  • 4.  RE: 3-point loop in template video

    Posted 08-20-2015 23:07
    Unfortunately I'm not familiar with Newsroom/ENPS, how do they dictate to the XPression what clip to play? Is it just replacing the source clip in the material or through some kind of Datalinq to the filepath?

    #XPression


  • 5.  RE: 3-point loop in template video

    Posted 08-20-2015 23:49
    When you use "Template Links," it allows you to replace parameters of a template, either in the sequencer directly or through an outside source like a newsroom system (ENPS, iNews) or datalinq. In either case, the actual video being played has replaced the template "placeholder."

    In my issue here, the scene director won't affect the actual clip I want looped because that clip is replaced outside the template.

    Anyone else have an idea?

    #XPression


  • 6.  RE: 3-point loop in template video

    Posted 07-09-2021 14:50

    I know this is 6 years old BUUUT for anyone still wondering... the trick for me was to have a duplicate object (with visibility off) and duplicate material that both act as an input for the original. One set is for my "Clip" and one set is for my "Input". You still put your Clip material into the scene director, then just add this code to the OnPrepare section (so that the preview is updated as well):
    #XPression

    dim loopClip, loopInput as xpBaseObject
    dim clipMat, inputMat as xpMaterial
    dim clipShader, inputShader as xpBaseShader
    
    'get objects
    self.getobjectbyname("ZTO Loop Clip", loopClip)
    self.getobjectbyname("ZTO Loop Input", loopInput)
    
    'get materials
    loopClip.getMaterial(0, clipMat)
    loopInput.getMaterial(0, inputMat)
    
    'get shaders
    clipMat.getShader(0, clipShader)
    inputMat.getShader(0, inputShader)
    
    'set clip shader file to match input shader file
    clipShader.setFilename(inputshader.filename)
    
    
    ​





    ------------------------------
    Joshua Coats
    Newsroom Artist
    Court TV
    ------------------------------