UI/material index bug related to shader node, cycles baking. #75427

Closed
opened 2020-04-06 05:12:12 +02:00 by Omar · 9 comments

System Information
Operating system: Linux-5.3.0-7642-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.64

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: 375c7dc4ca
Worked: (optional)

Short description of error
A UI bug shows an image being selected in the shader for baking, when it is actually not selected. Additionally the warning message from baking about the non-active image texture gives the wrong material index, by -1.

Exact steps for others to reproduce the error

  1. Open blender 2.82, and select general.
  2. Go to edit mode, and select a face on the cube.
  3. Add a second material slot for the cube.
  4. Create a new material in it, and assign it to the face in edit mode.
  5. For the second material, using the node editor, add a checker texture with shift-a and connect it to the base color of the default principled shader.
  6. Select the first material, and add an image texture to it. Select new and create a blank image.
  7. IMPORTANT Now copy the image texture with control-c, and paste it with control-v in the second material.
  8. Do a sanity check by moving the image texture around a bit with the mouse in both materials.
  9. Switch the render engine to cycles and bake.

Observe the warning message in the scripting view, specifically the material index. Additionally go into texture painting and notice the missing textures.
Observe the UI is acting like you have selected the image texture in the second material, but that is not true.

You can test with more materials using the setup of the second material, sandwiched between the first material, to further confirm the index and UI error.

To fix this you must go to the second material and press "a" to select all nodes, then double press "a" to deselect everything, and then select the image texture with the mouse. Now if you switch to texture painting the missing texture shading will instead be alpha. Baking now works correctly.

This bug has persisted for me between reloads, and when copying objects.

**System Information** Operating system: Linux-5.3.0-7642-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.64 **Blender Version** Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: `375c7dc4ca` Worked: (optional) **Short description of error** A UI bug shows an image being selected in the shader for baking, when it is actually not selected. Additionally the warning message from baking about the non-active image texture gives the wrong material index, by -1. **Exact steps for others to reproduce the error** 1. Open blender 2.82, and select general. 2. Go to edit mode, and select a face on the cube. 3. Add a second material slot for the cube. 4. Create a new material in it, and assign it to the face in edit mode. 5. For the second material, using the node editor, add a checker texture with shift-a and connect it to the base color of the default principled shader. 6. Select the first material, and add an image texture to it. Select new and create a blank image. 7. *IMPORTANT* Now copy the image texture with control-c, and paste it with control-v in the second material. 8. Do a sanity check by moving the image texture around a bit with the mouse in both materials. 9. Switch the render engine to cycles and bake. Observe the warning message in the scripting view, specifically the material index. Additionally go into texture painting and notice the missing textures. Observe the UI is acting like you have selected the image texture in the second material, but that is not true. You can test with more materials using the setup of the second material, sandwiched between the first material, to further confirm the index and UI error. To fix this you must go to the second material and press "a" to select all nodes, then double press "a" to deselect everything, and then select the image texture with the mouse. Now if you switch to texture painting the missing texture shading will instead be alpha. Baking now works correctly. This bug has persisted for me between reloads, and when copying objects.
Author

Added subscriber: @Omer-Almadani

Added subscriber: @Omer-Almadani

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Observe the UI is acting like you have selected the image texture in the second material, but that is not true.

Why isn't it true? You did not specify which texture to select last in: "8. Do a sanity check by moving the image texture around a bit with the mouse in both materials."

Thanks for the report. Unfortunately the scenario described is too time consuming for us to track down, we require the bug reporter to narrow down the problem.
If there are many steps to reproduce the problem, please attach a .blend file saved right before the bug occurs, so only a few steps are needed to trigger the bug.

> Observe the UI is acting like you have selected the image texture in the second material, but that is not true. Why isn't it true? You did not specify which texture to select last in: "8. Do a sanity check by moving the image texture around a bit with the mouse in both materials." Thanks for the report. Unfortunately the scenario described is too time consuming for us to track down, we require the bug reporter to narrow down the problem. If there are many steps to reproduce the problem, please attach a .blend file saved right before the bug occurs, so only a few steps are needed to trigger the bug.
Author
![material_two.png](https://archive.blender.org/developer/F8456109/material_two.png) ![missing_texture.png](https://archive.blender.org/developer/F8456108/missing_texture.png) ![material_one.png](https://archive.blender.org/developer/F8456107/material_one.png) [#75427.blend](https://archive.blender.org/developer/F8456106/T75427.blend) ![bake_info.png](https://archive.blender.org/developer/F8456105/bake_info.png)
Author

It is not true because blender doesn't consider it select, only the UI. In step 8 I wrote move the textures in both materials. It doesn't matter which one is selected last because they should be both selected together. In the attached blend file just hit bake. Also I attached images to better show what I am referring to.

It is not true because blender doesn't consider it select, only the UI. In step 8 I wrote move the textures in both materials. It doesn't matter which one is selected last because they should be both selected together. In the attached blend file just hit bake. Also I attached images to better show what I am referring to.

The problem of not detecting the active material is the same as described in #74713.
So I will merge the reports.

But I confirm that the material indicated in the message is wrong.
I don't know about the slot, the index for material two is 1 as you can see in the previous lines.

I'll fix the name issue.

The problem of not detecting the active material is the same as described in #74713. So I will merge the reports. But I confirm that the material indicated in the message is wrong. I don't know about the slot, the index for material two is 1 as you can see in the previous lines. I'll fix the name issue.

The problem with the wrong material name was resolved in 34b28850bf

The problem with the wrong material name was resolved in 34b28850bf

Closed as duplicate of #74713

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