Blenloader: call blendRead and blendWrite of modifiers when available
This is part of T76372.
This commit is contained in:
parent
b6981d9e48
commit
bf1e5a2133
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue