Blender Git Commit Log
Git Commits -> Revision f4cb3cc
Revision f4cb3cc by Julian Eisel (master) July 7, 2021, 17:24 (GMT) |
Assets: Keep assets active after renaming, ensure they are scrolled into view When renaming an ID somewhere in the UI after marking it as asset, it would often get lost in the Asset Browser (scrolled out of view). It would also get deactivated. This patch makes sure that if an asset is active whose ID gets renamed, it is kept active and visible. That is important for a fast, uninterrupted asset creation workflow, where users often rename assets while working in the asset browser. Old code stored the new file-name to identify a file after re-reading the file-list after the rename. For assets that doesn't work because there may be multiple assets with the same name. Here the simple solution of just storing the pointer to the renamed ID is chosen, rather than relying on the file-name in this case. (Should be fine with undo, since the ID * reference is short lived, it's not stored over possible undo steps. If it turns out to have issues, I rather switch to a rename_id_uuid, but keep that separate from the file->uid). Reviewed by: Sybren St�vel Differential Revision: https://developer.blender.org/D11119 |
Commit Details:
Full Hash: f4cb3ccd9c070dce24db98436ccf2e0e70000077
Parent Commit: fb98f22
Lines Changed: +67, -11
7 Modified Paths:
/source/blender/blenkernel/intern/screen.c (+6, -0) (Diff)
/source/blender/editors/space_file/filelist.c (+27, -5) (Diff)
/source/blender/editors/space_file/filelist.h (+2, -1) (Diff)
/source/blender/editors/space_file/filesel.c (+14, -3) (Diff)
/source/blender/editors/space_file/file_ops.c (+1, -0) (Diff)
/source/blender/editors/space_file/space_file.c (+11, -1) (Diff)
/source/blender/makesdna/DNA_space_types.h (+6, -1) (Diff)
/source/blender/editors/space_file/filelist.c (+27, -5) (Diff)
/source/blender/editors/space_file/filelist.h (+2, -1) (Diff)
/source/blender/editors/space_file/filesel.c (+14, -3) (Diff)
/source/blender/editors/space_file/file_ops.c (+1, -0) (Diff)
/source/blender/editors/space_file/space_file.c (+11, -1) (Diff)
/source/blender/makesdna/DNA_space_types.h (+6, -1) (Diff)