Graphics

 View Only
  • 1.  Copy text objects

    Posted 06-07-2016 20:21
    Hi guys, how I wish visual logic will be able to fetch objects in other scenes!
    While I wait for that, perhaps some of you can help me out with a simple issue. I don't see why this don't work. It compiles.

    OnOnline...
    dim scene1 as xpScene
    dim player1original as xpTextObject
    dim player1 as xpTextObject
    Engine.GetSceneByName("Opening title", scene1)
    scene1.GetObjectByName("Hometeam 1", player1original)
    self.GetObjectByName("Player1", player1)
    player1original.Text=player1.Text

    Any help would be great!





  • 2.  RE: Copy text objects

    Posted 06-07-2016 23:55
    The script looks fine, but when you call engine.GetSceneByName you are getting the original scene from layout mode. This won't be the same as one that may be online from the sequencer.
    If you actually need a scene that is online from the sequencer you will need to get it from the xpOutputFramebuffer object.
    #XPression


  • 3.  RE: Copy text objects

    Posted 06-08-2016 13:39
    Argh, I am just not getting any results. Could you please share an example?
    #XPression


  • 4.  RE: Copy text objects

    Posted 07-17-2017 07:51
    Hey JensDanmon, I'm curious.... Did you found a solution?
    #XPression


  • 5.  RE: Copy text objects

    Posted 07-17-2017 10:02
    Hey,

    This will point you in the right direction I think.
    It requires the other scene (parent) to be online of course.


    dim textparent, textchild as xpTextObject
    dim parent as xpScene
    dim fb as xpOutputFramebuffer

    engine.GetOutputFramebuffer(0, fb)
    fb.GetSceneOnLayer(0, parent)
    parent.GetObjectByName("Text1", textparent)

    self.GetObjectByName("Text1", textchild)

    textchild.text = textparent.text
    #XPression


  • 6.  RE: Copy text objects

    Posted 09-05-2017 15:14
    Would it make sense that any font-tags would get lost in this process? I am trying to copy a text from one object to another within the same scene, and the font-tags doesn't follow along... I tried at first with Visual Logic, but that didn't work. This is the code I am using.

    dim Line1 as xpTextObject
    Self.GetObjectByName(Line1, line1)

    dim Line1_2 as xpTextObject
    Self.GetObjectByName(Line1_2, line1_2)
    line1_2.text = line1.text

    #XPression