Relative Paths for Image Manager

I was editing the 'Create_Layered_Image_Backdrop' sample script, and was wondering if Image Manager has a way to deal with relative paths. I mean, with Content Manager, there is the .getAbsolutePath() function, but in the docs there isn't such a thing for Image Manager... I would like to be able to load a .jpg from the content library (Runtime/whatever/test.jpg) and set it as a LIE layer for a specific material.

Comments

  • You can use ContentMgr to get the absolute path from the relative path for texture files, then pass that to ImageMgr.

  • meipemeipe Posts: 101

    Ok, thanks, it works...

    var oContentMgr = App.getContentMgr();   
    oAbsPath = oContentMgr.getAbsolutePath( "/Runtime/whatever/test.jpg",true ) 

    (...)

    var oBaseLayerFile = new DzFileInfo( oAbsPath);

    (...)

    oLayer.imageFile = oAbsPath;

    ...

Sign In or Register to comment.