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:
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_bump.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bump.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.cc b/source/blender/nodes/shader/nodes/node_shader_bump.cc
index 7718b21af52..252abd02ad7 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bump.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bump.cc
@@ -23,6 +23,9 @@
#include "node_shader_util.hh"
+#include "UI_interface.h"
+#include "UI_resources.h"
+
/* **************** BUMP ******************** */
namespace blender::nodes::node_shader_bump_cc {
@@ -46,6 +49,11 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Vector>(N_("Normal"));
}
+static void node_shader_buts_bump(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+{
+ uiItemR(layout, ptr, "invert", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, 0);
+}
+
static int gpu_shader_bump(GPUMaterial *mat,
bNode *node,
bNodeExecData *UNUSED(execdata),
@@ -73,6 +81,7 @@ void register_node_type_sh_bump()
sh_node_type_base(&ntype, SH_NODE_BUMP, "Bump", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
+ ntype.draw_buttons = file_ns::node_shader_buts_bump;
node_type_gpu(&ntype, file_ns::gpu_shader_bump);
nodeRegisterType(&ntype);