Created design task to show progress of subprojects https://developer.blender.org/T77408. I have also listed the smaller issues and papercuts I hope to fix this summer on the design task.
Last September I started a patch to cleanup outliner selection. I started from scratch on Monday and now the patch is awaiting review (this will go in master to fix an issue). https://developer.blender.org/D5817. Already committed the patch to my soc-2020-outliner branch.
Started work on the first task, Mode toggling and Activation Columnhttps://developer.blender.org/T68498. Currently activation of scenes, collections, and cameras works from a new left column in the outliner. When in edit mode, you can also use the left column to toggle objects in or out of edit mode.
Next Week’s goals:
Add support for pose mode toggling to the column, and other fixes.
Currently the column selection code is not ideal because I ran into a small UI button issue. Once resolved, I will cleanup that code.
Remove data activation and mode toggling on outliner selection in favor of the column.
Continued selection cleanup in preparation for properties editor tab switching.
I just wanted to point at at specific thing I noticed about the outliner.
Sometimes we have a lot of objects in the scene and we want to inspect quickly the properties of those objects, like for example if they have a different delta transforms or custom normals. So an easy way would be using down arrow on the keyboard but as you can see in the gif below the objects are showed in dark orange therefore the property panel is not updating.
It would be nice if someone could implement this behaviour.
@ThinkingPolygons If you look at the task (linked above the video) it mentions the reasoning behind this. Selection, activation, mode toggle, etc. are all mixed up, and we are separating them. So yes, currently you can click the camera data icon to change active camera, but in my branch you will not be able to.
@jc4d and @slowk1d it would be preferred that all suggestions and feedback (including with the windows) build be on the feedback topic. Keep in mind that the features in the daily builds are not complete, and there are known issues, so look at the progress for the specific task in case it’s already known: https://developer.blender.org/T77408
I did not complete all items on my list for the week, but overall it was great. On the bright side I finished my CS algorithms class at my university so now I’m much more free to work on this project! And I’m still ahead of my anticipated schedule.
Added walk left/right navigation with arrow keys
Switched to radio icons instead of check and dot. The icons aren’t finalized, but this already is better (the check doesn’t get confused with the collection exclude checkbox.
Fixed an issue preventing me from properly using icon buttons (thanks @julianeisel!)
Cleaned up the code for drawing the column
Now every object mode can be toggled with the left column (see video). This makes it much easier to see which object is in a specific mode, and makes it simple to swap to a different object.
Removed activation on selection for collections and cameras. Now the only way to set the active collection is with the left column.
New unified Delete Hierarchy operator (26c0ca3aa7f4)
Fixed an issue selecting objects linked in multiple collections. The top and selected elements in the outliner would be selected.
Started (and I think finished) properties syncing. See the GIF for a demo. Now selecting data (mesh, materials, modifiers, bones, etc.) in the outliner will switch to the correct tab in the properties editor. The hardest part here was ensuring it respected any pinned data in a properties editor. I think I got it correct, but let me know if anything goes wrong!
Fixed mode column toggling when Lock Object Modes is disabled.
It’s been a slower week. I fixed a few issues and cleaned up the code a bit.
I added collection colors! Adding that to the Collection struct is simple, but the hard part is proving to be finding a method of displaying it in the outliner that is visible but not overpowering. It’s caused quite a discussion over on the other thread GSoC 2020: Outliner Discussion and Suggestions. I’m reading every reply and will try to make the best decision possible! I’ve implemented many of the suggestions along the way as well, some are easily integrated with the drawing code, and others require a bit of restructuring.
The reminder of my time was spent reading the code for the remaining tasks of my area. I spent a lot of time reading the code in outliner_tree.c and outliner_dragdrop.c and making small changes. I’ve had a few successful experiments with modifier drag+drop in the outliner, but just in a local branch. I’ll be committing it soon. Now that I’ve read the related code and made plans I’m ready to start on the remaining goals of the summer.
Sorting was redone to sort collections and objects alphabetically. There is a new sort by object type method as well.
The operator to create a new collection from the selection was written. This is the default behavior when using the new collection button from the header and the C shortcut key. When using the context menu, options to create an empty collection or to link objects into the new collection are shown.
Manual object sorting was started. This has proved to be a bit trickier than I first thought, but it mostly works now. The remaining issue is to ensure the bases and objects stay synced (see this video GSoC 2020: Outliner Discussion and Suggestions - #437 by justastatue).
Parenting works in the outliner without holding shift in view layers display mode.
I spent far too long trying to get the collection colors to draw in a single row. No success here sadly. On the bright side I understand the UI layout code much better now
Since Thursday of last week I had worked on drawing the collection color icons in a row rather than a submenu. I have it nearly perfectly working now, and I’ve created a patch for review: https://developer.blender.org/D8317. I’ve already applied the patch in my branch. This took most of my time sadly, but it taught me a lot of Blender’s UI layout, alignment, and widget drawing code.
Fixed bases out of sync when reordering objects. This meant that visibility toggling the outliner was incorrect.
As an experiment I changed all the outliner highlights to draw as rounded rectangles like the file browser and UI lists for greater consistency. I like it a lot and I"m curious what others think. It’s a slight thing, but it makes the outliner look a bit more polished.
Cleaned up collection colors and added 4 new slots. The user preferences are simpler, the color names are removed in favor of simple numbers because it was weird to recolor “red” to blue for example.
Added new types to the outliner tree: Grease pencil modifiers and grease pencil shader effects.
Added properties sync for shader effects.
And finally, I rewrote the modifier drag&drop code to be generic enough to apply to modifiers, constraints, and shader effects. Also, copying modifiers/constraints/effects between objects is possible though outliner drag&drop. There are a few unimplemented cases here, but I spent a long time rewriting this so adding new behavior was trivial.
Next Week
Wrap up the modifier/constraint/effect drag&drop. Just a few functions to write to copy data.
Work more on object sorting. You can’t reorder child objects yet which was an oversight.
Start on bone sorting. This will be both the sort by name and manual.
Fixed parent selection. A few months back I fixed a bug with drivers. When selecting a bone in the outliner, the parent armature was not selected making it impossible to modify bone drivers. The fix required selecting the parent object in the outliner. The issue with that is any selected objects in the outliner will force the context menu to show object options, rather than the modifiers, curves, or other types. The solution is to select the object in the viewport, but prevent the outliner select sync from overriding it. To better explain:
This looks much cleaner and since the fix is so simple I plan to get it in 2.90 and 2.83 if possible because the annoyances with the outliner parent selection caused many issues.
Finished all “UI Stack” (modifier, constraint, shader effects) operators. Now you can copy constraints between objects and bones, and reordering is much more reliable. Linking and copying also works for grease pencil shader effects. I also cleaned up the code a bit here now that it works well.
Bones are now sorted by name when Sort by Name is chosen.
Addressed a few small issues with mode toggling and selection.
Sadly, it looks like I’m putting manual bone sorting aside as they are stored as a flat list in the main blender database which doesn’t fit well with the sorting logic. If I have time I’ll revisit it.
Next Week
More work on context menu. I got a tiny bit done this week, but there is lots more to do.
Move a few fixes to 2.90 and hopefully 2.83 (dealing with object-parent selection & context menu).
I overlooked writing this the last two weeks… oops! I’ve gotten a lot of things done the last weeks though, so I’ll share all of that here. As we are nearing the end, much of my work has been testing and fixing small issues. I’ve also fixed several bugs in master and participated in the code quality day.
Week 11 August 10 - 15
Bugs fixed
Removed duplicate context menu entries
Fixed outliner child objects hidden when collections were filtered.
Fixed disabled buttons toggling on drag
Collection Colors
Finally decided on 8 colors. More may be added in the future, but 8 gives good flexibility without cluttering the context menu.
Use collection icons rather than squares in the context menu.
Switched to filled icons rather than shading behind the collection icon. To make this more prominent, a filled collection icon is now used.
Use the colored collection icons in various UI menus. Add collection instance, Move/Link collection, etc.
Prevent setting scene collection & linked collections color tags
Mode Toggle
Change the active object when toggling modes.
If the active object is removed from edit or pose mode, and other objects are still in the mode, a new active will be chosen from the remaining objects.
There is an undo/redo crash with these changes that needs to be resolved…
Change dot to mode icon on hover.
Properties Sync
When selecting a modifier/constraint/shader fx, ensure that it is expanded in the properties editor.
Use Shift for recursive bone restrict button toggling. This is consistent with objects and collections.
Add a new filter: Row children filter. This hides the row icons but still allows expanding to see children.
Enable the mode column by default
Draw the row highlights rounded and slightly spaced out like UI Lists and the File Browser.
Goals for the final week
Begin code review: I don’t expect to have everything reviewed by the end of the summer of code, but I do plan on having all my code separated into patches for the final review & merge.
Finalize collection colors & pick colors for the other themes.
Fix mode toggle crash on redo/undo
Final cleanup for drag&drop code
A few small context menu fixes
I’ll share a video tomorrow showing the state of the outliner.
As promised, here is the video! Today I committed most of my goals for the first stage of the context menu cleanup. There is still a lot of work to do, but it’s already much more usable.
Video contents (in order):
Modifier link with drag & drop
Collection colors in context menu (new icons)
Also new icons in the outliner
Collection color icons in UI menus (like add collection instance)
Mode toggle column
Removing the active doesn’t remove all anymore
Change dot icon on hover
Properties Editor Sync
Now modifiers, constraints, and shader fx are expanded on selection
Row icon filter - don’t show icons in rows, but still allow expanding
Context menu fixes. Here the context menu shown is based on the target of the right-click. Before it would be impossible to see the modifier menu when an object was also selected.
Deleting modifiers when other elements are also selected
Also you may notice the following throughout:
Collection exclude checkbox is placed with the other restrict buttons
The row highlights are slightly rounded and separated vertically
Next week is the final evaluation. I’ll be writing my Final Report and continuing code review and fixing any other issues that remain.
I did start development on a new feature to highlight the parent of objects and bones when the active item is in a collapsed outliner hierarchy. This won’t be part of the GSoC code review, but it could still be included in the 2.91 release if all goes well