UI: More Defaults for Search Placeholders #113792

Merged
Harley Acheson merged 5 commits from Harley/blender:SearchPlaceHolders into main 2024-01-23 17:16:00 +01:00
Member

For UI_BTYPE_SEARCH_MENU, use property UI Name as last resort.


This allows guessing placeholders like the following (highlighted), "UV Map" and "Vertex Group":

image

For UI_BTYPE_SEARCH_MENU, use property UI Name as last resort. --- This allows guessing placeholders like the following (highlighted), "UV Map" and "Vertex Group": ![image](/attachments/b806fdaf-a2eb-48aa-a1ce-b062a74f6325)
Harley Acheson added 1 commit 2023-10-17 00:56:18 +02:00
1563ebc32f UI: More Defaults for Search Placeholders
For UI_BTYPE_SEARCH_MENU, use property UI Name as last resort.
Harley Acheson added this to the User Interface project 2023-10-17 00:56:52 +02:00
Harley Acheson requested review from Pablo Vazquez 2023-10-17 00:57:00 +02:00
Member

Nice, works well in those cases.

In some other cases it seems to expose (bad?) naming that could be more clear, like in the following image, the modifier properties should be renamed to "Color Attribute", or the placeholder text set manually in the layout:
particle instance

Or for example here it says "UV Layer" but it should be "UV Map":
UV Warp

Perhaps that's not something for this patch, it just got exposed now, and we should just go and rename properties/set custom placeholders for these particular cases.

Nice, works well in those cases. In some other cases it seems to expose (bad?) naming that could be more clear, like in the following image, the modifier properties should be renamed to "Color Attribute", or the placeholder text set manually in the layout: ![particle instance](/attachments/1d345544-3ce2-4f50-a45c-1b43e3947260) Or for example here it says "UV Layer" but it should be "UV Map": ![UV Warp](/attachments/d29bd1b8-9dfd-4d2b-af91-41097c2ccf73) Perhaps that's not something for this patch, it just got exposed now, and we should just go and rename properties/set custom placeholders for these particular cases.
Author
Member

@pablovazquez - Perhaps that's not something for this patch, it just got exposed now, and we should just go and rename properties/set custom placeholders for these particular cases.

Yes, I guess it all depends on whether something is better than nothing for this. That might not be a lock since having a blank placeholder looks okay and in some cases it only adds redundancy. But realistically we might have already forced ourselves onto a road toward having placeholders everywhere that they can be.

How do you feel about this @JulianEisel ?

> @pablovazquez - Perhaps that's not something for this patch, it just got exposed now, and we should just go and rename properties/set custom placeholders for these particular cases. Yes, I guess it all depends on whether something is better than nothing for this. That might not be a lock since having a blank placeholder looks okay and in some cases it only adds redundancy. But realistically we might have already forced ourselves onto a road toward having placeholders everywhere that they can be. How do you feel about this @JulianEisel ?
Member

...forced ourselves onto a road toward having placeholders everywhere that they can be.

I don't think in all cases we'd be adding them just because we can.

In my example above, "Index Layer Name" and "Value Layer Name" should be set to "Color Attribute", or something that gives a hint on what type of data the dropdown lists.
image

In most cases it "just works", in other cases we'd just need to go and tweak them accordingly. I think most of the time something is better than trying to guess what the icon means.

> ...forced ourselves onto a road toward having placeholders everywhere that they can be. I don't think in all cases we'd be adding them just because we can. In my example above, "Index Layer Name" and "Value Layer Name" should be set to "Color Attribute", or something that gives a hint on what type of data the dropdown lists. ![image](/attachments/35f9f90b-0534-409e-acda-56f5907d20f4) In most cases it "just works", in other cases we'd just need to go and tweak them accordingly. I think most of the time _something_ is better than trying to guess what the icon means.
Harley Acheson added 2 commits 2023-10-19 01:53:07 +02:00
Author
Member

@pablovazquez

I updated this PR so that it does show "UV Map" for the "UV Warp" modifier.

But I honestly didn't know how to proceed with "ParticleInstance". I find that section to be quite mystifying. The "Index" and "Value" don't make sense to me, nor why something that looks like vertex colors is "Index Layer Name" and "Value Layer Name". I don't think I understand this enough to change it to anything that makes sense.

This panel is defined in modifiers\intern\MOD_particleinstance.cc in layers_panel_draw at about line 622. So this is where the "Index" and "Value" text come from:

  uiItemPointerR(
      col, ptr, "index_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Index"), ICON_NONE);
  uiItemPointerR(
      col, ptr, "value_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Value"), ICON_NONE);

