[Bf-blender-cvs] [d47173c] temp_remove_particles: Removed blenkernel particle code.

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


Commit: d47173c8caf6f713f1c2a36feb6cec657ce1182d
Author: Lukas Tönne
Date:   Wed Apr 13 10:49:39 2016 +0200
Branches: temp_remove_particles
https://developer.blender.org/rBd47173c8caf6f713f1c2a36feb6cec657ce1182d

Removed blenkernel particle code.

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

M	source/blender/blenkernel/BKE_effect.h
M	source/blender/blenkernel/BKE_object.h
D	source/blender/blenkernel/BKE_particle.h
M	source/blender/blenkernel/BKE_pointcache.h
M	source/blender/blenkernel/BKE_sca.h
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/anim.c
D	source/blender/blenkernel/intern/boids.c
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/library.c
M	source/blender/blenkernel/intern/library_query.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/object_dupli.c
M	source/blender/blenkernel/intern/object_update.c
D	source/blender/blenkernel/intern/particle.c
D	source/blender/blenkernel/intern/particle_child.c
D	source/blender/blenkernel/intern/particle_distribute.c
D	source/blender/blenkernel/intern/particle_system.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/blenloader/intern/versioning_250.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/blenloader/intern/versioning_legacy.c
M	source/blender/depsgraph/intern/depsgraph_build.cc
M	source/blender/depsgraph/intern/depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_build_nodes.cc
M	source/blender/depsgraph/intern/depsgraph_build_relations.cc
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/space_time/space_time.c
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/modifiers/intern/MOD_build.c
M	source/blender/modifiers/intern/MOD_explode.c
M	source/blender/modifiers/intern/MOD_laplaciandeform.c
M	source/blender/modifiers/intern/MOD_particleinstance.c
M	source/blender/modifiers/intern/MOD_particlesystem.c
M	source/blender/modifiers/intern/MOD_shapekey.c
M	source/blender/modifiers/intern/MOD_smooth.c
M	source/blender/modifiers/intern/MOD_softbody.c
M	source/blender/modifiers/intern/MOD_solidify.c
M	source/blender/render/intern/source/convertblender.c
M	source/blender/render/intern/source/pointdensity.c
M	source/creator/creator.c

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

diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index f8fee44..3ca4472 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -115,7 +115,6 @@ void            pdEndEffectors(struct ListBase **effectors);
 void            pdPrecalculateEffectors(struct ListBase *effectors);
 void            pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
 
-void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point);
 void pd_point_from_loc(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
 void pd_point_from_soft(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
 
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 7d60964..1bb1e5f 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -55,10 +55,7 @@ void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struc
 void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
 struct SoftBody *copy_softbody(const struct SoftBody *sb, bool copy_caches);
 struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb);
-struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys);
-void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src);
 void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src);
