It's time for non-modal property panels
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10265
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: It's time for non-modal property panels
The style effect window is modal, the layer settings window is non-modal.
If we had full access to the document in a non-modal window, my Switch Icons tool could be a free-floating window that you could use with any tool selected.
If we had full access to the document in a non-modal window, my Switch Icons tool could be a free-floating window that you could use with any tool selected.
- 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: It's time for non-modal property panels
Yes, you're right. I should have added, "Even so, non modal is usually preferable."Daxel wrote: ↑Sat Aug 21, 2021 5:25 pm Yes, those are. Not a problem for me either, but yeah I can imagine someone trying to keyframe a lot of changes in the direction of the shadow effect and having to reopen it each time, so yes that's a good example of a modal window that would be better as a modeless one.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
- davoodice2
- Posts: 397
- Joined: Tue Jun 15, 2021 1:14 pm
Re: It's time for non-modal property panels
I think it isn't related to modal or modeless, problem is that ScriptInterface class is called by a mouse click, a key press, or a menu command just.synthsin75 wrote: ↑Sat Aug 21, 2021 1:27 am A modal window is a window that you have to hit OK or Cancel before you can do anything else in Moho.
A modeless window is a window that you can keep up all the time and still do other stuff in Moho.
The problem for scripting modeless windows is that they generally cannot access the current state of the document, like the current frame, layer, etc.. They can pretty readily access the state of the document when they are opened, just not any changes until they are closed and reopened.
http://www.mohoscripting.com/classes/ScriptInterface
The ScriptInterface class is a script's way of interacting with the Anime Studio application itself. When a script is invoked (by a mouse click, a key press, or a menu command), it is provided with an object called "moho" - this object is an instance of the ScriptInterface class.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10265
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: It's time for non-modal property panels
Tool options functions also have access to ScriptInterface.davoodice2 wrote: ↑Sun Aug 22, 2021 12:53 pm I think it isn't related to modal or modeless, problem is that ScriptInterface class is called by a mouse click, a key press, or a menu command just.
http://www.mohoscripting.com/classes/ScriptInterfaceThe ScriptInterface class is a script's way of interacting with the Anime Studio application itself. When a script is invoked (by a mouse click, a key press, or a menu command), it is provided with an object called "moho" - this object is an instance of the ScriptInterface class.
:DoLayout(moho, layout)
:UpdateWidgets(moho)
:HandleMessage(moho, view, msg)
Dialogs only have access here:
Dialog:new(moho)
But not in these:
:UpdateWidgets()
:HandleMessage(msg)
You can only pass ScriptInterface methods to these in the current document state when Dialog:new(moho) is invoked.
So technically, both modal and modeless suffer the same problem, but in modal windows, we can simple store the values we need until the window is closed.
- 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: It's time for non-modal property panels
Just open the Layer settings, General tab. Whatever setting I change, I won't see the result until I hit "Apply" (or even until I render). So when I am tweaking/experimenting and trying to find the right values, I have to constantly move between the corresponding setting and "Apply". Whatever the technical reason, it is friction, and not elegant nor convenient. I'd really prefer spending more time for creative exploration with as little friction as possible.Hoptoad wrote: ↑Sat Aug 21, 2021 1:02 am I don't know what modal is, but I'm guessing from context clues that it's a window with buttons and whatnot that allows the user to get results with less clicking. If you have an idea for a new window or panel that would reduce clicking while animating, please draw it and label the buttons and propose a finished thing, and be sure to show how much screen space it would take, otherwise, like synthsin75 said, perhaps don't write such posts. It's easy to complain, as the saying goes. Perhaps your idea has not been implemented because of valid reasons -- like such a panel would subtract screen space presently used for animating.
I use DiVinci Resolve 17 for video editing. DiVinci is used by Major Studios. Nonetheless, it oftentimes takes me many clicks to accomplish something. This morning, for example, I needed to make a still frame from a video to re-insert into the video. This seems like a simple thing. Nonetheless, I had to click a button, right click on an picture, select grab still from a menu, click on the still to get a menu to save the still, choose PNG and name the file, browse to a folder, click a button to go back to the editing page, import the still as media, and drag it to the timeline. That's a lot of steps. But that's what it takes, and because a process took a lot of clicks does not make DiVinci a flawed program. DiVinci has many features that require only a few clicks: adding transitions, playing the video slow, and so forth.
Nearly everything Moho does can be done in three clicks or less. Can you submit a list particular things you do in Moho that takes you far too many clicks to do? I'm just not seeing what the big deal is.
Making and placing that still frame in DiVinci Resolve took me eleven clicks. But I say, So what? Sometimes things simply take as many clicks as they take.
Resolve is a good example where parameter changes are happening live. Imagine the settings in the Inspector (like Transform, Composite mode or anything else) requiring You to hit some sort of "Apply" button every time You make a change and want to see its results? It is just far from the best way of doing things.
Industry is full of good examples (AE, Fusion, Blender, C4D etc.), and they follow the paradigm for good reason: it is a streamlined way of working. There are situations / settings where a modal dialog makes sense. But for the most common and basic settings and parameters which most ppl constantly use changes should happen live as they are tweaked.
As for space requirements: a dockable, scrollable and collapsible palette would do the job. This kind of UI problem has been solved and sufficiently refined over the last 20 years.
Re: It's time for non-modal property panels
Just related to Your post, not Moho. If You want a freeze-frame effect in Resolve, have a look at the link belowHoptoad wrote: ↑Sat Aug 21, 2021 1:02 am I use DiVinci Resolve 17 for video editing. DiVinci is used by Major Studios. Nonetheless, it oftentimes takes me many clicks to accomplish something. This morning, for example, I needed to make a still frame from a video to re-insert into the video. This seems like a simple thing. Nonetheless, I had to click a button, right click on an picture, select grab still from a menu, click on the still to get a menu to save the still, choose PNG and name the file, browse to a folder, click a button to go back to the editing page, import the still as media, and drag it to the timeline. That's a lot of steps. But that's what it takes, and because a process took a lot of clicks does not make DiVinci a flawed program. DiVinci has many features that require only a few clicks: adding transitions, playing the video slow, and so forth.
...
Making and placing that still frame in DiVinci Resolve took me eleven clicks. But I say, So what? Sometimes things simply take as many clicks as they take.

