Graphics

 View Only
  • 1.  Scripting Question, Conditional states

    Posted 07-19-2012 13:21
    Hey Everyone,

    This may not even be possible but I figured I'd ask. Is it possible to have conditional animation controllers that are only triggered when something is put online at a specific layer?

    For example lets say I have an image on layer 0, Would it be possible to get it to shift to the left and scale down if something is brought on at layer 4? Currently I am trying to adjust the Xpression Transition logic script but it does not seem to be working well.

    Next question is there an output for the script? like a simple print command so I can keep track of variables as the script is running? Thanks!


  • 2.  RE: Scripting Question, Conditional states

    Posted 07-23-2012 19:57
    Hi Sam,

    Try this sample out.. https://rossvideo.centraldesktop.com/p/eAAAAAAAAUvbAAAAAENxR-8

    Put the scenes online from the sequencer and you will see how the "yellow box" and the "purple box" move when the "red bar" goes online and offline.

    For debugging a script, I find the MsgBox("put some string here") function is the best.. You can use it to output the value of any variable etc.. It's also a good way to spot errors in scripts.. If the scripting engine encounters a bug in the script it will just stop executing the script from the bad line. I use the MsgBox("blah") and put it at different parts of the script to find out how far along in the script the code got executed.

    #XPression


  • 3.  RE: Scripting Question, Conditional states

    Posted 07-27-2012 01:41
    Hey Brian,

    I am new the the scripting game here with Xpression and I am intrigued by this concept. I have downloaded the sample you provided above, but I cannot see where the execution for the conditional animation exists. Could you elaborate on how you did that trick?

    Thanks much

    #XPression


  • 4.  RE: Scripting Question, Conditional states

    Posted 07-27-2012 02:22
    Hi Bryan,

    The animation controller is being played back through a script in the scene. If you right click on the scene thumbnail in the scene manager and choose "Edit Script Events", you'll see scripts for OnOnline and OnSceneOnline. These scripts control the animation controller execution.

    The OnOnline script gets run when this particular scene goes online. In the example above the purpose of the OnOnline script is to see if the lower bar is already onair. If it is, then it will make sure the scene starts which the yellow or purple box already in the shifted up position.

    The OnSceneOnline script gets executed whenever this scene is on-air and a new scene is coming on air. The example uses this event to check for the Red Bar (or any other scene that will be on Layer 4) to be coming on-air. If it detects a scene on layer 4 going on air, then it will play a prebuilt animation controller in the scene that will shift the objects up.

    Oh, and there would also be an OnSceneOffline script to check if the red bar is going offline, and if so then it will play the animation controller backwards to shift the objects down again.

    #XPression


  • 5.  RE: Scripting Question, Conditional states

    Posted 07-27-2012 02:40
    Brilliant! Thank you sir. That opens up a new world. I just found the SDK so that will help as well.

    #XPression


  • 6.  RE: Scripting Question, Conditional states

    Posted 08-01-2012 20:13
    Hi Brian,

    This is incredible! And exactly what I was looking for. Thanks a million!

    #XPression