Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Greenlaw wrote: Fri Feb 16, 2024 4:34 pm I see there is something called Point Based Selection in the Shape window's options...is this what that's for? How does it work?
Ah! I see this is EXACTLY how it works. When the option is enabled, I just select the points from the Group list and the connected shapes are automatically selected inside the Shapes window. Sweet! I wish I had taken the time to try that yesterday. :D

Sigh! Now, I wish Moho's native Select Group pull-down list was a separate window like Shapes window.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

One more request:

In Point-Based Selection mode, I see that selecting a shape in the list will conversely activate/select the connected points. It would be useful if I could Hide/Reveal the selected points in the Shapes window like I can with Shapes.

This should probably be activated using Alt+click on the Eyes button because I won't necessarily want to hide both the Shape and Points at the same time. (I know I can hide/show Points from the Draw menu, but it will be nice to have this as an Alt command inside the Shapes window next to the related features.)
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Rai López »

That rig you describe sounds like a lot of shapes indeed, but its normal as soon as one start duplicating parts, etc., what I hope is performance was acceptable under that scenario...

You already figured it out, but yeah, that's what "Point-Based Selection" is for, the idea was expand the window possibilities while using other point tools so that you could easily select shapes in viewport not only with the Select Shape tool among others, but I've liked a lot the idea of can use it as some kind if shape group selection! :o The problem with the feature in question (apart of some palette selection quirks I'm getting right now while testing some things) is I've never get the desired performance precisely for depending on other tools and therefore not having all the control about UI updates and so, but it's indeed a feature I'd like to preserve and (try to) improve at some point.

Greenlaw wrote: Fri Feb 16, 2024 6:44 pm Minor (I hope) request: when renaming a shape in the Shapes window, can it be made so that double-clicking inside the name box will select all the text? Or maybe the traditional double-click to select one word and triple-click for all? (Actually, just double-clicking for all text is perfectly fine.)
Argh! I'm afraid this well could be another side-effect for a "fix" I did in order to allow Enter key (finally) confirmed changes (before one had to use Tab key or click elsewhere, I think for some kind of bug or limitation of text fields in this kind of windows), but I already detected this introduced the limitation of can't enter special characters, and now this... So I may have to back off on that? But hard decision because can't use Enter key was indeed quite cumbersome 🙄. Anyway, text field behaviors are hardcoded and may depend on its type or even, like in this case, placement, so I'm afraid there are little chances I can get rid of most of the current limitations, but I'll take all that into account when looking into it again for the exposed reasons. In any case, thanks for for letting me know!

Greenlaw wrote: Fri Feb 16, 2024 7:13 pm In Point-Based Selection mode, I see that selecting a shape in the list will conversely activate/select the connected points. It would be useful if I could Hide/Reveal the selected points in the Shapes window like I can with Shapes.
But that's something one can quickly do by the corresponding shortcuts anyway, isn't it? Unless I'm missing something, of course... e.g. with Point-Based Selection checked if I select some shape/s in palette or viewport, I can then hide the involved points here by pressing "Ctrl+H", the shape/s by pressing "Ctrl+Shift+H" or both if pressed sequentially, so (🤔) maybe the Alt version of the Hide/Unhide button could have other use? What if Alt+Hide/Unhide button acted as a visibility switcher? I'm kind of thinking out loud, but wouldn't it be useful if one could show all hidden shapes, for quickly getting the whole thing, and then can quickly restore the previous visibility state just by the press of a button? It'd be like press "Show All Shapes" but not having to selectively hide again the just showed shapes if necessary...

Well, thanks again for all the feedback/contribution and I hope everything makes sense!
...
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Hi Rai,

Earlier today, Moho seemed to be crashing a lot, and it seemed to occur while I was working with a lot of shapes inside an action. After a while, I noticed that the Shapes window was updating very slowly, and if I continued working with Moho long enough with the Shapes window open, Moho itself would slow down and then eventually crash.

To work around the issue...

1. I save often.

2. When Moho begins to slow down (and I mean suddenly and very noticeably), I close and reopen the Shapes window, and Moho will immediately go back to normal, at least for a while. It's probably a good idea to quit and relaunch Moho to be safe.

In this setup, I've got about 25 shapes in the layer and several complicated point animations in several actions, five instances of Liquid Shapes masking of five other layers. and the issue seems to occur when I'm scrubbing back and forth inside an action. Does this sound like a memory leak? Or maybe it's related to the new graphics engine.

To be clear, this is not a show-stopper for me. As a matter of fact, the Shapes Window is working great for this project, and it's saved my butt a few times today. I was just wondering if anyone else is seeing the same occasional slowdown while the window is open.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

I'm guessing this is a graphics engine issue. Sometimes, after I see the slowdown and close/reopen the Shapes Window, the window will open blank white with no visible UI. Moho is otherwise operating normally when this happens, so I take this as a cue to save and relaunch Moho.
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Rai López »

Hi Dennis. And, first off, thanks! Cause despite its not good news it's definitely invaluable feedback...

Well, this is why I wanted to concentrate (among other development related aspects) on performance after the last release, but 25 or so per layer are not so much shapes after all, so it's clear there is something else involved. It's funny the symptoms you describe reminds me a lot to the ones I've been dealing with during all the development, but in my case due to use and abuse of scripts reloading, nothing to do with the workflow you describe of course, but I wonder what could cause so similar issues, unfortunately I've no answers for now... Plus I'm not sure how actions could affect the normal functioning of the window, but that's an area of the software I've not submitted the window to tests, so I'll do it from now on to see what I can find.

One never know, but I don't think something like that will be related to Moho's graphics engine as long as it only happens while the window is open, I mean, it sounds clear enough the problem seem to be on my script side. A memory leak sounds to me more likely though but, again, I'm not sure where to start looking right now.

Greenlaw wrote: Wed Feb 21, 2024 12:55 am To be clear, this is not a show-stopper for me. As a matter of fact, the Shapes Window is working great for this project, and it's saved my butt a few times today. I was just wondering if anyone else is seeing the same occasional slowdown while the window is open.
Thank you and I'm glad to know it still helps, but it sounds indeed quite serious and I hope once I got the time to face the performance/stability review I be able to do something about it. So, yeah, please if someone else has suffering something like this and has any clue about a possible trigger or whatever, I'd love to heard about it.

Greenlaw wrote: Wed Feb 21, 2024 1:07 am Sometimes, after I see the slowdown and close/reopen the Shapes Window, the window will open blank white with no visible UI. Moho is otherwise operating normally when this happens, so I take this as a cue to save and relaunch Moho.
And that's another reason it reminds me so much to what I've been experiencing after several scripts reloading (as a curiosity, in my case controls end up appearing if I shake the blank window), but I assume in your case you are not performing several scripts reloading, so still no clue... But out of curiosity, when the slow down starts, if you open the task manager, is the Moho process suddenly taking much more memory than usually while working with similar projects?

Well, thank you very much again for not only stressing the tool but also reporting :)
...
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Sure, happy to help! :D

