Inconsistent name separator used for duplicate node sockets names. #91826

Closed
opened 2021-09-29 20:03:15 +02:00 by Brecht Van Lommel · 15 comments

System Information
Operating system: Linux-5.4.0-84-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.42.01

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, hash: 1d47885

Short description of error

Introduced by 756c22b, it's not properly connecting the second image socket in mix RGB nodes on load.

I suspect it's because the duplicate socket naming convention changed between .001 and _001 at some point.

Exact steps for others to reproduce the error

**System Information** Operating system: Linux-5.4.0-84-generic-x86_64-with-glibc2.31 64 Bits Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.42.01 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, hash: `1d47885` **Short description of error** Introduced by 756c22b, it's not properly connecting the second image socket in mix RGB nodes on load. I suspect it's because the duplicate socket naming convention changed between .001 and _001 at some point. **Exact steps for others to reproduce the error** * Download https://download.blender.org/demo/test/pabellon_barcelona_v1.scene_.zip * Open Compositor editor * Notice missing socket connections as compared to for example Blender 2.93.
Author
Owner

Added subscriber: @brecht

Added subscriber: @brecht

#92636 was marked as duplicate of this issue

#92636 was marked as duplicate of this issue
Author
Owner

Added subscriber: @Blendify

Added subscriber: @Blendify
Author
Owner

If no quick solution can be found for this, I suggest to revert the changes for such nodes with multiple sockets that have the same name, since this leads to data loss when resaving .blend files that you may not notice until later.

If no quick solution can be found for this, I suggest to revert the changes for such nodes with multiple sockets that have the same name, since this leads to data loss when resaving .blend files that you may not notice until later.
Member

I can reproduce but not with a file saved in recent versions of Blender, I wonder if the same can happen with some shader nodes that were also converted?

I can reproduce but not with a file saved in recent versions of Blender, I wonder if the same can happen with some shader nodes that were also converted?
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

The problem might stem from https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/node.cc$1515

The proposed solution would be to make this an underscore, there also seems to need some versioning code to check existing nodes for the . seperator.

The problem might stem from https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/node.cc$1515 The proposed solution would be to make this an underscore, there also seems to need some versioning code to check existing nodes for the `.` seperator.
Author
Owner

Added subscribers: @JacquesLucke, @HooglyBoogly

Added subscribers: @JacquesLucke, @HooglyBoogly
Author
Owner

Cycles handles both _001 and .001, Eevee does not use these identifiers so works regardless. So shader nodes are not an issue for Blender's own renderers, but for external engines this is still messy.

I'm confused about what the current convention is. And it's not clear to me if geometry nodes have a similar issues or if they avoid it, and if so why?

Cycles handles both `_001` and `.001`, Eevee does not use these identifiers so works regardless. So shader nodes are not an issue for Blender's own renderers, but for external engines this is still messy. I'm confused about what the current convention is. And it's not clear to me if geometry nodes have a similar issues or if they avoid it, and if so why?
Member

Looks like for some reason different conventions are used throughout node.cc. BLI_uniquename_cb is used three times, sometimes with . and sometimes with _.
Some versioning code just use one convention would be great. We really don't want that the same socket has different identifiers in different cases. That's also why I'm moving towards explicit socket identifiers with the socket declarations instead of some automatically generated identifiers.

I think we should revert the breaking commit for now, then add versioning to make sure that built-in nodes are consistent (i.e. the same socket does not have different identifiers in different nodes). Then we can commit the socket declarations again. I don't really care if the convention is to use _ or . or both, it should just should be consistent for different nodes of the same type.

Looks like for some reason different conventions are used throughout `node.cc`. `BLI_uniquename_cb` is used three times, sometimes with `.` and sometimes with `_`. Some versioning code just use one convention would be great. We really don't want that the same socket has different identifiers in different cases. That's also why I'm moving towards explicit socket identifiers with the socket declarations instead of some automatically generated identifiers. I think we should revert the breaking commit for now, then add versioning to make sure that built-in nodes are consistent (i.e. the same socket does not have different identifiers in different nodes). Then we can commit the socket declarations again. I don't really care if the convention is to use `_` or `.` or both, it should just should be consistent for different nodes of the same type.
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Member

The affecting nodes have been reverted in 0bc4056455 I'm leaving this task open until we figure out how to deal with the root cause.

The affecting nodes have been reverted in 0bc4056455 I'm leaving this task open until we figure out how to deal with the root cause.
Aaron Carlisle changed title from Compositor Mix RGB node has broken links opening old .blend files to Inconsistent name separator used for duplicate node sockets names. 2021-10-04 16:39:04 +02:00
Member

Added subscribers: @Ed-H, @PratikPB2123

Added subscribers: @Ed-H, @PratikPB2123
Hans Goudey self-assigned this 2021-11-11 00:36:11 +01:00

This issue was referenced by d845ba481c

This issue was referenced by d845ba481c6d2ef50bf87bec834555d5e1faf64c
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 3.0 milestone 2023-02-08 15:59:02 +01:00
Sign in to join this conversation.
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
7 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#91826
No description provided.