Graphics

 View Only
  • 1.  Scripting for realtime file updates.__Help!

    Posted 12-05-2013 01:39
    Hello Ross Community! My company just picked up an Xpression to work with our Ross vision 1 Switcher. The way we use Xpression is in this way; a producer brings in 10-15 stills a day for a morning news talk show. We have 50 stills templates created in our sequencer all referencing a pic 101, 102, 103, etc up to 50. We want to be able to paste our days 10-15 stills in the root images folder and have them auto populate in Xpression. We talked with a Ross rep who indicated it is not natively possible to realtime populate those images because X doesnt work by constantly pinging the root folder. He came up with a script to help us do it which I have attached below, but for some reason, the pics show up in X, except 101 and 103 and if I change them back to our "default" images, or placeholders, it will not auto-populate back. Can anyone take a look at this script and see anything wrong. Scripting is not my strong-suit so I barely know what Im looking at down there.

    Any help is greatly appreciated!

    Thanks all!

    Tim Jacobs

    (Numbers are line numbers only)

    1 dim name as xpTextObject

    2 dim pic as xpBaseObject

    3 dim candidatepic as xpMaterial

    4 dim picshader as xpBaseShader

    5 dim FilePath as String

    6

    7 Self.GetObjectByName("name", name)

    8 FilePath = Engine.ProjectPath & "ImagesShowDayPics" & name.Text & ".tif"

    9 Self.GetObjectByName("pic", pic)

    10 pic.GetMaterial(0, candidatepic)

    11 candidatepic.GetShader(0, picshader)

    12 picshader.SetFileName(FilePath)


  • 2.  RE: Scripting for realtime file updates.__Help!

    Posted 12-05-2013 02:32
    Since it works fine for most objects but not 101 and 103, I don't think the error is in the script.

    Everything in that script looks ok (except there are some backslashes missing from the path's but I think this message board probably removed them).

    Can you post your project anywhere?

    Note, that if you replace a file on disk, XPression won't necessarily update the texture because XPression caches them. You may need to restart XPression after changing the images on disk.

    #XPression


  • 3.  RE: Scripting for realtime file updates.__Help!

    Posted 12-05-2013 02:39
    I'm don't fully understand why you need this script at all though..

    Can't you just create the sequence items that point to 101.tif, 102.tif, 103.tif etc.. Then when you overwrite those files on disk with the days pic's XPression will use them? You'll need to either restart XPression or Flush the Texture Cache (in the Tools->Advanced menu) after overwriting the files on disk but then XPression will use the new stills.

    #XPression


  • 4.  RE: Scripting for realtime file updates.__Help!

    Posted 12-05-2013 03:22
    The main reason for the script is because we often get stills sent to us DURING the show which is live. The virtual output is feeding a monitor on set so the program cant be shut down when we add stills. Thats the issue we are trying to work around. The script was meant to basically reference the root file instead of the xpression cache.

    I mean as of right now we are shutting it down before the show and we told the producers they cant send stills mid-show, but we would like to accommodate them if we can.

    I can look into getting a project on dropbox when I go into work tomorrow.

    #XPression


  • 5.  RE: Scripting for realtime file updates.__Help!

    Posted 12-05-2013 13:51
    Just to be clear, when you get new stills you are OVERWRITING an existing file on disk with the same file name?

    I don't think the script will bypass the cache so I think it will have the same results as the approach I suggested.

    Try the Tools->Advanced->Flush Texture Cache menu option. This should do what you need and doesn't require restarting XPression.

    #XPression


  • 6.  RE: Scripting for realtime file updates.__Help!

    Posted 12-05-2013 17:19
    Our new stills have the same file name as the ones we are replacing. The Flush Cache worked!!!!!! Thats so funny too because I saw that option like 3 days ago and we moved on with a different theory and I forgot to go back to try that. Crazy that it was really that easy. Brian, you are awesome. Thanks!

    #XPression