Graphics

 View Only
  • 1.  Framebuffer selection

    Posted 08-29-2015 03:08
    Good evening,

    I have a series of miniboards and associated "pops" messages that are built to run from channel 1 (framebuffer 1), but some of my clients need these to run from the channel 2. Changing the framebuffer assignment in sequence is the easy part - but I have a script in the pops that needs to set the channel assignment as shown below. I've tried to set it with a widget and other means, but so far have had no success. I have a solution that will work for this but it's far from elegant. If anybody has any suggestions, I'd love to hear them. And of you need a clarification of what I'm trying to do, please let me know.

    The script below plays off the title header in the miniboard message while the "pop" animates on in a different layer.

    Thanks,

    Brian

    dim channel as xpOutputFrameBuffer

    dim template as xpScene

    dim titleOff as xpAnimController

    dim takeItem as xpBaseTakeItem

    engine.GetOutputFrameBuffer(0,channel)

    channel.GetSceneOnLayer(2, template)

    template.GetAnimControllerByName("titleAnim", titleOff)

    titleOff.position = 20

    titleoff.PlayRange(20,0)



  • 2.  RE: Framebuffer selection

    Posted 08-29-2015 03:18
    The script can ask the scene what framebuffer and layer it is currently on.

    Self.GetOnline(framebuffer, layer) where both parameters are integers.

    Then you could do: engine.getoutputframebuffer(framebuffer, channel)

    #XPression


  • 3.  RE: Framebuffer selection

    Posted 08-29-2015 03:47
    That was a nudge in the right direction - though the answer came in part from elsewhere in the forum...here's the revised script:

    dim channel,framebuffer as integer

    dim output as xpOutputFrameBuffer

    dim template as xpScene

    dim titleOff as xpAnimController

    scene.GetOnline(framebuffer,channel)

    engine.GetOutputFrameBuffer(framebuffer,output)

    output.GetSceneOnLayer(2, template)

    template.GetAnimControllerByName("titleAnim", titleOff)

    titleOff.position = 20

    titleoff.PlayRange(20,0)



    Now the pops should be following the miniboard... thanks Brian!

    #XPression


  • 4.  RE: Framebuffer selection

    Posted 08-29-2015 13:07
    Yes, that looks like what I was trying to get across.. Only one small mistake (but it won't affect your script at all)..

    It should be like this:

    `

    dim framebuffer,layer as integer

    scene.GetOnline(framebuffer,layer)

    `

    because the second parameter from GetOnline is a layer, not a channel..

    #XPression