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/intern')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c18
-rw-r--r--source/blender/blenloader/intern/readfile.c32
-rw-r--r--source/blender/blenloader/intern/runtime.c4
-rw-r--r--source/blender/blenloader/intern/writefile.c22
4 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index e917ccdf342..e9caa337129 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -175,7 +175,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
else if (bhead->code == DATA) {
if (looking) {
if (bhead->SDNAnr == DNA_struct_find_nr(fd->filesdna, "PreviewImage") ) {
- prv = BLO_library_read_struct(fd, bhead, "PreviewImage");
+ prv = BLO_library_read_struct(fd, bhead, "PreviewImage");
if (prv) {
memcpy(new_prv, prv, sizeof(PreviewImage));
if (prv->rect[0]) {
@@ -183,7 +183,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
new_prv->rect[0] = MEM_callocN(new_prv->w[0] * new_prv->h[0] * sizeof(unsigned int), "prvrect");
bhead = blo_nextbhead(fd, bhead);
rect = (unsigned int *)(bhead + 1);
- memcpy(new_prv->rect[0], rect, bhead->len);
+ memcpy(new_prv->rect[0], rect, bhead->len);
}
else {
new_prv->rect[0] = NULL;
@@ -194,7 +194,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
new_prv->rect[1] = MEM_callocN(new_prv->w[1] * new_prv->h[1] * sizeof(unsigned int), "prvrect");
bhead = blo_nextbhead(fd, bhead);
rect = (unsigned int *)(bhead + 1);
- memcpy(new_prv->rect[1], rect, bhead->len);
+ memcpy(new_prv->rect[1], rect, bhead->len);
}
else {
new_prv->rect[1] = NULL;
@@ -265,10 +265,10 @@ BlendFileData *BLO_read_from_file(const char *filepath, ReportList *reports)
if (fd) {
fd->reports = reports;
bfd = blo_read_file_internal(fd, filepath);
- blo_freefiledata(fd);
+ blo_freefiledata(fd);
}
- return bfd;
+ return bfd;
}
BlendFileData *BLO_read_from_memory(void *mem, int memsize, ReportList *reports)
@@ -280,10 +280,10 @@ BlendFileData *BLO_read_from_memory(void *mem, int memsize, ReportList *reports)
if (fd) {
fd->reports = reports;
bfd = blo_read_file_internal(fd, "");
- blo_freefiledata(fd);
+ blo_freefiledata(fd);
}
- return bfd;
+ return bfd;
}
BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFile *memfile, ReportList *reports)
@@ -332,10 +332,10 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil
}
blo_join_main(&mainlist);
- blo_freefiledata(fd);
+ blo_freefiledata(fd);
}
- return bfd;
+ return bfd;
}
void BLO_blendfiledata_free(BlendFileData *bfd)
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 42c90a6c0e5..7ba189d2a36 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -982,7 +982,7 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports)
blo_freefiledata(fd);
fd = NULL;
}
- }
+ }
else {
BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', not a blend file", fd->relabase);
blo_freefiledata(fd);
@@ -1129,7 +1129,7 @@ int BLO_is_a_library(const char *path, char *dir, char *group)
/* the last part of the dir is a .blend file, no group follows */
*fd = '/'; /* put back the removed slash separating the dir and the .blend file name */
}
- else {
+ else {
char *gp = fd + 1; // in case we have a .blend file, gp points to the group
/* Find the last slash */
@@ -1824,7 +1824,7 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
DRIVER_TARGETS_LOOPER(dvar)
- {
+ {
/* only relink if still used */
if (tarIndex < dvar->num_targets)
dtar->id = newlibadr(fd, id->lib, dtar->id);
@@ -3046,7 +3046,7 @@ static void lib_link_curve(FileData *fd, Main *main)
cu->taperobj = newlibadr(fd, cu->id.lib, cu->taperobj);
cu->textoncurve = newlibadr(fd, cu->id.lib, cu->textoncurve);
cu->vfont = newlibadr_us(fd, cu->id.lib, cu->vfont);
- cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb);
+ cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb);
cu->vfonti = newlibadr_us(fd, cu->id.lib, cu->vfonti);
cu->vfontbi = newlibadr_us(fd, cu->id.lib, cu->vfontbi);
@@ -3080,7 +3080,7 @@ static void direct_link_curve(FileData *fd, Curve *cu)
cu->mat = newdataadr(fd, cu->mat);
test_pointer_array(fd, (void **)&cu->mat);
cu->str = newdataadr(fd, cu->str);
- cu->strinfo= newdataadr(fd, cu->strinfo);
+ cu->strinfo= newdataadr(fd, cu->strinfo);
cu->tb = newdataadr(fd, cu->tb);
if (cu->vfont == NULL) link_list(fd, &(cu->nurb));
@@ -3091,14 +3091,14 @@ static void direct_link_curve(FileData *fd, Curve *cu)
if (cu->tb) {
memcpy(tb, cu->tb, cu->totbox*sizeof(TextBox));
MEM_freeN(cu->tb);
- cu->tb = tb;
+ cu->tb = tb;
}
else {
cu->totbox = 1;
cu->actbox = 1;
cu->tb = tb;
cu->tb[0].w = cu->linewidth;
- }
+ }
if (cu->wordspace == 0.0f) cu->wordspace = 1.0f;
}
@@ -3263,7 +3263,7 @@ static const char *ptcache_data_struct[] = {
"", // BPHYS_DATA_ROTATION
"", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
"", // BPHYS_DATA_SIZE:
- "", // BPHYS_DATA_TIMES:
+ "", // BPHYS_DATA_TIMES:
"BoidData" // case BPHYS_DATA_BOIDS:
};
static void direct_link_pointcache(FileData *fd, PointCache *cache)
@@ -3373,7 +3373,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
/* special case for only one object in the group */
index_ok = 1;
}
- else {
+ else {
for (; dw; dw=dw->next) {
if (dw->index > 0) {
index_ok = 1;
@@ -3610,7 +3610,7 @@ static void lib_link_mtface(FileData *fd, Mesh *me, MTFace *mtface, int totface)
static void lib_link_customdata_mtface(FileData *fd, Mesh *me, CustomData *fdata, int totface)
{
- int i;
+ int i;
for (i = 0; i < fdata->totlayer; i++) {
CustomDataLayer *layer = &fdata->layers[i];
@@ -4059,7 +4059,7 @@ static void lib_link_object(FileData *fd, Main *main)
if (paf->type == EFF_PARTICLE) {
paf->group = newlibadr_us(fd, ob->id.lib, paf->group);
}
- }
+ }
for (sens = ob->sensors.first; sens; sens = sens->next) {
for (a = 0; a < sens->totlinks; a++)
@@ -4591,7 +4591,7 @@ static void direct_link_object(FileData *fd, Object *ob)
direct_link_partdeflect(ob->pd);
ob->soft= newdataadr(fd, ob->soft);
if (ob->soft) {
- SoftBody *sb = ob->soft;
+ SoftBody *sb = ob->soft;
sb->bpoint = NULL; // init pointers so it gets rebuilt nicely
sb->bspring = NULL;
@@ -5034,7 +5034,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
ed->seqbasep = (ListBase *)(poin+offset);
else
ed->seqbasep = &ed->seqbase;
- }
+ }
/* stack */
link_list(fd, &(ed->metastack));
@@ -5068,7 +5068,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
}
if (sce->r.ffcodecdata.properties) {
sce->r.ffcodecdata.properties = newdataadr(fd, sce->r.ffcodecdata.properties);
- if (sce->r.ffcodecdata.properties) {
+ if (sce->r.ffcodecdata.properties) {
IDP_DirectLinkProperty(sce->r.ffcodecdata.properties,
(fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
@@ -8801,7 +8801,7 @@ static void expand_curve(FileData *fd, Main *mainvar, Curve *cu)
}
expand_doit(fd, mainvar, cu->vfont);
- expand_doit(fd, mainvar, cu->vfontb);
+ expand_doit(fd, mainvar, cu->vfontb);
expand_doit(fd, mainvar, cu->vfonti);
expand_doit(fd, mainvar, cu->vfontbi);
expand_doit(fd, mainvar, cu->key);
@@ -9623,7 +9623,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) {
blo_freefiledata(*fd);
*fd = NULL;
- }
+ }
}
void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag)
diff --git a/source/blender/blenloader/intern/runtime.c b/source/blender/blenloader/intern/runtime.c
index 4136f71f050..5d8a865eea8 100644
--- a/source/blender/blenloader/intern/runtime.c
+++ b/source/blender/blenloader/intern/runtime.c
@@ -91,7 +91,7 @@ cleanup:
if (fd != -1)
close(fd);
- return res;
+ return res;
}
BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
@@ -126,7 +126,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (not a blend file)", path);
goto cleanup;
}
- else {
+ else {
//printf("starting to read runtime from %s at datastart %d\n", path, datastart);
lseek(fd, datastart, SEEK_SET);
bfd = blo_read_blendafterruntime(fd, path, actualsize - datastart, reports);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 281cc4d01c3..ad83b426c51 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -511,7 +511,7 @@ static void write_fcurves(WriteData *wd, ListBase *fcurves)
writestruct(wd, DATA, "FCurve", 1, fcu);
/* curve data */
- if (fcu->bezt)
+ if (fcu->bezt)
writestruct(wd, DATA, "BezTriple", fcu->totvert, fcu->bezt);
if (fcu->fpt)
writestruct(wd, DATA, "FPoint", fcu->totvert, fcu->fpt);
@@ -888,7 +888,7 @@ static const char *ptcache_data_struct[] = {
"", // BPHYS_DATA_ROTATION
"", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
"", // BPHYS_DATA_SIZE:
- "", // BPHYS_DATA_TIMES:
+ "", // BPHYS_DATA_TIMES:
"BoidData" // case BPHYS_DATA_BOIDS:
};
static const char *ptcache_extra_struct[] = {
@@ -1329,7 +1329,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "ClothCollSettings", 1, clmd->coll_parms);
writestruct(wd, DATA, "EffectorWeights", 1, clmd->sim_parms->effector_weights);
write_pointcaches(wd, &clmd->ptcaches);
- }
+ }
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
@@ -1359,7 +1359,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "SmokeFlowSettings", 1, smd->flow);
else if (smd->type & MOD_SMOKE_TYPE_COLL)
writestruct(wd, DATA, "SmokeCollSettings", 1, smd->coll);
- }
+ }
else if (md->type==eModifierType_Fluidsim) {
FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
@@ -1387,7 +1387,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->paint_ramp);
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->vel_ramp);
}
- }
+ }
else if (md->type==eModifierType_Collision) {
#if 0
@@ -1607,7 +1607,7 @@ static void write_curves(WriteData *wd, ListBase *idbase)
if (cu->vfont) {
writedata(wd, DATA, amount_of_chars(cu->str)+1, cu->str);
writestruct(wd, DATA, "CharInfo", cu->len+1, cu->strinfo);
- writestruct(wd, DATA, "TextBox", cu->totbox, cu->tb);
+ writestruct(wd, DATA, "TextBox", cu->totbox, cu->tb);
}
else {
/* is also the order of reading */
@@ -2025,7 +2025,7 @@ static void write_materials(WriteData *wd, ListBase *idbase)
write_nodetree(wd, ma->nodetree);
}
- write_previews(wd, ma->preview);
+ write_previews(wd, ma->preview);
}
ma= ma->id.next;
}
@@ -2081,7 +2081,7 @@ static void write_lamps(WriteData *wd, ListBase *idbase)
}
if (la->curfalloff)
- write_curvemapping(wd, la->curfalloff);
+ write_curvemapping(wd, la->curfalloff);
/* nodetree is integral part of lamps, no libdata */
if (la->nodetree) {
@@ -2304,7 +2304,7 @@ static void write_gpencils(WriteData *wd, ListBase *lb)
/* write strokes */
for (gps= gpf->strokes.first; gps; gps= gps->next) {
writestruct(wd, DATA, "bGPDstroke", 1, gps);
- writestruct(wd, DATA, "bGPDspoint", gps->totpoints, gps->points);
+ writestruct(wd, DATA, "bGPDspoint", gps->totpoints, gps->points);
}
}
}
@@ -2999,7 +2999,7 @@ static int do_history(const char *name, ReportList *reports)
if (BLI_rename(tempname1, tempname2)) {
BKE_report(reports, RPT_ERROR, "Unable to make version backup");
return 1;
- }
+ }
hisnr--;
}
@@ -3074,7 +3074,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
/* file save to temporary file was successful */
/* now do reverse file history (move .blend1 -> .blend2, .blend -> .blend1) */
- if (write_flags & G_FILE_HISTORY) {
+ if (write_flags & G_FILE_HISTORY) {
int err_hist = do_history(filepath, reports);
if (err_hist) {
BKE_report(reports, RPT_ERROR, "Version backup failed (file saved with @)");