-void BKE_object_free_particlesystems(struct Object *ob);
 void BKE_object_free_softbody(struct Object *ob);
 void BKE_object_free_bulletsoftbody(struct Object *ob);
 void BKE_object_free_curve_cache(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
deleted file mode 100644
index e17fb9f..0000000
--- a/source/blender/blenkernel/BKE_particle.h
+++ /dev/null
@@ -1,479 +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) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Adaptive time step
- * Classical SPH
- * Copyright 2011-2012 AutoCRC
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BKE_PARTICLE_H__
-#define __BKE_PARTICLE_H__
-
-/** \file BKE_particle.h
- *  \ingroup bke
- */
-
-#include "BLI_utildefines.h"
-
-#include "DNA_particle_types.h"
-#include "DNA_object_types.h"
-
-#include "BKE_customdata.h"
-
-struct ParticleSystemModifierData;
-struct ParticleSystem;
-struct ParticleKey;
-struct ParticleSettings;
-
-struct Main;
-struct Object;
-struct Scene;
-struct DerivedMesh;
-struct ModifierData;
-struct MTFace;
-struct MCol;
-struct MFace;
-struct MVert;
-struct LatticeDeformData;
-struct LinkNode;
-struct KDTree;
-struct RNG;
-struct BVHTreeRay;
-struct BVHTreeRayHit; 
-struct EdgeHash;
-
-#define PARTICLE_P              ParticleData * pa; int p
-#define LOOP_PARTICLES  for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
-#define LOOP_EXISTING_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & PARS_UNEXIST))
-#define LOOP_SHOWN_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
-/* OpenMP: Can only advance one variable within loop definition. */
-#define LOOP_DYNAMIC_PARTICLES for (p = 0; p < psys->totpart; p++) if ((pa = psys->particles + p)->state.time > 0.0f)
-
-/* fast but sure way to get the modifier*/
-#define PARTICLE_PSMD ParticleSystemModifierData * psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
-
-/* common stuff that many particle functions need */
-typedef struct ParticleSimulationData {
-	struct Scene *scene;
-	struct Object *ob;
-	struct ParticleSystem *psys;
-	struct ParticleSystemModifierData *psmd;
-	struct ListBase *colliders;
-	/* Courant number. This is used to implement an adaptive time step. Only the
-	 * maximum value per time step is important. Only sph_integrate makes use of
-	 * this at the moment. Other solvers could, too. */
-	float courant_num;
-} ParticleSimulationData;
-
-typedef struct SPHData {
-	ParticleSystem *psys[10];
-	ParticleData *pa;
-	float mass;
-	struct EdgeHash *eh;
-	float *gravity;
-	float hfac;
-	/* Average distance to neighbours (other particles in the support domain),
-	 * for calculating the Courant number (adaptive time step). */
-	int pass;
-	float element_size;
-	float flow[3];
-
-	/* Integrator callbacks. This allows different SPH implementations. */
-	void (*force_cb) (void *sphdata_v, ParticleKey *state, float *force, float *impulse);
-	void (*density_cb) (void *rangedata_v, int index, const float co[3], float squared_dist);
-} SPHData;
-
-typedef struct ParticleTexture {
-	float ivel;                           /* used in reset */
-	float time, life, exist, size;        /* used in init */
-	float damp, gravity, field;           /* used in physics */
-	float length, clump, kink_freq, kink_amp, effector;  /* used in path caching */
-	float rough1, rough2, roughe;         /* used in path caching */
-} ParticleTexture;
-
-typedef struct ParticleSeam {
-	float v0[3], v1[3];
-	float nor[3], dir[3], tan[3];
-	float length2;
-} ParticleSeam;
-
-typedef struct ParticleCacheKey {
-	float co[3];
-	float vel[3];
-	float rot[4];
-	float col[3];
-	float time;
-	int segments;
-} ParticleCacheKey;
-
-typedef struct ParticleThreadContext {
-	/* shared */
-	struct ParticleSimulationData sim;
-	struct DerivedMesh *dm;
-	struct Material *ma;
-
-	/* distribution */
-	struct KDTree *tree;
-
-	struct ParticleSeam *seams;
-	int totseam;
-
-	float *jit, *jitoff, *weight;
-	float maxweight;
-	int *index, *skip, jitlevel;
-
-	int cfrom, distr;
-
-	struct ParticleData *tpars;
-
-	/* path caching */
-	int editupdate, between, segments, extra_segments;
-	int totchild, totparent, parent_pass;
-
-	float cfra;
-
-	float *vg_length, *vg_clump, *vg_kink;
-	float *vg_rough1, *vg_rough2, *vg_roughe;
-	float *vg_effector;
-
-	struct CurveMapping *clumpcurve;
-	struct CurveMapping *roughcurve;
-} ParticleThreadContext;
-
-typedef struct ParticleTask {
-	ParticleThreadContext *ctx;
-	struct RNG *rng, *rng_path;
-	int begin, end;
-} ParticleTask;
-
-typedef struct ParticleBillboardData {
-	struct Object *ob;
-	float vec[3], vel[3];
-	float offset[2];
-	float size[2];
-	float tilt, random, time;
-	int uv[3];
-	int lock, num;
-	int totnum;
-	int lifetime;
-	short align, uv_split, anim, split_offset;
-} ParticleBillboardData;
-
-typedef struct ParticleCollisionElement {
-	/* pointers to original data */
-	float *x[3], *v[3];
-
-	/* values interpolated from original data*/
-	float x0[3], x1[3], x2[3], p[3];
-	
-	/* results for found intersection point */
-	float nor[3], vel[3], uv[2];
-
-	/* count of original data (1-4) */
-	int tot;
-
-	/* index of the collision face */
-	int index;
-
-	/* flags for inversed normal / particle already inside element at start */
-	short inv_nor, inside;
-} ParticleCollisionElement;
-
-/* container for moving data between deflet_particle and particle_intersect_face */
-typedef struct ParticleCollision {
-	struct Object *current;
-	struct Object *hit;
-	struct Object *prev;
-	struct Object *skip;
-	struct Object *emitter;
-
-	struct CollisionModifierData *md; // collision modifier for current object;
-
-	float f;    // time factor of previous collision, needed for substracting face velocity
-	float fac1, fac2;
-
-	float cfra, old_cfra;
-
-	float original_ray_length; //original length of co2-co1, needed for collision time evaluation
-
-	int prev_index;
-
-	ParticleCollisionElement pce;
-
-	/* total_time is the amount of time in this subframe
-	 * inv_total_time is the opposite
-	 * inv_timestep is the inverse of the amount of time in this frame */
-	float total_time, inv_total_time, inv_timestep;
-
-	float radius;
-	float co1[3], co2[3];
-	float ve1[3], ve2[3];
-
-	float acc[3], boid_z;
-
-	int boid;
-} ParticleCollision;
-
-typedef struct ParticleDrawData {
-	float *vdata, *vd;      /* vertice data */
-	float *ndata, *nd;      /* normal data */
-	float *cdata, *cd;      /* color data */
-	float *vedata, *ved;    /* velocity data */
-	float *ma_col;
-	int tot_vec_size, flag;
-	int totpoint, totve;
-} ParticleDrawData;
-
-#define PARTICLE_DRAW_DATA_UPDATED  1
-
-#define PSYS_FRAND_COUNT    1024
-extern unsigned int PSYS_FRAND_SEED_OFFSET[PSYS_FRAND_COUNT];
-extern unsigned int PSYS_FRAND_SEED_MULTIPLIER[PSYS_FRAND_COUNT];
-extern float PSYS_FRAND_BASE[PSYS_FRAND_COUNT];
-
-void psys_init_rng(void);
-
-BLI_INLINE float psys_frand(ParticleSystem *psys, unsigned int seed)
-{
-	/* XXX far from ideal, this simply scrambles particle random numbers a bit
-	 * to avoid obvious correlations.
-	 * Can't use previous psys->frand arrays because these require initialization
-	 * inside psys_check_enabled, which wreaks havok in multithreaded depgraph updates.
-	 */
-	unsigned int offset = PSYS_FRAND_SEED_OFFSET[psys->seed % PSYS_FRAND_COUNT];
-	unsigned int multiplier = PSYS_FRAND_SEED_MULTIPLIER[psys->seed % PSYS_FRAND_COUNT];
-	return PSYS_FRAND_BASE[(offset + seed * multiplier) % PSYS_FRAND_COUNT];
-}
-
-BLI_INLINE void psys_frand_vec(ParticleSystem *psys, unsigned int seed, float vec[3])

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list