Graphics

 View Only
  • 1.  Change Text based on Director position & trying to show curent director position.

    Posted 02-06-2017 04:46
    I'm trying to change text based on director position and trying to show current director position but can not work.
    Any help with this?
    '--------------------------------------------------------
    Dim output As xpOutputFramebuffer
    Dim dir As xpSceneDirector
    Dim scene As xpScene
    dim txt1 as xpBaseObject
    dim txt2 as xpBaseObject

    engine.GetOutputFramebuffer(0, output)

    output.GetSceneOnLayer(0, scene)
    scene.GetSceneDirectorByName("MyDir", dir)
    scene.GetObjectByName("Text1", txt1)
    scene.GetObjectByName("Text2", txt2)

    dim i as integer
    i = dir.Position

    if i > 0 then
    txt1.text = "My Text 001"
    else
    txt1.text = "My Text 002"
    end if

    txt2.text = dir.Position
    '-------------------------------


  • 2.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-06-2017 09:51
    Hello, Mahibul.
    Maybe You paste text script in OnRender tab - must be work. Or using Visual Logic, if You want to see position SD in local scene. If in another scene - use script only.

    #XPression


  • 3.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-06-2017 10:49
    Hi Mahibul,
    I got your script to work, just by replacing one line:
    scene.GetSceneDirectorByName("MyDir", dir) - wasn't taking my Director name, so I replaced the line with this:
    scene.GetSceneDirector(0,Dir)


    #XPression


  • 4.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-06-2017 13:58
    Your script looks good.. Maybe there is a typo somewhere in it. It would be easier to debug if you uploaded the project/scene.

    #XPression


  • 5.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-08-2017 09:55
    Thanks Sample82. Solved the problem.

    #XPression


  • 6.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-08-2017 22:01
    Hi Mahibul,
    Be aware that it is possible to encounter performance issues when using scripts in the OnRender event. If it works that's fine, but just keep it in mind.
    OnRender scripts are running every 16ms in 1080i 29.97 so they can become quite resource intensive.
    #XPression


  • 7.  RE: Change Text based on Director position & trying to show curent director position.

    Posted 02-09-2017 14:30
    Thanks @garner for your valuable comment.
    I am just learning XPression. I have used VIZRT more then four years on SATV in Bangladesh. Now I am using XPression on NEWS24 tv channel in Bangladesh. So this is my learning part.

    Thanks again.
    #XPression