Graphics

 View Only
  • 1.  Set scene director length via script?

    Posted 01-24-2024 16:56

    I have a scene built in XPression that has a material that is replaced by a clip.  This plays fine in a frame buffer, but I'd like to have it play out on a server channel. The clip only plays the length of the scene director that way.  How would I script the changing of a scene director to match the length of the clip assigned to the material?   This is the script I have now at onPreviewRender:

    dim baseobj as xpBaseObject
    dim mat as xpMaterial
    dim mshader as xpVideoShader
    dim sdir as xpSceneDirector

    self.GetObjectByName("Drop Clip Here",baseobj)
    baseobj.GetMaterial(0,mat)
    mat.GetShader(0, mshader)

    mat.SeekTo(mshader.PreviewFrame)
    mat.UpdateThumbnail



    ------------------------------
    Aaron
    ------------------------------


  • 2.  RE: Set scene director length via script?

    Posted 01-25-2024 09:57

    You shouldn't have to change the length of the scene director.

    Do not drag the material in the scene to define the start of play. Instead add a script event. You grab the material as mat, you can do mat.Play()

    You even have a PlayRange(start,finish) command.

    Check out xpMaterial in the SDK help file.



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------



  • 3.  RE: Set scene director length via script?

    Posted 01-25-2024 11:01

    I think you might be after this?



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------