Regression: 3.4 mix colour node. links.new() not working properly via python #104415

Closed
opened 2023-02-07 18:08:22 +01:00 by Malcolm Reed · 2 comments

System Information
Operating system: windows 10
Graphics card: Nvidia Geforce rtx

Blender Version
Broken: 3.4.1
Worked: 3.3.1
Short description of error
Making a link to index 1 or 2 via python on the mix colour node doesn't properly connect.
If queried python reports a connection, but there is no noodle or visible output.

Exact steps for others to reproduce the error
Please see the attached files.
In 3.4.1 load: MixColor_node_links_3_4_1.blend
Select the sphere.
Run the script.
Look in the system console for reporting.

 - Input 1 is free
 - Yes a valid link
 - Input 1 is busy

This is saying that the input [1] on the node is free before the link is attempted.
After, tests that the link that is made is valid.
Says that the input is in use.

However you'll see that their is no connection between the newly created Texture node and the input[1] on the mix colour node.

If you then run it again immediately you'll see this:

 - Input 1 is busy
 - Yes a valid link
 - Input 1 is busy

This time it reports that the link is busy, although visually there is no connection.

Delete the new Texture nodes and we're back to the first result.

If you were to change line 43

baseCol_socket = mixAO.inputs[1]

to

baseCol_socket = mixAO.inputs[0]

Then the connection can be made to the factor input.

It seems their is some logical connection made, however the noodle isn't drawn.

To test in blender 3.3.1, load the file: MixColor_node_links_3_3_1.blend

**System Information** Operating system: windows 10 Graphics card: Nvidia Geforce rtx **Blender Version** Broken: 3.4.1 Worked: 3.3.1 **Short description of error** Making a link to index 1 or 2 via python on the mix colour node doesn't properly connect. If queried python reports a connection, but there is no noodle or visible output. **Exact steps for others to reproduce the error** Please see the attached files. In 3.4.1 load: MixColor_node_links_3_4_1.blend Select the sphere. Run the script. Look in the system console for reporting. ``` - Input 1 is free - Yes a valid link - Input 1 is busy ``` This is saying that the input [1] on the node is free before the link is attempted. After, tests that the link that is made is valid. Says that the input is in use. However you'll see that their is no connection between the newly created Texture node and the input[1] on the mix colour node. If you then run it again immediately you'll see this: ``` - Input 1 is busy - Yes a valid link - Input 1 is busy ``` This time it reports that the link is busy, although visually there is no connection. Delete the new Texture nodes and we're back to the first result. If you were to change line 43 ``` baseCol_socket = mixAO.inputs[1] ``` to ``` baseCol_socket = mixAO.inputs[0] ``` Then the connection can be made to the factor input. It seems their is some logical connection made, however the noodle isn't drawn. To test in blender 3.3.1, load the file: MixColor_node_links_3_3_1.blend
Malcolm Reed added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-02-07 18:08:23 +01:00
Contributor

(There have been several issues about this but I can't find them now since search doesn't seem to work.)

The Mix node now has 8 inputs (and 3 outputs):

>>> for i, input in enumerate(mix_node.inputs):
...     print(i, input.name, input.identifier)
...     
0 Factor Factor_Float
1 Factor Factor_Vector
2 A A_Float
3 B B_Float
4 A A_Vector
5 B B_Vector
6 A A_Color
7 B B_Color

This is to support being able to mix floats/vecs/colors with the same node. The inputs that are not used by the current mode are just hidden. In Color mode, the only visible inputs are 0, 6, and 7.

You're connecting inputs[1], which is the Factor_Vector input. And indeed, if you change the Mix node to Vector+Nonuniform mode, you will see the link you just created going to the texture node.

What you probably want, though, is inputs[6].

(There have been several issues about this but I can't find them now since search doesn't seem to work.) The Mix node now has 8 inputs (and 3 outputs): ``` >>> for i, input in enumerate(mix_node.inputs): ... print(i, input.name, input.identifier) ... 0 Factor Factor_Float 1 Factor Factor_Vector 2 A A_Float 3 B B_Float 4 A A_Vector 5 B B_Vector 6 A A_Color 7 B B_Color ``` This is to support being able to mix floats/vecs/colors with the same node. The inputs that are not used by the current mode are just hidden. In Color mode, the only visible inputs are 0, 6, and 7. You're connecting inputs[1], which is the Factor_Vector input. And indeed, if you change the Mix node to Vector+Nonuniform mode, you _will_ see the link you just created going to the texture node. What you probably want, though, is inputs[6].

I close this as duplicate of: #103395

I close this as duplicate of: https://projects.blender.org/blender/blender/issues/103395
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-02-07 18:52:25 +01:00
Iliya Katushenock added
Status
Duplicate
and removed
Status
Archived
labels 2023-02-07 18:58:42 +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
3 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#104415
No description provided.