Node Presets addon missing GeometryNodeGroup definition to work with geometry nodes #96022

Closed
opened 2022-02-25 04:56:36 +01:00 by Alain De Hoe · 6 comments

System Information
Operating system: macOS-12.2.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 5500M OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.103

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-04 23:51, hash: blender/blender@713d59bcaf
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: Node Presets (1, 1)
Author: Campbell Barton

Short description of error
I have a blend file with a geometry node node_group into the folder used by the Node Presets addons
The addon failed to load the geometry node group preset -with this error message

Error: Python: Traceback (most recent call last):

File "/Applications/Blender.app/Contents/Resources/3.1/scripts/addons/node_presets.py", line 152, in invoke
  node_template_add(context, self.filepath, self.group_name, event.shift, self.report)
File "/Applications/Blender.app/Contents/Resources/3.1/scripts/addons/node_presets.py", line 84, in node_template_add
  node_type_string = {

KeyError: 'GeometryNodeTree'
location: :-1

Quick fix:
Looking at node_presets.py code, it appears that it is missing GeometryNodeTree/GeometryNodeGroup definition
After editing node_type_string dictionary in {F12886248}node_presets.py (in the release 3.1/scripts/addons folder) as shown below, the preset loads fine

Added GeometryNodeGroup to this declaration

  node_type_string = {
      "GeometryNodeTree": "GeometryNodeGroup",
      "ShaderNodeTree": "ShaderNodeGroup",
      "CompositorNodeTree": "CompositorNodeGroup",
      "TextureNodeTree": "TextureNodeGroup",
  }[type(node_tree).__name__]

Exact steps for others to reproduce the error
Attached below is blend file containing the node group - Put this file in the folder parsed by the addon
Open blender, create a plane mesh, add a modifier
In modifier panel, Shift-A to bring menu, and select CameraToEdgeTriangle node group
That's where it failed (before editing node_presets.py)

**System Information** Operating system: macOS-12.2.1-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 5500M OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.103 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-04 23:51, hash: `blender/blender@713d59bcaf` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: Node Presets (1, 1) Author: Campbell Barton **Short description of error** I have a blend file with a geometry node node_group into the folder used by the Node Presets addons The addon failed to load the geometry node group preset -with this error message Error: Python: Traceback (most recent call last): ``` File "/Applications/Blender.app/Contents/Resources/3.1/scripts/addons/node_presets.py", line 152, in invoke node_template_add(context, self.filepath, self.group_name, event.shift, self.report) File "/Applications/Blender.app/Contents/Resources/3.1/scripts/addons/node_presets.py", line 84, in node_template_add node_type_string = { ``` KeyError: 'GeometryNodeTree' location: <unknown location>:-1 Quick fix: Looking at node_presets.py code, it appears that it is missing GeometryNodeTree/GeometryNodeGroup definition After editing node_type_string dictionary in {[F12886248](https://archive.blender.org/developer/F12886248/geoNode_CameraToEdgeTriangle.blend)}node_presets.py (in the release 3.1/scripts/addons folder) as shown below, the preset loads fine Added GeometryNodeGroup to this declaration ``` node_type_string = { "GeometryNodeTree": "GeometryNodeGroup", "ShaderNodeTree": "ShaderNodeGroup", "CompositorNodeTree": "CompositorNodeGroup", "TextureNodeTree": "TextureNodeGroup", }[type(node_tree).__name__] ``` **Exact steps for others to reproduce the error** Attached below is blend file containing the node group - Put this file in the folder parsed by the addon Open blender, create a plane mesh, add a modifier In modifier panel, Shift-A to bring menu, and select CameraToEdgeTriangle node group That's where it failed (before editing node_presets.py)
Author

Added subscriber: @aplus

Added subscriber: @aplus
Author

In modifier panel, Shift-A to bring menu, and select CameraToEdgeTriangle node group - shown in Template submenu

In modifier panel, Shift-A to bring menu, and select CameraToEdgeTriangle node group - shown in Template submenu
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Thanks for the report, but this has been fixed already- e56895f5e4
Please test again on fresh 3.1.0/3.2.0 builds: https://builder.blender.org/download/daily

Thanks for the report, but this has been fixed already- e56895f5e4 Please test again on fresh 3.1.0/3.2.0 builds: https://builder.blender.org/download/daily
Member

Closed as duplicate of #90845

Closed as duplicate of #90845
Author

Thanks Patrick for your response.
Did no think about the daily builds.
Addon works in blender-3.2.0-alpha+master.7d7dd66ba78f

Thanks Patrick for your response. Did no think about the daily builds. Addon works in blender-3.2.0-alpha+master.7d7dd66ba78f
Sign in to join this conversation.
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-addons#96022
No description provided.