Graphics

 View Only
  • 1.  Script to mask crawl while pausing crawl.

    Posted 06-24-2022 19:32
    Hello, I'm having trouble combining 2 scripts into 1.  I have a crawl scene group with a second scene director "HIDE" to mask off the crawl.  I found the following script on this forum to accomplish this perfectly.  I was then able to find (again on this great forum) a script to "pause" my crawl; which works perfectly.  What I'm trying to do is combine these 2 scripts into 1 keyboard script action.  Basically, run the Scene Director "HIDE", then pause the crawl; alternately, start the crawl and run Scene Director "HIDE" backwards to reveal the crawl.  I've tried several iterations and cannot seem to get both to work in 1 script, any suggestions would be great.  Thank you.

    'Hide the Crawl
    'This script will play forwards & back.
    dim scene as xpScene
    dim fb as xpOutputFramebuffer
    dim scenedir
    engine.GetOutputFramebuffer(0, fb)
    if fb.GetSceneOnLayer(0, scene) then
    if Scene.Name = "CRAWL" then
    if scene.GetSceneDirectorByName("HIDE", scenedir) then
    if scenedir.position >= 40 then
    scenedir.PlayRange(40, 0)
    else
    scenedir.PlayRange(0, 40)
    end if
    end if
    end if
    end if


    'pause the crawl
    dim fb as xpOutputFramebuffer
    dim scene as xpScene
    dim scenegroup as xpSceneGroup
    engine.GetOutputFramebuffer(0, fb)
    fb.GetSceneOnLayer(0, scene)
    if scene.IsGroup then
    scenegroup = scene
    scenegroup.stop
    end if

    ------------------------------
    Steve Szeszycki
    XPresssion Operator
    Los Angeles United States
    ------------------------------


  • 2.  RE: Script to mask crawl while pausing crawl.

    Posted 06-25-2022 14:09
    Steve,

    Without seeing your scene and combined script, I'm not sure exactly why these won't work in a single script. If you've been copying the entire second script to the end of the first, try putting a ` at the beginning of lines 2-4, since the first three 'declaration' commands in the second script (dim ... as xp...) won't run twice, like this.

    'Hide the Crawl
    'This script will play forwards & back.
    dim scene as xpScene
    dim fb as xpOutputFramebuffer
    dim scenedir
    engine.GetOutputFramebuffer(0, fb)
    if fb.GetSceneOnLayer(0, scene) then
    if Scene.Name = "CRAWL" then
    if scene.GetSceneDirectorByName("HIDE", scenedir) then
    if scenedir.position >= 40 then
    scenedir.PlayRange(40, 0)
    else
    scenedir.PlayRange(0, 40)
    end if
    end if
    end if
    end if
    'pause the crawl
    'dim fb as xpOutputFramebuffer
    'dim scene as xpScene
    'dim scenegroup as xpSceneGroup
    engine.GetOutputFramebuffer(0, fb)
    fb.GetSceneOnLayer(0, scene)
    if scene.IsGroup then
    scenegroup = scene
    scenegroup.stop
    end if

    My other suggestion would be to leave both of these scripts separate as they are now, but to run them with a single Keyboard Shortcut in a Group. You an add a group function to your Keyboard Shortcuts, then make your two Script Actions children of that Group. Enable the option to run all children actions when the group is triggered, and both scripts actions should run together. It would look something like this:


    This would also allow you to keep each script separate, so you could run each on it's own if you ever needed. Keep us updated if either of these work for you.

    ------------------------------
    Jeff Mayer
    Ross Video
    ------------------------------



  • 3.  RE: Script to mask crawl while pausing crawl.

    Posted 06-27-2022 20:38
    Hey Jeff, thanks for the reply; that was actually a good idea which I hadn't considered.  My goal though is try to get this all to work in one Keyboard Shortcut press.  So, I actually decided to place my "crawl pause" into a Script Event on the "HIDE" Scene Director (that way I can control when the crawl will pause with the animation. This works perfectly with my Keyboard script action.
    dim scenegroup as xpSceneGroup
    if scene.IsGroup then
    scenegroup = scene
    scenegroup.speed=0.0
    end if
    Scene Director

    However, when I use my Keyboard Script Action to play the Scene Director backwards (frame 40 to 0) it does not seem to recognize the "Start" script action; which has  "Execute when activated from play direction: Right" selected.  I'm not sure why, because my HIDE Animation Controller plays correctly forward and back with the Keyboard Script Action.

    I should also note that when I play the crawl on the Layout side and manually trigger the scene director "HIDE" to cover/pause and then reverse the Scene Director to reveal/start, it works exactly how I want it to.

    ------------------------------
    Steve Szeszycki
    XPresssion Operator
    Los Angeles United States
    ------------------------------