Cleanup: Move BKE_node.h to C++ #107790

Merged
Hans Goudey merged 16 commits from mod_moder/blender:tmp_move_node_on_cpp into main 2023-05-15 15:14:30 +02:00
252 changed files with 1437 additions and 1371 deletions
Showing only changes of commit 47fb3b35d6 - Show all commits

View File

@ -764,7 +764,9 @@ void node_free_node(bNodeTree *tree, bNode *node);
} // namespace blender::bke
#endif
// To move^!
#endif // +++++++++++++++ IM THERE!!!!!!!!!!!!!!
// Finished.!
/**
* Also used via RNA API, so we check for proper input output direction.
@ -776,25 +778,19 @@ struct bNodeLink *nodeAddLink(struct bNodeTree *ntree,
struct bNodeSocket *tosock);
void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link);
void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock);
/**
* Set the mute status of a single link.
*/
void nodeLinkSetMute(struct bNodeTree *ntree, struct bNodeLink *link, const bool muted);
bool nodeLinkIsHidden(const struct bNodeLink *link);
bool nodeLinkIsSelected(const struct bNodeLink *link);
void nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node);
void nodeToView(const struct bNode *node, float x, float y, float *rx, float *ry);
void nodeFromView(const struct bNode *node, float x, float y, float *rx, float *ry);
bool nodeLinkIsHidden(const struct bNodeLink *link);
void nodeAttachNode(struct bNodeTree *ntree, struct bNode *node, struct bNode *parent);
void nodeDetachNode(struct bNodeTree *ntree, struct bNode *node);
void nodePositionRelative(struct bNode *from_node,
const struct bNode *to_node,
const struct bNodeSocket *from_sock,
const struct bNodeSocket *to_sock);
void nodePositionPropagate(struct bNode *node);
/**
* Same as above but expects that the socket definitely is in the node tree.
*/
void nodeFindNode(struct bNodeTree *ntree,
struct bNodeSocket *sock,
struct bNode **r_node,
int *r_sockindex);
/**
* Finds a node based on its name.
*/
@ -806,65 +802,9 @@ bool nodeFindNodeTry(struct bNodeTree *ntree,
struct bNodeSocket *sock,
struct bNode **r_node,
int *r_sockindex);
/**
* Same as above but expects that the socket definitely is in the node tree.
*/
void nodeFindNode(struct bNodeTree *ntree,
struct bNodeSocket *sock,
struct bNode **r_node,
int *r_sockindex);
/**
* \note Recursive.
*/
struct bNode *nodeFindRootParent(bNode *node);
bool nodeIsParentAndChild(const bNode *parent, const bNode *child);
/**
* Iterate over a chain of nodes, starting with \a node_start, executing
* \a callback for each node (which can return false to end iterator).
*
* \param reversed: for backwards iteration
* \note Recursive
*/
void nodeChainIter(const bNodeTree *ntree,
const bNode *node_start,
bool (*callback)(bNode *, bNode *, void *, const bool),
void *userdata,
bool reversed);
/**
* Iterate over a chain of nodes, starting with \a node_start, executing
* \a callback for each node (which can return false to end iterator).
*
* Faster than nodeChainIter. Iter only once per node.
* Can be called recursively (using another nodeChainIterBackwards) by
* setting the recursion_lvl accordingly.
*
* \note Needs updated socket links (ntreeUpdateTree).
* \note Recursive
*/
void nodeChainIterBackwards(const bNodeTree *ntree,
const bNode *node_start,
bool (*callback)(bNode *, bNode *, void *),
void *userdata,
int recursion_lvl);
/**
* Iterate over all parents of \a node, executing \a callback for each parent
* (which can return false to end iterator)
*
* \note Recursive
*/
void nodeParentsIter(bNode *node, bool (*callback)(bNode *, void *), void *userdata);
/**
* A dangling reroute node is a reroute node that does *not* have a "data source", i.e. no
* non-reroute node is connected to its input.
*/
bool nodeIsDanglingReroute(const struct bNodeTree *ntree, const struct bNode *node);
struct bNodeLink *nodeFindLink(struct bNodeTree *ntree,
const struct bNodeSocket *from,
const struct bNodeSocket *to);
int nodeCountSocketLinks(const struct bNodeTree *ntree, const struct bNodeSocket *sock);
void nodeSetSelected(struct bNode *node, bool select);
@ -878,37 +818,9 @@ void nodeClearActive(struct bNodeTree *ntree);
* Two active flags, ID nodes have special flag for buttons display.
*/
struct bNode *nodeGetActiveTexture(struct bNodeTree *ntree);
struct bNode *nodeGetActivePaintCanvas(struct bNodeTree *ntree);
/**
* \brief Does the given node supports the sub active flag.
*
* \param sub_active: The active flag to check. #NODE_ACTIVE_TEXTURE / #NODE_ACTIVE_PAINT_CANVAS.
*/
bool nodeSupportsActiveFlag(const struct bNode *node, int sub_active);
void nodeSetSocketAvailability(struct bNodeTree *ntree,
struct bNodeSocket *sock,
bool is_available);
int nodeSocketLinkLimit(const struct bNodeSocket *sock);
/**
* If the node implements a `declare` function, this function makes sure that `node->declaration`
* is up to date. It is expected that the sockets of the node are up to date already.
*/
bool nodeDeclarationEnsure(struct bNodeTree *ntree, struct bNode *node);
/**
* Just update `node->declaration` if necessary. This can also be called on nodes that may not be
* up to date (e.g. because the need versioning or are dynamic).
*/
bool nodeDeclarationEnsureOnOutdatedNode(struct bNodeTree *ntree, struct bNode *node);
/**
* Update `socket->declaration` for all sockets in the node. This assumes that the node declaration
* and sockets are up to date already.
*/
void nodeSocketDeclarationsUpdate(struct bNode *node);
/**
* Node Instance Hash.
*/
@ -947,89 +859,22 @@ bool BKE_node_instance_hash_tag_key(bNodeInstanceHash *hash, bNodeInstanceKey ke
void BKE_node_instance_hash_remove_untagged(bNodeInstanceHash *hash,
bNodeInstanceValueFP valfreefp);
typedef GHashIterator bNodeInstanceHashIterator;
BLI_INLINE bNodeInstanceHashIterator *BKE_node_instance_hash_iterator_new(bNodeInstanceHash *hash)
{
return BLI_ghashIterator_new(hash->ghash);
}
BLI_INLINE void BKE_node_instance_hash_iterator_init(bNodeInstanceHashIterator *iter,
bNodeInstanceHash *hash)
{
BLI_ghashIterator_init(iter, hash->ghash);
}
BLI_INLINE void BKE_node_instance_hash_iterator_free(bNodeInstanceHashIterator *iter)
{
BLI_ghashIterator_free(iter);
}
BLI_INLINE bNodeInstanceKey
BKE_node_instance_hash_iterator_get_key(bNodeInstanceHashIterator *iter)
{
return *(bNodeInstanceKey *)BLI_ghashIterator_getKey(iter);
}
BLI_INLINE void *BKE_node_instance_hash_iterator_get_value(bNodeInstanceHashIterator *iter)
{
return BLI_ghashIterator_getValue(iter);
}
BLI_INLINE void BKE_node_instance_hash_iterator_step(bNodeInstanceHashIterator *iter)
{
BLI_ghashIterator_step(iter);
}
BLI_INLINE bool BKE_node_instance_hash_iterator_done(bNodeInstanceHashIterator *iter)
{
return BLI_ghashIterator_done(iter);
}
#define NODE_INSTANCE_HASH_ITER(iter_, hash_) \
for (BKE_node_instance_hash_iterator_init(&iter_, hash_); \
BKE_node_instance_hash_iterator_done(&iter_) == false; \
BKE_node_instance_hash_iterator_step(&iter_))
/* Node Previews */
bool BKE_node_preview_used(const struct bNode *node);
bNodePreview *BKE_node_preview_verify(
struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create);
bNodePreview *BKE_node_preview_copy(struct bNodePreview *preview);
void BKE_node_preview_free(struct bNodePreview *preview);
void BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize);
void BKE_node_preview_remove_unused(struct bNodeTree *ntree);
void BKE_node_preview_clear(struct bNodePreview *preview);
void BKE_node_preview_clear_tree(struct bNodeTree *ntree);
void BKE_node_preview_merge_tree(struct bNodeTree *to_ntree,
struct bNodeTree *from_ntree,
bool remove_old);
/** \} */
/* -------------------------------------------------------------------- */
/** \name Node Type Access
* \{ */
void nodeLabel(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen);
/**
* Get node socket label if it is set.
*/
const char *nodeSocketLabel(const struct bNodeSocket *sock);
bool nodeGroupPoll(const struct bNodeTree *nodetree,
const struct bNodeTree *grouptree,
const char **r_disabled_hint);
/**
* Initialize a new node type struct with default values and callbacks.
*/
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass);
void node_type_base_custom(struct bNodeType *ntype,
const char *idname,
const char *name,
short nclass);
void node_type_socket_templates(struct bNodeType *ntype,
struct bNodeSocketTemplate *inputs,
struct bNodeSocketTemplate *outputs);
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth);
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size);
/**
* \warning Nodes defining a storage type _must_ allocate this for new nodes.
* Otherwise nodes will reload as undefined (#46619).
@ -1043,12 +888,6 @@ void node_type_storage(struct bNodeType *ntype,
/** \} */
/* -------------------------------------------------------------------- */
/** \name Node Generic Functions
* \{ */
bool BKE_node_is_connected_to_output(const struct bNodeTree *ntree, const struct bNode *node);
/* ************** COMMON NODES *************** */
#define NODE_UNDEFINED -2 /* node type is not registered */
@ -1626,25 +1465,3 @@ extern struct bNodeSocketType NodeSocketTypeUndefined;
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
namespace blender::bke {
bNodeSocket *node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name);
bNodeSocket *node_find_enabled_input_socket(bNode &node, StringRef name);
bNodeSocket *node_find_enabled_output_socket(bNode &node, StringRef name);
} // namespace blender::bke
#endif
#define NODE_STORAGE_FUNCS(StorageT) \
[[maybe_unused]] static StorageT &node_storage(bNode &node) \
{ \
return *static_cast<StorageT *>(node.storage); \
} \
[[maybe_unused]] static const StorageT &node_storage(const bNode &node) \
{ \
return *static_cast<const StorageT *>(node.storage); \
}

