[Bf-blender-cvs] [fcba6703141] temp-attribute-processor: create nodes in new group

Jacques Lucke noreply at git.blender.org
Thu May 27 12:51:41 CEST 2021


Commit: fcba67031419407ce841af66cc5f60028d27c238
Author: Jacques Lucke
Date:   Mon May 24 17:07:18 2021 +0200
Branches: temp-attribute-processor
https://developer.blender.org/rBfcba67031419407ce841af66cc5f60028d27c238

create nodes in new group

===================================================================

M	release/scripts/startup/bl_operators/node.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index 221ec86230e..7c9ad560700 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -384,8 +384,16 @@ class NODE_OT_new_attribute_processor_group(Operator):
         node = context.space_data.edit_tree.nodes[self.node_name]
         if node.bl_idname != "GeometryNodeAttributeProcessor":
             return {'CANCELLED'}
-        new_group = bpy.data.node_groups.new("Attribute Group", "AttributeNodeTree")
-        node.node_tree = new_group
+
+        group = bpy.data.node_groups.new("Attribute Group", "AttributeNodeTree")
+
+        input_node = group.nodes.new('NodeGroupInput')
+        output_node = group.nodes.new('NodeGroupOutput')
+
+        input_node.location.x = -200 - input_node.width
+        output_node.location.x = 200
+
+        node.node_tree = group
         return {'FINISHED'}



More information about the Bf-blender-cvs mailing list