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 »

I wondered if I might be pushing Shapes Window beyond its intended use. :P

Anyway, please don't worry about it. I was working on what had to be the most complicated setup I've done in Moho, and your tool was an enormous help for managing and editing the stacking order for many shapes in many layers. This task would have been a nightmare without Shapes Window!

As for 'Shape Groups', I've been able to streamline my steps further, and I have a pretty good workflow now for the next time I need to do this.

Shapes Window truly is one of Moho's 'lost scripts'. Excellent work, Rai! :D
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 11:55 pm I wondered if I might be pushing Shapes Window beyond its intended use. :P
Yeah, the many times I've wondered that too :lol:

And, well, I'll take it easy because of that, but I really liked the shape grouping idea and basing its functioning in Point Groups would definitely ease any possible implementation... Not sure about the outcome at this point, though, but thanks for getting to that and sharing it.

Well, thanks for the kind words, Dennis! It means a lot to know it helped the most on the task it was originally conceived for :D
...
User avatar
Lae82
Posts: 32
Joined: Tue May 02, 2023 5:44 pm
Location: Sweden

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

Post by Lae82 »

Re-ordering shapes with up/down arrow buttons becomes very slow if the vector layer contains too many shapes. I found that re-ordering shapes works best if theres like 4-(8?) shapes on a vector layer.
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 »

Lae82 wrote: Sat Feb 24, 2024 2:25 pm Re-ordering shapes with up/down arrow buttons becomes very slow if the vector layer contains too many shapes. I found that re-ordering shapes works best if theres like 4-(8?) shapes on a vector layer.
If you have Point-Based Selection (PBS) enabled, switch it off. As discussed the other day, Shapes Window runs significantly faster when this is disabled.

I'm using Shapes Window with 24-31 shapes per layer, some with Liquid Shapes active, and moving a shape or a selection of shapes up and down the stack is instantaneous. The window only slows down for me when PBS is enabled.

PBS can be a useful feature but enable it only when necessary.
Last edited by Greenlaw on Sat Feb 24, 2024 11:40 pm, edited 3 times in total.
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 »

Yes, that can always affect so, as pointed, it's a good idea to check if such option is enabled just in case. But if you have this option disabled and even so it's too slow, where is the focus seems to also make a difference, e.g. if the focus is in Shapes Window, cause is the last thing you used or clicked, whether on its title or wherever, the list seems to update almost instantly here with more tan 30 shapes, meanwhile that if focus is somewhere else (because you clicked in viewport, timeline or wherever), the process is slower due to the list redraws differently for some reason that I'll have to check in order to see if can be avoided... Not sure if it will helping in the meantime, but thanks for informing!
...
User avatar
Lae82
Posts: 32
Joined: Tue May 02, 2023 5:44 pm
Location: Sweden

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

Post by Lae82 »

Turning off points-based selection helped in this case and now ordering shapes is faster.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

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

Post by funksmaname »

I just came in here to say 3 things...
🤯, 😍 and 🙏
User avatar
lucasfranca
Posts: 128
Joined: Sat Oct 07, 2017 11:47 pm

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

Post by lucasfranca »

You had updated before this last version and had worked the Freehand and Brush size issues, but this version is no longer working. Did you remove the piece of code that solved this issue?
An old guy [since 1983] who was raised in front of the TV.
Passionate about animation, after getting old, he decides to make it his hobby.

I share tutorials, reviews, tips and tricks from this vast world of animation on my channel.

https://youtube.com/animai2D
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 »

lucasfranca wrote: Sat Mar 09, 2024 8:42 pm You had updated before this last version and had worked the Freehand and Brush size issues, but this version is no longer working. Did you remove the piece of code that solved this issue?
🤔 Indeed, I believe I introduced some changes in a try to help on that, but if (I remember well) I was really never able to totally reproduce it? For instance, this is latest version working here without problems even with Points-Based Selection option enabled:

Image

An the same with Blob Brush instead. So I wonder if couldn't be something else there (like some custom script) involved...

P.S.
funksmaname wrote: Mon Mar 04, 2024 11:38 pm🤯, 😍 and 🙏
:D
...
User avatar
lucasfranca
Posts: 128
Joined: Sat Oct 07, 2017 11:47 pm

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

Post by lucasfranca »

Ok, it's working fine to me now. I don’t know what happened.

Let me compliment you on the palettes you put on and I missed the hue triangle on Moho! Very impressive. I do not know if it is possible (possibly not, but it does not hurt me to ask you) but I would like there to be a circle indicating where we are in tonal value and color so we can drag to a new value. Is that even possible?
An old guy [since 1983] who was raised in front of the TV.
Passionate about animation, after getting old, he decides to make it his hobby.

