Graphics

 View Only
  • 1.  Change material

    Posted 06-11-2015 12:44
    Hello.

    I try to change material on an object:

    dim objBkg as xpBaseObject

    dim objMat as xpMaterial

    Self.GetObjectByName("Under_titel_bkg", objBkg)

    Engine.GetMaterialByName("A farve", objMat)

    objBkg.SetMaterial(0, objMat)


    But it doen't work for me

    Brg Tue.


  • 2.  RE: Change material

    Posted 06-11-2015 14:09
    You should enable the Preference "Enabled Debug Monitor for Scripting" and restart XPression, then try again. You may find you get error messages in the debug monitor like, "Object with Name xxxx not found", or "Material not found" etc.. This will help you determine why your script is not working.

    If you post a link to your project/scene/script, I'm sure someone could look and tell you exactly what is wrong.

    #XPression


  • 3.  RE: Change material

    Posted 06-11-2015 23:53
    The script works fine.

    I just had to place it somewhere else between my other scripts.

    #XPression