FileImport Syntax changed?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

FileImport Syntax changed?

Post by mkelley »

It used to be you could do:

moho:FileImport(file)

and insert whatever file you wanted into the system. Now, however, it brings up a dialog box where you must checkmark the items you want to import (even if there is only one layer or item). This is changed as of at least 11, and worked fine in 9 (so I don't know where the change actually occurred). Needless to say, I can find no documentation on this function, but I'm hoping there is at least some parameter I can pass so that it won't bring the @#$! dialog up but just import the whole file.

Anyone have any ideas?
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: FileImport Syntax changed?

Post by dkwroot »

The dialog box pops up because we now have layer referencing. In the past, we could only import files directly, but now we have a choice to import directly or by reference. I think it was oversight that the devs didn't think to add a bool to the import function that would allow us to bypass the dialog box and import always directly or by reference. You should probably ask for this in a feature request.
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Re: FileImport Syntax changed?

Post by mkelley »

Yeah, I'll put in that request (but I'm sorry I missed this -- my own fault it's not in there now).
Post Reply