View File

@ -0,0 +1,232 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2005 Blender Foundation */
mod_moder marked this conversation as resolved
Review

Always check new files for the right copyright. This should be Copyright 2023 Blender Foundation.

Always check new files for the right copyright. This should be `Copyright 2023 Blender Foundation.`

I added this in #107952

I added this in https://projects.blender.org/blender/blender/pulls/107952
#pragma once
/** \file
* \ingroup bke
*/
#include "BLI_compiler_compat.h"
#include "BLI_ghash.h"
#include "DNA_listBase.h"
#include "BKE_node.h"
/* for FOREACH_NODETREE_BEGIN */
#include "DNA_node_types.h"
#include "RNA_types.h"
#include "BLI_map.hh"
#include "BLI_string_ref.hh"
namespace blender::bke {
/**
* Set the mute status of a single link.
*/
void nodeLinkSetMute( bNodeTree *ntree, bNodeLink *link, const bool muted);
bool nodeLinkIsSelected(const bNodeLink *link);
void nodeInternalRelink( bNodeTree *ntree, bNode *node);
void nodeToView(const bNode *node, float x, float y, float *rx, float *ry);
void nodeFromView(const bNode *node, float x, float y, float *rx, float *ry);
void nodePositionRelative( bNode *from_node,
const bNode *to_node,
const bNodeSocket *from_sock,
const bNodeSocket *to_sock);
void nodePositionPropagate( bNode *node);
/**
* \note Recursive.
*/
bNode *nodeFindRootParent(bNode *node);
/**
* Iterate over a chain of nodes, starting with \a node_start, executing
* \a callback for each node (which can return false to end iterator).
*
* \param reversed: for backwards iteration
* \note Recursive
*/
void nodeChainIter(const bNodeTree *ntree,
const bNode *node_start,
bool (*callback)(bNode *, bNode *, void *, const bool),
void *userdata,
bool reversed);
/**
* Iterate over a chain of nodes, starting with \a node_start, executing
* \a callback for each node (which can return false to end iterator).
*
* Faster than nodeChainIter. Iter only once per node.
* Can be called recursively (using another nodeChainIterBackwards) by
* setting the recursion_lvl accordingly.
*
* \note Needs updated socket links (ntreeUpdateTree).
* \note Recursive
*/
void nodeChainIterBackwards(const bNodeTree *ntree,
const bNode *node_start,
bool (*callback)(bNode *, bNode *, void *),
void *userdata,
int recursion_lvl);
/**
* Iterate over all parents of \a node, executing \a callback for each parent
* (which can return false to end iterator)
*
* \note Recursive
*/
void nodeParentsIter(bNode *node, bool (*callback)(bNode *, void *), void *userdata);
/**
* A dangling reroute node is a reroute node that does *not* have a "data source", i.e. no
* non-reroute node is connected to its input.
*/
bool nodeIsDanglingReroute(const struct bNodeTree *ntree, const struct bNode *node);
struct bNodeLink *nodeFindLink(struct bNodeTree *ntree,
const struct bNodeSocket *from,
const struct bNodeSocket *to);
struct bNode *nodeGetActivePaintCanvas(struct bNodeTree *ntree);
}
namespace blender::bke {
/**
* \brief Does the given node supports the sub active flag.
*
* \param sub_active: The active flag to check. #NODE_ACTIVE_TEXTURE / #NODE_ACTIVE_PAINT_CANVAS.
*/
bool nodeSupportsActiveFlag(const struct bNode *node, int sub_active);
void nodeSetSocketAvailability(struct bNodeTree *ntree,
struct bNodeSocket *sock,
bool is_available);
/**
* If the node implements a `declare` function, this function makes sure that `node->declaration`
* is up to date. It is expected that the sockets of the node are up to date already.
*/
bool nodeDeclarationEnsure(struct bNodeTree *ntree, struct bNode *node);
/**
* Just update `node->declaration` if necessary. This can also be called on nodes that may not be
* up to date (e.g. because the need versioning or are dynamic).
*/
bool nodeDeclarationEnsureOnOutdatedNode(struct bNodeTree *ntree, struct bNode *node);
/**
* Update `socket->declaration` for all sockets in the node. This assumes that the node declaration
* and sockets are up to date already.
*/
void nodeSocketDeclarationsUpdate(struct bNode *node);
}
namespace blender::bke {
typedef GHashIterator bNodeInstanceHashIterator;
BLI_INLINE bNodeInstanceHashIterator *node_instance_hash_iterator_new(bNodeInstanceHash *hash)
{
return BLI_ghashIterator_new(hash->ghash);
}
BLI_INLINE void node_instance_hash_iterator_init(bNodeInstanceHashIterator *iter,
bNodeInstanceHash *hash)
{
BLI_ghashIterator_init(iter, hash->ghash);
}
BLI_INLINE void node_instance_hash_iterator_free(bNodeInstanceHashIterator *iter)
{
BLI_ghashIterator_free(iter);
}
BLI_INLINE bNodeInstanceKey node_instance_hash_iterator_get_key(bNodeInstanceHashIterator *iter)
{
return *(bNodeInstanceKey *)BLI_ghashIterator_getKey(iter);
}
BLI_INLINE void *node_instance_hash_iterator_get_value(bNodeInstanceHashIterator *iter)
{
return BLI_ghashIterator_getValue(iter);
}
BLI_INLINE void node_instance_hash_iterator_step(bNodeInstanceHashIterator *iter)
{
BLI_ghashIterator_step(iter);
}
BLI_INLINE bool node_instance_hash_iterator_done(bNodeInstanceHashIterator *iter)
{
return BLI_ghashIterator_done(iter);
}
#define NODE_INSTANCE_HASH_ITER(iter_, hash_) \
for (blender::bke::node_instance_hash_iterator_init(&iter_, hash_); \
blender::bke::node_instance_hash_iterator_done(&iter_) == false; \
blender::bke::node_instance_hash_iterator_step(&iter_))
}
namespace blender::bke {
/* Node Previews */
bool node_preview_used(const bNode *node);
bNodePreview *node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create);
bNodePreview *node_preview_copy( bNodePreview *preview);
void node_preview_free( bNodePreview *preview);
void node_preview_init_tree(bNodeTree *ntree, int xsize, int ysize);
void node_preview_remove_unused(bNodeTree *ntree);
void node_preview_clear(bNodePreview *preview);
void node_preview_merge_tree(bNodeTree *to_ntree,
bNodeTree *from_ntree,
bool remove_old);
/* -------------------------------------------------------------------- */
/** \name Node Type Access
* \{ */
void nodeLabel(const bNodeTree *ntree, const bNode *node, char *label, int maxlen);
/**
* Get node socket label if it is set.
*/
const char *nodeSocketLabel(const bNodeSocket *sock);
/**
* Initialize a new node type struct with default values and callbacks.
*/
void node_type_base(bNodeType *ntype, int type, const char *name, short nclass);
void node_type_socket_templates(bNodeType *ntype,
bNodeSocketTemplate *inputs,
bNodeSocketTemplate *outputs);
void node_type_size(bNodeType *ntype, int width, int minwidth, int maxwidth);
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size);
/* -------------------------------------------------------------------- */
/** \name Node Generic Functions
* \{ */
bool node_is_connected_to_output(const struct bNodeTree *ntree, const struct bNode *node);
} // namespace blender::bke
namespace blender::bke {
bNodeSocket *node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name);
bNodeSocket *node_find_enabled_input_socket(bNode &node, StringRef name);
bNodeSocket *node_find_enabled_output_socket(bNode &node, StringRef name);
} // namespace blender::bke
#define NODE_STORAGE_FUNCS(StorageT) \
[[maybe_unused]] static StorageT &node_storage(bNode &node) \
{ \
return *static_cast<StorageT *>(node.storage); \
} \
[[maybe_unused]] static const StorageT &node_storage(const bNode &node) \
{ \
return *static_cast<const StorageT *>(node.storage); \
}

