Blender Git Loki

Git Commits -> Revision a759d01

February 18, 2015, 20:36 (GMT)
Big refactor of filelisting in filebrowser - decouple os/fs-related direntry from actual blender listing.

Main idea is that direntry had quite a bit of things already absolutely useless
in the mere 'file listing' context (image pointer, void 'data' pointer, etc.).

On the other end, to handle future asset stuff, we need *more* 'meta data' for our 'files'
(tags, variants, revisions...).

Further more, we need all this to be easily usable through RNA, i.e. we need it to
be defined in DNA.

So instead of trying to use direntry in DNA, mixing low-level system stuff like stat
where we do not want to see it, we define our own 'file' representation,
with only what we really need (who cares about chars or block or dev files in filebrowser?
we only need to know whether it's a regular file or a directory, period).

That way, low-level dirlisting remains clean, and we can easily extend our own
data as needed.

Note this new code works, does not crash (so far...) nor memleak, but it
needs quite a bit of work still, we are still storing useless stuff in direntry
(all those strings representing modes, size etc.!), and mem handling
during dir/lib listing is confusing at best (would like to use a memarena
or mempool here, but it's not that easy).

Commit Details:

Full Hash: a759d0190bd12303e9f1f2cf22a3c533d59b9934
Parent Commit: 3e6aa7b
Lines Changed: +745, -469

11 Modified Paths:

/source/blender/blenlib/BLI_fileops.h (+4, -4) (Diff)
/source/blender/blenlib/BLI_fileops_types.h (+0, -8) (Diff)
/source/blender/blenlib/intern/storage.c (+34, -28) (Diff)
/source/blender/editors/interface/interface_icons.c (+1, -1) (Diff)
/source/blender/editors/space_file/filelist.c (+556, -356) (Diff)
/source/blender/editors/space_file/filelist.h (+4, -3) (Diff)
/source/blender/editors/space_file/filesel.c (+15, -18) (Diff)
/source/blender/editors/space_file/file_draw.c (+29, -26) (Diff)
/source/blender/editors/space_file/file_ops.c (+22, -22) (Diff)
/source/blender/editors/space_file/space_file.c (+2, -2) (Diff)
/source/blender/makesdna/DNA_space_types.h (+78, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021