Shader editor "camera" postion isn't consistent with saved file after certain circumstances #125269

Open
opened 2024-07-23 02:45:39 +02:00 by Sebastian-Alvarez · 7 comments

System Information
Operating system: macOS-14.5-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Ultra 1.2

Blender Version
Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: a51f293548ad
Worked: I think 4.1 was fine

Short description of error
Shader node looks empty when clicking on object, node tree exists but it's always away from view

Exact steps for others to reproduce the error
I think this started with 4.2, it seems to me that it's rather recent. Basically when I click on an object and I have the shader in one of the open areas, the node tree is there, but it's out of frame. I have to either click and drag with the mouse wheel button, or press Home to bring the node tree into view, which is what I normally do. But in the last few weeks I've had to do that about 50 or 60 times a day, because it happens every time.

**System Information** Operating system: macOS-14.5-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Ultra 1.2 **Blender Version** Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad` Worked: I think 4.1 was fine **Short description of error** Shader node looks empty when clicking on object, node tree exists but it's always away from view **Exact steps for others to reproduce the error** I think this started with 4.2, it seems to me that it's rather recent. Basically when I click on an object and I have the shader in one of the open areas, the node tree is there, but it's out of frame. I have to either click and drag with the mouse wheel button, or press Home to bring the node tree into view, which is what I normally do. But in the last few weeks I've had to do that about 50 or 60 times a day, because it happens every time.
Sebastian-Alvarez added the
Type
Report
Status
Needs Triage
Severity
Normal
labels 2024-07-23 02:45:40 +02:00
Member

I can kind of confirm this issue. If I create a file on my other computer, and shift the nodes and node tree view off in some direction amount, then save the file and open it on my Mac, the "camera" of the node viewer is away from my nodes, which is different from the view that should be saved to the file. The same applies if I do it the other way around.

I assume this is because when Blender loads the file and tries setting up the scale and position of the "node tree camera" it doesn't take into consideration differences in display configuration (E.g. Resolution, and scaling settings). And places the "camera" in the the wrong spot with the wrong zoom level.

I will mark this as confirmed.

Note: This issue is also in Blender 4.1 in my testing.

I have attached a video demonstrating the issue by having two computers with different displays testing the issue. I should note that the issue isn't between Windows and macOS, it's between different display configurations. For example, if I plug the same monitor I use on my Windows desktop into my Mac, then the issue doesn't occur because the display configuration is the same.

I can kind of confirm this issue. If I create a file on my other computer, and shift the nodes and node tree view off in some direction amount, then save the file and open it on my Mac, the "camera" of the node viewer is away from my nodes, which is different from the view that should be saved to the file. The same applies if I do it the other way around. I assume this is because when Blender loads the file and tries setting up the scale and position of the "node tree camera" it doesn't take into consideration differences in display configuration (E.g. Resolution, and scaling settings). And places the "camera" in the the wrong spot with the wrong zoom level. I will mark this as confirmed. Note: This issue is also in Blender 4.1 in my testing. I have attached a video demonstrating the issue by having two computers with different displays testing the issue. I should note that the issue isn't between Windows and macOS, it's between different display configurations. For example, if I plug the same monitor I use on my Windows desktop into my Mac, then the issue doesn't occur because the display configuration is the same.
Alaska changed title from Shader node looks empty when clicking on object, node tree exists but it's always away from view to Shader editor "camera" postion isn't consistent with saved file after certain circumstances 2024-07-23 06:34:42 +02:00
Alaska removed the
Interest
Pipeline & IO
label 2024-07-23 07:00:55 +02:00

Yes, this is very old issie, it just hard to track this..

Yes, this is very old issie, it just hard to track this..

One thing, just because I saw the new title that mentions a saved file. That makes me think that maybe this was misinterpreted as something that happens when one saves the file, then later opens it again. That's not the case. I mean, it is, but not the only scenario.

This basically happens if I'm editing something and I select object after object, even if I go between two objects, it won't happen every time, but most times, I will be working on the material for an object, then select another object and nothing will show in the shader editor. So I press Home, and it comes into view. Then I click on the previous object that I was working on right before, and the node tree is also out of view.

Also, if I create a new material, the two nodes we always see when doing that, the Principled BSDF and the Material Output, will also be completely out of view.

One thing, just because I saw the new title that mentions a saved file. That makes me think that maybe this was misinterpreted as something that happens when one saves the file, then later opens it again. That's not the case. I mean, it is, but not the only scenario. This basically happens if I'm editing something and I select object after object, even if I go between two objects, it won't happen every time, but most times, I will be working on the material for an object, then select another object and nothing will show in the shader editor. So I press Home, and it comes into view. Then I click on the previous object that I was working on right before, and the node tree is also out of view. Also, if I create a new material, the two nodes we always see when doing that, the Principled BSDF and the Material Output, will also be completely out of view.
Member

The node editor "camera" position is expected to stay the same as you switch between materials. So what's likely is that your nodes are in completely different spots in the node editor, so you move your "camera" to go look at it meaning that when you switch back to a old material you're far away from the nodes again.

The node editor "camera" position is expected to stay the same as you switch between materials. So what's likely is that your nodes are in completely different spots in the node editor, so you move your "camera" to go look at it meaning that when you switch back to a old material you're far away from the nodes again.

That’s interesting. Is there a way to center the view completely? Because if that’s possible, then I can start selecting each object, bringing the node tree to the absolute center, then do the same for all the others.

That way, eventually they will all appear when I select them. Does that make sense?

That’s interesting. Is there a way to center the view completely? Because if that’s possible, then I can start selecting each object, bringing the node tree to the absolute center, then do the same for all the others. That way, eventually they will all appear when I select them. Does that make sense?
Member

This might help.

It's a python script that you can run in Blender. It adds a orange frame at 0,0 (the center of the node editor) to every material in your file.

Now when you switch materials and notice something is off, you can select "Frame all", see your nodes and the frame, and shift the nodes towards the orange frame then delete it.

Steps to use this script:

  1. Open Blender with the file you're having issues with.
  2. Open a text editor window in Blender.
  3. Create a new text "object" by pressing the New Text button at the top of the text editor.
  4. Paste the code in there.
  5. Click the play button at the top of the text editor.
  6. Go back to using your files like normal, and if you encounter the issue with nodes being far away, shift them towards 0,0 (The orange frame) then delete the orange frame if you want.
import bpy

def add_frame_to_material(material):
  # Adds a new Frame to the material's node tree at 0,0.
  # Check if the material uses nodes
  if not material.use_nodes:
    return

  # Get the node tree
  node_tree = material.node_tree

  # Add a new Frame node
  new_frame = node_tree.nodes.new("NodeFrame")
  new_frame.location = (0, 0)  # Set location to 0,0
  new_frame.use_custom_color = True # Enable Custom colors
  new_frame.color = (1, 0.6, 0) # Set the custom color to orange


# Loop through all materials in the blend file
for material in bpy.data.materials:
  add_frame_to_material(material)
This might help. It's a python script that you can run in Blender. It adds a orange frame at 0,0 (the center of the node editor) to every material in your file. Now when you switch materials and notice something is off, you can select "Frame all", see your nodes and the frame, and shift the nodes towards the orange frame then delete it. Steps to use this script: 1. Open Blender with the file you're having issues with. 2. Open a text editor window in Blender. 3. Create a new text "object" by pressing the `New Text` button at the top of the text editor. 4. Paste the code in there. 5. Click the play button at the top of the text editor. 6. Go back to using your files like normal, and if you encounter the issue with nodes being far away, shift them towards 0,0 (The orange frame) then delete the orange frame if you want. ``` import bpy def add_frame_to_material(material): # Adds a new Frame to the material's node tree at 0,0. # Check if the material uses nodes if not material.use_nodes: return # Get the node tree node_tree = material.node_tree # Add a new Frame node new_frame = node_tree.nodes.new("NodeFrame") new_frame.location = (0, 0) # Set location to 0,0 new_frame.use_custom_color = True # Enable Custom colors new_frame.color = (1, 0.6, 0) # Set the custom color to orange # Loop through all materials in the blend file for material in bpy.data.materials: add_frame_to_material(material) ```

Hi, sorry I haven't replied in 3 days, honestly they've been pretty bad days and I haven't had a chance to try this, but I just wanted to say thank you regardless and I will try it later today hopefully.

Hi, sorry I haven't replied in 3 days, honestly they've been pretty bad days and I haven't had a chance to try this, but I just wanted to say thank you regardless and I will try it later today hopefully.
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 12:55:20 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#125269
No description provided.