[Bf-blender-cvs] [987bb50] temp_remove_particles: Removed remaining use of pointers to particle types as well as boids headers.

Lukas Tönne noreply at git.blender.org
Wed Apr 13 18:10:58 CEST 2016


Commit: 987bb50a74132e1f2489083c59daab892f24806f
Author: Lukas Tönne
Date:   Wed Apr 13 18:10:23 2016 +0200
Branches: temp_remove_particles
https://developer.blender.org/rB987bb50a74132e1f2489083c59daab892f24806f

Removed remaining use of pointers to particle types as well as boids headers.

===================================================================

M	source/blender/CMakeLists.txt
D	source/blender/blenkernel/BKE_boids.h
M	source/blender/blenkernel/BKE_effect.h
M	source/blender/blenkernel/BKE_pointcache.h
M	source/blender/blenkernel/BKE_texture.h
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/effect.c
M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/editors/include/ED_buttons.h
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/space_buttons/buttons_texture.c
D	source/blender/makesdna/DNA_boid_types.h
M	source/blender/makesdna/DNA_dynamicpaint_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesdna/DNA_smoke_types.h
M	source/blender/makesdna/intern/makesdna.c
M	source/blender/render/intern/source/convertblender.c

===================================================================

diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 0cfeae7..ca103e4 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -29,7 +29,6 @@ set(SRC_DNA_INC
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_actuator_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_anim_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_armature_types.h
-	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_boid_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_brush_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_camera_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_cloth_types.h
diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h
deleted file mode 100644
index 582cd0c..0000000
--- a/source/blender/blenkernel/BKE_boids.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2009 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BKE_BOIDS_H__
-#define __BKE_BOIDS_H__
-
-/** \file BKE_boids.h
- *  \ingroup bke
- *  \since 2009
- *  \author Janne Karhu
- */
-
-#include "DNA_boid_types.h"
-
-struct RNG;
-
-typedef struct BoidBrainData {
-	struct ParticleSimulationData *sim;
-	struct ParticleSettings *part;
-	float timestep, cfra, dfra;
-	float wanted_co[3], wanted_speed;
-
-	/* Goal stuff */
-	struct Object *goal_ob;
-	float goal_co[3];
-	float goal_nor[3];
-	float goal_priority;
-
-	struct RNG *rng;
-} BoidBrainData;
-
-void boids_precalc_rules(struct ParticleSettings *part, float cfra);
-void boid_brain(BoidBrainData *bbd, int p, struct ParticleData *pa);
-void boid_body(BoidBrainData *bbd, struct ParticleData *pa);
-void boid_default_settings(BoidSettings *boids);
-BoidRule *boid_new_rule(int type);
-BoidState *boid_new_state(BoidSettings *boids);
-BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state);
-void boid_free_settings(BoidSettings *boids);
-BoidSettings *boid_copy_settings(BoidSettings *boids);
-BoidState *boid_get_current_state(BoidSettings *boids);
-#endif
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index b388483..d3606e1 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -41,8 +41,6 @@ struct Object;
 struct Scene;
 struct ListBase;
 struct Group;
-struct ParticleSimulationData;
-struct ParticleData;
 struct PointCacheKey;
 
 struct EffectorWeights *BKE_add_effector_weights(struct Group *group);
@@ -62,8 +60,6 @@ typedef struct EffectedPoint {
 
 	unsigned int flag;
 	int index;
-
-	struct ParticleSystem *psys;  /* particle system the point belongs to */
 } EffectedPoint;
 
 typedef struct GuideEffectorData {
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 926d66b..c0ddfa3 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -35,7 +35,6 @@
 #include "DNA_ID.h"
 #include "DNA_dynamicpaint_types.h"
 #include "DNA_object_force.h"
-#include "DNA_boid_types.h"
 #include <stdio.h> /* for FILE */
 
 /* Point cache clearing option, for BKE_ptcache_id_clear, before
@@ -86,7 +85,6 @@ struct ListBase;
 struct Main;
 struct Object;
 struct PointCacheKey;
-struct ParticleSystem;
 struct PointCache;
 struct Scene;
 struct SmokeModifierData;
@@ -105,7 +103,6 @@ typedef struct PTCacheData {
 	float ave[3];
 	float size;
 	float times[3];
-	struct BoidData boids;
 } PTCacheData;
 
 typedef struct PTCacheFile {
@@ -249,15 +246,6 @@ typedef struct PTCacheEdit {
 
 	struct PTCacheID pid;
 
-	/* particles stuff */
-	struct ParticleSystem *psys;
-	struct KDTree *emitter_field;
-	float *emitter_cosnos; /* localspace face centers and normals (average of its verts), from the derived mesh */
-	int *mirror_cache;
-
-	struct ParticleCacheKey **pathcache;    /* path cache (runtime) */
-	ListBase pathcachebufs;
-
 	int totpoint, totframes, totcached, edited;
 
 	unsigned char sel_col[3];
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index e7b9e7a..4337855 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -47,7 +47,6 @@ struct Main;
 struct Material;
 struct MTex;
 struct OceanTex;
-struct ParticleSettings;
 struct PointDensity;
 struct Tex;
 struct TexMapping;
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 083c8b8..8f253e1 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -191,7 +191,6 @@ set(SRC
 	BKE_blender.h
 	BKE_bmfont.h
 	BKE_bmfont_types.h
-	BKE_boids.h
 	BKE_bpath.h
 	BKE_brush.h
 	BKE_bullet.h
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index c2f6401..0582d07 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -622,8 +622,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Main *bmain, Sc
 
 	/* softbody collision  */
 	if ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_LATTICE)) {
-		if (ob->particlesystem.first ||
-		    modifiers_isModifierEnabled(ob, eModifierType_Softbody) ||
+		if (modifiers_isModifierEnabled(ob, eModifierType_Softbody) ||
 		    modifiers_isModifierEnabled(ob, eModifierType_Cloth) ||
 		    modifiers_isModifierEnabled(ob, eModifierType_DynamicPaint))
 		{
@@ -2107,8 +2106,6 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob)
 						ob->recalc |= OB_RECALC_DATA;
 					}
 				}
