[Bf-blender-cvs] [fe0bd22] particles_refactor: Added missing read/write code for particle display.
Lukas Tönne
noreply at git.blender.org
Tue Apr 22 12:06:08 CEST 2014
Commit: fe0bd22bcf0be33c4adbac416a0bc9d9c5fe8648
Author: Lukas Tönne
Date: Wed Dec 18 11:47:57 2013 +0100
https://developer.blender.org/rBfe0bd22bcf0be33c4adbac416a0bc9d9c5fe8648
Added missing read/write code for particle display.
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d4a9f29..5684430 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4271,6 +4271,11 @@ static void direct_link_nparticle_system(FileData *fd, NParticleSystem *psys)
}
}
+static void direct_link_nparticle_display(FileData *UNUSED(fd), NParticleDisplay *UNUSED(display))
+{
+ /* nothing to do here yet */
+}
+
/* ************ READ OBJECT ***************** */
@@ -4838,9 +4843,13 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
}
else if (md->type == eModifierType_NParticleSystem) {
NParticleSystemModifierData *pmd = (NParticleSystemModifierData *)md;
+ NParticleDisplay *display;
pmd->psys = newdataadr(fd, pmd->psys);
direct_link_nparticle_system(fd, pmd->psys);
+ link_list(fd, &pmd->display);
+ for (display = pmd->display.first; display; display = display->next)
+ direct_link_nparticle_display(fd, display);
}
else if (md->type == eModifierType_LaplacianDeform) {
LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)md;
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 06a29c3..f128b3b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1394,6 +1394,11 @@ static void write_nparticle_system(WriteData *wd, NParticleSystem *psys)
}
}
+static void write_nparticle_display(WriteData *wd, NParticleDisplay *display)
+{
+ writestruct(wd, DATA, "NParticleDisplay", 1, display);
+}
+
static void write_modifiers(WriteData *wd, ListBase *modbase)
{
ModifierData *md;
@@ -1513,7 +1518,11 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
}
else if (md->type==eModifierType_NParticleSystem) {
NParticleSystemModifierData *pmd = (NParticleSystemModifierData *)md;
+ NParticleDisplay *display;
+
write_nparticle_system(wd, pmd->psys);
+ for (display = pmd->display.first; display; display = display->next)
+ write_nparticle_display(wd, display);
}
else if (md->type==eModifierType_LaplacianDeform) {
LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData*) md;
More information about the Bf-blender-cvs
mailing list