Page MenuHome

Screen Operators
Needs ReviewPublic

Authored by Ilya Shurupov (Hto-Ya) on Jun 11 2020, 2:42 PM.
Tokens
"Love" token, awarded by ParallelMayhem."Love" token, awarded by Shimoon."Love" token, awarded by kynu."Like" token, awarded by bestelix."Love" token, awarded by tako."Y So Serious" token, awarded by AnityEx."Love" token, awarded by ruthwikrao."Love" token, awarded by johnsyed.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Close any area. Join any two areas. New Swap & Drag resize operators.



Diff Detail

Event Timeline

Ilya Shurupov (Hto-Ya) requested review of this revision.Jun 11 2020, 2:42 PM
Ilya Shurupov (Hto-Ya) created this revision.
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 11 2020, 3:08 PM
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 11 2020, 3:13 PM
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 14 2020, 7:22 PM
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 14 2020, 7:24 PM

Quite excited for this patch, but I'm afraid I didn't get very far when testing it out. I know you said it's work in progress, so maybe these are known issues, but just in case:

  • Trying to drag from any corner towards the panel that the corner belongs to (ie. starting a split action) segfaults.
  • Trying to drag from any corner towards another panel seems to result in starting a join between two different panels.

  • A shortcut bound to screen.area_split only works when the mouse is hovering over a border.
  • screen.area_join joins areas without left click to confirm it. Maybe by design? If so, I'm not a fan. I know it lets you join multiple panels with a single action very quickly, but I don't think you would need that very often. Without waiting for left click to confirm the action, It can easily cause accidental joins.

Hope you'll find time to finish this sometime! It looks very promising.

Quite excited for this patch, but I'm afraid I didn't get very far when testing it out. I know you said it's work in progress, so maybe these are known issues, but just in case:

  • Trying to drag from any corner towards the panel that the corner belongs to (ie. starting a split action) segfaults.
  • Trying to drag from any corner towards another panel seems to result in starting a join between two different panels.
  • A shortcut bound to screen.area_split only works when the mouse is hovering over a border.
  • screen.area_join joins areas without left click to confirm it. Maybe by design? If so, I'm not a fan. I know it lets you join multiple panels with a single action very quickly, but I don't think you would need that very often. Without waiting for left click to confirm the action, It can easily cause accidental joins.

Thanks for your feedback.
That idea with "joining area with mouse drag from corner to another area" is a bug in my patch.
U just assign any key to the operator - press the key and move the mouse to an area that u want to be deleted.
To confirm u can just move the mouse to that area till mouse is crossing an edge or u can press the left mouse key
Your mouse move is the direction of join. So in your video, u activate join op by doing some corner shooter game, then u move your mouse up or whatever when there is no area to be joined, that's why there is stop cursor


What about the split operator, I'm not quite getting what is the problem

Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 15 2020, 11:21 PM
Ilya Shurupov (Hto-Ya) updated this revision to Diff 26154.EditedJun 22 2020, 10:47 AM

Now u can close any area

Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 22 2020, 10:55 AM
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jun 22 2020, 7:07 PM
Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)
Ilya Shurupov (Hto-Ya) updated this revision to Diff 26207.EditedJun 23 2020, 4:29 PM

Join operator refactor. Small bug fixes.
Now in the HEader menu

comments everywhere & bug fixes & simplifications

Can't seem to get it to apply to master atm, would be happy to test again if you like!

Can't seem to get it to apply to master atm, would be happy to test again if you like!

Sure! I will try to resolve that issue

Any updates on this? Really looking forward to this functionality!

Any updates on this? Really looking forward to this functionality!

Not yet, I'll return to work on this in a few days

Up to date with master

Hi @Demeter Dzadik (Mets), now u should be able to apply the patch!

Thank you! I tried testing but I don't get all the options you show when I right click on a border, I only get the original 4 options: Horizontal&Vertical split, Join and Swap. Also each time I right click, these two lines get printed in the console:

RNA_int_set_array: SCREEN_OT_area_join.cursor not found.
RNA_int_set_array: SCREEN_OT_area_swap.cursor not found.

And when I try Swap Areas, it prints this and does nothing:
ERROR (wm.operator): /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:1305 wm_operator_invoke: invalid operator call 'SCREEN_OT_area_swap'

It's possible that I've done something wrong when applying the patch but I tried several times and the same thing happened. Do you have any ideas?

Thanks! I was not considering the "right-click on border" menu. Thus, commands in this menu are old and they're giving some errors. That is definitely a bug and I'll try to fix this.
Meanwhile, u can access all the features simply by right-clicking not on borders but headers. Or u can just assign shortcuts manually.

Alrighty. Also don't forget about mouse dragging from the "ActionZones"/the corners of editors. It seems joining using that doesn't work atm, only splitting.

Binding a key to area joining works, although I'm still not a fan of the UX. If someone doesn't know how it works they can easily destroy their UI with no way to go back, among other issues, but this being the biggest one.

Binding a key to area split also works, but I did notice that for some reason if I leave the direction parameter unspecified, it does nothing.

Hope that's useful!

Alrighty. Also, don't forget about mouse dragging from the "ActionZones"/the corners of editors. It seems joining using that doesn't work atm, only splitting.

I removed it on purpose, didn't thought someone would want to use it again. If that isn't the case then I'll bring it back.

Binding a key to area joining works, although I'm still not a fan of the UX. If someone doesn't know how it works they can easily destroy their UI with no way to go back, among other issues, but this being the biggest one.

Could u please be more specific about this one? So far I know bout meaningless arrows in complex situations and inability to just execute join with no need to run modal func.

Binding a key to area split also works, but I did notice that for some reason if I leave the direction parameter unspecified, it does nothing.

Yeah, I know. But split op isn't in the scope of this patch. Maybe for now though.

Hope that's useful!

Of course!

Ilya Shurupov (Hto-Ya) edited the summary of this revision. (Show Details)Jul 16 2020, 12:21 PM

Binding a key to area joining works, although I'm still not a fan of the UX. If someone doesn't know how it works they can easily destroy their UI with no way to go back, among other issues, but this being the biggest one.

Could u please be more specific about this one? So far I know bout meaningless arrows in complex situations and inability to just execute join with no need to run modal func.

What I mean is that you can initiate the area join operator and move your mouse around the screen a bit and immediately join areas without confirming the action. Moving the mouse should never be considered as the user explicitly wanting to do something, especially not something as permanent as this. That's what the mouse buttons are for. The way it is right now, if a user right clicks on a border and chooses Join Area and moves their mouse, there's a 50% chance it will join the correct areas, but a 100% chance that they can't cancel or undo it. If they accidentally hit the hotkey, half their UI could be gone before they blink. If they hit the hotkey knowingly, they might mouse over an area to preview what will happen when they join them - but, instead, they already joined them! The editor is simply gone before they confirmed anything. The only operator in Blender that used to work this way was the old area split operator, but that got fixed sometime in 2.8. And it was one of the most infamous noob pitfall for beginner Blender users.

I removed it on purpose, didn't thought someone would want to use it again. If that isn't the case then I'll bring it back.

I will certainly stop using action zones if I can manage areas with shortcuts instead, but there are hundreds of thousands of Blender users out there who have been splitting and joining editors with action zones for 20 years, and are perfectly happy with it. You gotta keep that in mind when thinking about these things! ^^