I18n: Use fmt::format() to replace string concatenation in nodes #107260
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#107260
Loading…
Reference in New Issue
No description provided.
Delete Branch "pioverfour/blender:dp_geo_nodes_tooltips_fmt"
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?
The UI code for nodes uses
stringstream
s a few times to formatstrings. In some cases it is fine, but in others it makes localization
hard or impossible to do properly, as explained in #92758.
This commit replaces some
stringstream
s withfmt::format()
, alibrary that is already used in other parts of Blender and was
suggested by Hans Goudey (@hooglyboogly) in
D15996.
It appears that node socket tooltips are translated during evaluation, which does not happen in the main thread. This means that
BLT_translate()
will not allow translation to happen. For now, I have modified it to return true, but a better solution should be found and I don’t know where to look. This occurs in at least another area of Blender, more details in #108206.18n: Use fmt::format() to replace string concatenation in nodesto WIP: 18n: Use fmt::format() to replace string concatenation in nodes85be395a81
to18dff85c0e
18dff85c0e
toaaec2c7b69
aaec2c7b69
tobb38e01688
bb38e01688
to015f915e62
WIP: 18n: Use fmt::format() to replace string concatenation in nodesto 18n: Use fmt::format() to replace string concatenation in nodesIf this is merged into 3.6, a cleanup will likely need be done when merging into main, to remove
#define FMT_HEADER_ONLY
, after0d38fa2422
.@blender-bot build
18n: Use fmt::format() to replace string concatenation in nodesto I18n: Use fmt::format() to replace string concatenation in nodesThis commit comments out threading which wasn't mentioned in the commit log (although I see it's mentioned in the PR).
Now the threading line is left in but commented without any notes for why it's there. In future it please include changes to multi-threaded behavior in the commit log too, and note why commented code is left in.
All right, I understand. If it's too much of an issue right now, this part of the commit can be reverted and tackled separately.
Otherwise I still plan to look into it some more as part of #108206, if only to clean up and comment.
@pioverfour I completely missed this somehow, will revert that part of the change for now indeed.
Afair, boost translation mechanism is not threadsafe at all, which is why it was disabled in any thread but the main one.
Reverted threading change in
7ceb33e06e
.That's what I figured, I wrote about what I found in the other issue. To be honest I was a bit surprised to see this merged! 😅
Do you have suggestions on the best course of action? I can't reproduce the crashes, so I don't know how to determine if the boost issue is still a thing.
@pioverfour tbh I have a hard time understanding why some UI-related string should be handled in a threaded context. Feels like a design issue in the node system...
This PR affected on building of internal field names in geometry node evaluator (multithreaded).
My problem is once again: why on earth does UI names have to be 'built during nodetree evaluation'? This does not sounds normal to me, at all.
In D15996, @HooglyBoogly wrote:
… so I guess this can be considered a known issue.