The above references "index_layer_name" and "value_layer_name", which are defined in makesrna\intern\rna_modifier.cc in particleinstance_space at about line 3822. This is where the "Index Layer Name" and "Value Layer Name" text comes from:

  prop = RNA_def_property(srna, "index_layer_name", PROP_STRING, PROP_NONE);
  RNA_def_property_string_sdna(prop, nullptr, "index_layer_name");
  RNA_def_property_ui_text(prop, "Index Layer Name", "Custom data layer name for the index");
  RNA_def_property_update(prop, 0, "rna_Modifier_update");

  prop = RNA_def_property(srna, "value_layer_name", PROP_STRING, PROP_NONE);
  RNA_def_property_string_sdna(prop, nullptr, "value_layer_name");
  RNA_def_property_ui_text(
      prop, "Value Layer Name", "Custom data layer name for the randomized value");
  RNA_def_property_update(prop, 0, "rna_Modifier_update");
@pablovazquez I updated this PR so that it does show "UV Map" for the "UV Warp" modifier. But I honestly didn't know how to proceed with "ParticleInstance". I find that section to be quite mystifying. The "Index" and "Value" don't make sense to me, nor why something that looks like vertex colors is "Index Layer Name" and "Value Layer Name". I don't think I understand this enough to change it to anything that makes sense. This panel is defined in modifiers\intern\MOD_particleinstance.cc in `layers_panel_draw` at about line 622. So this is where the "Index" and "Value" text come from: ``` uiItemPointerR( col, ptr, "index_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Index"), ICON_NONE); uiItemPointerR( col, ptr, "value_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Value"), ICON_NONE); ``` The above references "index_layer_name" and "value_layer_name", which are defined in makesrna\intern\rna_modifier.cc in `particleinstance_space` at about line 3822. This is where the "Index Layer Name" and "Value Layer Name" text comes from: ``` prop = RNA_def_property(srna, "index_layer_name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, nullptr, "index_layer_name"); RNA_def_property_ui_text(prop, "Index Layer Name", "Custom data layer name for the index"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "value_layer_name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, nullptr, "value_layer_name"); RNA_def_property_ui_text( prop, "Value Layer Name", "Custom data layer name for the randomized value"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); ```
Harley Acheson added 1 commit 2023-11-12 18:42:16 +01:00
Member

It would be nice to revisit this and tweak whatever fields need tweaking on a case by case. I haven't found many other offenders since then other than the ones I mentioned.

It would be nice to revisit this and tweak whatever fields need tweaking on a case by case. I haven't found many other offenders since then other than the ones I mentioned.
Author
Member

@pablovazquez - It would be nice to revisit this and tweak whatever fields need tweaking on a case by case. I haven't found many other offenders since then other than the ones I mentioned.

This PR is basically just a two-liner.

For inputs of UI_BTYPE_SEARCH_MENU only it adds a "last chance guess" , using the property UI Name if it hasn't found a string by other means. That helps for a small number of places, like those shown in the first comment, for "UV Map" in the UVProject modifier, and the "Vertex Group" in the DataTransfer modifer.

And for the "UVWarp" modifier specifically it changes "UV Layer" to "UV Map" in response to this comment.

I think we should just commit this and anything else can be dealt with as separate issues.

> @pablovazquez - It would be nice to revisit this and tweak whatever fields need tweaking on a case by case. I haven't found many other offenders since then other than the ones I mentioned. This PR is basically just a **two-liner.** For inputs of UI_BTYPE_SEARCH_MENU only it adds a "last chance guess" , using the property UI Name if it hasn't found a string by other means. That helps for a small number of places, like those shown in the first comment, for "UV Map" in the UVProject modifier, and the "Vertex Group" in the DataTransfer modifer. And for the "UVWarp" modifier specifically it changes "UV Layer" to "UV Map" in response to [this comment](https://projects.blender.org/blender/blender/pulls/113792#issuecomment-1046709). I think we should just commit this and anything else can be dealt with as separate issues.
Pablo Vazquez approved these changes 2024-01-23 15:15:29 +01:00
Pablo Vazquez left a comment
Member

I think we should just commit this and anything else can be dealt with as separate issues.

+1

> I think we should just commit this and anything else can be dealt with as separate issues. +1
Harley Acheson added 1 commit 2024-01-23 17:13:52 +01:00
Harley Acheson merged commit 606723b3e2 into main 2024-01-23 17:16:00 +01:00
Harley Acheson deleted branch SearchPlaceHolders 2024-01-23 17:16:03 +01: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 project
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#113792
No description provided.