Breaking shader node changes for 4.0 #96219

Open
opened 2022-03-07 14:16:51 +01:00 by Brecht Van Lommel · 17 comments

There are a number of proposed changes to shader nodes that break the Python API, mainly for add-ons that import and export shaders.

We need to make a decision to either:

  • Make these breaking changes in 3.2 or 3.3, and then do them all together with good communication so scripts only need to be updated once.
  • Postpone all breaking changes to 4.0, and see which parts of these patches can be non-breaking. For example we could have new general Mix/Combine/Separate nodes in addition to the existing ones.

Patches:

There are a number of proposed changes to shader nodes that break the Python API, mainly for add-ons that import and export shaders. We need to make a decision to either: * Make these breaking changes in 3.2 or 3.3, and then do them all together with good communication so scripts only need to be updated once. * Postpone all breaking changes to 4.0, and see which parts of these patches can be non-breaking. For example we could have new general Mix/Combine/Separate nodes in addition to the existing ones. Patches: * [ ] [D14034: Geometry/Compositor/Shader/Texture Nodes: Add general Combine/Separate Color nodes](https://archive.blender.org/developer/D14034) * [ ] [D14257: Shader Nodes: Changes to node UI and default values to improve consistency](https://archive.blender.org/developer/D14257) * [ ] [D14202: UI (Shader/Compositor): Rename "RGB" input to "Color" input](https://archive.blender.org/developer/D14202) * [ ] [D13749: Node: Mix node](https://archive.blender.org/developer/D13749) * [ ] [D13359: Rename "fac" to "factor" across all nodes](https://archive.blender.org/developer/D13359) * [ ] Use proper "Brightness" word in names

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

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

Added subscriber: @brecht

Added subscriber: @brecht
Gathering feedback on devtalk here: https://devtalk.blender.org/t/feedback-on-breaking-python-api-changes-for-shader-nodes/23281

Added subscriber: @MysteryPancake

Added subscriber: @MysteryPancake

Is there any way the Python API could be detoured to avoid breaking changes? E.g. "Fac" in the API aliased to "Factor"?

It would be a shame to have more duplicate code for Mix/Combine/Separate nodes

Is there any way the Python API could be detoured to avoid breaking changes? E.g. "Fac" in the API aliased to "Factor"? It would be a shame to have more duplicate code for Mix/Combine/Separate nodes

Added subscriber: @EAW

Added subscriber: @EAW

Added subscriber: @Diogo_Valadares

Added subscriber: @Diogo_Valadares

The problem is that some scripts use .name instead of the .identifier, and worse, that node.inputs["Factor"]" actually use the name instead of the identifier currently.

The problem is that some scripts use `.name` instead of the `.identifier`, and worse, that `node.inputs["Factor"]"` actually use the name instead of the identifier currently.

Added subscriber: @Aeraglyx

Added subscriber: @Aeraglyx
Added subscribers: @Ethan-Hall, @HooglyBoogly, @fclem, @CharlieJolly

@CharlieJolly, @HooglyBoogly, @MysteryPancake, @Ethan-Hall, @fclem

I propose we do the following:

  • For Blender 3.2, add new Mix and Combine/Separate nodes and convert existing nodes in .blend files. Keep the old nodes available in the Python API but hidden from the menus.
  • Postpone other changes to another release where we make more breaking changes to shader nodes that. For example in the context of new textures nodes or improvements to the principled BSDF, that are likely to happen before 4.0.

That's rather conservative, but I think it's worth taking API compatibility a bit more seriously.

@CharlieJolly, @HooglyBoogly, @MysteryPancake, @Ethan-Hall, @fclem I propose we do the following: * For Blender 3.2, add new Mix and Combine/Separate nodes and convert existing nodes in .blend files. Keep the old nodes available in the Python API but hidden from the menus. * Postpone other changes to another release where we make more breaking changes to shader nodes that. For example in the context of new textures nodes or improvements to the principled BSDF, that are likely to happen before 4.0. That's rather conservative, but I think it's worth taking API compatibility a bit more seriously.
Thomas Dinges added this to the 4.0 milestone 2023-02-07 18:52:08 +01:00
Brecht Van Lommel added this to the Render & Cycles project 2023-02-07 19:08:06 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:03:17 +01:00

Adding a few more patches here for consideration

WIP: Separate ColorRamp node name into Color Ramp #104996
WIP: Rename Bright/Contrast to Brightness Contrast #104998
WIP: Rename Dilate/Erode to Dilate Erode #104999

There needs to be a consensus of the use or not use of the "/" separator. I'm not sure about it myself but the inconsistency bothers me.

Adding a few more patches here for consideration [WIP: Separate ColorRamp node name into Color Ramp #104996](https://projects.blender.org/blender/blender/pulls/104996) [WIP: Rename Bright/Contrast to Brightness Contrast #104998](https://projects.blender.org/blender/blender/pulls/104998) [WIP: Rename Dilate/Erode to Dilate Erode #104999](https://projects.blender.org/blender/blender/pulls/104999) There needs to be a consensus of the use or not use of the "/" separator. I'm not sure about it myself but the inconsistency bothers me.

Changing UI names like these does not break file or API compatibility. If the names are similar enough to the previous ones and not break documentation completely, we can do them any time.

Changing UI names like these does not break file or API compatibility. If the names are similar enough to the previous ones and not break documentation completely, we can do them any time.

Ah, I gave the opposite advice in #104996, since the node names are used by the Python API and the default names would change. But if that's considered an okay change, I think these names are much better, so I'd support the changes @zanqdo proposed.

Ah, I gave the opposite advice in #104996, since the node names are used by the Python API and the default names would change. But if that's considered an okay change, I think these names are much better, so I'd support the changes @zanqdo proposed.

The socket names are used in the API, but the node names are not I think.

The socket names are used in the API, but the node names are not I think.

The socket names are used in the API, but the node names are not I think.

Yeah, that's why I didn't change the Bright socket name. I guess that one is a change for 4.0

> The socket names are used in the API, but the node names are not I think. Yeah, that's why I didn't change the *Bright* socket name. I guess that one is a change for 4.0
Hans Goudey changed title from Breaking shader node changes to Breaking shader node changes for 4.0 2023-02-28 19:57:13 +01:00

Created a WIP PR for the Brightness rename #108128

Can we add it to the list?

I might need help on do-versioning.

Created a WIP PR for the Brightness rename https://projects.blender.org/blender/blender/pulls/108128 Can we add it to the list? I might need help on do-versioning.
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
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#96219
There is no content yet.