Final Report - Outliner Tree Refactoring
Overview
The primary objective of the project was to migrate all remaining elements of the Outliner tree to the new code design for tree elements.
For more details on the new design, refer to issue #96713 - Continued Outliner Code Refactor. You can also check the porting status for each element type in that link.
Summary
All tree elements, with the exception of TSE_ID_BASE
, have been successfully migrated to the new object-oriented design. Numerous new classes for tree elements have been created, each corresponding to a type, within the source/blender/editors/space_outliner/tree
folder.
All commits are listed in this topic thread above.
Progress
Weeks 1-5
During this period, all ID tree elements, specifically the subtypes of TSE_SOME_ID
, were transitioned to the new code design.
In addition, the following cleanups were performed:
- The removal of the temporary
isExpandValid()
function, which was utilized during the transition to the new tree-element design. This was necessary because expanding wasn’t applicable to certain types. (4094cd207a) - Renaming of outliner class functions to adhere to style conventions. (65f40a4e5d)
Additionally, I began work on the refactoring of tree_element_get_icon()
to make greater use of AbstractTreeElement::getIcon()
. This task was suggested by my mentor to diversify my project work, but I wasn’t able to complete it at this time. (Refactor: tree-element-get-icon)
Weeks 6-12
Throughout the remainder of the program, my focus shifted to other tree elements. This period also provided me with the opportunity to gain more experience in handling git merges and resolving conflicts.
There was a situation when, due to my oversight, a pull request containing a bug was merged into the main branch. This experience underscored the importance of code review and the need to ensure that changes do not lead to software crashes, at least within my own development environment, before creating a PR. It also provided insight into the role of buildbot in the development process.
Week 13
During this final week, the remaining pull requests were reviewed and successfully merged into the main branch:
- 668b31c5d8: Outliner: Port layer collection elements to new tree-element code design
- 81eb7edc8b: Outliner: Port view collection base elements to new tree-element code design
- ed5110c0ef: Outliner: Port pose channel elements to new tree-element code design
Future Work
Moving forward, the remaining tree element, TSE_ID_BASE
, needs to be ported to the new design for the Outliner. Additionally, efforts will be directed toward cleaning up the mess present in outliner_add_element()
.
Acknowledgments
First and foremost, I would like to express my sincere gratitude to my mentor, Julian Eisel, for his invaluable guidance and mentorship. He has not only provided me with insightful guidance and direction but has also encouraged me to explore new concepts and best practices. Additionally, I am profoundly grateful to other developers who have offered their assistance and support throughout this journey. Thanks for all of you!!