Graphics

 View Only
  • 1.  Problem with script

    Posted 12-06-2017 21:44
    Hi. What I mean.
    I have a scene with text object. Add in this text script. In script code I use a value this text object. I found what script no work. More precisely, do not get value from this text. I tryed to find problem and fix this. And finded. But is crazy. If text named "A" - don't work. If name - "T" - working. And more variations with name text object.
    And more interested, if to stay name "A" (don't work), change value text in sequencer and send scene On Line - have mistake. But if stay scene online and push take again - that script get value and all be right.
    Someone met with a similar one?
    Thanks.
    XPression Designer 7.0, build 3802

    Enjoy!
    http://dropmefiles.com/xU4CV


  • 2.  RE: Problem with script

    Posted 12-07-2017 14:28
    Hey,

    I'm not a great scripter but I would put the script on "onbeforerender" and "previewrender" with some minor changes, see below.


    dim league, text1, text2, textA, textT as xpTextObject

    self.getObjectByName("Text1", text1)
    self.getObjectByName("Text2", text2)
    self.getObjectByName("A", texta)
    self.getObjectByName("T", textt)
    self.getObjectByName("League", league)

    'Swaps logo
    text1.text = "test add text - " & league.text & " - " & texta.text
    text2.text = "test add text - " & league.text & " - " & textt.text
    #XPression


  • 3.  RE: Problem with script

    Posted 12-07-2017 14:41
    I can confirm the problem (but not redmile's solution). It seems to evaluate published items in alphabetical order. When A is set, the OnSetText script runs, but League has not yet been set. When T is set, the OnSetText script runs, and League has already been set.

    Method: I renamed A to B and it still didn't work; I renamed League to ALeague and adjusted the scripts, and it worked.

    Interesting find, glad there are work-arounds.

    #XPression


  • 4.  RE: Problem with script

    Posted 12-07-2017 15:53
    Thanks, guys! But this do not fixed global problem ). I found this and of course change objects. That cures the symptoms only. )
    Thanks. And more little bug.
    Sometimes if add stagger animation (SA) on object-track - and reposition folow SD, SA - is be lost. If reload project - SA is comeback. But if do not know this, You add new SA on object-track and You will see a mistake. (
    #XPression