Brush Assets: Show new catalog in asset shelf when duplicating brush #120531

Merged
Hans Goudey merged 5 commits from HooglyBoogly/blender:brush-assets-duplicate-show-catalog into brush-assets-project 2024-04-26 18:36:37 +02:00
Member

When adding a new brush asset in a new catalog,
make it visible in the currently active asset shelf.

When adding a new brush asset in a new catalog, make it visible in the currently active asset shelf.
Hans Goudey added 1 commit 2024-04-11 17:24:18 +02:00
Hans Goudey requested review from Julian Eisel 2024-04-11 17:24:30 +02:00
Hans Goudey added this to the Brush Assets & Asset Shelf project 2024-04-17 17:23:12 +02:00
Hans Goudey added 1 commit 2024-04-23 19:51:48 +02:00
Julian Eisel requested changes 2024-04-23 21:06:59 +02:00
Dismissed
@ -866,6 +867,28 @@ static AssetLibraryReference user_library_to_library_ref(const bUserAssetLibrary
return library_ref;
}
static void show_catalog_in_asset_shelf(const bContext &C, const StringRefNull catalog_path)
Member

Code here is largely a duplicate of active_shelf_from_area(), would rather share this.

Code here is largely a duplicate of `active_shelf_from_area()`, would rather share this.
HooglyBoogly marked this conversation as resolved
@ -887,0 +891,4 @@
if (!area) {
return;
}
const ARegion *shelf_region = BKE_area_find_region_type(area, RGN_TYPE_ASSET_SHELF);
Member

Code here is duplicated from active_shelf_from_area(), better make this shared.

Code here is duplicated from `active_shelf_from_area()`, better make this shared.
HooglyBoogly marked this conversation as resolved
@ -887,0 +899,4 @@
return;
}
const RegionAssetShelf &shelf = *static_cast<const RegionAssetShelf *>(shelf_region->regiondata);
if (!BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(
Member

This does assume that the currently active shelf displays brushes, which may not be true. I'm not sure how we could improve this though since there's nothing to explicitly connect this to a certain asset shelf. If we had traits we could check that the asset shelf traits include "brush". I guess for now the asset shelf should hide empty catalog tabs.
Nothing for you to do, just noting as a weakness.

This does assume that the currently active shelf displays brushes, which may not be true. I'm not sure how we could improve this though since there's nothing to explicitly connect this to a certain asset shelf. If we had traits we could check that the asset shelf traits include "brush". I guess for now the asset shelf should hide empty catalog tabs. Nothing for you to do, just noting as a weakness.
Author
Member

Yeah, maybe that will get clearer if we ever actually have two conflicting asset shelf types here.

Yeah, maybe that will get clearer if we ever actually have two conflicting asset shelf types here.
Hans Goudey added 1 commit 2024-04-26 17:13:35 +02:00
Hans Goudey added 2 commits 2024-04-26 18:27:50 +02:00
Hans Goudey requested review from Julian Eisel 2024-04-26 18:28:29 +02:00
Julian Eisel approved these changes 2024-04-26 18:29:35 +02:00
Hans Goudey merged commit 2ff7ed0366 into brush-assets-project 2024-04-26 18:36:37 +02:00
Hans Goudey deleted branch brush-assets-duplicate-show-catalog 2024-04-26 18:36:40 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#120531
No description provided.