UI: IDSearch Image Thumbnail Tooltips #118945
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#118945
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Harley/blender:IDSearchImageThumbs"
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?
Data-block ID selector showing Image thumbnails on hover.
This is great! I think it should show more info, the same as regular images does in the file browser. Since there can be multiple data-blocks with similar names (or the same name even, if linked) that point to different paths.
Thanks for tackling what we discussed in the module meeting.
I undertsand that since it's a data-block and not a "real" file, different data is available.
In that case some useful data-block specific info to show would be the "source" (single image, movie, etc) and color space. Is that possible?
The resolution could also use the same format as in the Image panel (e.g.
400 x 400, RGB byte, SRGB8_A8
)This is super nice, but since the example text is the font name, it makes it hard to compare how a specific character looks in different fonts. Would it be too bad/too long to go with something like "The quick brown fox jumps over the lazy dog"? :D I know some recommend against it but it is at least better for comparing characters.
@pablovazquez
I updated this PR and the captures in the first comment, showing number of users, image source, colorspace. And using a different sample type for the font.
Thanks for updating this PR!
Few notes:
Colorspace
->Color Space
, but I don't think we actually need to specify, other labels don't and "sRGB" in context is easy to understand.How about sorting it differently too:
image.frame_duration
)@pablovazquez
Fixed.
Yes, having difficulty getting anything from render result so far.
Perfect, removed it.
Done. I updated the captures in the first comment.
Got it.
And while there also did the same for MoveClip, which is different from image of type movie:
Awesome! What a nice improvement. Thanks!
No more notes from me looks wise. Looking forward to adding more of these useful tooltips elsewhere in the future.
@HooglyBoogly - Any thoughts or ideas on how this could be done any better, neater, cleaner?
UI Experiment: IDSearch Image Thumbnail Tooltipsto UI: IDSearch Image Thumbnail TooltipsAny updates on this one? Would be great to get it in since there are other tooltip improvements in this release.
I think we ran the clock out on this one for 4.2...
The code makes more of a mess than I'd like considered this late in the release cycle. It could have been simplified by only only doing previews for images, but that would have just left users complaining that it didn't work for movies, etc. I think we should just make this a target for 4.3, see if @HooglyBoogly has any ideas about making less of a mess, and we can consider which types of items we want in this, if we need any more, how they look, etc
@ -156,0 +157,4 @@
* Return image buffer of preview for given image
* width_r & *height_r are optional and return the _original size_ of the image.
*/
struct ImBuf *BKE_image_preview(struct Image *ima, short max, short *width_r, short *height_r);
Usually
r_
is meant to be a prefix, is something different happening here? Also it's not clear what "max" means.@ -4800,6 +4800,31 @@ bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser)
return ibuf != nullptr;
}
ImBuf *BKE_image_preview(struct Image *ima, short max, short *width_r, short *height_r)
struct Image
->Image
short max
->const short max
@ -4803,0 +4806,4 @@
ImBuf *image_ibuf = BKE_image_acquire_ibuf(ima, nullptr, &lock);
ImBuf *preview = nullptr;
if (image_ibuf) {
Flip the condition and return early
@ -3302,12 +3302,8 @@ ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz);
void UI_tooltip_free(bContext *C, bScreen *screen, ARegion *region);
struct uiSearchItemTooltipData {
This struct name doesn't really match what it contains anymore. It seems it only works for searches of ID data-blocks now. Is the struct even necessary actually? I'd expect the type to be redundant with the type information stored inside the ID.
@ -1502,23 +1508,196 @@ ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz)
return ui_tooltip_create_with_data(C, data, init_position, nullptr, aspect);
}
static void ui_tooltip_from_image(Image *ima, uiTooltipData *data)
Use references instead of pointers
@ -1505,0 +1549,4 @@
}
if (BKE_image_has_anim(ima)) {
ImBufAnim *anim = ((ImageAnim *)ima->anims.first)->anim;
Use C++ static_cast
@ -1505,2 +1664,3 @@
static uiTooltipData *ui_tooltip_data_from_search_item_tooltip_data(
const uiSearchItemTooltipData *item_tooltip_data)
bContext *C, const uiSearchItemTooltipData *item_tooltip_data)
Unused argument? Anyway it's nice to not propagate context arguments this deep
Yes, able to remove it. That does simplify things a bit. Thanks!
Could this somewhow still make it into 4.2? This would be so useful to have! Especially when trying to find images in the UV editor or shader editor, where the current thumbnails are way to small and sometimes the texuter names are just nonsensical. Also, the fact that is also shows meta data is such a time saver as well! ❤️
That's not impossible, but I think highly unlikely. We are quite strict about not introducing user-visible changes after we go into the Bcon3 stage of our release schedule.
@blender-bot build
@blender-bot build