Blender  V3.3
node_shader_output_linestyle.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2005 Blender Foundation. All rights reserved. */
3 
4 #include "node_shader_util.hh"
5 
6 #include "UI_interface.h"
7 #include "UI_resources.h"
8 
10 
12 {
13  b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 0.0f, 1.0f, 1.0f});
14  b.add_input<decl::Float>(N_("Color Fac"))
15  .default_value(1.0f)
16  .min(0.0f)
17  .max(1.0f)
18  .subtype(PROP_FACTOR);
19  b.add_input<decl::Float>(N_("Alpha"))
20  .default_value(1.0f)
21  .min(0.0f)
22  .max(1.0f)
23  .subtype(PROP_FACTOR);
24  b.add_input<decl::Float>(N_("Alpha Fac"))
25  .default_value(1.0f)
26  .min(0.0f)
27  .max(1.0f)
28  .subtype(PROP_FACTOR);
29 }
30 
32 {
33  uiLayout *row, *col;
34 
35  col = uiLayoutColumn(layout, false);
36  row = uiLayoutRow(col, true);
37  uiItemR(row, ptr, "blend_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
38  uiItemR(col, ptr, "use_clamp", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
39 }
40 
41 } // namespace blender::nodes::node_shader_output_linestyle_cc
42 
43 /* node type definition */
45 {
47 
48  static bNodeType ntype;
49 
50  sh_node_type_base(&ntype, SH_NODE_OUTPUT_LINESTYLE, "Line Style Output", NODE_CLASS_OUTPUT);
53  ntype.no_muting = true;
54 
55  nodeRegisterType(&ntype);
56 }
#define NODE_CLASS_OUTPUT
Definition: BKE_node.h:346
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define SH_NODE_OUTPUT_LINESTYLE
Definition: BKE_node.h:1161
#define UNUSED(x)
@ PROP_FACTOR
Definition: RNA_types.h:144
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
uint col
static void node_buts_output_linestyle(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_sh_output_linestyle()
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
Definition: BKE_node.h:244
NodeDeclareFunction declare
Definition: BKE_node.h:324
bool no_muting
Definition: BKE_node.h:338
#define N_(msgid)
PointerRNA * ptr
Definition: wm_files.c:3480