Revision 865fe33 by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 6, 2021, 15:57 (GMT) |
Fix compile error of asset library test on Windows The `filesystem::path::c_str()` function returns the path in the native string format, which is `wchar` on Windows. Instead use the one that does a conversion to `std::string` if needed. |
Revision f08aeab by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 6, 2021, 13:44 (GMT) |
Correct name of catalog-tree item child container alias This used to be a set, now it's a map. |
Revision d0b68f9 by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 6, 2021, 13:44 (GMT) |
Avoid unnecessary allocations in unit test |
September 3, 2021, 21:19 (GMT) |
Add and use initial UI Tree-View API This adds a simple to use API to implement custom tree views. This should make adding tree like layouts much easier & cleaner. Plus, it should become easier to mange UI state (once I've done some more additions). Another goal for this was separating UI code better from the data, currently we often have to add UI state information to the data (we may still have to do this in some cases for file writing). Idea is to let API users implement a custom tree-view class, that inherits from `uiAbstractTreeView` and implements its `build_tree()` function to add tree items. Each such item has a custom type, that defines how its tree row is drawn. For that, another class can be added, inheriting from `uiAbstractTreeViewItem` and implementing its `build_row()` function. But this also adds `uiBasicTreeViewItem` which is just a tree-row with an icon and a label, for convenience. More such common tree-view item types can be added. I'm quite happy with how this turned out eventually. This could work! The resulting UI should look identical to the one before this commit. Only internals changed (drastically). |
September 2, 2021, 18:01 (GMT) |
Basic support for creating catalogs from the UI To the right of each catalog, the UI shows a '+' button now. It creates a catalog (simply named "Catalog" for now) inside this parent catalog. This change is written to the asset libraries catalog defintion file immediately. Adding multiple catalogs on the same level will cause errors currently, since then you have multiple catalogs on the same level named "Catalog". We'll have to ensure uniqueness there. I think we should immediately enable renaming after creating a new catalog, like we do it for creating new files in the File Browser. |
September 2, 2021, 16:14 (GMT) |
Minor tweaks * Avoid unnecessarily specifying button width. * Remove left padding from items without icon, looks better that way. |
September 2, 2021, 15:23 (GMT) |
Very basic tree drawing in the Asset Browser sidebar Draws the catalogs in the Asset Browser sidebar with some dummy icons. Also adds an "All" and a "Unassigned" item. Besides hover feedback, interaction is not working yet. Also removes the categories UI and makes sure all assets are drawn always. Filtering by catalog needs to be implemented still. |
Revision e8eb5d8 by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 2, 2021, 13:23 (GMT) |
Add tests for catalog tree Removes the printing of the catalog tree. Also adds and tests a function to get the full catalog path from a tree item. |
Revision ead9a15 by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 2, 2021, 10:29 (GMT) |
Simplify catalog tree creation using std::map By using std::map with the catalog-component name as key simplifies creation quite a bit. Generally it seems like the most appropriate container for storing children in the tree. |
Revision d76863c by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 1, 2021, 17:41 (GMT) |
Merge branch 'master' into temp-asset-browser-catalogs |
Revision 0cf37ba by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) September 1, 2021, 17:36 (GMT) |
Revision c0c605d by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 31, 2021, 14:55 (GMT) |
Use `ghc::filesystem` as platform compatible replacement for `std::filesystem` Previous commit merged the `temp-cpp-ghc-filesystem` branch into this, now we can actually use this replacment. This way the branch can be compiled on macOS. |
Revision 8c81ff5 by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 31, 2021, 14:51 (GMT) |
Merge branch 'temp-cpp-ghc-filesystem' into temp-asset-browser-catalogs |
Revision 5d1fa2e by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename, temp-cpp-ghc-filesystem) August 31, 2021, 14:49 (GMT) |
Dependencies: Drop-in replacement for std::filesystem (in extern/) Introduces the ghc::filesystem library as a (leight weight, header only) drop-in replacement for std::filesystem. The latter can't be used on the minimum macOS version we support. Once that changes, we can switch to using std::filesystem directly. Part of T90379. * Add ghc::filesystem to extern/ as platform compatible replacement for std::filesystem. * Add Windows specific code to avoid issues with including Windows.h. * Add blender::bli::filesystem as alias for ghc::filesystem. That should make the ghc -> std transition easier later on since we can just change this alias. Also makes it easy to switch between the two at compile time. |
Revision 1a20b3d by Julian Eisel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 31, 2021, 14:29 (GMT) |
Merge branch 'master' into temp-asset-browser-catalogs |
Revision ab98982 by Jacques Lucke (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 17, 2021, 09:22 (GMT) |
Merge branch 'master' into temp-asset-browser-catalogs |
Revision ca70b80 by Sybren A. Stüvel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 11, 2021, 13:52 (GMT) |
Asset Catalogs: change default catalog definition file name Change the default catalog definition file name from "single_catalog_definition_file.cats.txt" to "blender_assets.cats.txt". |
Revision 0a7e49f by Sybren A. Stüvel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 11, 2021, 13:36 (GMT) |
Cleanup: use same parameter name in declaration & definition |
Revision 6214763 by Sybren A. Stüvel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 11, 2021, 12:48 (GMT) |
Asset Catalogs: clean up catalog paths before using them Clean up paths by trimming whitespace and separators `/path/to/something ` ? `path/to/something`. |
Revision ed1fd86 by Sybren A. Stüvel (temp-asset-browser-catalogs, temp-asset-browser-catalogs-ui, temp-assetlib-plus-uuid-rename) August 11, 2021, 11:59 (GMT) |
Asset Catalogs: allow adding new catalogs New catalogs can be added with `AssetCatalogService::create_catalog()`. It only requires the catalog path, and convert that into a suitable catalog ID itself. It is intended that artists won't have to bother with assigning catalog IDs, and that editing those is more of an advanced feature. Adding a catalog will automatically save the catalog definition file to disk. |
|