Page MenuHome

Fix T74332: selection sync replacing parent selection
ClosedPublic

Authored by Nathan Craddock (natecraddock) on Mar 5 2020, 7:14 AM.

Details

Summary

Selecting certain child datablocks also selects the parent (e.g. selecting a pose bone selects the armature). The base was selected, but the outliner tree element was left unselected. The subsequent selection sync would then deselect the parent base because it was not flagged as selected in the outliner.

This led to issues like T74332 where selecting a pose bone in the outliner did not show drivers in the driver editor unless the armature was explicitly added to the selection afterwards.

The solution is to also flag the outliner elements as selected when selecting parent bases.

Diff Detail

Repository
rB Blender

Event Timeline

source/blender/editors/space_outliner/outliner_select.c
322–324

This is needed if the previous selected object was the parent. For example, if an armature was selected, then the pose bone was selected, the armature would then be deselected because it was active.

358

This could be optimized by searching back for a treestore rather than ID on line 321.

Sybren A. Stüvel (sybren) added inline comments.
source/blender/editors/space_outliner/outliner_select.c
322–324

Such comments should be code comments; your explanation is clear, and IMO really belongs in the code, not in the tracker.

358

Probably a good idea for a different patch.

This revision is now accepted and ready to land.Mar 5 2020, 10:25 AM
Nathan Craddock (natecraddock) marked an inline comment as done.Mar 5 2020, 3:28 PM

Thanks for the quick review. I will comment the code and commit.

source/blender/editors/space_outliner/outliner_select.c
322–324

I should have phrased it as a question. The reason I made the patch was because I was unsure of the lines I commented on. Seems like its okay though.