Asset Browser: dragging custom node group asset adds broken node #97237

Closed
opened 2022-04-11 09:21:13 +02:00 by Sergey · 12 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-10 16:45, hash: 2e77a8f974
Worked: (newest version of Blender that worked as expected)

Short description of error
It's possible to add custom node group to asset browser but it's impossible to drag custom group from there. It creates something instead of a group node.

2022-04-11 11-06-19.mp4

Exact steps for others to reproduce the error
untitled.blend

  1. Open the file
  2. Run the script
  3. Choose "Test Tree"
  4. Mark current group node as asset
  5. Drag and drop the asset into the Test Tree
**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-10 16:45, hash: `2e77a8f974` Worked: (newest version of Blender that worked as expected) **Short description of error** It's possible to add custom node group to asset browser but it's impossible to drag custom group from there. It creates something instead of a group node. [2022-04-11 11-06-19.mp4](https://archive.blender.org/developer/F12994697/2022-04-11_11-06-19.mp4) **Exact steps for others to reproduce the error** [untitled.blend](https://archive.blender.org/developer/F12994698/untitled.blend) 1. Open the file 2. Run the script 3. Choose "Test Tree" 4. Mark current group node as asset 5. Drag and drop the asset into the Test Tree
Author

Added subscriber: @randum

Added subscriber: @randum
Member

Added subscribers: @JulianEisel, @lichtwerk

Added subscribers: @JulianEisel, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm.

Drag n Drop was added in 604e61d81d.
@JulianEisel : mind checking what is wrong

We also have #92811 (Support node groups in asset browser) with a couple of TODOs in this regard, will drop a note about this report there as well...

Can confirm. Drag n Drop was added in 604e61d81d. @JulianEisel : mind checking what is wrong We also have #92811 (Support node groups in asset browser) with a couple of TODOs in this regard, will drop a note about this report there as well...
Member

Following the policy "bug in new feature: high prio" I will raise priority here.

Following the policy "bug in new feature: high prio" I will raise priority here.
Philipp Oeser changed title from Adding custom node group asset to Asset Browser: dragging custom node group asset adds broken node 2022-04-14 11:04:02 +02:00

Added subscriber: @mont29

Added subscriber: @mont29

@JulianEisel I would simply not allow custom node group as assets currently... Custom node groups have several very bad issues already (at ID management level), let's not add even more complexity in this area?

@JulianEisel I would simply not allow custom node group as assets currently... Custom node groups have several very bad issues already (at ID management level), let's not add even more complexity in this area?
Member

In #97237#1348401, @mont29 wrote:
@JulianEisel I would simply not allow custom node group as assets currently... Custom node groups have several very bad issues already (at ID management level), let's not add even more complexity in this area?

I think the #nodes_physics team should decide on that. But I would argue that having them supported as assets doesn't add much to what's already possible. After all it's just a more usable link/append.

Fixing the issue itself is probably simple. I just didn't have a test case for custom nodes when adding the node group drag & drop support (I forgot about the template).

> In #97237#1348401, @mont29 wrote: > @JulianEisel I would simply not allow custom node group as assets currently... Custom node groups have several very bad issues already (at ID management level), let's not add even more complexity in this area? I think the #nodes_physics team should decide on that. But I would argue that having them supported as assets doesn't add much to what's already possible. After all it's just a more usable link/append. Fixing the issue itself is probably simple. I just didn't have a test case for custom nodes when adding the node group drag & drop support (I forgot about the template).
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

The issue is that node_add_group_exec does not know what type of node to add. It usually determines the node type by calling node_group_idname, but that only works for built-in tree types.
Note, the fix for the very specific example case is to just return "CustomNodeType" from node_group_idname in the default case, but that's not a generic fix obviously.

It's not clear to me how the fix should work. We'd need some way to determine the group-node type based on a node-group for custom tree types. Issue is that there might be multiple group-node types that could match. So for a general fix, we'd probably need to call some callback of the addon which determines which group to add. Or it would have to specify a "default node group idname" somehow.

Think it's fine to disable supporting assets for custom node tree types for now until a solution is found.

The issue is that `node_add_group_exec` does not know what type of node to add. It usually determines the node type by calling `node_group_idname`, but that only works for built-in tree types. Note, the fix for the very specific example case is to just return `"CustomNodeType"` from `node_group_idname` in the default case, but that's not a generic fix obviously. It's not clear to me how the fix should work. We'd need some way to determine the group-node type based on a node-group for custom tree types. Issue is that there might be multiple group-node types that could match. So for a general fix, we'd probably need to call some callback of the addon which determines which group to add. Or it would have to specify a "default node group idname" somehow. Think it's fine to disable supporting assets for custom node tree types for now until a solution is found.
Jacques Lucke self-assigned this 2022-05-23 11:15:03 +02:00

This issue was referenced by 2f2d13b8c6

This issue was referenced by 2f2d13b8c664b90a7d3249d6ad71bac3d519026d
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 3.2 milestone 2023-02-08 15:51:07 +01:00
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:40:49 +01:00
Bastien Montagne removed this from the Pipeline, Assets & IO project 2023-02-10 12:49:29 +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
6 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#97237
No description provided.