Blender
V4.3
source
blender
nodes
NOD_node_in_compute_context.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_compute_context.hh
"
8
#include "
BLI_hash.hh
"
9
#include "
BLI_struct_equality_utils.hh
"
10
11
struct
bNode
;
12
struct
bNodeSocket
;
13
14
namespace
blender::nodes
{
15
20
struct
NodeInContext
{
21
const
ComputeContext
*context =
nullptr
;
22
const
bNode
*node =
nullptr
;
23
24
uint64_t
hash
()
const
25
{
26
return
get_default_hash
(this->
context_hash
(), this->node);
27
}
28
29
ComputeContextHash
context_hash
()
const
30
{
31
return
context ? context->
hash
() :
ComputeContextHash
{};
32
}
33
38
BLI_STRUCT_EQUALITY_OPERATORS_2
(
NodeInContext
,
context_hash
(), node)
39
};
40
45
struct
SocketInContext
{
46
const
ComputeContext
*context =
nullptr
;
47
const
bNodeSocket
*
socket
=
nullptr
;
48
49
uint64_t
hash
()
const
50
{
51
return
get_default_hash
(this->
context_hash
(), this->socket);
52
}
53
54
ComputeContextHash
context_hash
()
const
55
{
56
return
context ? context->
hash
() :
ComputeContextHash
{};
57
}
58
63
BLI_STRUCT_EQUALITY_OPERATORS_2
(
SocketInContext
,
context_hash
(),
socket
)
64
};
65
66
}
// namespace blender::nodes
BLI_compute_context.hh
BLI_hash.hh
BLI_struct_equality_utils.hh
BLI_STRUCT_EQUALITY_OPERATORS_2
#define BLI_STRUCT_EQUALITY_OPERATORS_2(Type, m1, m2)
Definition
BLI_struct_equality_utils.hh:29
blender::ComputeContext
Definition
BLI_compute_context.hh:73
blender::nodes
Definition
BKE_node.hh:63
blender::get_default_hash
uint64_t get_default_hash(const T &v)
Definition
BLI_hash.hh:219
uint64_t
unsigned __int64 uint64_t
Definition
stdint.h:90
bNodeSocket
Definition
DNA_node_types.h:121
bNode
Definition
DNA_node_types.h:357
blender::ComputeContextHash
Definition
BLI_compute_context.hh:51
blender::ComputeContextHash::hash
uint64_t hash() const
Definition
BLI_compute_context.hh:55
blender::nodes::NodeInContext
Definition
NOD_node_in_compute_context.hh:20
blender::nodes::NodeInContext::context_hash
ComputeContextHash context_hash() const
Definition
NOD_node_in_compute_context.hh:29
blender::nodes::NodeInContext::hash
uint64_t hash() const
Definition
NOD_node_in_compute_context.hh:24
blender::nodes::SocketInContext
Definition
NOD_node_in_compute_context.hh:45
blender::nodes::SocketInContext::context_hash
ComputeContextHash context_hash() const
Definition
NOD_node_in_compute_context.hh:54
blender::nodes::SocketInContext::hash
uint64_t hash() const
Definition
NOD_node_in_compute_context.hh:49
blender::nodes::SocketInContext::socket
const bNodeSocket * socket
Definition
NOD_node_in_compute_context.hh:47
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0