Search found 8148 matches

by synthsin75
Sun Dec 10, 2023 3:28 am
Forum: Scripting
Topic: How to get Bone Angle on a frame when bone is controled by a Smart Bone?
Replies: 8
Views: 5457

Re: How to get Bone Angle on a frame when bone is controled by a Smart Bone?

If you're doing it not already, I seem to remember that baking keyframes from the end of the time range to the start is faster. Might be worth trying.
by synthsin75
Sat Dec 09, 2023 11:50 am
Forum: General Moho Discussion
Topic: Switch Selection concept for v13.5
Replies: 45
Views: 96006

Re: Switch Selection concept for v13.5

this (windows) example works (worked in Lua 5.2 - not tried in 5.4) without the intermediate file local sOut = io.popen( "dir /B " .. path .. "*.png", "r" ) local sData = sOut:read "*a" IOW the output of cmd>dir ... is delivered in the fcb:read ... call (and ...
by synthsin75
Sat Dec 09, 2023 11:48 am
Forum: Bug Discussions
Topic: Moho 14 - Issue with complicated masking on canvas. GPU disabling missing in this version?
Replies: 19
Views: 19143

Re: Moho 14 - Issue with complicated masking on canvas. GPU disabling missing in this version?

Since the display of masking was updated/improved, you may need to use some liquid shapes and/or references to get the render-accurate mask in the workspace.
by synthsin75
Sat Dec 09, 2023 11:45 am
Forum: General Moho Discussion
Topic: Switch Selection concept for v13.5
Replies: 45
Views: 96006

Re: Switch Selection concept for v13.5

SimplSam wrote: Sat Dec 09, 2023 11:22 am The other option would be to pass a filename to external app, which it populates, then read/delete the contents of that file after the call.
That's my current plan.
by synthsin75
Sat Dec 09, 2023 10:01 am
Forum: General Moho Discussion
Topic: Switch Selection concept for v13.5
Replies: 45
Views: 96006

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: 58655

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: 2005

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: 2005

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: 30624

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: 30624

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: 2762

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: 30624

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: 30624

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: 30624

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....