Graphics

 View Only
  • 1.  Relative and Absolute path within scripting

    Posted 07-05-2017 15:10
    Hi There,

    How can I link to images/video's which are places into the "video" of "images" map, but without using with the whole (absolute) path?

    For example...


    If txt.Text = "Background 1" Then
    material.GetShader(0, shad)
    shad.SetFileName("................................ ..............Video\DLS\background 1.avi")
    End if


    How can I make a relative link from the location of the project.xpr file?


  • 2.  RE: Relative and Absolute path within scripting

    Posted 07-05-2017 16:31
    xpEngine.ProjectPath

    This is found in the XPression SDK file in the public properties for xpEngine Object Members.
    #XPression


  • 3.  RE: Relative and Absolute path within scripting

    Posted 07-06-2017 08:00
    Thanks,

    Can you give me advice how I can implement it into the code. I can't get it right.
    #XPression


  • 4.  RE: Relative and Absolute path within scripting

    Posted 07-07-2017 19:26
    dim quad as xpBaseObject

    self.GetObjectByName("Quad1", quad)
    quad.SetVolatileTextureFile(0, Engine.ProjectPath + "\Images\Pic1.jpg")
    #XPression