Graphics

 View Only
  • 1.  How can I get the texture filename with script?

    Posted 09-13-2015 19:38
    In Xpression, I want to display with a Text field the filename of a texture that is on a Quad layer.

    I couldn't find a way to do it in Visual Logic.

    How can I get filename with the layer script?

    Is it possible and if so, please point me the right direction.

    Thank you!


  • 2.  RE: How can I get the texture filename with script?

    Posted 09-14-2015 17:01
    You can use a script like this in OnOnline, and OnPreviewRender:

    `

    dim quad as xpBaseObject

    dim mat as xpMaterial

    dim shader as xpBaseShader

    dim text as xpTextObject

    Self.GetObjectByName("Text1", text)

    Self.GetObjectByName("Quad1", quad)

    if quad.GetMaterial(0, mat) then

    if mat.GetShader(0, shader) then

    text.text = "The filename is: " + shader.filename

    end if

    end if

    `

    #XPression


  • 3.  RE: How can I get the texture filename with script?

    Posted 09-14-2015 22:06
    Brian,

    Thank you for your help as always.

    This worked perfectly.

    Best,

    #XPression