52 switch (stemp->
type) {
63 dval->
min = (int)stemp->
min;
64 dval->
max = (
int)stemp->
max;
135 if (stemp_first ==
nullptr) {
137 nextsock = sock->
next;
144 while (stemp->
type != -1) {
150 nextsock = sock->
next;
156 if (socklist->
first) {
160 while (stemp->
type != -1) {
167 while (stemp->
type != -1) {
179 const bool do_id_user)
185 bNodeSocket *old_socket_with_same_identifier =
nullptr;
188 if (old_socket.
identifier == socket_decl->identifier()) {
190 old_socket_with_same_identifier = &old_socket;
195 if (old_socket_with_same_identifier ==
nullptr) {
197 new_socket = &socket_decl->build(
ntree,
node);
200 STRNCPY(old_socket_with_same_identifier->
name, socket_decl->name().c_str());
201 if (socket_decl->matches(*old_socket_with_same_identifier)) {
203 new_socket = old_socket_with_same_identifier;
207 old_socket_with_same_identifier->
identifier[0] =
'\0';
208 new_socket = &socket_decl->update_or_build(
ntree,
node, *old_socket_with_same_identifier);
210 if (new_socket == old_socket_with_same_identifier) {
217 if (
link->
fromsock == old_socket_with_same_identifier) {
220 else if (
link->
tosock == old_socket_with_same_identifier) {
225 if (internal_link->fromsock == old_socket_with_same_identifier) {
226 internal_link->fromsock = new_socket;
228 else if (internal_link->tosock == old_socket_with_same_identifier) {
229 internal_link->tosock = new_socket;
235 new_sockets.
add_new(new_socket);
238 if (!new_sockets.
contains(old_socket)) {
260 if (ntype ==
nullptr) {
263 if (ntype->
declare !=
nullptr) {
265 if (!
node->runtime->declaration->matches(*
node)) {
300 dval->
min = -FLT_MAX;
328 dval->
min = -FLT_MAX;
345 dval->
value[0] =
'\0';
352 dval->
value =
nullptr;
359 dval->
value =
nullptr;
366 "node socket value object");
367 dval->
value =
nullptr;
374 "node socket value texture");
375 dval->
value =
nullptr;
382 "node socket value material");
383 dval->
value =
nullptr;
399 if (!
from->default_value) {
405 if (
from->label[0] !=
'\0') {
409 switch (
from->typeinfo->type) {
489 const int loop_limit = 100;
518 socket =
input->link->fromsock;
538 const char *
UNUSED(data_path))
556 const char *
UNUSED(data_path))
574 toval->
min = fromval->min;
575 toval->
max = fromval->max;
582 toval->
min = fromval->min;
583 toval->
max = fromval->max;
590 toval->
min = fromval->min;
591 toval->
max = fromval->max;
617 stype = MEM_cnew<bNodeSocketType>(
"node socket C type");
657 const char *socket_idname =
"NodeSocketVirtual";
661 stype = MEM_cnew<bNodeSocketType>(
"node socket C type");
735 socktype->
base_cpp_type = &blender::CPPType::get<blender::float3>();
751 socktype->
base_cpp_type = &blender::CPPType::get<blender::ColorGeometry4f>();
756 &blender::CPPType::get<ValueOrField<blender::ColorGeometry4f>>();
768 socktype->
base_cpp_type = &blender::CPPType::get<std::string>();
775 value.~basic_string();
791 socktype->
base_cpp_type = &blender::CPPType::get<Object *>();
803 socktype->
base_cpp_type = &blender::CPPType::get<GeometrySet>();
815 socktype->
base_cpp_type = &blender::CPPType::get<Collection *>();
851 socktype->
base_cpp_type = &blender::CPPType::get<Material *>();
void id_us_plus(struct ID *id)
void nodeRemoveSocketEx(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, bool do_id_user)
void nodeRegisterSocketType(struct bNodeSocketType *stype)
void nodeSocketDeclarationsUpdate(struct bNode *node)
struct bNodeSocket * nodeAddStaticSocket(struct bNodeTree *ntree, struct bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
void nodeModifySocketTypeStatic(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, int type, int subtype)
const char * nodeStaticSocketLabel(int type, int subtype)
const char * nodeStaticSocketType(int type, int subtype)
const char * nodeStaticSocketInterfaceType(int type, int subtype)
void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock)
bool nodeDeclarationEnsureOnOutdatedNode(struct bNodeTree *ntree, struct bNode *node)
#define CMP_NODE_R_LAYERS
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define STREQLEN(a, b, n)
Object groups, one object can be in many groups at once.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Texture
void add_new(const Key &key)
bool contains(const Key &key) const
void remove_and_reorder(const int64_t index)
IndexRange index_range() const
Span< SocketDeclarationPtr > outputs() const
Span< SocketDeclarationPtr > inputs() const
SyclQueue void void size_t num_bytes void
BLI_CPP_TYPE_MAKE(GeometrySet, GeometrySet, CPPTypeFlags::Printable)
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
std::unique_ptr< SocketDeclaration > SocketDeclarationPtr
void node_socket_init_default_value(bNodeSocket *sock)
static void standard_node_socket_interface_verify_socket(bNodeTree *UNUSED(ntree), const bNodeSocket *interface_socket, bNode *UNUSED(node), bNodeSocket *sock, const char *UNUSED(data_path))
void ED_init_node_socket_type_virtual(bNodeSocketType *)
static void refresh_socket_list(bNodeTree &ntree, bNode &node, ListBase &sockets, Span< SocketDeclarationPtr > socket_decls, const bool do_id_user)
void node_socket_copy_default_value(bNodeSocket *to, const bNodeSocket *from)
static void standard_node_socket_interface_from_socket(bNodeTree *UNUSED(ntree), bNodeSocket *stemp, bNode *UNUSED(node), bNodeSocket *sock)
static void verify_socket_template_list(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, ListBase *socklist, bNodeSocketTemplate *stemp_first)
static bNodeSocketType * make_socket_type_geometry()
static bNodeSocketType * make_socket_type_string()
static bNodeSocketType * make_socket_type_vector(PropertySubType subtype)
static bNodeSocketType * make_standard_socket_type(int type, int subtype)
static bNodeSocketType * make_socket_type_int(PropertySubType subtype)
static bNodeSocketType * make_socket_type_material()
static bNodeSocketType * make_socket_type_virtual()
static bNodeSocketType * make_socket_type_object()
static void standard_node_socket_interface_init_socket(bNodeTree *UNUSED(ntree), const bNodeSocket *interface_socket, bNode *UNUSED(node), bNodeSocket *sock, const char *UNUSED(data_path))
void ED_init_standard_node_socket_type(bNodeSocketType *)
struct bNodeSocket * node_add_socket_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp, eNodeSocketInOut in_out)
void node_verify_sockets(bNodeTree *ntree, bNode *node, bool do_id_user)
static bNodeSocketType * make_socket_type_rgba()
static bNodeSocketType * make_socket_type_collection()
void register_standard_node_socket_types()
static bNodeSocketType * make_socket_type_texture()
void node_socket_skip_reroutes(ListBase *links, bNode *node, bNodeSocket *socket, bNode **r_node, bNodeSocket **r_socket)
static bNodeSocket * verify_socket_template(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, ListBase *socklist, bNodeSocketTemplate *stemp)
static bNodeSocketType * make_socket_type_float(PropertySubType subtype)
static bNodeSocketType * make_socket_type_bool()
static void refresh_node(bNodeTree &ntree, bNode &node, blender::nodes::NodeDeclaration &node_decl, bool do_id_user)
static bNodeSocketType * make_socket_type_image()
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
StructRNA * RNA_struct_find(const char *identifier)
Compact definition of a node socket.
struct bNodeSocket * sock
SocketGetGeometryNodesCPPValueFunction get_geometry_nodes_cpp_value
void(* interface_from_socket)(struct bNodeTree *ntree, struct bNodeSocket *interface_socket, struct bNode *node, struct bNodeSocket *sock)
void(* interface_init_socket)(struct bNodeTree *ntree, const struct bNodeSocket *interface_socket, struct bNode *node, struct bNodeSocket *sock, const char *data_path)
const CPPTypeHandle * geometry_nodes_cpp_type
SocketGetCPPValueFunction get_base_cpp_value
ExtensionRNA ext_interface
const CPPTypeHandle * base_cpp_type
bool use_link_limits_of_type
void(* free_self)(struct bNodeSocketType *stype)
void(* interface_verify_socket)(struct bNodeTree *ntree, const struct bNodeSocket *interface_socket, struct bNode *node, struct bNodeSocket *sock, const char *data_path)
struct Collection * value
struct bNodeSocket * next
struct bNodeSocketType * typeinfo
bNodeSocketTemplate * outputs
NodeDeclareFunction declare
bNodeSocketTemplate * inputs