Page MenuHome

Fix Filebrowser Blender ID filter
ClosedPublic

Authored by Dalai Felinto (dfelinto) on Wed, Oct 9, 9:39 PM.

Details

Summary

When the filtering option was disable we should see all the datablock types.

Diff Detail

Repository
rB Blender

Event Timeline

Small annoyance, unless I really misread the intent of this option here. Either way without this it is really annoying to reset the filter_id option to all, after you clicked in any of the options.

In terms of UI I think we should gray out, not hide the suboptions (both in the Advanced Options menu, and the regular filter menu, but that's a separate issue, one that the Python UI dev team can tackle anyways.

Agree this should be fixed.
There's just one thing that might cause an issue later, not sure.

source/blender/editors/space_file/filelist.c
834

The FILTER_ID_XX enum is almost "full", think there's only one unused bit left. If we change it to be a long long or whatever, using ~(0) *might* break.
Checking the C reference, apparently C99 allows interpreting an un-suffixed integer constant as long long, but it's very unclear to me what the rules for that are and if we can rely on this.

Maybe this is unlikely to cause issues in practise, but there's still a trivial & safe route:
Add a FILTER_ID_ALL for convenience and use that instead (also here). This may also be convenient in other places.

This revision is now accepted and ready to land.Fri, Oct 11, 4:18 PM
This revision was automatically updated to reflect the committed changes.