Thanks for confirming that 24 shapes shouldn't be taxing to Shape Window. I wasn't sure since I've been using the tool for less than a week. It might have more to do with the animation of the shapes.

I'll screen-record and document the error more thoroughly once I get this task out of the way.
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Rai López »

Well thank you again! For the moment I've observed there is something with item preview (the little shape thumbnail before name field) I wanted to correct at some point but, for whatever reason, in the end it stayed that way... I'm referring to the fact it updates at every frame change (so applies to "when scrubbing back and forth inside an action") if the selected shape or its points are being animating, and that's something I wanted to avoid because I don't think it worth's the stress for what in the end it really offers. It may or may not have something to do with the crashes (although I do see more chances it has more to do with that than with the slowdown part), but in the absence of something else I think it could be like a good starting point.

Greenlaw wrote: Wed Feb 21, 2024 3:12 am Thanks for confirming that 24 shapes shouldn't be taxing to Shape Window.
Well, in the end it will depend on current load (also Point-Based Selection option can make a difference), but such number of shapes should be managed without too much trouble in any modern computer if I've done tests with some quite more shapes here with acceptable performance. But, of course, I'm conscious normally certain tests don't reflect reality a well as real projects do...

Greenlaw wrote: Wed Feb 21, 2024 3:12 am I'll screen-record and document the error more thoroughly once I get this task out of the way.
Well, no strings attached! Whatever you be able to provide will be welcomed but, as I said, the mere fact you are testing and real-world stressing the script plus sharing this kind of feedback is indeed a lot, so thanks in any case!
...
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Rai López wrote: Wed Feb 21, 2024 4:12 am ...I've observed there is something with item preview (the little shape thumbnail before name field)...I'm referring to the fact it updates at every frame change (so applies to "when scrubbing back and forth inside an action") if the selected shape or its points are being animating...It may or may not have something to do with the crashes (although I do see more chances it has more to do with that than with the slowdown part), but in the absence of something else I think it could be like a good starting point.

...Well, in the end it will depend on current load (also Point-Based Selection option can make a difference)...
Thanks for sharing your observations! This seems consistent with what I'm experiencing, and it gives me some guidance for what to try when I see the next slowdown. I'll let you know how it goes.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Hi Rai,

