Habib Gahbiche 535d9c63e1 UI: Improve default position of shader nodes
After creating a new shading material, the new node tree might become invisible and the user has to scroll down to see the nodes.

The idea of this PR is to create nodes with x-positions centered around zero, such that they are always visible no matter the screen size or workspace setup. Ideally, the nodes' position should depend on the region's zoom and pan. However, the node creation code currently does not depend on `SpaceNode`, so such solution would complicate the code a bit. Also, this heuristic seem to work well enough for most cases.

Note: this only affects newly created materials. The material of the default cube and the default world material still have invisible nodes sometimes. This is because they are saved in the startup file, which will be addressed in a different patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/136926
2025-04-16 16:25:20 +02:00
2025-04-16 11:08:40 +10:00
2025-04-15 20:23:32 +02:00
2023-12-08 13:28:13 +11:00
2025-01-08 16:42:50 +01:00
2025-03-12 21:55:59 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%