Blender  V3.3
node_geo_is_viewport.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include "DEG_depsgraph_query.h"
4 
5 #include "node_geometry_util.hh"
6 
8 
10 {
11  b.add_output<decl::Bool>(N_("Is Viewport"));
12 }
13 
15 {
16  const Depsgraph *depsgraph = params.depsgraph();
18  const bool is_viewport = mode == DAG_EVAL_VIEWPORT;
19 
20  params.set_output("Is Viewport", is_viewport);
21 }
22 
23 } // namespace blender::nodes::node_geo_is_viewport_cc
24 
26 {
27  namespace file_ns = blender::nodes::node_geo_is_viewport_cc;
28 
29  static bNodeType ntype;
30 
34  nodeRegisterType(&ntype);
35 }
#define GEO_NODE_IS_VIEWPORT
Definition: BKE_node.h:1389
#define NODE_CLASS_INPUT
Definition: BKE_node.h:345
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
eEvaluationMode
Definition: DEG_depsgraph.h:44
@ DAG_EVAL_VIEWPORT
Definition: DEG_depsgraph.h:45
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
const Depsgraph * depsgraph
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_is_viewport()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
NodeGeometryExecFunction geometry_node_execute
Definition: BKE_node.h:316
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)