projects
/
blender.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b9fe539
)
Bug fix: unbaked particle cache was cleared from current frame onwards on file load.
author
Janne Karhu <jhkarh@gmail.com>
Fri, 7 Jan 2011 17:27:27 +0000
(17:27 +0000)
committer
Janne Karhu <jhkarh@gmail.com>
Fri, 7 Jan 2011 17:27:27 +0000
(17:27 +0000)
source/blender/blenloader/intern/readfile.c
patch
|
blob
|
history
source/blender/makesdna/DNA_modifier_types.h
patch
|
blob
|
history
source/blender/modifiers/intern/MOD_particlesystem.c
patch
|
blob
|
history
diff --git
a/source/blender/blenloader/intern/readfile.c
b/source/blender/blenloader/intern/readfile.c
index 7aca496d9abfd921110f8ca55c97acaf3bc198f6..38476b0bcc22cbd8c7e7393fd331061f809994c0 100644
(file)
--- a/
source/blender/blenloader/intern/readfile.c
+++ b/
source/blender/blenloader/intern/readfile.c
@@
-3927,9
+3927,10
@@
static void direct_link_modifiers(FileData *fd, ListBase *lb)
} else if (md->type==eModifierType_ParticleSystem) {
ParticleSystemModifierData *psmd = (ParticleSystemModifierData*) md;
} else if (md->type==eModifierType_ParticleSystem) {
ParticleSystemModifierData *psmd = (ParticleSystemModifierData*) md;
- psmd->dm=
0
;
- psmd->psys=newdataadr(fd, psmd->psys);
+ psmd->dm=
NULL
;
+ psmd->psys=
newdataadr(fd, psmd->psys);
psmd->flag &= ~eParticleSystemFlag_psys_updated;
psmd->flag &= ~eParticleSystemFlag_psys_updated;
+ psmd->flag |= eParticleSystemFlag_file_loaded;
} else if (md->type==eModifierType_Explode) {
ExplodeModifierData *psmd = (ExplodeModifierData*) md;
} else if (md->type==eModifierType_Explode) {
ExplodeModifierData *psmd = (ExplodeModifierData*) md;
diff --git
a/source/blender/makesdna/DNA_modifier_types.h
b/source/blender/makesdna/DNA_modifier_types.h
index 3f6124c7fa1a113b96c205a5617c9b8a9d537502..1c8610461bed50b940e6169ebe6679e90034b5da 100644
(file)
--- a/
source/blender/makesdna/DNA_modifier_types.h
+++ b/
source/blender/makesdna/DNA_modifier_types.h
@@
-550,6
+550,7
@@
typedef struct MeshDeformModifierData {
typedef enum {
eParticleSystemFlag_Pars = (1<<0),
eParticleSystemFlag_psys_updated = (1<<1),
typedef enum {
eParticleSystemFlag_Pars = (1<<0),
eParticleSystemFlag_psys_updated = (1<<1),
+ eParticleSystemFlag_file_loaded = (1<<2),
} ParticleSystemModifierFlag;
typedef struct ParticleSystemModifierData {
} ParticleSystemModifierFlag;
typedef struct ParticleSystemModifierData {
diff --git
a/source/blender/modifiers/intern/MOD_particlesystem.c
b/source/blender/modifiers/intern/MOD_particlesystem.c
index f2b580aca9aa611478434b2af56deed58b3d66ea..d7e61b7210e2f3c5eee0991ebc40dc840e95e034 100644
(file)
--- a/
source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/
source/blender/modifiers/intern/MOD_particlesystem.c
@@
-154,6
+154,10
@@
static void deformVerts(ModifierData *md, Object *ob,
psmd->dm->needsFree = 1;
psmd->dm->release(psmd->dm);
}
psmd->dm->needsFree = 1;
psmd->dm->release(psmd->dm);
}
+ else if(psmd->flag & eParticleSystemFlag_file_loaded) {
+ /* in file read dm just wasn't saved in file so no need to reset everything */
+ psmd->flag &= ~eParticleSystemFlag_file_loaded;
+ }
else {
/* no dm before, so recalc particles fully */
psys->recalc |= PSYS_RECALC_RESET;
else {
/* no dm before, so recalc particles fully */
psys->recalc |= PSYS_RECALC_RESET;
@@
-176,7
+180,6
@@
static void deformVerts(ModifierData *md, Object *ob,
if(psmd->dm->getNumVerts(psmd->dm)!=psmd->totdmvert ||
psmd->dm->getNumEdges(psmd->dm)!=psmd->totdmedge ||
psmd->dm->getNumFaces(psmd->dm)!=psmd->totdmface){
if(psmd->dm->getNumVerts(psmd->dm)!=psmd->totdmvert ||
psmd->dm->getNumEdges(psmd->dm)!=psmd->totdmedge ||
psmd->dm->getNumFaces(psmd->dm)!=psmd->totdmface){
- /* in file read dm hasn't really changed but just wasn't saved in file */
psys->recalc |= PSYS_RECALC_RESET;
psys->recalc |= PSYS_RECALC_RESET;