Graphics

 View Only
  • 1.  Script in Scene director

    Posted 11-14-2014 15:45
    Hi guys, hopefully someone can point me in the right direction.

    I am trying to build an scriptevent in scene director that will make the scene jump to X,Y,Z position based on a GPI trigger. If GPI1 then jump to frame 30 etc.

    I have not found a way to manipulate the play position yet. Anyone?


  • 2.  RE: Script in Scene director

    Posted 11-14-2014 21:53
    I think you should take a different approach. I would create scripts in the Keyboard/GPI Mapping menu that are assigned to each GPI trigger. Those scripts would get the Scene on the OutputFramebuffer and could then set the position of the scene director.

    It would be something like:

    `

    dim fb as xpOutputFramebuffer

    dim scene as xpScene

    engine.GetOutputFrameBuffer(0, fb)

    if fb.GetSceneOnLayer(0, scene) then

    scene.scenedirector.position = 100

    end if

    `

    #XPression


  • 3.  RE: Script in Scene director

    Posted 11-17-2014 15:36

    Hi Brian,

    this was my first idea, but that would effect every scene in the project. I want this GPI to work only if one specific scene is online.

    So im trying to do a script event in scene director.

    This is what I have:


    dim gpi as xpGPIboard

    engine.GetGPIboard(0, gpi)

    gpi.GetInputState()

    if gpi.OnGPI(0, 0, true) then

    scene.scenedirector.position = 100

    end if



    Am I calling the GPI board wrong?

    I have set SmartGPI as board #1 in hardware setup. And firing SmartGPI #1 in Dashbord.

    Any help is appreciated!


    #XPression


  • 4.  RE: Script in Scene director

    Posted 11-17-2014 15:44
    Sorry, I dont think that going to work. In your method the script would only get called once when the scene director is running and the play-position hits the frame with your script.. So unless the GPI were triggered exactly on the same frame when the script runs there is no way it would ever detect the GPI. If you were using a real hardware GPI then you could just read the InputPinState on that frame (like you were trying) to see if it is high or low; but the Smart GPI trigger is a momentary edge trigger and not a High/Low state. I'm still not sure if you could actually change the scene director position from inside a script on the scene director though.

    The only advice I can give, is to try to do it the way I suggested. If you only want it to work when a specific scene is online, then just check the scene name or ID after calling GetSceneOnLayer to see if it matches the scene you want. If not, then just exit the script without setting the position.

    #XPression