7 #define DNA_DEPRECATED_ALLOW
33 int link_after_region_type)
35 ARegion *link_after_region =
nullptr;
37 if (region->regiontype == region_type) {
40 if (region->regiontype == link_after_region_type) {
41 link_after_region = region;
61 if (
STREQ(idtest->name + 2, name_src)) {
64 if (
STREQ(idtest->name + 2, name_dst)) {
81 if (
STREQ(socket->name, old_name)) {
82 BLI_strncpy(socket->name, new_name,
sizeof(socket->name));
84 if (
STREQ(socket->identifier, old_name)) {
85 BLI_strncpy(socket->identifier, new_name,
sizeof(socket->name));
95 if (!
id.startswith(name)) {
113 const char *old_name,
114 const char *new_name)
117 if (
node->type == node_type) {
126 const char *old_name,
127 const char *new_name)
130 if (
node->type == node_type) {
138 const char *old_name,
139 const char *new_name)
142 if (
node->type == node_type) {
153 const char *identifier,
157 if (sock !=
nullptr) {
166 if (
node->type == node_type) {
168 strcpy(
node->idname, new_name);
175 const int node_tree_type,
177 const int socket_index_orig,
178 const int socket_index_offset,
179 const int total_number_of_sockets)
185 for (
int input_index = total_number_of_sockets - 1; input_index >= socket_index_orig;
193 if (
node->type != node_type) {
197 const size_t node_name_length = strlen(
node->name);
198 const size_t node_name_escaped_max_length = (node_name_length * 2);
199 char *node_name_escaped = (
char *)
MEM_mallocN(node_name_escaped_max_length + 1,
202 char *rna_path_prefix =
BLI_sprintfN(
"nodes[\"%s\"].inputs", node_name_escaped);
204 const int new_index = input_index + socket_index_offset;
206 bmain, owner_id, rna_path_prefix,
nullptr,
nullptr, input_index, new_index,
false);
void BKE_animdata_fix_paths_rename_all_ex(struct Main *bmain, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL()
struct ListBase * which_libbase(struct Main *bmain, short type)
void BKE_main_namemap_remove_name(struct Main *bmain, struct ID *id, const char *name) ATTR_NONNULL()
struct bNodeSocket * nodeAddStaticSocket(struct bNodeTree *ntree, struct bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
#define FOREACH_NODETREE_END
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
#define LISTBASE_FOREACH(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
#define ID_IS_LINKED(_id)
_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.
constexpr bool is_empty() const
constexpr bool startswith(StringRef prefix) const
constexpr int64_t size() const
constexpr StringRef drop_known_prefix(StringRef prefix) const
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void version_node_socket_id_delim(bNodeSocket *socket)
void version_node_socket_index_animdata(Main *bmain, const int node_tree_type, const int node_type, const int socket_index_orig, const int socket_index_offset, const int total_number_of_sockets)
ID * do_versions_rename_id(Main *bmain, const short id_type, const char *name_src, const char *name_dst)
void version_node_input_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
ARegion * do_versions_add_region(int regiontype, const char *name)
void version_node_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
void version_socket_update_is_used(bNodeTree *ntree)
bNodeSocket * version_node_add_socket_if_not_exist(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
ARegion * do_versions_add_region_if_not_found(ListBase *regionbase, int region_type, const char *name, int link_after_region_type)
static void change_node_socket_name(ListBase *sockets, const char *old_name, const char *new_name)
void version_node_output_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
void version_node_id(bNodeTree *ntree, const int node_type, const char *new_name)