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:
authorSebastián Barschkis <sebbas@sebbas.org>2019-12-16 17:50:14 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2019-12-16 18:37:01 +0300
commitd27ccf990c2b957a10f4676e3153f907829a4b22 (patch)
tree48667db9d5f51e3c951cb1106566a53db21d9adf /source/blender/blenkernel/intern/particle.c
parent7b87d3d34ec5bbaf777bdc27abdb69600915fce1 (diff)
Mantaflow [Part 6]: Updates in /blender/source
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming. Reviewed By: sergey Maniphest Tasks: T59995 Differential Revision: https://developer.blender.org/D3855
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 096142b9889..ded38cf562f 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -34,7 +34,7 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_particle_types.h"
-#include "DNA_smoke_types.h"
+#include "DNA_fluid_types.h"
#include "DNA_scene_types.h"
#include "DNA_dynamicpaint_types.h"
@@ -360,6 +360,11 @@ bool psys_check_enabled(Object *ob, ParticleSystem *psys, const bool use_render_
}
psmd = psys_get_modifier(ob, psys);
+
+ if (!psmd) {
+ return 0;
+ }
+
if (use_render_params) {
if (!(psmd->modifier.mode & eModifierMode_Render)) {
return 0;
@@ -3577,12 +3582,12 @@ void object_remove_particle_system(Main *bmain, Scene *UNUSED(scene), Object *ob
return;
}
- /* clear all other appearances of this pointer (like on smoke flow modifier) */
- if ((md = modifiers_findByType(ob, eModifierType_Smoke))) {
- SmokeModifierData *smd = (SmokeModifierData *)md;
- if ((smd->type == MOD_SMOKE_TYPE_FLOW) && smd->flow && smd->flow->psys) {
- if (smd->flow->psys == psys) {
- smd->flow->psys = NULL;
+ /* clear all other appearances of this pointer (like on manta flow modifier) */
+ if ((md = modifiers_findByType(ob, eModifierType_Fluid))) {
+ FluidModifierData *mmd = (FluidModifierData *)md;
+ if ((mmd->type == MOD_FLUID_TYPE_FLOW) && mmd->flow && mmd->flow->psys) {
+ if (mmd->flow->psys == psys) {
+ mmd->flow->psys = NULL;
}
}
}