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:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/BLO_readfile.h14
-rw-r--r--source/blender/blenloader/intern/readblenentry.c9
-rw-r--r--source/blender/blenloader/intern/readfile.c20
-rw-r--r--source/blender/blenloader/intern/undofile.c2
-rw-r--r--source/blender/blenloader/intern/versioning_260.c2
5 files changed, 32 insertions, 15 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 11f34732cfc..5a1c479f450 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -48,6 +48,7 @@ struct View3D;
struct bContext;
struct BHead;
struct FileData;
+struct BlendFileReadParams;
typedef struct BlendHandle BlendHandle;
@@ -71,6 +72,10 @@ typedef struct BlendFileData {
eBlenFileType type;
} BlendFileData;
+struct BlendFileReadParams {
+ uint skip_flags : 2; /* eBLOReadSkip */
+ uint is_startup : 1;
+};
/* skip reading some data-block types (may want to skip screen data too). */
typedef enum eBLOReadSkip {
@@ -83,13 +88,16 @@ typedef enum eBLOReadSkip {
BlendFileData *BLO_read_from_file(
const char *filepath,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
BlendFileData *BLO_read_from_memory(
const void *mem, int memsize,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
BlendFileData *BLO_read_from_memfile(
struct Main *oldmain, const char *filename, struct MemFile *memfile,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
void BLO_blendfiledata_free(BlendFileData *bfd);
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 7488d62bb3c..b2bcf745eac 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -319,7 +319,8 @@ void BLO_blendhandle_close(BlendHandle *bh)
*/
BlendFileData *BLO_read_from_file(
const char *filepath,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
@@ -346,7 +347,8 @@ BlendFileData *BLO_read_from_file(
*/
BlendFileData *BLO_read_from_memory(
const void *mem, int memsize,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
@@ -370,7 +372,8 @@ BlendFileData *BLO_read_from_memory(
*/
BlendFileData *BLO_read_from_memfile(
Main *oldmain, const char *filename, MemFile *memfile,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 08a45f367f4..657495e763e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4517,12 +4517,12 @@ static void lib_link_mesh(FileData *fd, Main *main)
/*
* Re-tessellate, even if the polys were just created from tessfaces, this
* is important because it:
- * - fill the CD_ORIGINDEX layer
- * - gives consistency of tessface between loading from a file and
- * converting an edited BMesh back into a mesh (i.e. it replaces
- * quad tessfaces in a loaded mesh immediately, instead of lazily
- * waiting until edit mode has been entered/exited, making it easier
- * to recognize problems that would otherwise only show up after edits).
+ * - fill the CD_ORIGINDEX layer
+ * - gives consistency of tessface between loading from a file and
+ * converting an edited BMesh back into a mesh (i.e. it replaces
+ * quad tessfaces in a loaded mesh immediately, instead of lazily
+ * waiting until edit mode has been entered/exited, making it easier
+ * to recognize problems that would otherwise only show up after edits).
*/
#ifdef USE_TESSFACE_DEFAULT
BKE_mesh_tessface_calc(me);
@@ -5683,7 +5683,13 @@ static void direct_link_object(FileData *fd, Object *ob)
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
if (ob->sculpt) {
- ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ if (ob->mode & OB_MODE_ALL_SCULPT) {
+ ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ ob->sculpt->mode_type = ob->mode;
+ }
+ else {
+ ob->sculpt = NULL;
+ }
}
link_list(fd, &ob->lodlevels);
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 614a3be559b..37cd69b72f2 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -130,7 +130,7 @@ void memfile_chunk_add(
struct Main *BLO_memfile_main_get(struct MemFile *memfile, struct Main *oldmain, struct Scene **r_scene)
{
struct Main *bmain_undo = NULL;
- BlendFileData *bfd = BLO_read_from_memfile(oldmain, BKE_main_blendfile_path(oldmain), memfile, NULL, BLO_READ_SKIP_NONE);
+ BlendFileData *bfd = BLO_read_from_memfile(oldmain, BKE_main_blendfile_path(oldmain), memfile, BLO_READ_SKIP_NONE, NULL);
if (bfd) {
bmain_undo = bfd->main;
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 13b7b7c1559..c5062ed1e16 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -400,7 +400,7 @@ static void do_versions_nodetree_image_layer_2_64_5(bNodeTree *ntree)
NodeImageLayer *output = MEM_callocN(sizeof(NodeImageLayer), "node image layer");
/* take pass index both from current storage ptr (actually an int) */
- output->pass_index = GET_INT_FROM_POINTER(sock->storage);
+ output->pass_index = POINTER_AS_INT(sock->storage);
/* replace socket data pointer */
sock->storage = output;