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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-11-25 11:38:54 +0300
committerJeroen Bakker <jeroen@blender.org>2020-12-02 10:36:42 +0300
commita08a08cb4c26627c05ad6089030223e8313a0073 (patch)
tree4524a33ef07b37c1dffdd196798cab09213ad0ce
parent50e8072708428a169f7049a2626c2392b7c4e202 (diff)
Fix T82729: Crash in rna_EffectorWeight_path when object has fluid and dynamic paint modifiers
Looks like prior to the introduction of mantaflow, the former SmokeModifierData always had a domain initialized (even if its type was set to None). Since mataflow, the FluidModifierData type needs to be set to MOD_FLUID_TYPE_DOMAIN (otherwise domain is invalid) Maniphest Tasks: T82729 Differential Revision: https://developer.blender.org/D9644
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 6e1ca7741a7..b0a53a7f168 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -801,11 +801,12 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
}
}
- /* check smoke modifier */
+ /* check fluid modifier */
md = (ModifierData *)modifiers_findByType(ob, eModifierType_Fluid);
if (md) {
- FluidModifierData *mmd = (FluidModifierData *)md;
- if (mmd->domain->effector_weights == ew) {
+ FluidModifierData *fmd = (FluidModifierData *)md;
+ if (fmd->type == MOD_FLUID_TYPE_DOMAIN && fmd->domain &&
+ fmd->domain->effector_weights == ew) {
char name_esc[sizeof(md->name) * 2];
BLI_strescape(name_esc, md->name, sizeof(name_esc));
return BLI_sprintfN("modifiers[\"%s\"].domain_settings.effector_weights", name_esc);