Driver on NodeGroup input slot breaks when changing slots. #73855

Closed
opened 2020-02-15 21:51:27 +01:00 by Greymalkin · 3 comments

System Information
Operating system: Linux-5.4.14-arch1-1-x86_64-with-arch 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.44

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d4
Worked: (optional)

Short description of error
Adding a driver onto the input node of a shader group uses slot index instead of name or ID. If user changes the order or number of slots, the driver will apply to the wrong input for all materials in which the group is used.

Exact steps for others to reproduce the error
Create two materials.
Make a NodeGroup with a BSDF output and two inputs (e.g. base color and specular strength)
Use this node group in both materials.
Create a property on the object (e.g. "global specular").
Add a driver from "global specular" property value to the specular strength in both materials.
Modify the node group to also include "bump map" input.
Move bump map input up to be between base color and specular strength.

Result: "global specular" property value now applies to "bump map" rather than to "specular strength." Driver must now be manually pasted to its new home in every material which uses it.

Consequences/affected users
While this may not apply to the majority of users who are not making their own shader setups using NodeGroups among many materials, it is a very annoying problem for those who are. In my case, I have been developing a shader group to apply to a generic base mesh across multiple models, scenes, and files. Everytime I tweak the group, I have unexpected rendering results in every other scene and file to which that group applied and which are using drivers.

**System Information** Operating system: Linux-5.4.14-arch1-1-x86_64-with-arch 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.44 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: `f1aa4d18d4` Worked: (optional) **Short description of error** Adding a driver onto the input node of a shader group uses slot index instead of name or ID. If user changes the order or number of slots, the driver will apply to the wrong input for all materials in which the group is used. **Exact steps for others to reproduce the error** Create two materials. Make a NodeGroup with a BSDF output and two inputs (e.g. base color and specular strength) Use this node group in both materials. Create a property on the object (e.g. "global specular"). Add a driver from "global specular" property value to the specular strength in both materials. Modify the node group to also include "bump map" input. Move bump map input up to be between base color and specular strength. Result: "global specular" property value now applies to "bump map" rather than to "specular strength." Driver must now be manually pasted to its new home in every material which uses it. **Consequences/affected users** While this may not apply to the majority of users who are not making their own shader setups using NodeGroups among many materials, it is a very annoying problem for those who are. In my case, I have been developing a shader group to apply to a generic base mesh across multiple models, scenes, and files. Everytime I tweak the group, I have unexpected rendering results in every other scene and file to which that group applied and which are using drivers.
Author

Added subscriber: @Greymalkin

Added subscriber: @Greymalkin
Author

Just wanted to add that a workaround is to apply the driver to a Value node in each material and use that to drive the slot. The connection appears to follow the name as expected.

Just wanted to add that a workaround is to apply the driver to a Value node in each material and use that to drive the slot. The connection appears to follow the name as expected.

Closed as duplicate of #63596

Closed as duplicate of #63596
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
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#73855
No description provided.