View File

@ -15,7 +15,7 @@
#include "DNA_node_types.h"
#include "BKE_node.h"
#include "BKE_node.hh"
struct bNode;
struct bNodeSocket;

View File

@ -70,7 +70,7 @@
#include "BKE_image_format.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_packedFile.h"

View File

@ -26,7 +26,7 @@
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "DNA_ID.h"

View File

@ -38,7 +38,7 @@
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_main_namemap.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_report.h"
#include "BKE_scene.h"

View File

@ -21,7 +21,7 @@
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_scene.h"

View File

@ -33,7 +33,7 @@
#include "BKE_lib_query.h"
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_tree_update.h"
#include "BKE_texture.h"

View File

@ -57,7 +57,7 @@
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_object.h"
#include "BKE_scene.h"
@ -1560,7 +1560,7 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma, const struct Ob
ma->texpaintslot = static_cast<TexPaintSlot *>(
MEM_callocN(sizeof(TexPaintSlot) * count, "texpaint_slots"));
bNode *active_node = nodeGetActivePaintCanvas(ma->nodetree);
bNode *active_node = blender::bke::nodeGetActivePaintCanvas(ma->nodetree);
fill_texpaint_slots_recursive(ma->nodetree, active_node, ob, ma, count, slot_filter);

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "DNA_node_types.h"

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "NOD_node_declaration.hh"

