Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht>2020-03-03 19:21:28 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-03 19:34:21 +0300
commit2841b2be3949b7592b50cd2ebd03b9b32a5f2058 (patch)
tree36b583a61bdf14150b8061d3f349610d781696de /source/blender/blenkernel
parent19785b96c43f6dc19906f4b39a18a656684826b1 (diff)
IDs: change FILTER_ID_* to 64 bit to make space for new ID types
And change file browser to boolean from bitflag enum, which is only 32 bit. Differential Revision: https://developer.blender.org/D7004
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_blender_copybuffer.h6
-rw-r--r--source/blender/blenkernel/BKE_idcode.h6
-rw-r--r--source/blender/blenkernel/intern/blender_copybuffer.c4
-rw-r--r--source/blender/blenkernel/intern/idcode.c4
4 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_blender_copybuffer.h b/source/blender/blenkernel/BKE_blender_copybuffer.h
index fcc30ffc20d..ca20d3d9bba 100644
--- a/source/blender/blenkernel/BKE_blender_copybuffer.h
+++ b/source/blender/blenkernel/BKE_blender_copybuffer.h
@@ -20,6 +20,8 @@
* \ingroup bke
*/
+#include "BLI_sys_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -36,12 +38,12 @@ bool BKE_copybuffer_save(struct Main *bmain_src, const char *filename, struct Re
bool BKE_copybuffer_read(struct Main *bmain_dst,
const char *libname,
struct ReportList *reports,
- const unsigned int id_types_mask);
+ const uint64_t id_types_mask);
int BKE_copybuffer_paste(struct bContext *C,
const char *libname,
const short flag,
struct ReportList *reports,
- const unsigned int id_types_mask);
+ const uint64_t id_types_mask);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_idcode.h b/source/blender/blenkernel/BKE_idcode.h
index dc58651b4e8..067143e3253 100644
--- a/source/blender/blenkernel/BKE_idcode.h
+++ b/source/blender/blenkernel/BKE_idcode.h
@@ -24,6 +24,8 @@
* \ingroup bke
*/
+#include "BLI_sys_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -35,8 +37,8 @@ short BKE_idcode_from_name(const char *name);
bool BKE_idcode_is_linkable(short idcode);
bool BKE_idcode_is_valid(short idcode);
-int BKE_idcode_to_idfilter(const short idcode);
-short BKE_idcode_from_idfilter(const int idfilter);
+uint64_t BKE_idcode_to_idfilter(const short idcode);
+short BKE_idcode_from_idfilter(const uint64_t idfilter);
int BKE_idcode_to_index(const short idcode);
short BKE_idcode_from_index(const int index);
diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c
index f78eefa0a27..8619db34d93 100644
--- a/source/blender/blenkernel/intern/blender_copybuffer.c
+++ b/source/blender/blenkernel/intern/blender_copybuffer.c
@@ -84,7 +84,7 @@ bool BKE_copybuffer_save(Main *bmain_src, const char *filename, ReportList *repo
bool BKE_copybuffer_read(Main *bmain_dst,
const char *libname,
ReportList *reports,
- const unsigned int id_types_mask)
+ const uint64_t id_types_mask)
{
BlendHandle *bh = BLO_blendhandle_from_file(libname, reports);
if (bh == NULL) {
@@ -117,7 +117,7 @@ int BKE_copybuffer_paste(bContext *C,
const char *libname,
const short flag,
ReportList *reports,
- const unsigned int id_types_mask)
+ const uint64_t id_types_mask)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c
index 6b7cb181374..b9ca77ceb67 100644
--- a/source/blender/blenkernel/intern/idcode.c
+++ b/source/blender/blenkernel/intern/idcode.c
@@ -179,7 +179,7 @@ short BKE_idcode_from_name(const char *name)
/**
* Convert an idcode into an idfilter (e.g. ID_OB -> FILTER_ID_OB).
*/
-int BKE_idcode_to_idfilter(const short idcode)
+uint64_t BKE_idcode_to_idfilter(const short idcode)
{
#define CASE_IDFILTER(_id) \
case ID_##_id: \
@@ -227,7 +227,7 @@ int BKE_idcode_to_idfilter(const short idcode)
/**
* Convert an idfilter into an idcode (e.g. FILTER_ID_OB -> ID_OB).
*/
-short BKE_idcode_from_idfilter(const int idfilter)
+short BKE_idcode_from_idfilter(const uint64_t idfilter)
{
#define CASE_IDFILTER(_id) \
case FILTER_ID_##_id: \