-				if (ob->particlesystem.first)
-					ob->recalc |= OB_RECALC_DATA;
 				break;
 			case OB_CURVE:
 			case OB_SURF:
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index e49c57d..ba9a47d 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1030,8 +1030,6 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str
 				return false;
 			brush->pmd = pmd;
 
-			brush->psys = NULL;
-
 			brush->flags = MOD_DPAINT_ABS_ALPHA | MOD_DPAINT_RAMP_ALPHA;
 			brush->collision = MOD_DPAINT_COL_VOLUME;
 			
@@ -1185,7 +1183,6 @@ void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct Dyn
 		t_brush->particle_radius = brush->particle_radius;
 		t_brush->particle_smooth = brush->particle_smooth;
 		t_brush->paint_distance = brush->paint_distance;
-		t_brush->psys = brush->psys;
 
 		if (brush->paint_ramp)
 			memcpy(t_brush->paint_ramp, brush->paint_ramp, sizeof(ColorBand));
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 97b8582..38753f0 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -286,7 +286,6 @@ void pd_point_from_loc(Scene *scene, float *loc, float *vel, int index, Effected
 	point->flag = 0;
 
 	point->ave = point->rot = NULL;
-	point->psys = NULL;
 }
 void pd_point_from_soft(Scene *scene, float *loc, float *vel, int index, EffectedPoint *point)
 {
@@ -301,8 +300,6 @@ void pd_point_from_soft(Scene *scene, float *loc, float *vel, int index, Effecte
 	point->flag = PE_WIND_AS_SPEED;
 
 	point->ave = point->rot = NULL;
-
-	point->psys = NULL;
 }
 /************************************************/
 /*			Effectors		*/
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index d605232..a3529d8 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -130,7 +130,7 @@ static int ptcache_data_size[] = {
 		3 * sizeof(float), // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST
 		sizeof(float), // BPHYS_DATA_SIZE
 		3 * sizeof(float), // BPHYS_DATA_TIMES
-		sizeof(BoidData) // case BPHYS_DATA_BOIDS
+		0 // case BPHYS_DATA_BOIDS
 };
 
 static int ptcache_extra_datasize[] = {
@@ -1825,7 +1825,6 @@ static void ptcache_file_pointers_init(PTCacheFile *pf)
 	pf->cur[BPHYS_DATA_AVELOCITY] =	(data_types & (1<<BPHYS_DATA_AVELOCITY))?		&pf->data.ave	: NULL;
 	pf->cur[BPHYS_DATA_SIZE] =		(data_types & (1<<BPHYS_DATA_SIZE))		?		&pf->data.size	: NULL;
 	pf->cur[BPHYS_DATA_TIMES] =		(data_types & (1<<BPHYS_DATA_TIMES))	?		&pf->data.times	: NULL;
-	pf->cur[BPHYS_DATA_BOIDS] =		(data_types & (1<<BPHYS_DATA_BOIDS))	?		&pf->data.boids	: NULL;
 }
 
 /* Check to see if point number "index" is in pm, uses binary search for index data. */
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index fcb7320..0e95516 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -562,8 +562,6 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
 			smd->flow->color[2] = 0.7f;
 
 			smd->flow->dm = NULL;
-			smd->flow->psys = NULL;
-
 		}
 		else if (smd->type & MOD_SMOKE_TYPE_COLL)
 		{
@@ -629,7 +627,6 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
 		tsmd->domain->cache_file_format = smd->domain->cache_file_format;
 	}
 	else if (tsmd->flow) {
-		tsmd->flow->psys = smd->flow->psys;
 		tsmd->flow->noise_texture = smd->flow->noise_texture;
 
 		tsmd->flow->vel_multi = smd->flow->vel_m

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list