December 3, 2020, 00:50 (GMT) |
Merge branch 'temp-review-asset-previews' into temp-review-asset-drag-drop |
December 3, 2020, 00:50 (GMT) |
Merge branch 'temp-review-asset-create-ui' into temp-review-asset-previews |
December 3, 2020, 00:47 (GMT) |
Merge branch 'temp-review-asset-metadata' into asset-metadata-creation |
December 3, 2020, 00:45 (GMT) |
Merge branch 'master' into tmp-review-asset-metadata |
December 3, 2020, 00:42 (GMT) |
Sync with review branches Some minor changes (mostly cleanups) done while splitting up the branch for review. |
December 2, 2020, 22:00 (GMT) |
Asset Browser UI This introduces the UI part of the Asset Browser. Additions: * Asset Browser as sub-editor of the File Browser. * Asset repository dropdown, showing "Current File" and all custom repositories. * Display popover, filter popover and search box (partially dummies, see T82680). * Navigation region showing asset categories. * Asset metadata editing UI in the sidebar (preview, description, tags). * Make asset files draggable (with preview image). * If a repository with invalid path is selected, draw a message in the main region to help the user understand what's wrong. * Operators to add and remove asset tags. * "Only Assets" option for Link/Append. Differential Revision: https://developer.blender.org/D9725 |
December 2, 2020, 21:18 (GMT) |
Asset Browser: Internal File Browser changes & Python API additions The Asset Browser will be a sub-editor of the File Browser. This prepares the File Browser code for that. **File-Lists** * Support loading assets with metadata read from external files into the file-list. * New main based file-list type, for the "Current File" asset repository. * Refresh file-list when switching between browse modes or asset repositories. * Support empty file-lists (repository with no assets). * Store file previews as icons, so scripts can reference them via icon-id. See D9719. **Space Data** * Introduce "browse mode" to differeniate between file and asset browsing. * Add `FileAssetSelectParams` to `SpaceFile`, with `FileSelectParams` as base. Makes sure data is separated between asset and file browsing when switching between them. The active params can be obtained through `ED_fileselect_get_active_params()`. * `FileAssetSelectParams` stores the currently visible repository ID. * Introduce file history abstraction so file and asset browsing can keep a separate history (previous and next directories). **General** * Option to only show asset data-blocks while file browsing (not exposed here). * Add "active_file" context member, so scripts can get and display info about the active file. * Add "active_id" context member, so `ED_OT_lib_id_load_custom_preview` can set a custom ID preview. (Only for "Current File" repository) * Expose some of `FileDirEntry` in RNA as (non-editable). That way scripts can obtain name, preview icon and asset-data. Differential Revision: https://developer.blender.org/D9724 |
December 2, 2020, 19:57 (GMT) |
Asset Browser: Support custom asset repository paths through Preferences Idea is simple: In {nav Preferences > File Paths}, you can create custom repositories, give them a name and select a path. Currently, this has to be a path to a .blend, only .blend files are supported as repositories right now. But directories should be supported as well, see {T82682}. Differential Revision: https://developer.blender.org/D9722 |
December 2, 2020, 19:27 (GMT) |
Asset Browser: Support dragging assets and appending on drop Idea is simple: When dragging an asset, store the source file-path and data-block name and when dropping, append the data-block. It uses existing drop operators, but the function to get the dropped ID is replaced with one that returns the local ID, or, in case of an external asset, appends the ID first. Note that I expect this to be a short-lived change. A refactor like D4071 is needed to make the drag & drop system more future proof for assets and other use cases. Differential Revision: https://developer.blender.org/D9721 |
December 2, 2020, 17:24 (GMT) |
Asset Browser: Various changes for previews * Operator to set a custom data-block preview. Copies an image from a selected path to the ID's preview buffer. * Object preview support (threaded). Creates a localized copy of the object, creates a temporary main, scene, view-layer and depsgraph, uses the "Frame Selected" logic to place a camera in front of the object, and renders that offscreen. * Support defining (not necessarily rendering) icons in threads. Needed so the File Browser can expose file previews with an icon-id to scripts. ** For that, ported the C++ to be able to use scope based mutex locks. ** Also support ImBuf icons. * Tag previews as "unfinished" while they render in a thread, for the File Browser to dynamically load previews as they get finished. * Better handle cases where threaded preview generation is requested, but the ID type doesn't support it (fallback to single threaded). Differential Revision: https://developer.blender.org/D9719 |
December 2, 2020, 16:26 (GMT) |
Asset Browser: "Make Asset" operator and UI integration Exposes "Make Asset" in Outliner context menus and button context menus. The Outliner can tell operators which IDs are selected via a new "selected_ids" context member. We can use that for more operators and editors in future. Other UI code can set a new "focused_id" context member (automatically done for ID pointer property buttons). That way, data-block search menus or other buttons representing a data-block (e.g. materal slots) can hand an ID to operators via context. Differential Revision: https://developer.blender.org/D9717 |
December 2, 2020, 15:42 (GMT) |
Asset Browser: "Make Asset" operator and UI integration |
December 2, 2020, 14:58 (GMT) |
Asset Browser: Metadata storage, reading, writing and API |
December 1, 2020, 18:22 (GMT) |
Remove outdated TODO comment, comment why it's not needed instead |
December 1, 2020, 18:09 (GMT) |
Cleanup: Better naming for WM-drag functions Also added a comment for clarification. |
December 1, 2020, 18:08 (GMT) |
Remove "Author" from asset metadata This can become a custom property, based on review feedback we don't need to have this builtin. |
December 1, 2020, 17:21 (GMT) |
Minor UI tweaks * Use "metadata" not "meta-data", just like elsewhere. * Move asset repositories panel in the Preferences to the bottom, looks weird otherwise. * Slightly improve layout of the panel, after review feedback. |
December 1, 2020, 17:09 (GMT) |
Remove WIP code for asset catalogs I still have a local version of the branch with this code, but for the merge into master this isn't needed and adds unecessary review overhead. |
December 1, 2020, 16:53 (GMT) |
Merge branch 'master' into asset-browser |
November 30, 2020, 16:39 (GMT) |
Rename some core asset types (breaking file compatibility) After feedback from review, I decided to change data-structure names (`AssetData` -> `AssetMetaData`, `CustomTag` -> `AssetTag`). This will break DNA compatibility so old assets created with this branch won't be readable. |
|