11 b.add_output<
decl::Int>(
"Mouse X").description(
12 "The region-space mouse X location, in pixels, increasing from 0 at the left");
13 b.add_output<
decl::Int>(
"Mouse Y").description(
14 "The region-space mouse Y location, in pixels, increasing from 0 at the bottom");
15 b.add_output<
decl::Int>(
"Region Width").description(
"The total X size of the region in pixels");
16 b.add_output<
decl::Int>(
"Region Height").description(
"The total Y size of the region in pixels");
24 const int2 mouse =
params.user_data()->call_data->operator_data->mouse_position;
25 const int2 size =
params.user_data()->call_data->operator_data->region_size;
26 params.set_output(
"Mouse X", mouse.x);
27 params.set_output(
"Mouse Y", mouse.y);
28 params.set_output(
"Region Width", size.x);
29 params.set_output(
"Region Height", size.y);
#define NOD_REGISTER_NODE(REGISTER_FUNC)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void node_geo_exec(GeoNodeExecParams params)
void search_link_ops_for_tool_node(GatherLinkSearchOpParams ¶ms)
bool check_tool_context_and_error(GeoNodeExecParams ¶ms)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeGeometryExecFunction geometry_node_execute
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare