Page MenuHome

Fix T90862: Texts in Outliner can have wrong icon
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Aug 30 2021, 3:38 PM.

Details

Summary

In contrast to the Filebrowser, the Outliner (Blender File view) did not
distinguish icons for text-based formats (if they have a filepath this
can be done though).

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Aug 30 2021, 3:38 PM
Hans Goudey (HooglyBoogly) requested changes to this revision.Sep 6 2021, 3:48 PM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/editors/space_outliner/outliner_draw.c
2632

Seems like a nice place for a comment, I'm honestly not sure how a VDB file could end up being loaded as a text, for example.

source/blender/editors/space_outliner/outliner_select.c
1431 ↗(On Diff #41224)

Is there a reason to make this a special case and not put it in tree_element_activate?

This revision now requires changes to proceed.Sep 6 2021, 3:48 PM

Could you split the fix from the new feature (activating text on click)? Looking up the biggest area has always been kinda weak, I had multiple experienced users complain about this seemingly random behavior. But better to discuss that in a dedicated patch/task.

source/blender/editors/space_outliner/outliner_draw.c
2633

Shouldn't ICON_FILE_TEXT be the default/fallback icon?

source/blender/editors/space_outliner/outliner_select.c
1433–1442 ↗(On Diff #41224)

This seems like a direct copy from editsource_text_edit()? Better put this into a function then.

Julian Eisel (Severin) requested changes to this revision.Sep 6 2021, 4:17 PM
  • use dedicated function for activating
  • add comment
Philipp Oeser (lichtwerk) marked 2 inline comments as done.Sep 6 2021, 4:23 PM
Philipp Oeser (lichtwerk) added inline comments.
source/blender/editors/space_outliner/outliner_draw.c
2632

Without filtering, the Text Editor can open all kinds of formats (.obj, ...)

Philipp Oeser (lichtwerk) marked an inline comment as done.

use ICON_FILE_TEXT as default icon

Philipp Oeser (lichtwerk) planned changes to this revision.Sep 6 2021, 4:44 PM

Will split these in two.

  • split of activating into own patch
  • change back default icon to script (since these can have no extension or not be saved -- and still think these are the most common)
Philipp Oeser (lichtwerk) retitled this revision from Fix T90862: Texts in Outliner can have wrong icon and dont activate to Fix T90862: Texts in Outliner can have wrong icon.

I'd personally still prefer ICON_FILE_TEXT as default icon, it's just the more general one. Now it shows the wrong icon if a non-script file is loaded but not saved.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 14 2021, 10:01 AM
This revision was automatically updated to reflect the committed changes.