Geometry Nodes: Link drag search value moving improvement #107470
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
Code Documentation
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107470
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mod_moder/blender:tmp_add_other_value_option_to_dnd_moving"
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?
This PR based on #107461.
Now, when grag and drop going be used for create new input value node, it aslo
be moved socket value in to node storage. This means, by design, that result of
evaluation on node tree will don't be change.
Right now a few nodes (in shader in many cases) implemented without node
storage, but by storing value in socket itself. Float value input node unsupported
in this way too.
For data blocks, the original value is set to null, thus avoiding the existence of unused pointers.
Will this work for all node editors?
At the moment, some of the nodes are implemented, it seems to me strange logic. They store their values in sockets, not node storage data blocks. It's not very consistent, which is the reason I went around them. This means that all shader nodes are, at the very least, unsupported. Hopefully this can change in the near future.
Shader Node Editor hasn't gotten any updates that Geometry Nodes Editor got. It is seemingly abandoned at the moment and developers are hesitating to work on it over difficulty of the task of the rewrite. I hope this changes soon. Shader UI is really lacking and incosistencies between node editors weakens the UX of entire Blender.
@ -2488,3 +2543,1 @@
for (ID **dst_value : dst_values) {
*dst_value = *src_socket_value;
id_us_plus(*dst_value);
void **src_value = static_cast<void **>(socket_value_storage(src));
Why cast to
void **
here? Seems likevoid *
would be fine.@ -2495,0 +2555,4 @@
* C++ equivalent:
* src_value = {};
*/
BUFFER_FOR_CPP_TYPE_VALUE(src_type, src_zero_value);
What about this:
@ -2429,0 +2440,4 @@
switch (node.type) {
case FN_NODE_INPUT_BOOL: {
return &reinterpret_cast<NodeInputBool *>(node.storage)->boolean;
}
IMO the brackets don't really help here, they just make the function take more space. They aren't necessary since you aren't declaring any variables in the cases. Same with below.
@ -2492,3 +2548,2 @@
id_us_min(*src_socket_value);
*src_socket_value = nullptr;
convert.convert_to_uninitialized(src_type, dst_type, src_value, dst_value);
I think
convert_to_initialized
might be correct here actually, since the destination is already a valid socket value, it will already be initialized. Not that it makes a difference right now...Right now we no have a
convert_to_initialized
and i not sure if that make some difference now too. (This case really simple)Oh, my bad, I searched and fount
convert_to_initialized_n
but missed the_n
. Indeed it doesn't matter here currently.I'll still test this before committing it, but the code looks good.
Yes, thank for reviews and testing Hans.
This is really nice! A great usability improvement! A few things:
@ -2429,0 +2455,4 @@
return nullptr;
}
void *socket_value_storage(bNodeSocket &socket)
@ -2429,0 +2479,4 @@
case SOCK_MATERIAL:
return &socket.default_value_typed<bNodeSocketValueMaterial>()->value;
case SOCK_STRING:
break;
Seems simpler to return null here as a way to not support strings, rather than checking again below:
Geometry Nodes: Drag and drop value moving improvementto Geometry Nodes: Link drag search value moving improvementYeah, i mention this little above. Right now a few nodes (in shader in many cases) implemented without node storage, but by storing value in socket itself.
I planning to offer comming soon some plans about refactoring this places for reduce legacy design moments.
Ah I see, makes sense now, thanks.