Blender  V2.93
BKE_lib_remap.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 #pragma once
17 
35 #include "BLI_compiler_attrs.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /* BKE_libblock_free, delete are declared in BKE_lib_id.h for convenience. */
42 
43 /* Also IDRemap->flag. */
44 enum {
88 };
89 
90 /* Note: Requiring new_id to be non-null, this *may* not be the case ultimately,
91  * but makes things simpler for now. */
92 void BKE_libblock_remap_locked(struct Main *bmain,
93  void *old_idv,
94  void *new_idv,
95  const short remap_flags) ATTR_NONNULL(1, 2);
96 void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, const short remap_flags)
97  ATTR_NONNULL(1, 2);
98 
99 void BKE_libblock_unlink(struct Main *bmain,
100  void *idv,
101  const bool do_flag_never_null,
102  const bool do_skip_indirect) ATTR_NONNULL();
103 
104 void BKE_libblock_relink_ex(struct Main *bmain,
105  void *idv,
106  void *old_idv,
107  void *new_idv,
108  const short remap_flags) ATTR_NONNULL(1, 2);
109 
110 void BKE_libblock_relink_to_newid(struct ID *id) ATTR_NONNULL();
111 
112 typedef void (*BKE_library_free_notifier_reference_cb)(const void *);
113 typedef void (*BKE_library_remap_editor_id_reference_cb)(struct ID *, struct ID *);
114 
118 
119 #ifdef __cplusplus
120 }
121 #endif
void void void BKE_libblock_unlink(struct Main *bmain, void *idv, const bool do_flag_never_null, const bool do_skip_indirect) ATTR_NONNULL()
Definition: lib_remap.c:573
void BKE_library_callback_remap_editor_id_reference_set(BKE_library_remap_editor_id_reference_cb func)
Definition: lib_remap.c:61
void(* BKE_library_free_notifier_reference_cb)(const void *)
void(* BKE_library_remap_editor_id_reference_cb)(struct ID *, struct ID *)
void void BKE_libblock_relink_to_newid(struct ID *id) ATTR_NONNULL()
Definition: lib_remap.c:702
void void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, const short remap_flags) ATTR_NONNULL(1
void BKE_library_callback_free_notifier_reference_set(BKE_library_free_notifier_reference_cb func)
Definition: lib_remap.c:54
void BKE_libblock_relink_ex(struct Main *bmain, void *idv, void *old_idv, void *new_idv, const short remap_flags) ATTR_NONNULL(1
@ ID_REMAP_SKIP_USER_CLEAR
Definition: BKE_lib_remap.h:80
@ ID_REMAP_FORCE_INTERNAL_RUNTIME_POINTERS
Definition: BKE_lib_remap.h:87
@ ID_REMAP_SKIP_OVERRIDE_LIBRARY
Definition: BKE_lib_remap.h:78
@ ID_REMAP_SKIP_NEVER_NULL_USAGE
Definition: BKE_lib_remap.h:55
@ ID_REMAP_FLAG_NEVER_NULL_USAGE
Definition: BKE_lib_remap.h:60
@ ID_REMAP_SKIP_INDIRECT_USAGE
Definition: BKE_lib_remap.h:46
@ ID_REMAP_FORCE_NEVER_NULL_USAGE
Definition: BKE_lib_remap.h:67
@ ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE
Definition: BKE_lib_remap.h:76
void BKE_libblock_remap_locked(struct Main *bmain, void *old_idv, void *new_idv, const short remap_flags) ATTR_NONNULL(1
#define ATTR_NONNULL(...)
Definition: DNA_ID.h:273
Definition: BKE_main.h:116