Search found 8143 matches

by synthsin75
Sat Dec 09, 2023 10:01 am
Forum: General Moho Discussion
Topic: Switch Selection concept for v13.5
Replies: 45
Views: 95443

Re: Switch Selection concept for v13.5

While it's easy enough to pass arguments from Moho Lua to external apps/scripts, it's not as easy to get data back. I think the only way is to write the data to a file, so Lua can read it. It can be done with: function capture(cmd) local f = assert(io.popen(cmd, 'r')) local s = assert(f:read('*a'))...
by synthsin75
Sat Dec 09, 2023 5:34 am
Forum: Scripting
Topic: Test if modeless dialog closed
Replies: 0
Views: 57383

Test if modeless dialog closed

Anyone have any good ideas on how know when a modeless dialog has been closed? EDIT: Never mind, I figured it out: function scriptDialog:OnOK() if (self.d == nil) then --dialog has been closed with X button end end EDIT2: This is not reliable. It only works until a GUI message or two is sent. :?
by synthsin75
Wed Dec 06, 2023 2:43 am
Forum: Scripting
Topic: Order of selection?
Replies: 3
Views: 1731

Re: Order of selection?

Thanks for your quick response. Damn, would've been nice if Moho could 'just' return the selected bones in order of selection. I cannot track selection of bones because the tool is just a run-immediately-on-click-tool and only used when the bone selection is already done by the user. Looks like I n...
by synthsin75
Wed Dec 06, 2023 1:36 am
Forum: Scripting
Topic: Order of selection?
Replies: 3
Views: 1731

Re: Order of selection?

You'd have to track these, like adding their IDs to a table, as they're selected. If your script is the one doing the selecting, that's pretty easy. If not, you'd need to devise a way to do it, like using the IsEnabled function of your script. You can track the last selected bone, and add it to the ...
by synthsin75
Sun Dec 03, 2023 8:21 pm
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

This should be a reliable way to get the last selected layer in the original, saved file: function LK_ExportLayerToTodoFolder:IsEnabled(moho) if (moho.document:Path() ~= "") then self.layerID = moho.document:LayerID(moho.layer) self.docPath = moho.document:Path() end self.lastLayer = moho....
by synthsin75
Sun Dec 03, 2023 7:51 pm
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

I thought of copying the contents, but I didn't know if this could occasionally be used on group layers too.
by synthsin75
Sun Dec 03, 2023 5:53 pm
Forum: Bug Discussions
Topic: Moho 14 / Liquid Shapes / texture image / BUG
Replies: 4
Views: 2506

Re: Moho 14 / Liquid Shapes / texture image / BUG

Image textures are only influenced by bone strength.
by synthsin75
Sun Dec 03, 2023 5:51 pm
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

Yeah, when I was testing this, it seemed that any print function would derail the file close.
I think I only saw this when trying to close the new file, but haven't tested any further.
by synthsin75
Fri Dec 01, 2023 8:18 pm
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

I didn't think about using the moho-helper-object! Nice. I did try to fix it that way for a bit, but didn't get far. Might not work in this case? I do feel you should be able to update moho.document after creating new files... I hope we can get some API updates, generating moho files is kind of an ...
by synthsin75
Fri Dec 01, 2023 6:24 am
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

It looks like this may be a somewhat similar case as modeless dialogs before the helper object, where the initial document state persists throughout the entirety of the function run. In this case, the moho object passed to the run function cannot be changed until the function is initiated/run again....
by synthsin75
Thu Nov 30, 2023 1:12 am
Forum: Scripting
Topic: How do I create a new moho file and copy a layer to it via script?
Replies: 18
Views: 30000

Re: How do I create a new moho file and copy a layer to it via script?

Since there's no API for copying layers across documents, I *think* you'd need to do this: 1. create your new document and save it, like you're doing (there's no need to open this file, as it should already be the current document) 2. use something like loadDoc = moho:LoadDocument(path) to load the ...
by synthsin75
Tue Nov 28, 2023 12:32 am
Forum: Bug Discussions
Topic: Moho 14.1: Frequent crashes, guaranteed layer selector crash in advanced rig file
Replies: 26
Views: 8945

Re: Moho 14.1: Frequent crashes, guaranteed layer selector crash in advanced rig file

If you can pare the file down to the minimum that still makes it crash using layer selector, you could post it here for others to investigate.

Otherwise, it's just shots in the dark at this point.
by synthsin75
Sun Nov 26, 2023 12:17 pm
Forum: Bug Discussions
Topic: Moho 14.1: Frequent crashes, guaranteed layer selector crash in advanced rig file
Replies: 26
Views: 8945

Re: Moho 14.1: Frequent crashes, guaranteed layer selector crash in advanced rig file

Curvers are basically just warp meshes, but with tons of small slices. So having curvers manipulate other curvers could be multiplying the performance hit. I'd suggest using regular bone chains and curvers, rather than stacking curvers. Like Daxel said, try removing things from a copy of the file, t...
by synthsin75
Fri Nov 24, 2023 9:06 pm
Forum: Share Your Work
Topic: Dora the explorer meets the cartel
Replies: 2
Views: 1589

Re: Dora the explorer meets the cartel

There should be a content warning on this. Language, violence, and gore.
by synthsin75
Fri Nov 24, 2023 9:03 pm
Forum: General Moho Discussion
Topic: One of the layer color turned into black color in moho pro 14.1
Replies: 4
Views: 1856

Re: One of the layer color turned into black color in moho pro 14.1

Without seeing the image, my first guess would be colorize layer in the layer settings.