[Bf-blender-cvs] [daca75d] alembic: Fixed writing code for cache modifiers to include extra DNA fields of subtypes.

Lukas Tönne noreply at git.blender.org
Thu Apr 2 14:00:05 CEST 2015


Commit: daca75d8e171873d22416c49a174781e4a1a1905
Author: Lukas Tönne
Date:   Thu Apr 2 13:54:08 2015 +0200
Branches: alembic
https://developer.blender.org/rBdaca75d8e171873d22416c49a174781e4a1a1905

Fixed writing code for cache modifiers to include extra DNA fields of
subtypes.

===================================================================

M	source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e49be0a..9ad1d81 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3490,7 +3490,11 @@ static void write_cache_modifiers(WriteData *wd, CacheLibrary *cachelib)
 {
 	CacheModifier *md;
 	for (md = cachelib->modifiers.first; md; md = md->next) {
-		writestruct(wd, DATA, "CacheModifier", 1, md);
+		const char *struct_name = BKE_cache_modifier_type_struct_name(md->type);
+		if (!struct_name || struct_name[0] == '\0')
+			continue;
+		
+		writestruct(wd, DATA, struct_name, 1, md);
 		
 		switch (md->type) {
 			// TODO add specifics here




More information about the Bf-blender-cvs mailing list