Compositor: Fix Missing output UI for Normal node
There were multiple issues at hand here: - The default value has been changed to `{0, 0, 1}` see: rB25f1783673de636a6f0ca4457df8c05bc685981a - The output needs the subtype set `PROP_DIRECTION` - The noder properties were missing in `node_composit_set_butfunc` Fixes T96860
This commit is contained in:
parent
b20b672e76
commit
ccecd97c8c
Notes:
blender-bot
2023-02-14 07:39:44 +01:00
Referenced by issue #96860, Compositor: Missing output UI for Normal node Referenced by issue #96241, 3.1: Potential candidates for corrective releases
|
@ -797,6 +797,9 @@ static void node_composit_set_butfunc(bNodeType *ntype)
|
|||
ntype->draw_buttons = node_composit_buts_image;
|
||||
ntype->draw_buttons_ex = node_composit_buts_image_ex;
|
||||
break;
|
||||
case CMP_NODE_NORMAL:
|
||||
ntype->draw_buttons = node_buts_normal;
|
||||
break;
|
||||
case CMP_NODE_CURVE_RGB:
|
||||
ntype->draw_buttons = node_buts_curvecol;
|
||||
break;
|
||||
|
|
|
@ -30,11 +30,15 @@ namespace blender::nodes::node_composite_normal_cc {
|
|||
static void cmp_node_normal_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Normal"))
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION);
|
||||
b.add_output<decl::Vector>(N_("Normal"))
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION);
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_output<decl::Float>(N_("Dot"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue