Interface: BitmapLayerManager

Interfaces > Core Interfaces > BitmapLayerManager

 

   

Core Interfaces - Quick Navigation

This Core Interface provides access to the layered Photoshop PSD image format.

   

Interface: BitmapLayerManager 

Methods:

<integer>BitmapLayerManager.getLayerCount <filename>filename   

Returns the number of layers in the specified file.

   

<string>BitmapLayerManager.getLayerName <filename>filename <integer>index 

Returns the name of the indexed layer in the specified file.

   

<bitmap>BitmapLayerManager.LoadLayer <filename>filename <integer>index <boolean>fullframe 

Loads the specified 0-based indexed layer from the specified file. Returns a bitmap value. If fullframe is set to true , loads the layer at the resolution of the full image.

FOR EXAMPLE

--load the background layer from a PSD file
test_file = sysinfo.currentdir + "\\test.psd"
theBmp = bitmapLayerManager.LoadLayer test_file 0 true
--assign a bitmap texture to the first material in the MEdit
meditMaterials[1].diffusemap = bitmapTexture()
--assign the PSD background layer to the diffuse slot:
meditMaterials[1].diffusemap.bitmap = theBmp