Maniphest T68702

Normal Node is not working after SOCK_COMPAT flag was added for vector values
Closed, ResolvedBUG

Assigned To
Omar Emara (OmarSquircleArt)
Authored By
Charlie Jolly (charlie)
Aug 15 2019, 6:22 PM
Tags
  • BF Blender
  • User Interface
Subscribers
Brecht Van Lommel (brecht)
Charlie Jolly (charlie)
Dalai Felinto (dfelinto)
Jacques Lucke (JacquesLucke)

Description

Blender: 2.81 since https://developer.blender.org/rB26911ba1e26b90d7fafcd2e877a52c55181896c1

This commit introduced a new SOCK_COMPACT flag.

This breaks the Normal node and possibly other nodes that have a vector with a PROP_DIRECTION subtype.

Simple fix is to just add the SOCK_COMPACT to the socket template but a proper fix should add a working unit vector widget button.

diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c
index 074cc3dd87f..c6eaccaf7dd 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal.c
@@ -25,7 +25,7 @@
 
 /* **************** NORMAL  ******************** */
 static bNodeSocketTemplate sh_node_normal_in[] = {
-    {SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION},
+    {SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION, SOCK_COMPACT},
     {-1, 0, ""},
 };

Revisions and Commits

rB Blender
D5503

Related Objects

Mentioned In
T76984: Normal Node not drawing properly in compositor
Mentioned Here
rB26911ba1e26b: Nodes: Display vector values expanded, except when specified as compact.

Event Timeline

Charlie Jolly (charlie) created this task.Aug 15 2019, 6:22 PM
Dalai Felinto (dfelinto) assigned this task to Omar Emara (OmarSquircleArt).EditedAug 15 2019, 6:33 PM
Dalai Felinto (dfelinto) lowered the priority of this task from 90 to 50.
Dalai Felinto (dfelinto) added subscribers: Jacques Lucke (JacquesLucke), Brecht Van Lommel (brecht), Dalai Felinto (dfelinto).

@Brecht Van Lommel (brecht) @Jacques Lucke (JacquesLucke) since you reviewed the original patch want to look at this? I can confirm the issue was introduced in that commit.

Brecht Van Lommel (brecht) raised the priority of this task from 50 to High.Aug 15 2019, 6:40 PM

Setting as high since we want this fixed before the next release.

Philipp Oeser (lichtwerk) added projects: Nodes, User Interface.Aug 16 2019, 11:16 AM
Omar Emara (OmarSquircleArt) changed the task status from Unknown Status to Resolved by committing rB25f1783673de: Fix T68702: Input socket in the Normal node isn't drawn properly..Aug 16 2019, 5:59 PM
Omar Emara (OmarSquircleArt) added a commit: rB25f1783673de: Fix T68702: Input socket in the Normal node isn't drawn properly..
Hans Goudey (HooglyBoogly) removed a project: Nodes.May 16 2022, 11:02 AM