Fix T51759: fluid simulation particles not remoevd when colliding with outflow objects.
authorLucas Veber <lucky3>
Sun, 2 Jul 2017 20:38:16 +0000 (22:38 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 2 Jul 2017 20:42:08 +0000 (22:42 +0200)
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2719

intern/elbeem/intern/solver_util.cpp

index 6eca427c7878cf5d5b42f0ccd09d031590e609c2..f0c7bce2b4ec0152109108887eca882664e37c04 100644 (file)
@@ -855,6 +855,10 @@ void LbmFsgrSolver::advanceParticles() {
                                if(k<=mSizez-1-cutval){ 
                                        CellFlagType pflag = RFLAG(level, i,j,k, workSet);
                                        //errMsg("PIT move"," at "<<PRINT_IJK<<" flag"<<convertCellFlagType2String(pflag) );
+                                       if (pflag & CFMbndOutflow) {
+                                               DEL_PART;
+                                               continue;
+                                       }
                                        if(pflag & (CFBnd)) {
                                                handleObstacleParticle(p);
                                                continue;