Hey LM!
is ImageLayer really implemented?
i get an error when i do this :
JS_image_sequence.bitmapPath = LM.GUI.OpenFile("Select the first image file of the sequence")
if (self.bitmapPath == "") then
return
end
JS_image_sequence.iLayer = moho:CreateNewLayer(MOHO.LT_IMAGE)
-- ERROR HERE :
self.iLayer:SetSourceImage(self.bitmapPath)
I checked the file path issues using io.read and seem fine...
The error is :
"attempt to call method SetSourceImage (a nil value)"
so i guess it is not in the API (as stated in the doc)??
Or am i doing something wrong with the path? (any special issue under windows? i am using string.format() for escape characters)
thank you!!
Julien
is ImageLayer:SetSourceImage() implemented???
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 36
- Joined: Tue Mar 22, 2005 11:47 am
This I just pulled out of the Explosion particle menu script:
So I guess the problem is one of those instances where a function might be looking at a layer in too generic a manner, so you have to kick it in the bum and let it know specifically the type of layer you're working with. So I guess the call would be
Yay! Image sequence importer! Once it's in working order, It would be great if you could make it kind of an overall sequence importer, the same code with minor changes should let you import sequences of Illustrator files, 3D OBJects. Cool.
Code: Select all
local group = moho:LayerAsGroup(moho:CreateNewLayer(MOHO.LT_GROUP))
Code: Select all
JS_image_sequence.iLayer = moho:LayerAsImage(CreateNewLayer(MOHO.LT_IMAGE))