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:
authorJacques Lucke <jacques@blender.org>2020-06-15 18:55:06 +0300
committerJacques Lucke <jacques@blender.org>2020-06-15 18:55:06 +0300
commitbf1e5a2133a3c35549e24850739f83af34eb15b3 (patch)
tree48e69dd5315b5069a88b3b16f224ead4590867ec /source/blender/blenloader
parentb6981d9e48ef9ccf3ae1b39d11af480a4d76f135 (diff)
Blenloader: call blendRead and blendWrite of modifiers when available
This is part of T76372.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c9
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 12d1e93e183..fcbbccedcda 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5579,8 +5579,11 @@ static void direct_link_modifiers(BlendDataReader *reader, ListBase *lb, Object
md = modifier_replace_with_fluid(reader->fd, ob, lb, md);
is_allocated = true;
}
+
+ const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
+
/* if modifiers disappear, or for upward compatibility */
- if (NULL == BKE_modifier_get_info(md->type)) {
+ if (mti == NULL) {
md->type = eModifierType_None;
}
@@ -5884,6 +5887,10 @@ static void direct_link_modifiers(BlendDataReader *reader, ListBase *lb, Object
direct_link_curveprofile(reader, bmd->custom_profile);
}
}
+
+ if (mti->blendRead != NULL) {
+ mti->blendRead(reader, md);
+ }
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 2b57a8e1f5e..b6f8849b46d 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1839,6 +1839,10 @@ static void write_modifiers(BlendWriter *writer, ListBase *modbase)
write_CurveProfile(writer, bmd->custom_profile);
}
}
+
+ if (mti->blendWrite != NULL) {
+ mti->blendWrite(writer, md);
+ }
}
}