Moho document library: create folder and move existed imported file into
Moderators: Víctor Paredes, Belgarath, slowtiger
Moho document library: create folder and move existed imported file into
Hi guys !
I want to import some files into moho document and place by defferent categories (folders, for example: Characters, Audio etc.). The problem is: I can't find in scripting references how to create folder in current document library and move imported files into.
So how can I do this ?
Thanks.
I want to import some files into moho document and place by defferent categories (folders, for example: Characters, Audio etc.). The problem is: I can't find in scripting references how to create folder in current document library and move imported files into.
So how can I do this ?
Thanks.
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: Moho document library: create folder and move existed imported file into
I think what you are looking for is in the menu File -> Gather Media...






Moho co-owner
Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Re: Moho document library: create folder and move existed imported file into
I didn't quite understand what this functionality does.Víctor Paredes wrote: ↑Mon Aug 23, 2021 5:06 pm I think what you are looking for is in the menu File -> Gather Media...
What I need is: by scripting, after file importing in document library (image below), creating some category folder in this library (Image, sound, etc.) and put the file reference into this category folder.
For example this "download.jpg" put into [Untitled.moho->Images] folder

- synthsin75
- Posts: 10267
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Moho document library: create folder and move existed imported file into
Since there is no scripting access to the Library, Victor's suggestion is probably the closest.
File>Gather Media collects all the referenced files in the document and puts them in Images, Audio, etc. folders with the Moho file.
To speed this up, enable Edit>Preferences>Documents tab>Open and switch to new file after Gather.
Then you can just File>Gather Media and add to the Library.
File>Gather Media collects all the referenced files in the document and puts them in Images, Audio, etc. folders with the Moho file.
To speed this up, enable Edit>Preferences>Documents tab>Open and switch to new file after Gather.
Then you can just File>Gather Media and add to the Library.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Moho document library: create folder and move existed imported file into
FYI, this issue might be fixed by now but double-check that Moho project file size after Gather isn't unusually huge. If it is, just resave it. If the file size seems correct, never mind.
The problem back then was that compression wasn't being applied to the Moho file after Gather; resaving the file compresses it. I think this issue may have gotten fixed but it's been a long time since I last used Gather so I'm not sure. This is more of an issue when you need to send somebody the gathered files, or if you have very limited diskspace.

The problem back then was that compression wasn't being applied to the Moho file after Gather; resaving the file compresses it. I think this issue may have gotten fixed but it's been a long time since I last used Gather so I'm not sure. This is more of an issue when you need to send somebody the gathered files, or if you have very limited diskspace.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Moho document library: create folder and move existed imported file into
I used Gather Media for the first time a couple days ago and it worked like I had expected. It made a new folder, and in that folder was a folder called Audio with the audio files duplicated, a folder called Images with the image files duplicated, the relevant .moho file, and a text file called Bill of Materials which listed all the filed that had been gathered. I had to compress it myself, Moho didn't do that.
- synthsin75
- Posts: 10267
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Moho document library: create folder and move existed imported file into
Dennis was talking about the Moho file itself, not the folder of all the assets. A Moho file is already a compressed archive file, containing the JSON Moho file and thumbnail image. If Gather doesn't compress all the whitespace in the JSON, the file can be a lot bigger.
EDIT: Just checked, and Moho still isn't compressing the Moho JSON for Gather. So if you have Moho automatically opening the gathered file, you'll want to immediately save it again to compress the file size.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Moho document library: create folder and move existed imported file into
Oh, okay. Immediately save, to make a smaller file. Got it. Thanks.
Re: Moho document library: create folder and move existed imported file into
Thanks for checking. It was probably one of the things that got fixed in 13.0 and then lost in the 13.5 reboot. I'll report it.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
- synthsin75
- Posts: 10267
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Moho document library: create folder and move existed imported file into
Although it is nice to have some way to view the uncompressed file, without having to jump through Python to beautify it.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Moho document library: create folder and move existed imported file into
Some 3D and compositing programs I've used give you the option to save compressed or uncompressed, and let you set the default behavior for how it saves.
Maybe Moho can use this feature?
Maybe Moho can use this feature?
Last edited by Greenlaw on Wed Aug 25, 2021 3:46 pm, edited 1 time in total.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
- davoodice2
- Posts: 397
- Joined: Tue Jun 15, 2021 1:14 pm
Re: Moho document library: create folder and move existed imported file into
last lime I use gather media it broken my project. Moho did not know the path of any of the files, even when I was redirecting and saving, and the same thing happened again. Until I had to delete every folder and file I had created in the library to fix the problem.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10267
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Moho document library: create folder and move existed imported file into
Sounds like user error. May not switching to the gathered file, not moving it by its containing folder, etc..davoodice2 wrote: ↑Wed Aug 25, 2021 8:21 am last lime I use gather media it broken my project. Moho did not know the path of any of the files, even when I was redirecting and saving, and the same thing happened again. Until I had to delete every folder and file I had created in the library to fix the problem.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/