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
------------------------------
Original Message:
Sent: 01-24-2024 16:55
From: Aaron Rice
Subject: Set scene director length via script?
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
------------------------------