Graphics

 View Only
  • 1.  API - Play second SceneDirector

    Posted 07-09-2013 13:55
    Hello,

    I am trying to play a second SceneDirector in one Scene via the API.

    This seems only possible by setting this SceneDirector as default one.

    Can someone confirm this?

    It would be much more comfortable if I did not have to change the default property permanently.

    Kind regards,

    Spectro


  • 2.  RE: API - Play second SceneDirector

    Posted 07-09-2013 14:37
    Hi Spectro,

    It's not neccessary to set it as the default SceneDirector.

    You can define two SceneDirectors and then use those instances directly.

    Example:

    dim SDirector1 as XpSceneDirector

    dim SDirector2 as XpSceneDirector

    XpScene.GetSceneDirectorByName("Name1", SDirector1)

    XpScene.GetSceneDirectorByName("Name2", SDirector2)

    Then you have the same possibilities with those SDirector's that you have with the default Scene Director.

    Good luck!

    Kenneth

    #XPression


  • 3.  RE: API - Play second SceneDirector

    Posted 07-09-2013 14:48
    Hi Kenneth,

    no that does not work for me.

    I can define two scenedirectors, but only the default one accepts commands.

    For example:

    I have Scenedirector (SD1) which plays a video on a Quad and SD2 which does some DVE effects with the Quad.

    With SD1 as default sd1.play... plays the video, but sd2.Play... or sd2.PlayRange... does nothing.

    When I now do a SD2.setasDefault I am able to play the DVE but the video on SD1 stopps imediately.

    Any ideas?

    #XPression


  • 4.  RE: API - Play second SceneDirector

    Posted 07-09-2013 15:04
    Oh you want to play them simultaneously?

    I don't know if that's even possible. I actually haven't tried it yet.

    Is it an option for you to put the DVE-effect inside the same Scene Director?

    #XPression


  • 5.  RE: API - Play second SceneDirector

    Posted 07-09-2013 15:29
    At first, sure there are workarounds for almost everthing in such a powerful tool like xpression :-)

    My goal is to play two scenedirectors simultaneously.

    But at the moment even playing two scenedirectors one by one does not work as I want.

    Here some examples in pseudocode, I am using Delphi not VB.

    dim SDirector1 as XpSceneDirector

    dim SDirector2 as XpSceneDirector

    XpScene.GetSceneDirectorByName("Name1"³, SDirector1)

    XpScene.GetSceneDirectorByName("Name2"³, SDirector2)

    this example works:

    SDirector1.setAsDefault

    SDirector1.Play(true, 10000)

    SDirector2.setAsDefault

    SDirector2.Play(true, 10000)

    this example plays only SDirector1:

    SDirector1.setAsDefault

    SDirector1.Play(true, 10000)

    SDirector2.Play(true, 10000)

    this example plays one second of SDirector1 then SDirector2 :

    SDirector1.setAsDefault

    SDirector1.Play(false, 0)

    wait(1s)

    SDirector2.setAsDefault

    SDirector2.Play(true, 10000)

    this example plays SDirector1 :

    SDirector1.setAsDefault

    SDirector1.Play(false, 0)

    wait(1s)

    SDirector2.Play(true, 10000)

    Since my project has to be done, I'm going to give up the second scene director and focus with it later.

    Thank you,

    spectro

    #XPression


  • 6.  RE: API - Play second SceneDirector

    Posted 01-24-2014 14:07
    I tried again today and with a newer version of Xpression it works.

    #XPression