Page 1 of 1

What not so?

Posted: Wed Sep 29, 2004 2:11 pm
by maxic

Code: Select all

local layer = moho:CreateNewLayer(MOHO.LT_IMAGE)
layer:SetName("Test"..lay)
layer:SetSourceImage(path)
It does not work :-(

In source code *.moho file:

Code: Select all

image ""
:-(

Posted: Wed Sep 29, 2004 8:50 pm
by Lost Marble
Try this instead:

local layer = moho:LayerAsImage(moho:CreateNewLayer(MOHO.LT_IMAGE))
layer:SetSourceImage(path)

In C terminology, you need to "cast" the layer to an ImageLayer type.

Posted: Thu Sep 30, 2004 12:14 pm
by maxic
:D :D :D
Many thanks!!! The script good!