I share tutorials, reviews, tips and tricks from this vast world of animation on my channel.

https://youtube.com/animai2D
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 »

Happy to heard that, Lucas! I wonder if something could have mixed up between installations at some point or something? Or it could simply be a circumstantial behavior, I hope... Anyway thanks for letting me know!

And thanks also for the kind words about palettes/swatches! Although, as you kind of guessed, yeah, anything beyond what you can see and do with them now is actually the most technically possible (even surprised me I got to make work the interactive slider working that way, not without basically kinda patchily hack things). The only way MeshPreview widget (where Swatches are drawn) could provide such kind of functionalities is if, just like viewport has, it got View and MouseEvent powers, but that would be like a big/advanced feature request that I'm afraid would hardly prosper... even though, among other things but just to name something, it would certainly open a whole new world of interactive UI based rigging possibilities and widgets of any kind :roll:
...
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 have a question about this:
Link To Style Window -> Uncheck this can improve performance, but then Style window won't be in perfect sync with the Shapes Window...
Can you explain what you meant by "...Style window won't be in perfect sync..."?

The reason I'm asking is that I'm having a little trouble renaming shapes in Shapes Window--specifically, the cursor wants to jump to the end of the text as I'm editing it--and I'm thinking of using the Shapes Window to identify and select my shape but do the renaming part in the Style Window.

I don't know if this approach improves anything because I haven't started testing yet, but understanding what Link To Style Window does might help me.

Thanks!
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 »

Oh, wait... never mind. I just started testing, and I see exactly how this option helps.

When Link To Style Window is disabled, the Shape does not get selected in Style Window when I select the Shape in Shapes Window. When I enable the option, it does.

So, I'll treat this like Point Based Selection then and only enable Link To Style Window when I need it.

Oh, and yes, so far typing the new name in the Style Window does seem to work better. I'll continue with this Shapes+Style Window workflow today and report back later on whether it's worth the extra step.
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, and yes, I think that's all! At some point I introduced that in a try to allow one had the chance to get a little response improvement while dealing with shape list's items in the window if, since it may be redundant in many cases anyway, you don't mind Style Window and Select Shape tool's toolbar don't get updated accordingly. I don't think the impact will be very noticeable in a more "nowadays" computer though, so in general one may not need to even bother about it, cause even though in my case I can certainly tell the difference after clicking in the list, for some reason I prefer to leave the option checked.

Greenlaw wrote: Wed Apr 10, 2024 5:30 pm I'm having a little trouble renaming shapes in Shapes Window--specifically, the cursor wants to jump to the end of the text as I'm editing it--and I'm thinking of using the Shapes Window to identify and select my shape but do the renaming part in the Style Window.

🤔 I'm not being able to reproduce exactly that, but since I had to apply a little hack/patch to the Name field to allow confirming changes by pressing Enter key, I'm always on my guard with that... One known issue is it doesn't accept certain special characters now due to that and other might be, since I'm not sure now it that was different before the change, text doesn't get selected/highlighted as soon as you click over it as usual elsewhere, that maybe is what you feel different or buggy? That is why I've sometimes wondered if shouldn't I revert the change, but then I remember that can't use Enter key to confirm name changes was so annoying that I kind of resist...
...
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!

Thanks for the speedy reply!
Rai López wrote: Wed Apr 10, 2024 6:53 pm I don't think the impact will be very noticeable in a more "nowadays" computer though...I prefer to leave the option checked.
Sounds good to me. I'll leave it on, too, then.
Greenlaw wrote: Wed Apr 10, 2024 5:30 pm I'm not being able to reproduce exactly that...
It's a very specific situation: When I insert my text cursor in the middle of the text, and press Backspace, the cursor jumps to the end of the text. So, if I'm not paying close attention to the text while typing, I'm messing up the name. Regardless, I still have to move the text cursor back to where I intended to insert my text edit.

This morning, I needed to remove an underscore from the middle of many shape names and also insert a letter, and this cursor-jumping bug was making me nuts. Editing the text this way in the Style Window was more stable. I'm able to reproduce this on both my laptop and desktop computers.

It seems to work fine when I'm deleting all the text and retyping or adding text at the end of the existing text.

Update: I just checked again, and yes, it's specifically related to using the Backspace key in the middle of the text. Anytime I press Backspace, the cursor jumps to the end of the text.
Post Reply