HeyVern's scripts and tools - (focus on bones)
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 303
- Joined: Thu May 13, 2010 2:01 pm
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: HeyVern's scripts and tools - (focus on bones)
any body can fix links? and block this bot from forum
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- hayasidist
- Posts: 3523
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: HeyVern's scripts and tools - (focus on bones)
Vern was back and active on the forum recently -- you could try a PM to him...
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: HeyVern's scripts and tools - (focus on bones)
thankshayasidist wrote: ↑Thu Oct 28, 2021 10:44 amVern was back and active on the forum recently -- you could try a PM to him...
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Re: HeyVern's scripts and tools - (focus on bones)
Hi Vern, do you still have these scripts? Even though they are outdated, I'm very interested and could possibly update them. I am building a tool for re-using animation, but have not figured out how to build a library yet. This sounds like a smart way of going about it.
- Víctor Paredes
- Site Admin
- Posts: 5661
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: HeyVern's scripts and tools - (focus on bones)
Hey, Lukas.
I couldn't find Vern's script (although I'm sure I should have a backup somewhere), but in the forum I found this other script made by David F. Sandberg. Maybe it can help:
https://www.lostmarble.com/forum/viewto ... 12&t=16748
I couldn't find Vern's script (although I'm sure I should have a backup somewhere), but in the forum I found this other script made by David F. Sandberg. Maybe it can help:
https://www.lostmarble.com/forum/viewto ... 12&t=16748
Moho Product Manager
www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Re: HeyVern's scripts and tools - (focus on bones)
Thank you Victor, I'll have a look!Víctor Paredes wrote: ↑Tue Feb 01, 2022 10:28 am Hey, Lukas.
I couldn't find Vern's script (although I'm sure I should have a backup somewhere), but in the forum I found this other script made by David F. Sandberg. Maybe it can help:
https://www.lostmarble.com/forum/viewto ... 12&t=16748
Re: HeyVern's scripts and tools - (focus on bones)
Hello Lukas,
I found the script you've asked. I also added a similar script.
I hope these would be helpful.
Good luck,
LG
https://www.mediafire.com/file/80nwka7u ... s.zip/file
https://www.mediafire.com/file/4byzonon ... n.zip/file
I found the script you've asked. I also added a similar script.
I hope these would be helpful.
Good luck,
LG
https://www.mediafire.com/file/80nwka7u ... s.zip/file
https://www.mediafire.com/file/4byzonon ... n.zip/file
Re: HeyVern's scripts and tools - (focus on bones)
Much appreciated!teotoon wrote: ↑Tue Feb 01, 2022 8:54 pm Hello Lukas,
I found the script you've asked. I also added a similar script.
I hope these would be helpful.
Good luck,
LG
https://www.mediafire.com/file/80nwka7u ... s.zip/file
https://www.mediafire.com/file/4byzonon ... n.zip/file
Re: HeyVern's scripts and tools - (focus on bones)
Sorry for being away again.
Yes, I still have these scripts. I haven't used them in ages since Moho has its own built-in copy/paste bones.
As you said they don't work very well in newer versions of Moho. There was way too much version-specific junk in there.
I will try to post them later tonight after work.
My script was based on the same scripts posted here and created by "Tha Narie".
I think when I revised it, there were so many changes I simply replaced my name on it. I did combine it into one script and added some extra functions. This was ages ago so it's hard to remember. I do remember that script was A NIGHTMARE to work on. There are SO MANY BONE PROPERTIES to track for copy and paste.
I also had a "save animation" script that's in the same shape. It required similar amounts of nightmarish coding to manage all properties not just of bones but EVERYTHING. I believe my first iteration only saved bone animation.
Yes, I still have these scripts. I haven't used them in ages since Moho has its own built-in copy/paste bones.
As you said they don't work very well in newer versions of Moho. There was way too much version-specific junk in there.
I will try to post them later tonight after work.
My script was based on the same scripts posted here and created by "Tha Narie".
I think when I revised it, there were so many changes I simply replaced my name on it. I did combine it into one script and added some extra functions. This was ages ago so it's hard to remember. I do remember that script was A NIGHTMARE to work on. There are SO MANY BONE PROPERTIES to track for copy and paste.
I also had a "save animation" script that's in the same shape. It required similar amounts of nightmarish coding to manage all properties not just of bones but EVERYTHING. I believe my first iteration only saved bone animation.
Re: HeyVern's scripts and tools - (focus on bones)
Good to see you back here again!heyvern wrote: ↑Sat Feb 05, 2022 9:50 pmSorry for being away again.
Yes, I still have these scripts. I haven't used them in ages since Moho has its own built-in copy/paste bones.
As you said they don't work very well in newer versions of Moho. There was way too much version-specific junk in there.
I will try to post them later tonight after work.
My script was based on the same scripts posted here and created by "Tha Narie".
I think when I revised it, there were so many changes I simply replaced my name on it. I did combine it into one script and added some extra functions. This was ages ago so it's hard to remember. I do remember that script was A NIGHTMARE to work on. There are SO MANY BONE PROPERTIES to track for copy and paste.
I also had a "save animation" script that's in the same shape. It required similar amounts of nightmarish coding to manage all properties not just of bones but EVERYTHING. I believe my first iteration only saved bone animation.
Intesting. Saving everything in text seems like a crazy (but impressive) undertaking. How does it know what child-layers to apply keys to when loading the data? By layer-name just like bone-names?
I'm still not sure what exactly I am looking for, but here's me thinking out loud:
I think this might be a good (and simpler, thus less prone to getting broken by updates) solution to my problems:
- An 'Export all actions as moho files' script. That exports all Regular and Morph actions of a layer as .moho files (with all keys in the Mainline) in a folder. (skipping actions of which .moho files already exist in that folder)
- An 'Import actions from folder' script. That imports all .moho files in a folder a user points at. It would simply interpret the mainline keys from "Walkcycle.moho" as an action named "Walkcycle".
As a bonus you can easily update actions by simply editing the animation in "Walkcycle.moho" and the next time you import you'll have the latest versions of all actions.
Re: HeyVern's scripts and tools - (focus on bones)
Oops, this turned out to be more difficult than I thought it would be... Because I can't modify and save a MohoDoc returned from LoadDocument() or by creating new files.Lukas wrote: ↑Sun Feb 06, 2022 9:46 am
- An 'Export all actions as moho files' script. That exports all Regular and Morph actions of a layer as .moho files (with all keys in the Mainline) in a folder. (skipping actions of which .moho files already exist in that folder)
- An 'Import actions from folder' script. That imports all .moho files in a folder a user points at. It would simply interpret the mainline keys from "Walkcycle.moho" as an action named "Walkcycle".
The "Actions" window actually has "Import Action" and "Export Action" buttons, but unfortunately I can't find a lua function that does the same thing.
It does just seem to write a json file, so it might be close in functionality to your save/load script Vern.
- synthsin75
- Posts: 9973
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: HeyVern's scripts and tools - (focus on bones)
You should be able to save a new file using: ScriptInterface:FileSave() or ScriptInterface:FileSaveAs(path)
Maybe you were looking at: LM.GUI.SaveFile(caption)
That only prompts the user for a path.
- 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: HeyVern's scripts and tools - (focus on bones)
Ah you're right, thanks! After ScriptInterface:FileSaveAs(path) I can keep using moho.document to modify each file. I'm not sure what I was doing wrong before. I'm still having some trouble reverting back to the old file after exporting all actions as .moho files. It crashes, but only sometimes (all tested on the same file). API access to 'export action' and 'import action' would make all of this a lot easier :/synthsin75 wrote: ↑Tue Feb 08, 2022 1:18 amYou should be able to save a new file using: ScriptInterface:FileSave() or ScriptInterface:FileSaveAs(path)
[...]
- synthsin75
- Posts: 9973
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: HeyVern's scripts and tools - (focus on bones)
Yeah, I think we've talked about Moho not quite updating the moho.document reference before, especially with new, tabbed documents. Have you tried by having the script only have one open document at a time?
- 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/