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:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-08-22 13:31:32 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-08-22 13:31:32 +0400
commit5dafc1a5530466c421c2c80eb2f06ba34bd21cb9 (patch)
tree859b64e4181fb48ac189219cf205fdde7de92de0 /source/blender/blenloader/intern
parentc5d902133f03c6740aea6801940b022f615ca0d5 (diff)
parenteab746fc5facc02e9885570c1f05e753278cbc33 (diff)
svn merge -r 16060:16222 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/genfile.c10
-rw-r--r--source/blender/blenloader/intern/readblenentry.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c62
-rw-r--r--source/blender/blenloader/intern/writefile.c4
4 files changed, 31 insertions, 49 deletions
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c
index 87c859de839..86338ca9e89 100644
--- a/source/blender/blenloader/intern/genfile.c
+++ b/source/blender/blenloader/intern/genfile.c
@@ -58,6 +58,8 @@
#include "genfile.h"
+#include "BLO_sys_types.h" // for intptr_t support
+
/* gcc 4.1 on mingw was complaining that __int64 was alredy defined
actually is saw the line below as typedef long long long long...
Anyhow, since its alredy defined, its safe to do an ifndef here- Cambpell*/
@@ -315,7 +317,7 @@ static void init_structDNA(struct SDNA *sdna, int do_endian_swap)
/* in sdna->data the data, now we convert that to something understandable */
{
int *data, *verg;
- long nr;
+ intptr_t nr;
short *sp;
char str[8], *cp;
@@ -351,7 +353,7 @@ static void init_structDNA(struct SDNA *sdna, int do_endian_swap)
cp++;
nr++;
}
- nr= (long)cp; /* prevent BUS error */
+ nr= (intptr_t)cp; /* prevent BUS error */
nr= (nr+3) & ~3;
cp= (char *)nr;
@@ -389,7 +391,7 @@ static void init_structDNA(struct SDNA *sdna, int do_endian_swap)
cp++;
nr++;
}
- nr= (long)cp; /* prevent BUS error */
+ nr= (intptr_t)cp; /* prevent BUS error */
nr= (nr+3) & ~3;
cp= (char *)nr;
@@ -1098,7 +1100,7 @@ int dna_elem_offset(struct SDNA *sdna, char *stype, char *vartype, char *name)
int SDNAnr= dna_findstruct_nr(sdna, stype);
short *spo= sdna->structs[SDNAnr];
char *cp= find_elem(sdna, vartype, name, spo, NULL, NULL);
- return (int)((long)cp);
+ return (int)((intptr_t)cp);
}
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index f56b261efe2..5a75b5c8b11 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -63,6 +63,8 @@
#include "BLO_readblenfile.h"
+#include "BLO_sys_types.h" // needed for intptr_t
+
/**
* IDType stuff, I plan to move this
* out into its own file + prefix, and
@@ -193,7 +195,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
buf[2]= buf[2]?buf[2]:' ';
buf[3]= buf[3]?buf[3]:' ';
- fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long)bhead->len+sizeof(BHead));
+ fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (intptr_t)bhead->len+sizeof(BHead));
}
}
fprintf(fp, "]\n");
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 8d2fa9036a6..ea226d9c220 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2585,6 +2585,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
{
part->pd= newdataadr(fd, part->pd);
+ part->pd2= newdataadr(fd, part->pd2);
}
static void lib_link_particlesystems(FileData *fd, ID *id, ListBase *particles)
@@ -2945,11 +2946,9 @@ static void lib_link_object(FileData *fd, Main *main)
sens= ob->sensors.first;
while(sens) {
- if(ob->id.lib==NULL) { // done in expand_main
- for(a=0; a<sens->totlinks; a++) {
- sens->links[a]= newglobadr(fd, sens->links[a]);
- }
- }
+ for(a=0; a<sens->totlinks; a++)
+ sens->links[a]= newglobadr(fd, sens->links[a]);
+
if(sens->type==SENS_TOUCH) {
bTouchSensor *ts= sens->data;
ts->ma= newlibadr(fd, ob->id.lib, ts->ma);
@@ -2964,11 +2963,9 @@ static void lib_link_object(FileData *fd, Main *main)
cont= ob->controllers.first;
while(cont) {
- if(ob->id.lib==NULL) { // done in expand_main
- for(a=0; a<cont->totlinks; a++) {
- cont->links[a]= newglobadr(fd, cont->links[a]);
- }
- }
+ for(a=0; a<cont->totlinks; a++)
+ cont->links[a]= newglobadr(fd, cont->links[a]);
+
if(cont->type==CONT_PYTHON) {
bPythonCont *pc= cont->data;
pc->text= newlibadr(fd, ob->id.lib, pc->text);
@@ -3597,9 +3594,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
{
Sequence temp;
char *poin;
- long offset;
+ intptr_t offset;
- offset= ((long)&(temp.seqbase)) - ((long)&temp);
+ offset= ((intptr_t)&(temp.seqbase)) - ((intptr_t)&temp);
/* root pointer */
if(ed->seqbasep == old_seqbasep) {
@@ -4098,7 +4095,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
while(se) {
se->v1= newdataadr(fd, se->v1);
se->v2= newdataadr(fd, se->v2);
- if( (long)se->v1 > (long)se->v2) {
+ if( (intptr_t)se->v1 > (intptr_t)se->v2) {
sv= se->v1;
se->v1= se->v2;
se->v2= sv;
@@ -7738,31 +7735,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
idproperties_fix_group_lengths(main->brush);
idproperties_fix_group_lengths(main->particle);
}
-
- /* only needed until old bad svn/RC1,2 files are saved with a > 17 version -dg */
- if(main->versionfile == 245 && main->subversionfile < 17) {
- ModifierData *md;
- Object *ob;
-
- for(ob = main->object.first; ob; ob= ob->id.next) {
- for(md=ob->modifiers.first; md; ) {
- if(md->type==eModifierType_Cloth) {
- ModifierData *next;
- MEM_freeN(((ClothModifierData *)md)->sim_parms);
- MEM_freeN(((ClothModifierData *)md)->coll_parms);
- MEM_freeN(((ClothModifierData *)md)->point_cache);
- ((ClothModifierData *)md)->sim_parms = NULL;
- ((ClothModifierData *)md)->coll_parms = NULL;
- ((ClothModifierData *)md)->point_cache = NULL;
- next=md->next;
- BLI_remlink(&ob->modifiers, md);
- md = next;
- }
- else
- md = md->next;
- }
- }
- }
/* sun/sky */
if(main->versionfile < 246) {
@@ -7812,6 +7784,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(me=main->mesh.first; me; me= me->id.next)
alphasort_version_246(fd, lib, me);
}
+
+ if(main->versionfile <= 246 && main->subversionfile < 1){
+ Object *ob;
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+ if(ob->pd && (ob->pd->forcefield == PFIELD_WIND))
+ ob->pd->f_noise = 0.0;
+ }
+ }
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
@@ -8529,9 +8509,6 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
sens= ob->sensors.first;
while(sens) {
- for(a=0; a<sens->totlinks; a++) {
- sens->links[a]= newglobadr(fd, sens->links[a]);
- }
if(sens->type==SENS_TOUCH) {
bTouchSensor *ts= sens->data;
expand_doit(fd, mainvar, ts->ma);
@@ -8545,9 +8522,6 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
cont= ob->controllers.first;
while(cont) {
- for(a=0; a<cont->totlinks; a++) {
- cont->links[a]= newglobadr(fd, cont->links[a]);
- }
if(cont->type==CONT_PYTHON) {
bPythonCont *pc= cont->data;
expand_doit(fd, mainvar, pc->text);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index f61c71f7f2f..6bed9e0c415 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -535,6 +535,7 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
writestruct(wd, ID_PA, "ParticleSettings", 1, part);
if (part->id.properties) IDP_WriteProperty(part->id.properties, wd);
writestruct(wd, DATA, "PartDeflect", 1, part->pd);
+ writestruct(wd, DATA, "PartDeflect", 1, part->pd2);
}
part= part->id.next;
}
@@ -608,6 +609,9 @@ static void write_sensors(WriteData *wd, ListBase *lb)
case SENS_ACTUATOR:
writestruct(wd, DATA, "bActuatorSensor", 1, sens->data);
break;
+ case SENS_DELAY:
+ writestruct(wd, DATA, "bDelaySensor", 1, sens->data);
+ break;
case SENS_COLLISION:
writestruct(wd, DATA, "bCollisionSensor", 1, sens->data);
break;