Create geometry nodes modifier when selecting an existing one in the editor #84927
Labels
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#84927
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Selecting an already existing geometry nodes tree in the editor on an object without a modifier should automatically create a nodes modifier. This is in parallel to the behaviour of selecting a material without a material slot.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @SimonThommes
#96741 was marked as duplicate of this issue
Added subscriber: @Rgtemze
Hi Simon, I am working on this and aiming to complete it in a couple of days. I can accelerate if it is urgent.
Awesome! This is not urgent, it's more for convenience.
Hi Simon, it is not fully ready yet but I want to make sure that the desired functionality is as the following:
By the way, I am new to Blender development; so, I am communicating with the developers at this thread (https://devtalk.blender.org/t/finding-callback-function/17176/4) to learn more about the Blender and modify my code to make it comply with Blender standards.
@Rgtemze That looks great, congrats!
I am not a Blender developer myself, so it's great that you have the thread. Once you have the finished patch I'll also make sure that a developer from my work group can look over the code.
One thing I forgot to mention in terms of functionality:
This should copy exactly the functionality of the
New
button, if the active modifier is not aGeometry Nodes
modifier. So it should add a newGeometry Nodes
modifier at the end of the stack.Added subscriber: @oweissbarth
Added subscribers: @HooglyBoogly, @JacquesLucke
Hi @JacquesLucke, @HooglyBoogly,
I want to talk about my implementation approach with you regarding this task.
I will use ED_object_modifier_add function to add the new modifier. However, that automatically creates a new Node Tree although the intended functionality is to use the selected node tree, not the new one. One solution is to let it create this new node tree and then replace it with the selected Node Tree afterwards. What else would you suggest here?
I am also planning to call ED_object_modifier_add function inside ED_node_tree_update function which is executed when a node tree is selected but the Geometry Nodes modifier is not active.
What are your thoughts?
Added subscriber: @JulianEisel
I'm not convinced the suggested solution of automatically adding a modifier is a good design idea.
There is nothing that tells the user how the node editor and the modifiers are linked together. On its own this could be an acceptable design limitation, but I see it getting worse:
Every time I played with the geometry nodes I was a bit confused about how the node tree selector works. I only realized what's going on after looking at the code.
I think there's an opportunity to help users learn about the design here.
We could display a message in the node editor when no geometry nodes modifier is active, similar to how the Asset Browser communicates that an invalid repository is selected:
Again, point of such messages is to help users understand the design, what's wrong and how they can address it.
It could say something like: "No active geometry node modifier for the object. Activate or create one in the Properties."
The node-tree selector can be grayed out then.
Under the message there could still be a button to create the modifier as a shortcut. (We also consider having buttons to let blender create the asset repository/library or to open the preferences as shortcut below the asset browser message.)
Added subscriber: @DAnkur-1
@JulianEisel I see your points. The current behaviour of the geometry node editor and node tree selector is based on the shader editor.
So the geometry node modifier is to the geometry node tree what the material slot is to the shader node tree.
When there is no material slot on an object and you select one in the shader editor a new slot is automatically created. I personally find that quite intuitive and convenient (in both cases)
Of course, opposed to materials, not every modifier, as of now, can be represented with a node tree. (For materials there is still the legacy
Use Nodes
option, we decided against adopting this option for node modifiers)So the problem is that only specifically a
Geometry Nodes
modifier can act as aslot
. Every other modifier does not give the option to modify a node tree currently.In terms of convenience I would argue that it is much easier to just add a material slot, than to add a geometry nodes modifier. So I would like it if we can find a way that keeps the functionality for an empty modifier stack, but still address the points you are bringing up.
As a kind of compromise I would propose the following for the long run:
New
button is pressed / node tree is selectedAdded subscriber: @Rawalanche
As soon as the user adds new GN modifier, it creates new GN datablock. It always assumes that when user adds a new GN modifier, they want to also create new GN node network, while in many cases, user just wants to use existing GN node network on another object.
So every single addition of GN modifier burdens the user with a duty to clean up unintended datablock by going to the Outliner in blend view mode, finding it and deleting it.
GN modifier should not automatically assume that the user intention is to create new GN node network when it is mandatory for user to create a new GN modifier if they want to use existing GN network on another object.
Added subscriber: @Vyach
Poke