Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-03-14 00:00:56 +0300
committerHans Goudey <h.goudey@me.com>2021-03-14 00:00:56 +0300
commit2c216413d5f0de6b4b35e0736964654206b72a02 (patch)
tree9eb4489d79836868111e1656c51fb08d21711725 /release/scripts/startup
parent03490618a285a46dca137055735a8df780a24047 (diff)
Nodes: Move group input and output to a consistent menu location
Currently (in geometry nodes) you can delete the group input or group output nodes with no way to get them back without copy and paste. This adds them to the "Group" submenu of the add menu so at least there is a way to add them back. Additionally, these nodes are moved to the "Group" submenu for all node editors. This makes sense since they are not like the other input or output nodes, they really just relate to how groups are organized. Differential Revision: https://developer.blender.org/D10241
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/nodeitems_builtins.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index c6565f1b578..e6e2c25e383 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -94,6 +94,11 @@ def node_group_items(context):
yield NodeItemCustom(draw=group_tools_draw)
+ yield NodeItem("NodeGroupInput", poll=group_input_output_item_poll)
+ yield NodeItem("NodeGroupOutput", poll=group_input_output_item_poll)
+
+ yield NodeItemCustom(draw=lambda self, layout, context: layout.separator())
+
def contains_group(nodetree, group):
if nodetree == group:
return True
@@ -200,7 +205,6 @@ shader_node_categories = [
NodeItem("ShaderNodeUVMap"),
NodeItem("ShaderNodeVertexColor"),
NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
- NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
]),
ShaderNodeCategory("SH_NEW_OUTPUT", "Output", items=[
NodeItem("ShaderNodeOutputMaterial", poll=object_eevee_cycles_shader_nodes_poll),
@@ -208,7 +212,6 @@ shader_node_categories = [
NodeItem("ShaderNodeOutputAOV"),
NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
- NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
]),
ShaderNodeCategory("SH_NEW_SHADER", "Shader", items=[
NodeItem("ShaderNodeMixShader", poll=eevee_cycles_shader_nodes_poll),
@@ -310,7 +313,6 @@ compositor_node_categories = [
NodeItem("CompositorNodeBokehImage"),
NodeItem("CompositorNodeTime"),
NodeItem("CompositorNodeTrackPos"),
- NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
]),
CompositorNodeCategory("CMP_OUTPUT", "Output", items=[
NodeItem("CompositorNodeComposite"),
@@ -318,7 +320,6 @@ compositor_node_categories = [
NodeItem("CompositorNodeSplitViewer"),
NodeItem("CompositorNodeOutputFile"),
NodeItem("CompositorNodeLevels"),
- NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
]),
CompositorNodeCategory("CMP_OP_COLOR", "Color", items=[
NodeItem("CompositorNodeMixRGB"),
@@ -420,12 +421,10 @@ texture_node_categories = [
NodeItem("TextureNodeCoordinates"),
NodeItem("TextureNodeTexture"),
NodeItem("TextureNodeImage"),
- NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
]),
TextureNodeCategory("TEX_OUTPUT", "Output", items=[
NodeItem("TextureNodeOutput"),
NodeItem("TextureNodeViewer"),
- NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
]),
TextureNodeCategory("TEX_OP_COLOR", "Color", items=[
NodeItem("TextureNodeMixRGB"),