I think you're correct in suspecting Point-Based Selection. I disabled this option today and saw smoother performance with no crashing so far.

A few minutes ago, I enabled Point-Based Selection, and sure enough, Shapes Window's response slowed down noticeably. I'll test this thoroughly later so I can explain what I mean and how to reproduce it.

For now, I need to get back to using Shapes Window (with PBS switched off.) :)
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Rai López »

Thanks for letting me know! Yeah, definitely I'll have to see what to finally do with that option taking into account the possible disadvantages... I used to like it because I saw it like having the potential of expand the window possibilities regarding shape creation and interaction, but if in the end it can cause more trouble than advantages (given that shape creation is not something as recurrent as managing and I think it's easy to end up just using the well-known native way instead) I may consider whether to keep it accessible or not, at least until/unless deep improvements could be made to it.

Regarding what I said about limiting item preview updates, well at first I thought it could be like an easy task, but now that I'm at it, I see that could be not possible to only avoid shape's point animation updates but well may be a matter of all or nothing... which is a pity, because I wanted to preserve some basic things like shape color change updates at least. Well, I'll have to dig a little more and see, but if at some point I got actual evidences it could cause crashes, I'll have no chance but make the little preview to only show the shape just as it is in frame zero no matter what happen beyond that.

Well, just some thoughts in base of all this, I hope they make sense... Thanks again for continue testing (even so) & informing! :)
...
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Rai López wrote: Thu Feb 22, 2024 2:45 am Yeah, definitely I'll have to see what to finally do with (Point-Based Selection) taking into account the possible disadvantages... I used to like it because I saw it like having the potential of expand the window possibilities regarding shape creation and interaction, but if in the end it can cause more trouble than advantages (given that shape creation is not something as recurrent as managing and I think it's easy to end up just using the well-known native way instead)
I have a question: Is there a different way to set and select a group of Shapes? I've been using Moho's native Select Group list along with Shape Window's Point-Based Selection as a way to make 'Shape Group' selections. When you wrote, "I think it's easy to end up just using the well-known native way instead," that made me think, "Oh, maybe I'm doing this wrong or the hard way." :D

If there's another way to have 'Shape Groups', it would be a big help right now. Otherwise, Point-Based Selection is still very useful to me. For the time being, I can disable it when I'm not actively using it. (I had to use it again only a few minutes ago.)

Anyway, I just wanted to ask that you do not remove this option if this is the only way to make a 'Shape Group' selection in Moho.

Thanks for listening, Rai.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Daxel »

I keep A. Evseeva's script mod of Select Shapes for this select from points feature and some more.

https://mohoscripts.com/script/ae_select_shape

Just in case it's useful for someone or insteresting as code reference.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Greenlaw »

Awesome! Thank you, Daxel!

I switched the native Select Shape hotkey (Q) to A Evseeva's mod and it works great! Workflow could be smoother, but it does the job:

1. Select the point group using Select Points Tool's Select Group.
2. Press Q to activate A Evseeva's Select Shape.
3. Click the Select From Points button.
4. The 'Shape group' will be selected in the Shapes Window, ready for hiding/showing or whatever. (The Shapes Window will need to be open, of course.)

Adding the Select From Points button to the Shapes Window can help streamline the process, but for now, this works for me.

This is almost like having Layer Comps, but for Shapes. :)
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Re: Lost Scripts' Shapes Window (**New** BETA 3) for Moho 14.1 Pro

Post by Rai López »

Greenlaw wrote: Thu Feb 22, 2024 1:33 pm When you wrote, "I think it's easy to end up just using the well-known native way instead" [...] If there's another way to have 'Shape Groups', it would be a big help right now. Otherwise, Point-Based Selection is still very useful to me. For the time being, I can disable it when I'm not actively using it. (I had to use it again only a few minutes ago.)
It's only I had only shape creation in mind when I wrote that, so I didn't take into account that other usefulness you found regarding shape groups, which I admit is great... but happy to heard you found another workaround! Anyway, and on second thoughts, if luckily I got to solve at least some issues with the feature, the best outcome could be make it handier by a button, so if performance continue being an issue one can activate/deactivate it with ease at least (plus can know if its active at a glance).

🤔 Ruminating on the idea of how something like those kind of shape groups/comps could be well/easily implemented... It would surely requiere another (more 🙄) dropdown menu, because I'm not very sure about the idea of having a third window mode to have to switch to only for that (plus all the complexity in terms of development it would entail at this point), but no matter the way I think it could definitely worth a try in the interest of a feature like that, so I'll continue thinking about it and see... Thanks again for all the feedback and cheers!
...
Post Reply