View File

@ -15,7 +15,7 @@
#include "BKE_anim_data.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
@ -540,7 +540,7 @@ class NodeTreeMainUpdater {
void update_individual_nodes(bNodeTree &ntree)
{
for (bNode *node : ntree.all_nodes()) {
nodeDeclarationEnsure(&ntree, node);
blender::bke::nodeDeclarationEnsure(&ntree, node);
if (this->should_update_individual_node(ntree, *node)) {
bNodeType &ntype = *node->typeinfo;
if (ntype.group_update_func) {
@ -701,7 +701,7 @@ class NodeTreeMainUpdater {
if ((ntree.runtime->changed_flag & allowed_flags) == ntree.runtime->changed_flag) {
return;
}
BKE_node_preview_remove_unused(&ntree);
blender::bke::node_preview_remove_unused(&ntree);
}
void propagate_runtime_flags(const bNodeTree &ntree)

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_zones.hh"

View File

@ -109,7 +109,7 @@
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_object_facemap.h"
#include "BKE_paint.h"

View File

@ -78,7 +78,7 @@
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_mask.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_object.h"
#include "BKE_paint.h"

View File

@ -30,7 +30,7 @@
#include "BKE_lib_query.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_pointcache.h"
#include "BKE_simulation.h"

View File

@ -47,7 +47,7 @@
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_scene.h"
#include "BKE_texture.h"

View File

@ -78,7 +78,7 @@
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_modifier.h"
#include "BKE_node.h" /* for tree type defines */
#include "BKE_node.hh" /* for tree type defines */
#include "BKE_object.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"

View File

@ -51,7 +51,7 @@
#include "BKE_mesh.hh"
#include "BKE_mesh_legacy_convert.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "IMB_imbuf.h"
#include "MEM_guardedalloc.h"

View File

@ -65,7 +65,7 @@
#include "BKE_main_namemap.h"
#include "BKE_mesh.hh"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_screen.h"
#include "BKE_workspace.h"

View File

@ -20,7 +20,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_main_namemap.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "MEM_guardedalloc.h"

View File

@ -50,7 +50,7 @@
#include "BKE_main_namemap.h"
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_paint.h"

View File

@ -104,7 +104,7 @@
#include "BKE_lib_override.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_packedFile.h"
#include "BKE_report.h"
#include "BKE_workspace.h"

View File

@ -15,7 +15,7 @@
#include "BKE_main.h"
#include "BKE_mball_tessellate.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_scene.h"
#include "BKE_vfont.h"

View File

@ -5,7 +5,7 @@
#include "DNA_node_types.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "COM_NodeOperationBuilder.h"

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2011 Blender Foundation. */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "RNA_access.h"
#include "RNA_prototypes.h"

View File

@ -5,7 +5,7 @@
#include "DNA_node_types.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "COM_Converter.h"

View File

@ -5,7 +5,7 @@
#include "BLT_translation.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_scene.h"

View File

@ -3,7 +3,7 @@
#include "COM_ConvertColorSpaceNode.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BLI_utildefines.h"

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2018 Blender Foundation. */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "NOD_composite.h"

View File

@ -2,7 +2,7 @@
* Copyright 2011 Blender Foundation. */
#include "COM_FilterNode.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "COM_ConvolutionEdgeFilterOperation.h"
namespace blender::compositor {

View File

@ -2,7 +2,7 @@
* Copyright 2011 Blender Foundation. */
#include "COM_InvertNode.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "COM_InvertOperation.h"
namespace blender::compositor {

View File

@ -3,7 +3,7 @@
#include "COM_ScaleNode.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "COM_ScaleOperation.h"
#include "COM_SetValueOperation.h"

View File

@ -8,7 +8,7 @@
#include "DNA_movieclip_types.h"
#include "BKE_node.h"
#include "BKE_node.hh"
namespace blender::compositor {

View File

@ -3,7 +3,7 @@
#include "COM_PreviewOperation.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "IMB_colormanagement.h"
namespace blender::compositor {

View File

@ -2,7 +2,7 @@
* Copyright 2017 Blender Foundation. */
#include "COM_SMAAOperation.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "COM_SMAAAreaTexture.h"
extern "C" {

View File

@ -5,7 +5,7 @@
#include "COM_WorkScheduler.h"
#include "BKE_image.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_scene.h"
#include "NOD_texture.h"

View File

@ -6,7 +6,7 @@
#include "DNA_defaults.h"
#include "BKE_movieclip.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_tracking.h"
namespace blender::compositor {

View File

@ -8,7 +8,7 @@
#include "NOD_derived_node_tree.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "COM_scheduler.hh"

View File

@ -78,7 +78,7 @@
#include "BKE_mesh.hh"
#include "BKE_modifier.h"
#include "BKE_movieclip.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_object.h"
#include "BKE_particle.h"

View File

@ -28,7 +28,7 @@
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"

View File

@ -71,7 +71,7 @@
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_object.h"
#include "BKE_particle.h"

View File

@ -26,7 +26,7 @@
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"

View File

@ -16,7 +16,7 @@
#include "BKE_geometry_set.hh"
#include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BLI_math.h"

View File

@ -30,7 +30,7 @@
#include "BKE_anim_data.h"
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"

View File

@ -8,7 +8,7 @@
#include "DRW_render.h"
#include "BKE_lib_id.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BLI_dynstr.h"
#include "BLI_string_utils.h"

View File

@ -10,7 +10,7 @@
#include "BKE_lib_id.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "NOD_shader.h"
#include "eevee_instance.hh"

View File

@ -7,7 +7,7 @@
*/
#include "BKE_lib_id.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_world.h"
#include "DEG_depsgraph_query.h"
#include "NOD_shader.h"

View File

@ -10,7 +10,7 @@
#include "BLI_memblock.h"
#include "BKE_image.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BLI_dynstr.h"
#include "BLI_hash.h"

View File

@ -4,7 +4,7 @@
#include "BLI_hash.h"
/* get_image */
#include "BKE_node.h"
#include "BKE_node.hh"
#include "DNA_node_types.h"
#include "ED_uvedit.h"
/* get_image */

View File

@ -5,7 +5,7 @@
#include "BKE_context.h"
#include "BKE_idtype.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "DEG_depsgraph.h"
#include "RNA_define.h"

View File

@ -8,7 +8,7 @@
#include "BKE_context.h"
#include "BKE_curves.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "ED_curves.h"

View File

@ -23,7 +23,7 @@
#include "BKE_cryptomatte.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_screen.h"
#include "NOD_composite.h"

View File

@ -25,7 +25,7 @@
#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_curveprofile.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_tracking.h"
#include "IMB_colormanagement.h"

View File

@ -31,7 +31,7 @@
#include "BKE_lib_override.h"
#include "BKE_lib_remap.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_text.h"

View File

@ -74,7 +74,7 @@
#include "BKE_mesh.hh"
#include "BKE_mesh_runtime.h"
#include "BKE_nla.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcloud.h"

View File

@ -35,7 +35,7 @@
#include "BKE_mesh.hh"
#include "BKE_mesh_mapping.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
@ -516,7 +516,7 @@ static bool bake_object_check(const Scene *scene,
if (image) {
if (node) {
if (BKE_node_is_connected_to_output(ntree, node)) {
if (blender::bke::node_is_connected_to_output(ntree, node)) {
/* we don't return false since this may be a false positive
* this can't be RPT_ERROR though, otherwise it prevents
* multiple highpoly objects to be baked at once */

View File

@ -35,7 +35,7 @@
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_tree_update.h"
#include "BKE_object.h"
#include "BKE_report.h"

View File

@ -55,7 +55,7 @@
#include "BKE_light.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_pose_backup.h"
#include "BKE_scene.h"

View File

@ -41,7 +41,7 @@
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"

View File

@ -30,7 +30,7 @@
#include "BKE_icons.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_paint.h"
#include "BKE_scene.h"

View File

@ -63,7 +63,7 @@
#include "BKE_mesh.hh"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_scene.h"
@ -6791,13 +6791,13 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
if (in_sock != nullptr && link == nullptr) {
nodeAddLink(ntree, out_node, out_sock, in_node, in_sock);
nodePositionRelative(out_node, in_node, out_sock, in_sock);
blender::bke::nodePositionRelative(out_node, in_node, out_sock, in_sock);
}
}
ED_node_tree_propagate_change(C, bmain, ntree);
/* In case we added more than one node, position them too. */
nodePositionPropagate(out_node);
blender::bke::nodePositionPropagate(out_node);
if (ima) {
BKE_texpaint_slot_refresh_cache(scene, ma, ob);

View File

@ -33,7 +33,7 @@
#include "BKE_layer.h"
#include "BKE_linestyle.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_paint.h"
#include "BKE_particle.h"

View File

@ -6,7 +6,7 @@
#include "BKE_global.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_report.h"
@ -315,7 +315,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
}
for (bNode *new_node : node_map.values()) {
nodeDeclarationEnsure(&tree, new_node);
blender::bke::nodeDeclarationEnsure(&tree, new_node);
}
remap_pairing(tree, node_map);

View File

@ -20,7 +20,7 @@
#include "BKE_curve.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_scene.h"

View File

@ -23,7 +23,7 @@
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_report.h"

View File

@ -38,7 +38,7 @@
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_node_tree_zones.hh"
@ -312,7 +312,7 @@ static Array<uiBlock *> node_uiblocks_init(const bContext &C, const Span<bNode *
float2 node_to_view(const bNode &node, const float2 &co)
{
float2 result;
nodeToView(&node, co.x, co.y, &result.x, &result.y);
blender::bke::nodeToView(&node, co.x, co.y, &result.x, &result.y);
return result * UI_SCALE_FAC;
}
@ -332,7 +332,7 @@ float2 node_from_view(const bNode &node, const float2 &co)
const float x = co.x / UI_SCALE_FAC;
const float y = co.y / UI_SCALE_FAC;
float2 result;
nodeFromView(&node, x, y, &result.x, &result.y);
blender::bke::nodeFromView(&node, x, y, &result.x, &result.y);
return result;
}
@ -402,7 +402,7 @@ static void node_update_basis(const bContext &C,
uiLayout *row = uiLayoutRow(layout, true);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
const char *socket_label = nodeSocketLabel(socket);
const char *socket_label = blender::bke::nodeSocketLabel(socket);
const char *socket_translation_context = node_socket_get_translation_context(*socket);
socket->typeinfo->draw((bContext *)&C,
row,
@ -539,7 +539,7 @@ static void node_update_basis(const bContext &C,
uiLayout *row = uiLayoutRow(layout, true);
const char *socket_label = nodeSocketLabel(socket);
const char *socket_label = blender::bke::nodeSocketLabel(socket);
const char *socket_translation_context = node_socket_get_translation_context(*socket);
socket->typeinfo->draw((bContext *)&C,
row,
@ -1162,7 +1162,7 @@ static char *node_socket_get_tooltip(const SpaceNode *snode,
}
if (output.str().empty()) {
output << nodeSocketLabel(&socket);
output << blender::bke::nodeSocketLabel(&socket);
}
return BLI_strdup(output.str().c_str());
@ -2322,7 +2322,7 @@ static void node_draw_basis(const bContext &C,
}
char showname[128];
nodeLabel(&ntree, &node, showname, sizeof(showname));
blender::bke::nodeLabel(&ntree, &node, showname, sizeof(showname));
uiBut *but = uiDefBut(&block,
UI_BTYPE_LABEL,
@ -2557,7 +2557,7 @@ static void node_draw_hidden(const bContext &C,
}
char showname[128];
nodeLabel(&ntree, &node, showname, sizeof(showname));
blender::bke::nodeLabel(&ntree, &node, showname, sizeof(showname));
uiBut *but = uiDefBut(&block,
UI_BTYPE_LABEL,
@ -2855,7 +2855,7 @@ static void frame_node_draw_label(TreeDrawContext &tree_draw_ctx,
const float font_size = data->label_size / aspect;
char label[MAX_NAME];
nodeLabel(&ntree, &node, label, sizeof(label));
blender::bke::nodeLabel(&ntree, &node, label, sizeof(label));
BLF_enable(fontid, BLF_ASPECT);
BLF_aspect(fontid, aspect, aspect, 1.0f);
@ -3247,14 +3247,14 @@ static void node_draw_nodetree(const bContext &C,
nodelink_batch_start(snode);
LISTBASE_FOREACH (const bNodeLink *, link, &ntree.links) {
if (!nodeLinkIsHidden(link) && !nodeLinkIsSelected(link)) {
if (!nodeLinkIsHidden(link) && !blender::bke::nodeLinkIsSelected(link)) {
node_draw_link(C, region.v2d, snode, *link, false);
}
}
/* Draw selected node links after the unselected ones, so they are shown on top. */
LISTBASE_FOREACH (const bNodeLink *, link, &ntree.links) {
if (!nodeLinkIsHidden(link) && nodeLinkIsSelected(link)) {
if (!nodeLinkIsHidden(link) && blender::bke::nodeLinkIsSelected(link)) {
node_draw_link(C, region.v2d, snode, *link, true);
}
}

View File

@ -23,7 +23,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_report.h"
@ -1352,7 +1352,7 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
}
for (bNode *node : node_map.values()) {
nodeDeclarationEnsure(ntree, node);
blender::bke::nodeDeclarationEnsure(ntree, node);
}
/* Clear flags for recursive depth-first iteration. */
@ -1897,7 +1897,7 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator * /*op*/)
LISTBASE_FOREACH_MUTABLE (bNode *, node, &snode->edittree->nodes) {
if (node->flag & SELECT) {
nodeInternalRelink(snode->edittree, node);
blender::bke::nodeInternalRelink(snode->edittree, node);
nodeRemoveNode(bmain, snode->edittree, node, true);
}
}

View File

@ -551,7 +551,7 @@ static bool node_group_separate_selected(
}
for (bNode *node : new_nodes) {
nodeDeclarationEnsure(&ntree, node);
blender::bke::nodeDeclarationEnsure(&ntree, node);
}
/* and copy across the animation,
@ -752,7 +752,7 @@ static void get_min_max_of_nodes(const Span<bNode *> nodes,
INIT_MINMAX2(min, max);
for (const bNode *node : nodes) {
float2 loc;
nodeToView(node, node->offsetx, node->offsety, &loc.x, &loc.y);
blender::bke::nodeToView(node, node->offsetx, node->offsety, &loc.x, &loc.y);
math::min_max(loc, min, max);
if (use_size) {
loc.x += node->width;

View File

@ -12,7 +12,7 @@
#include "BLI_vector.hh"
#include "BLI_vector_set.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "UI_interface.h"
#include "UI_interface.hh"

View File

@ -18,7 +18,7 @@
#include "BKE_curve.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_screen.h"
@ -1643,7 +1643,7 @@ static int mute_links_exec(bContext *C, wmOperator *op)
bke::node_tree_runtime::AllowUsingOutdatedInfo allow_outdated_info{ntree};
for (bNodeLink *link : affected_links) {
nodeLinkSetMute(&ntree, link, !(link->flag & NODE_LINK_MUTED));
blender::bke::nodeLinkSetMute(&ntree, link, !(link->flag & NODE_LINK_MUTED));
const bool muted = link->flag & NODE_LINK_MUTED;
/* Propagate mute status downstream past reroute nodes. */
@ -1652,7 +1652,7 @@ static int mute_links_exec(bContext *C, wmOperator *op)
links.push_multiple(link->tonode->output_socket(0).directly_linked_links());
while (!links.is_empty()) {
bNodeLink *link = links.pop();
nodeLinkSetMute(&ntree, link, muted);
blender::bke::nodeLinkSetMute(&ntree, link, muted);
if (!link->tonode->is_reroute()) {
continue;
}
@ -1666,7 +1666,7 @@ static int mute_links_exec(bContext *C, wmOperator *op)
links.push_multiple(link->fromnode->input_socket(0).directly_linked_links());
while (!links.is_empty()) {
bNodeLink *link = links.pop();
nodeLinkSetMute(&ntree, link, muted);
blender::bke::nodeLinkSetMute(&ntree, link, muted);
if (!link->fromnode->is_reroute()) {
continue;
}
@ -1722,7 +1722,7 @@ static int detach_links_exec(bContext *C, wmOperator * /*op*/)
for (bNode *node : ntree.all_nodes()) {
if (node->flag & SELECT) {
nodeInternalRelink(&ntree, node);
blender::bke::nodeInternalRelink(&ntree, node);
}
}
@ -2254,7 +2254,7 @@ bNodeSocket *get_main_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_
ListBase *sockets = (in_out == SOCK_IN) ? &node.inputs : &node.outputs;
/* Try to get the main socket based on the socket declaration. */
nodeDeclarationEnsure(&ntree, &node);
blender::bke::nodeDeclarationEnsure(&ntree, &node);
const nodes::NodeDeclaration *node_decl = node.declaration();
if (node_decl != nullptr) {
Span<nodes::SocketDeclarationPtr> socket_decls = (in_out == SOCK_IN) ? node_decl->inputs :
@ -2371,7 +2371,7 @@ static void node_link_insert_offset_frame_chains(bNodeTree *ntree,
{
for (bNode *node : ntree->all_nodes()) {
if (nodeIsParentAndChild(parent, node)) {
nodeChainIter(ntree, node, node_link_insert_offset_frame_chain_cb, data, reversed);
blender::bke::nodeChainIter(ntree, node, node_link_insert_offset_frame_chain_cb, data, reversed);
}
}
}
@ -2402,7 +2402,7 @@ static bool node_link_insert_offset_chain_cb(bNode *fromnode,
}
}
else if (ofs_node->parent) {
bNode *node = nodeFindRootParent(ofs_node);
bNode *node = blender::bke::nodeFindRootParent(ofs_node);
node_offset_apply(*node, data->offset_x);
}
else {
@ -2505,7 +2505,7 @@ static void node_link_insert_offset_ntree(NodeInsertOfsData *iofsd,
node_offset_apply(*offs_node, addval);
}
else if (!insert.parent && offs_node->parent) {
node_offset_apply(*nodeFindRootParent(offs_node), addval);
node_offset_apply(*blender::bke::nodeFindRootParent(offs_node), addval);
}
margin = addval;
}
@ -2521,9 +2521,9 @@ static void node_link_insert_offset_ntree(NodeInsertOfsData *iofsd,
iofsd->offset_x = margin;
/* flag all parents of insert as offset to prevent them from being offset */
nodeParentsIter(&insert, node_parents_offset_flag_enable_cb, nullptr);
blender::bke::nodeParentsIter(&insert, node_parents_offset_flag_enable_cb, nullptr);
/* iterate over entire chain and apply offsets */
nodeChainIter(ntree,
blender::bke::nodeChainIter(ntree,
right_alignment ? next : prev,
node_link_insert_offset_chain_cb,
iofsd,

View File

@ -21,7 +21,7 @@
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_workspace.h"

View File

@ -235,7 +235,7 @@ static void node_socket_add_replace(const bContext *C,
}
else {
sock_from_tmp = (bNodeSocket *)BLI_findlink(&node_from->outputs, item->socket_index);
nodePositionRelative(node_from, node_to, sock_from_tmp, sock_to);
blender::bke::nodePositionRelative(node_from, node_to, sock_from_tmp, sock_to);
}
node_link_item_apply(ntree, node_from, item);
@ -467,7 +467,7 @@ static void ui_node_sock_name(const bNodeTree *ntree,
bNode *node = sock->link->fromnode;
char node_name[UI_MAX_NAME_STR];
nodeLabel(ntree, node, node_name, sizeof(node_name));
blender::bke::nodeLabel(ntree, node, node_name, sizeof(node_name));
if (BLI_listbase_is_empty(&node->inputs) && node->outputs.first != node->outputs.last) {
BLI_snprintf(
@ -833,7 +833,7 @@ static void ui_node_draw_input(
sub = uiLayoutRow(sub, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
uiItemL(sub, IFACE_(nodeSocketLabel(&input)), ICON_NONE);
uiItemL(sub, IFACE_(blender::bke::nodeSocketLabel(&input)), ICON_NONE);
}
if (dependency_loop) {

View File

@ -15,7 +15,7 @@
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_screen.h"

View File

@ -18,7 +18,7 @@
#include "BKE_gpencil_legacy.h"
#include "BKE_lib_id.h"
#include "BKE_lib_remap.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_screen.h"

View File

@ -39,7 +39,7 @@
#include "BKE_main.h"
#include "BKE_main_namemap.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_report.h"

View File

@ -14,7 +14,7 @@
#include "BLI_rect.h"
#include "BKE_context.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_report.h"
@ -48,7 +48,7 @@ static void create_transform_data_for_node(TransData &td,
/* account for parents (nested nodes) */
if (node.parent) {
nodeToView(node.parent,
blender::bke::nodeToView(node.parent,
node.locx + roundf(node.offsetx),
node.locy + roundf(node.offsety),
&locx,
@ -249,7 +249,7 @@ static void flushTransNodes(TransInfo *t)
/* account for parents (nested nodes) */
if (node->parent) {
nodeFromView(node->parent,
blender::bke::nodeFromView(node->parent,
loc[0] - roundf(node->offsetx),
loc[1] - roundf(node->offsety),
&node->locx,

View File

@ -25,7 +25,7 @@
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_scene.h"
#include "BKE_undo_system.h"

View File

@ -36,7 +36,7 @@
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_tree_update.h"
#include "BKE_object.h"
#include "BKE_scene.h"

View File

@ -11,7 +11,7 @@
#include "StrokeRenderer.h"
#include "BKE_global.h"
#include "BKE_node.h"
#include "BKE_node.hh"
namespace Freestyle {

View File

@ -17,7 +17,7 @@
#include "BKE_global.h"
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_subdiv_ccg.h"

View File

@ -42,7 +42,7 @@
#include "BKE_mesh.hh"
#include "BKE_mesh_legacy_convert.h"
#include "BKE_mesh_runtime.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_scene.h"

View File

@ -19,7 +19,7 @@
#include "BKE_lib_id.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BKE_world.h"

View File

@ -10,7 +10,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_tree_update.h"
#include "BLI_fileops.h"

View File

@ -8,7 +8,7 @@
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "IMB_colormanagement.h"

View File

@ -22,7 +22,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BLI_fileops.h"
#include "BLI_math.h"
#include "BLI_math_vector_types.hh"

View File

@ -5,7 +5,7 @@
*/
#include "BKE_image.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BLI_map.hh"

View File

@ -6,7 +6,7 @@
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BLI_map.hh"
#include "BLI_math_vector.h"

View File

@ -37,7 +37,7 @@
#include "BKE_idtype.h"
#include "BKE_lib_override.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_report.h"
#include "DEG_depsgraph.h"

View File

@ -17,7 +17,7 @@
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "BKE_tracking.h"
@ -96,7 +96,7 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree)
static void local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
{
/* move over the compbufs and previews */
BKE_node_preview_merge_tree(ntree, localtree, true);
blender::bke::node_preview_merge_tree(ntree, localtree, true);
for (bNode *lnode = (bNode *)localtree->nodes.first; lnode; lnode = lnode->next) {
if (bNode *orig_node = nodeFindNodebyName(ntree, lnode->name)) {

View File

@ -30,7 +30,7 @@ void cmp_node_update_default(bNodeTree * /*ntree*/, bNode *node)
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
{
node_type_base(ntype, type, name, nclass);
blender::bke::node_type_base(ntype, type, name, nclass);
ntype->poll = cmp_node_poll_default;
ntype->updatefunc = cmp_node_update_default;

View File

@ -106,7 +106,7 @@ void register_node_type_cmp_antialiasing()
ntype.declare = file_ns::cmp_node_antialiasing_declare;
ntype.draw_buttons = file_ns::node_composit_buts_antialiasing;
ntype.flag |= NODE_PREVIEW;
node_type_size(&ntype, 170, 140, 200);
blender::bke::node_type_size(&ntype, 170, 140, 200);
ntype.initfunc = file_ns::node_composit_init_antialiasing;
node_type_storage(
&ntype, "NodeAntiAliasingData", node_free_standard_storage, node_copy_standard_storage);

View File

@ -209,7 +209,7 @@ void register_node_type_cmp_colorbalance()
ntype.declare = file_ns::cmp_node_colorbalance_declare;
ntype.draw_buttons = file_ns::node_composit_buts_colorbalance;
ntype.draw_buttons_ex = file_ns::node_composit_buts_colorbalance_ex;
node_type_size(&ntype, 400, 200, 400);
blender::bke::node_type_size(&ntype, 400, 200, 400);
ntype.initfunc = file_ns::node_composit_init_colorbalance;
node_type_storage(
&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage);

View File

@ -352,7 +352,7 @@ void register_node_type_cmp_colorcorrection()
ntype.declare = file_ns::cmp_node_colorcorrection_declare;
ntype.draw_buttons = file_ns::node_composit_buts_colorcorrection;
ntype.draw_buttons_ex = file_ns::node_composit_buts_colorcorrection_ex;
node_type_size(&ntype, 400, 200, 600);
blender::bke::node_type_size(&ntype, 400, 200, 600);
ntype.initfunc = file_ns::node_composit_init_colorcorrection;
node_type_storage(
&ntype, "NodeColorCorrection", node_free_standard_storage, node_copy_standard_storage);

View File

@ -11,7 +11,7 @@
#include "node_common.h"
#include "node_composite_util.hh"
#include "BKE_node.h"
#include "BKE_node.hh"
#include "RNA_access.h"
@ -30,7 +30,7 @@ void register_node_type_cmp_group()
BLI_assert(ntype.rna_ext.srna != nullptr);
RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype);
node_type_size(&ntype, 140, 60, 400);
blender::bke::node_type_size(&ntype, 140, 60, 400);
ntype.labelfunc = node_group_label;
ntype.declare_dynamic = blender::nodes::node_group_declare_dynamic;

View File

@ -80,7 +80,7 @@ void register_node_type_cmp_convert_color_space(void)
&ntype, CMP_NODE_CONVERT_COLOR_SPACE, "Convert Colorspace", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::CMP_NODE_CONVERT_COLOR_SPACE_declare;
ntype.draw_buttons = file_ns::node_composit_buts_convert_colorspace;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
blender::bke::node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
ntype.initfunc = file_ns::node_composit_init_convert_colorspace;
node_type_storage(
&ntype, "NodeConvertColorSpace", node_free_standard_storage, node_copy_standard_storage);

View File

@ -334,9 +334,9 @@ void register_node_type_cmp_cryptomatte()
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE, "Cryptomatte", NODE_CLASS_MATTE);
node_type_socket_templates(
blender::bke::node_type_socket_templates(
&ntype, file_ns::cmp_node_cryptomatte_in, file_ns::cmp_node_cryptomatte_out);
node_type_size(&ntype, 240, 100, 700);
blender::bke::node_type_size(&ntype, 240, 100, 700);
ntype.initfunc = file_ns::node_init_cryptomatte;
ntype.initfunc_api = file_ns::node_init_api_cryptomatte;
ntype.poll = file_ns::node_poll_cryptomatte;
@ -426,7 +426,7 @@ void register_node_type_cmp_cryptomatte_legacy()
cmp_node_type_base(
&ntype, CMP_NODE_CRYPTOMATTE_LEGACY, "Cryptomatte (Legacy)", NODE_CLASS_MATTE);
node_type_socket_templates(&ntype, nullptr, file_ns::cmp_node_cryptomatte_out);
blender::bke::node_type_socket_templates(&ntype, nullptr, file_ns::cmp_node_cryptomatte_out);
ntype.initfunc = legacy_file_ns::node_init_cryptomatte_legacy;
node_type_storage(
&ntype, "NodeCryptomatte", file_ns::node_free_cryptomatte, file_ns::node_copy_cryptomatte);

View File

@ -99,7 +99,7 @@ void register_node_type_cmp_curve_time()
cmp_node_type_base(&ntype, CMP_NODE_TIME, "Time Curve", NODE_CLASS_INPUT);
ntype.declare = file_ns::cmp_node_time_declare;
node_type_size(&ntype, 200, 140, 320);
blender::bke::node_type_size(&ntype, 200, 140, 320);
ntype.initfunc = file_ns::node_composit_init_curves_time;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
@ -194,7 +194,7 @@ void register_node_type_cmp_curve_vec()
cmp_node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::cmp_node_curve_vec_declare;
ntype.draw_buttons = file_ns::node_buts_curvevec;
node_type_size(&ntype, 200, 140, 320);
blender::bke::node_type_size(&ntype, 200, 140, 320);
ntype.initfunc = file_ns::node_composit_init_curve_vec;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
@ -332,7 +332,7 @@ void register_node_type_cmp_curve_rgb()
cmp_node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_rgbcurves_declare;
node_type_size(&ntype, 200, 140, 320);
blender::bke::node_type_size(&ntype, 200, 140, 320);
ntype.initfunc = file_ns::node_composit_init_curve_rgb;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;

View File

@ -163,7 +163,7 @@ void register_node_type_cmp_ellipsemask()
cmp_node_type_base(&ntype, CMP_NODE_MASK_ELLIPSE, "Ellipse Mask", NODE_CLASS_MATTE);
ntype.declare = file_ns::cmp_node_ellipsemask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_ellipsemask;
node_type_size(&ntype, 260, 110, 320);
blender::bke::node_type_size(&ntype, 260, 110, 320);
ntype.initfunc = file_ns::node_composit_init_ellipsemask;
node_type_storage(
&ntype, "NodeEllipseMask", node_free_standard_storage, node_copy_standard_storage);

Some files were not shown because too many files have changed in this diff Show More