https://teckers.com/how-to-freeze-frame ... i-resolve/
- davoodice2
- Posts: 397
- Joined: Tue Jun 15, 2021 1:14 pm
Re: It's time for non-modal property panels
In 13.5.2 it doesn't have access to moho.even when open for first time. if try to access moho crashes.synthsin75 wrote: ↑Sat Aug 21, 2021 1:27 am A modal window is a window that you have to hit OK or Cancel before you can do anything else in Moho.
A modeless window is a window that you can keep up all the time and still do other stuff in Moho.
The problem for scripting modeless windows is that they generally cannot access the current state of the document, like the current frame, layer, etc.. They can pretty readily access the state of the document when they are opened, just not any changes until they are closed and reopened.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10265
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: It's time for non-modal property panels
Yeah, I found that too. I had to update my switch icons script because self.moho suddenly causes a crash in 13.5.2. http://www.lostmarble.com/forum/viewtop ... 42#p201642davoodice2 wrote: ↑Mon Dec 20, 2021 5:42 pm In 13.5.2 it doesn't have access to moho.even when open for first time. if try to access moho crashes.
I just reported the bug. Thanks for reminding me.
- 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: It's time for non-modal property panels
That's one of the reasons I started using styles so habitually, a long time ago you could not interactively change colour in Moho unless you used styles.
With the ability to manipulate colours and have it reflected in the scene instantaneously and interactively, Moho became a whole lot faster and more fun to use.
I have no idea how people can stand non modal workflows, it's like playing pin the tail on the donkey.
With the ability to manipulate colours and have it reflected in the scene instantaneously and interactively, Moho became a whole lot faster and more fun to use.
I have no idea how people can stand non modal workflows, it's like playing pin the tail on the donkey.