Graphics

 View Only
  • 1.  A couple of scripting questions

    Posted 03-13-2018 19:33
    I need to know what I need to do script-wise, to accomplish the following:

    - Enter text in a single location to populate 10 different scenes (formatting and placement are identical, I just need a type once, set everywhere functionality)

    - Trigger a script to run at a specific time... perhaps to execute when a particular keyframe happens

    - This one might be harder, but I also need to have a script work in a progressive way, so that as say 5 scenes play out, the script state enabled by scene 1 carries over to scene 2, and that script executes, and then both states remain for scene 3, etc, Basically this is to do with text highlight states.. when scene 0 plays, all the 0's will highlight, then say scene 4 plays, I want all the 4's to highlight while the 0's remain highlighted, etc.

    I already have a script for making individual numbers in a string highlight (thanks again, Antoine), but I need to expand upon it to have the above functionality if possible. The first 2 being more pressing than the third.

    Thanks Guys!
    - Willie


  • 2.  RE: A couple of scripting questions

    Posted 03-14-2018 11:07
    Hey Will, regarding your first question I would probably have the scenes check a "main" scene, whichever scene you decide the operator will type into.

    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


    If you have multiple text objects like it sound like you do you'll need to set child to parent for each text you want to be copied. The good news is once you do it for one scene you can just copy and past to the rest of the scenes.

    Regarding your second question you can just put a script on a scene director and then it will execute at that frame.
    #XPression


  • 3.  RE: A couple of scripting questions

    Posted 03-14-2018 17:05
    This sounds good... I am guessing the stuff in parenthesis denotes where I should put the name of my text objects? Do the parenthesis remain? I know that sounds ridiculous, but as I prefaced, I am a COMPLETE noob with scripting
    #XPression


  • 4.  RE: A couple of scripting questions

    Posted 03-14-2018 17:27

    Right - so as expected I am not understanding stuff... bear with me, its a frustrating place to be, but once I get it, I'll get it, and then I'll be one of the ones answering questions instead of asking,

    So, I set up a new scene called Numbers_Master in which I will have the operator enter the text values to populate the various scenes.

    When I plugged in the names where I thought they should go and then attempted to compile the script I got an error message. Screenshot attached below:


    #XPression


  • 5.  RE: A couple of scripting questions

    Posted 03-14-2018 17:44
    Ok, another issue... when placing a script on the timeline, what does one have to enter in the 'Edit Script' dialogue to trigger the script I need to trigger? It seemed logical to me that I could copy my working highlight text script to this, but that returns errors.

    I feel like I am at a medical conference in a foreign language and the only dictionary I have access to (online resources I have found for VBScript) just gives me theory on the construct of the language, rather than definitions... I learn best in context... I'm willing to pay, I just need to be instructed...
    #XPression


  • 6.  RE: A couple of scripting questions

    Posted 03-15-2018 09:38
    The script I wrote up there is to placed on the scene level it needs to be written differently on a scene director and differently again on the text object as different things are set up for you already. For example that script is for the scene so "self" refers to the scene however on a text object "self" is the text object itself.

    I see on another thread you have requested some training so that's probably the way to go just to get you the fundamentals :)
    #XPression