Graphics

 View Only
  • 1.  Setting the image file in a shader

    Posted 04-30-2018 18:41
    Hi
    I am setting the image file name of a texture shader, and find that if I have 1 material already pointing to a file, when I set another material's shader to point to the same file, the object that uses the first material has a flash frame as the file name is set. Sometimes it doesn't happen, but most of the time it does.
    I have tried using shader.setfilename and also shader.filename =
    Both give the same results.

    Any ideas?
    Thanks
    Simon


  • 2.  RE: Setting the image file in a shader

    Posted 04-30-2018 18:50
    Hi Simon,
    Try adding an xpEngine.Lock and .Unlock around the .Filename= call.


    #XPression


  • 3.  RE: Setting the image file in a shader

    Posted 04-30-2018 18:59
    Thanks Brian that has fixed it. If I have other animations going on at the same time, will they pause?
    And what is best setfilename or .filename =?
    #XPression