UI: Increase Node Label Name Limit From 63 to 255 Characters. #114378

Closed
Hoshinova wants to merge 1 commits from Hoshinova/blender:increase-label-name-limit into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This PR increases the node label name limit from 63 to 255 characters.
This allows node frames to be used as explanations for more complex mathematical relationships, which are getting more common especially with the quickly developing geometry nodes.

Here's an example from @Raiko
3.png

Since the use of unicode characters like π or θ take up 2 characters, we might even want to increase it beyond 255.

This PR increases the node label name limit from 63 to 255 characters. This allows node frames to be used as explanations for more complex mathematical relationships, which are getting more common especially with the quickly developing geometry nodes. Here's an example from @Raiko ![3.png](/attachments/8894eb11-c5e3-47d4-a922-1e5c63850313) Since the use of unicode characters like π or θ take up 2 characters, we might even want to increase it beyond 255.
26 KiB
Hoshinova added 1 commit 2023-11-01 21:18:36 +01:00
Leon Schittek added this to the Nodes & Physics project 2023-11-01 21:59:41 +01:00
Leon Schittek added the
Interest
User Interface
label 2023-11-01 22:00:12 +01:00
Member

I don't think increasing the size of bNode by 192 bytes is worth it here.
For longer descriptions, a frame can already contain a text data-block.

I don't think increasing the size of `bNode` by 192 bytes is worth it here. For longer descriptions, a frame can already contain a text data-block.
Author
Member

@HooglyBoogly I figured you'd say that however oftentimes you have dozens or in in some bigger projects even hundreds of node frames. You'd have to individually add dozens/hundreds of text data-blocks and link them to the corresponding node frames. Can you imagine how frustrating this gets over time. Apart from having to manually going through multiple steps of creating, writing and linking the text data-blocks, they also pile up over time.
Good luck making sure that Text.001 to Text.083 are all linked to the correct node frames.

Thus especially for bigger projects the node frame labels are the only real way to conveniently explain parts of the node tree and 63 characters are really just not enough for that. The label in the example image I PR already exceeds the 63 character limit and it's not even that long and descriptive. If you use unicode characters the limit drops to a mere 31 characters.

Some tricks I've seen to deal with this issue is artists doing stuff like using node frames around node frames to get some extra character space. Here's an example from a real production file:
4.png

If we were in the 1980s it'd make sense to argue over 192 additional bytes per node, but were well past that age now.
Modern SSD's offer multiple Terabytes of storage for cheap prices.
Just imagine an artist applying one subdivision level more than necessary on a model and the file size would increase more than those 192 additional bytes per node could ever cause.

@HooglyBoogly I figured you'd say that however oftentimes you have dozens or in in some bigger projects even hundreds of node frames. You'd have to individually add dozens/hundreds of text data-blocks and link them to the corresponding node frames. Can you imagine how frustrating this gets over time. Apart from having to manually going through multiple steps of creating, writing and linking the text data-blocks, they also pile up over time. Good luck making sure that `Text.001` to `Text.083` are all linked to the correct node frames. Thus especially for bigger projects the node frame labels are the only real way to conveniently explain parts of the node tree and 63 characters are really just not enough for that. The label in the example image I PR already exceeds the 63 character limit and it's not even that long and descriptive. If you use unicode characters the limit drops to a mere 31 characters. Some tricks I've seen to deal with this issue is artists doing stuff like using node frames around node frames to get some extra character space. Here's an example from a real production file: ![4.png](/attachments/ced76f2a-0b8d-4083-8208-01af7968828a) If we were in the 1980s it'd make sense to argue over 192 additional bytes per node, but were well past that age now. Modern SSD's offer multiple Terabytes of storage for cheap prices. Just imagine an artist applying one subdivision level more than necessary on a model and the file size would increase more than those 192 additional bytes per node could ever cause.
45 KiB
Author
Member

It's also worth to be noted that this issue is really only prevalent with node frames. Instead of increasing the label size to 256 for all nodes we could also just have the node frame contain it's own separate label field. Then we could also add some more quality of life features like having the label be able to contain carriage returns, text styling like having *example* render as example or perhaps even support things like LaTeX.

What do you think @HooglyBoogly ?

It's also worth to be noted that this issue is really only prevalent with node frames. Instead of increasing the label size to 256 for all nodes we could also just have the node frame contain it's own separate label field. Then we could also add some more quality of life features like having the label be able to contain carriage returns, text styling like having `*example*` render as *example* or perhaps even support things like LaTeX. What do you think @HooglyBoogly ?
Member

Thanks for the background, but currently my opinion remains the same. The core node data structures are already much more bloated than they should be, and we've been trying to improve that. It's not the size on disk I care about really-- I assume empty strings are easily compressed away anyway-- the memory usage is much more important. Especially as we are pushing the direction of using complex node graphs in the background, exposed as high level groups, this is important. The node graph itself would ideally be negligible in terms of Blender's resource usage.

A better approach would probably be turning the label into an allocated string (the DNA equivalent of std::string). For that, I would prefer to rely on the longer term developments discussed here: https://devtalk.blender.org/t/dna-decentralization-and-c/30391

Thanks for the background, but currently my opinion remains the same. The core node data structures are already much more bloated than they should be, and we've been trying to improve that. It's not the size on disk I care about really-- I assume empty strings are easily compressed away anyway-- the memory usage is much more important. Especially as we are pushing the direction of using complex node graphs in the background, exposed as high level groups, this is important. The node graph itself would ideally be negligible in terms of Blender's resource usage. A better approach would probably be turning the label into an allocated string (the DNA equivalent of `std::string`). For that, I would prefer to rely on the longer term developments discussed here: https://devtalk.blender.org/t/dna-decentralization-and-c/30391
Author
Member

@HooglyBoogly

A better approach would probably be turning the label into an allocated string (the DNA equivalent of std::string). For that, I would prefer to rely on the longer term developments discussed here: https://devtalk.blender.org/t/dna-decentralization-and-c/30391

You mean turn char label into something like DNAString label? If that means we could have the label contain an arbitrary number of characters while having the container adapt to the size of the string, then I'm all for it.

@JacquesLucke Has there already been any work done on a DNAString container?

@HooglyBoogly >A better approach would probably be turning the label into an allocated string (the DNA equivalent of std::string). For that, I would prefer to rely on the longer term developments discussed here: https://devtalk.blender.org/t/dna-decentralization-and-c/30391 You mean turn `char label` into something like `DNAString label`? If that means we could have the label contain an arbitrary number of characters while having the container adapt to the size of the string, then I'm all for it. @JacquesLucke Has there already been any work done on a `DNAString` container?
Member

There hasn't been a decision about how we proceed with that topic. A clearer shorter term goal is allowing DNA to convert between char array[64] and a char * separately allocated string. But that would raise forward compatibility issues as well.

There hasn't been a decision about how we proceed with that topic. A clearer shorter term goal is allowing DNA to convert between `char array[64]` and a `char *` separately allocated string. But that would raise forward compatibility issues as well.
Author
Member

If we'll have forward compatibility issues anyways, then why not just have all DNA use a single universal DNAString container and have this discussion off the table for the next 20 years?

If we'll have forward compatibility issues anyways, then why not just have all DNA use a single universal `DNAString` container and have this discussion off the table for the next 20 years?
Member

Not sure I understand your question. But anyway, I don't think code review is really the right place for this discussion.

Not sure I understand your question. But anyway, I don't think code review is really the right place for this discussion.
Hans Goudey closed this pull request 2024-02-14 15:56:15 +01:00

Pull request closed

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#114378
No description provided.