Brush asset shelf popup #119217
No reviewers
Labels
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 project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119217
Loading…
Reference in New Issue
No description provided.
Delete Branch "JulianEisel/blender:brush-asset-asset-shelf-popup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Things should be working, design definitely needs evaluation as part of the brush assets project.
@blender-bot package
Package build started. Download here when ready.
@ -0,0 +30,4 @@
const ScrArea *area,
AssetShelfType &shelf_type)
{
ARegion *shelf_region = BKE_area_find_region_type(area, RGN_TYPE_ASSET_SHELF);
I guess this means the asset shelf popup can only be opened from a 3D viewport and in the future the image editor. It will not work in the properties editor?
It's also strange to me that state would be tied to a specific 3D viewport. Multiple could be open, and I would expect the popup to be independent of which one you opened it from.
Replying to the inline comment here, since this is higher level discussion:
Yes, that's mostly due to the decision we made in the asset shelf review to store asset shelf data as asset-shelf region-data, so you need to have an asset shelf region available.
However I'm not convinced that we'd want to support displaying asset shelves in the properties editor, or other such UIs. Asset shelves have quite some shenanigans for context sensitivity, asset shelf data storage, asset shelf settings, region behavior, file read/write, ... A popup to choose an asset (for example for the ID template) should be much simpler. Just displaying the assets (and the catalogs) in a popup is easy. Also options like the preview size and "Show Names" are mostly just there to optimize the asset shelf for keeping it visible on screen, I don't think we need these options for a popup asset selector.
Now thinking about it, I'm wondering if what we want for brushes is actually the asset shelf as popup or the simpler popup I just described. We just always talked about the "asset shelf as a popup" so that's how I implemented it. But given that we need to do advanced filtering (show brush types based on context/active mode), and call a custom operator on click, I think using the asset shelf makes sense, especially since that needs to exists anyway.
I don't think that's a big deal. But we could store the popup asset shelf data in the workspace instead and stick to the region-data for the permanent region. Not sure yet how much work this would be.
The asset shelf data/settings is now stored statically, independent of the asset shelf region. Earlier we discussed storing it in the workspace or the preferences instead, both are still possible, but I think static storage is fine as well even. Can still be done easily now, but good to see as first step that region independent storage is possible, and not ugly to deal with in code even.
WIP: Brush asset shelf popupto Brush asset shelf popupJust a few small comments, overall looks fine.
@ -61,0 +68,4 @@
/* -------------------------------------------------------------------- */
/** \name Asset shelf type */
bool asset_shelf_type_poll(const bContext &C,
I think the
asset_shelf_
prefix on these functions is redundant with the namespace, they'll usually be called likeasset::shelf::type_poll
@ -61,0 +72,4 @@
const SpaceType &space_type,
const AssetShelfType *shelf_type);
AssetShelfType *asset_shelf_type_find_from_idname(const SpaceType &space_type,
blender::StringRefNull idname);
blender::
is unnecessary@ -75,0 +75,4 @@
StringRefNull idname)
{
for (const std::unique_ptr<AssetShelfType> &shelf_type : space_type.asset_shelf_types) {
if (STREQ(idname.c_str(), shelf_type->idname)) {
idname == shelf_type->idname
@ -0,0 +26,4 @@
namespace blender::ed::asset::shelf {
class PopupAssetShelfStorage {
Similarly,
PopupStorage
is less redundant given the contextPopupStorage
sounds more like we're storing popups here. Went withStaticPopupShelves
, I think that's nicely descriptive.@ -0,0 +28,4 @@
class PopupAssetShelfStorage {
public:
ListBase popup_shelves;
LiseBase
->Vector<AssetShelf *>
Brush asset shelf popupto WIP: Brush asset shelf popupWIP: Brush asset shelf popupto Brush asset shelf popup