Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.
Moderators: Víctor Paredes, Belgarath, slowtiger
-
maxic
- Posts: 64
- Joined: Wed Sep 22, 2004 8:24 am
- Location: Moscow, Russian Federation
-
Contact:
Post
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:

-
Lost Marble
- Site Admin
- Posts: 2354
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
-
Contact:
Post
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.
-
maxic
- Posts: 64
- Joined: Wed Sep 22, 2004 8:24 am
- Location: Moscow, Russian Federation
-
Contact:
Post
by maxic »