Hi!
My name is Almaz Shinbay, and this topic is meant for posting weekly reports as well as the final report at the end of the program.
You can have a look at the proposal here.
Feedback topic: GSoC 2023: Outliner Tree Fefactoring - Feedback
Working Branch: temp-id-mesh-refactor (merged into main branch and deleted)
Report Week 1 (May 29 - June 2)
This week’s progress:
- Two main branch commits:
– f63c3075cb: Port mesh elements to new tree-element code design
– 8374208a57: Port curve elements to new tree-element code design - After the discussion with my mentor, I started working on default
expand()
ofTreeElementID
to avoid a bunch of small classes that only differ slightly
Report Week 2 (June 5 - June 9)
This week’s progress:
- Two main branch commits:
– c5ddf63a4a: Port metaball elements to new tree-element code design
– b67e5492c3: Port texture elements to new tree-element code design - Tried to understand how scene IDs and related elements were ported to new tree-element code design for porting object and armature elements:
– Read the changes from commit 4292bb060d. - The default
expand()
will be done after porting all ID elements, that expand not only animation data, as agreed upon by the mentor.
Next week’s goals:
- Port
ID_LS
andID_GD_LEGACY
to new code design - Start working on porting
ID_OB
Report Week 3 (June 12 - June 16)
This week’s progress:
- Three main branch commits and one PR, awaiting review:
– a7ac317159: Port linestyle elements to new tree-element code design
– 3481376981: Port grease pencil legacy elements to new tree-element code design
– 864798b4c7: Port collection elements to new tree-element code design
– #108964: Outliner: Port armature elements to new tree-element code design - Started working on object ID elements on branch Almaz-Shinbay/blender:temp-id-object-refactor
TO-DO for Week 4:
- Continue work on porting object elements
- Resolve any changes required after the review of #108964
Report Week 4 (June 19 - June 23)
This week’s progress:
- Main branch commits:
– 93e2e749da: Outliner: Port armature elements to new tree-element code design
– 888cfd29c3: Outliner: Port object elements to new tree-element code design - Pull requests:
– #109256 - Outliner: Port remaining ID elements to new tree-element code design
TO-DO for Week 5:
- After successful review of #109256, remove
isExpandValid()
fromAbstractTreeElement
and its sub-classes - Discuss with mentor the next steps of the project
Report Week 5 (June 26 - June 30)
This week’s progress:
- Main branch commits:
– 89f61015d1: Outliner: Port remaining ID elements to new tree-element code design
– 4094cd207a: Outliner: Remove isExpandValid() from AbstractTreeElement and its sub-classes
– 65f40a4e5d: Cleanup: use snake case for outliner class function names - I worked on refactoring of
tree_element_get_icon()
, which is a quite different task from the proposed project, but it is also part of #96713 and recommended by my mentor.
– Replacedtree_element_get_icon_from_id()
with usingvirtual AbstractTreeElement::getIcon()
– Working branch: Almaz-Shinbay/blender:refactor-tree-element-get-icon
TO-DO for Week 6:
- Continue work on porting other tree elements
Report Week 6 (July 3 - July 7)
This week’s progress:
- Main branch commits:
– af92de664b: Outliner: Port bone elements to new tree-element code design - PRs:
– #109793: Outliner: Port edit bone elements to new tree-element code design - Also started porting
TSE_DEFGROUP
,TSE_DEFGROUP_BASE
to new tree-element code design
TO-DO for Week 7:
- Because of traveling in the following week, I can’t do much work and the main goals will be the followings:
– Merge into the main #109793
– Try to finish the work withTSE_DEFGROUP
,TSE_DEFGROUP_BASE
Report Week 7 (July 10 - July 14)
As mentioned a week before, I didn’t do much work due to traveling, but main goals were achieved.
This week’s progress:
- Main branch commits:
– bfae400ea5: Outliner: Port edit bone elements to new tree-element code design - PRs:
– #110003: Outliner: Port deform group elements to new tree-element code design
TO-DO for Week 8:
- Merge into the main branch #110003, making required changes from review
- Continue to port other tree element types used in
TreeElementIDObject
, starting fromTSE_LINKED_PSYS
Report Week 8 (July 17 - July 21)
This week’s progress:
- PRs:
– #110245: Outliner: Port particle system elements to new tree-element code design
– #110371: Outliner: Port grease pencil effect elements to new tree-element code design
TO-DO for Week 9:
- Wait for review of PRs and make any required changes
- Discuss with the mentor about porting modifier and constraint elements
Report Week 9 (July 24 - July 28)
This week’s progress:
- Main branch commits:
– 1f722a6d01: Outliner: Port grease pencil effect elements to new tree-element code design
– 8214109778: Outliner: Port deform group elements to new tree-element code design
– ee7ba1955c: Outliner: Port particle system elements to new tree-element code design - PRs:
– #110585 - PassShaderFxData
pointer to grease pencil effect constructor
– #110587 - Outliner: Port pose group elements to new tree-element code design
TO-DO for Week 10:
- Get PRs merged into main branch
- Work on porting modifier and pose related tree elements
Report Week 10 (July 31 - August 4)
During this week, I focused solely on the project during the evenings because I took part in the Kazakhstan training camp for ICPC.
This week’s progress:
- PRs:
– #110806 - Outliner: Port pose base elements to new tree-element code design - Apart from working on
TSE_POSE_BASE
, I also attempted to portTSE_MODIFIER_BASE
andTSE_MODIFIER
. The former has been completed, but the latter is still unfinished.
TO-DO for Week 11:
- Complete the work on porting
TSE_MODIFIER
- Start to port
TSE_POSE_CHANNEL
andTSE_LINKED_OB
Report Week 11 (August 7 - August 11)
This week’s progress:
- Main branch commits:
– d9de0a4725: Fix missing ShaderFx pointer to TreeElementGPencilEffect constructor
– d5c7608b39: Outliner: Port view layer elements to new tree-element code design
– 55117f20ee: Outliner: Port pose group elements to new tree-element code design - Worked on porting constraint and modifier elements
TO-DO for Week 12:
- Complete
TSE_CONSTRAINT
,TSE_CONSTRAINT_BASE
- Port
TSE_POSE_CHANNEL
,TSE_LINKED_OB
- Fall semester just has started in my university. If there will be more free time, try to work on other remaining types.
Report Week 12 (August 14 - August 18)
This week’s progress:
- Main branch commits:
– 485c98cc2c: Outliner: Port pose base elements to new tree-element code design
– 02969de155: Outliner: Port constraint elements to new tree-element code design
– e628b5ffe5: Cleanup: remove unnecessary constraint code in pose base expand()
– 077db81638: Outliner: Port linked object elements to new tree-element code design
– 28f4bb2007: Outliner: Port modifier elements to new tree-element code design - PRs:
– #111167 - Outliner: Port pose channel elements to new tree-element code design
– #111220 - Outliner: Port layer collection elements to new tree-element code design
– #111230 - Outliner: Port view collection base elements to new tree-element code design
TO-DO for Week 13:
- Get merged PRs into main branch
- Prepare and submit final report of the project
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!!