[Bf-blender-cvs] [664f5b8] temp_remove_particles: Removed particle DNA.
Lukas Tönne
noreply at git.blender.org
Wed Apr 13 13:41:24 CEST 2016
Commit: 664f5b8c06a0d935dd859fdcf2998db2f582c5ee
Author: Lukas Tönne
Date: Wed Apr 13 13:41:11 2016 +0200
Branches: temp_remove_particles
https://developer.blender.org/rB664f5b8c06a0d935dd859fdcf2998db2f582c5ee
Removed particle DNA.
===================================================================
M source/blender/CMakeLists.txt
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/intern/bpath.c
M source/blender/blenkernel/intern/cloth.c
M source/blender/blenkernel/intern/dynamicpaint.c
M source/blender/blenkernel/intern/effect.c
M source/blender/blenkernel/intern/fluidsim.c
M source/blender/blenkernel/intern/group.c
M source/blender/blenkernel/intern/object_deform.c
M source/blender/blenkernel/intern/pointcache.c
M source/blender/blenkernel/intern/rigidbody.c
M source/blender/blenkernel/intern/smoke.c
M source/blender/blenkernel/intern/softbody.c
M source/blender/blenkernel/intern/texture.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/blenloader/intern/writefile.c
M source/blender/depsgraph/intern/depsgraph_build.cc
M source/blender/depsgraph/intern/depsgraph_build_nodes.cc
M source/blender/depsgraph/intern/depsgraph_build_relations.cc
M source/blender/depsgraph/intern/depsgraph_tag.cc
M source/blender/gpu/GPU_material.h
M source/blender/gpu/intern/gpu_codegen.c
M source/blender/gpu/intern/gpu_draw.c
M source/blender/gpu/intern/gpu_material.c
D source/blender/makesdna/DNA_particle_types.h
M source/blender/makesdna/intern/makesdna.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/nodes/shader/nodes/node_shader_particle_info.c
M source/blender/render/intern/source/convertblender.c
M source/blender/render/intern/source/pointdensity.c
M source/blender/render/intern/source/renderdatabase.c
M source/blender/render/intern/source/shadeinput.c
M source/blender/render/intern/source/voxeldata.c
===================================================================
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index e36f9e2..0cfeae7 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -67,7 +67,6 @@ set(SRC_DNA_INC
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_property_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index 3ca4472..b388483 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -43,7 +43,7 @@ struct ListBase;
struct Group;
struct ParticleSimulationData;
struct ParticleData;
-struct ParticleKey;
+struct PointCacheKey;
struct EffectorWeights *BKE_add_effector_weights(struct Group *group);
struct PartDeflect *object_add_collision_fields(int type);
@@ -95,7 +95,6 @@ typedef struct EffectorCache {
struct Scene *scene;
struct Object *ob;
- struct ParticleSystem *psys;
struct SurfaceModifierData *surmd;
struct PartDeflect *pd;
@@ -110,7 +109,7 @@ typedef struct EffectorCache {
} EffectorCache;
void free_partdeflect(struct PartDeflect *pd);
-struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights, bool precalc);
+struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct EffectorWeights *weights, bool precalc);
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);
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 42d1942..926d66b 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -85,7 +85,7 @@ struct ClothModifierData;
struct ListBase;
struct Main;
struct Object;
-struct ParticleKey;
+struct PointCacheKey;
struct ParticleSystem;
struct PointCache;
struct Scene;
@@ -264,12 +264,18 @@ typedef struct PTCacheEdit {
unsigned char nosel_col[3];
} PTCacheEdit;
-/* Particle functions */
-void BKE_ptcache_make_particle_key(struct ParticleKey *key, int index, void **data, float time);
+typedef struct PointCacheKey {
+ float co[3]; /* location */
+ float vel[3]; /* velocity */
+ float rot[4]; /* rotation quaternion */
+ float ave[3]; /* angular velocity */
+ float time; /* when this key happens */
+} PointCacheKey;
+
+void BKE_ptcache_make_key(struct PointCacheKey *key, int index, void **data, float time);
/**************** Creating ID's ****************************/
void BKE_ptcache_id_from_softbody(PTCacheID *pid, struct Object *ob, struct SoftBody *sb);
-void BKE_ptcache_id_from_particles(PTCacheID *pid, struct Object *ob, struct ParticleSystem *psys);
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd);
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, struct Object *ob, struct DynamicPaintSurface *surface);
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 95918b9..e7b9e7a 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -87,7 +87,6 @@ struct Tex *give_current_lamp_texture(struct Lamp *la);
struct Tex *give_current_linestyle_texture(struct FreestyleLineStyle *linestyle);
struct Tex *give_current_world_texture(struct World *world);
struct Tex *give_current_brush_texture(struct Brush *br);
-struct Tex *give_current_particle_texture(struct ParticleSettings *part);
struct bNode *give_current_material_texture_node(struct Material *ma);
@@ -99,7 +98,6 @@ void set_current_world_texture(struct World *wo, struct Tex *tex);
void set_current_material_texture(struct Material *ma, struct Tex *tex);
void set_current_lamp_texture(struct Lamp *la, struct Tex *tex);
void set_current_linestyle_texture(struct FreestyleLineStyle *linestyle, struct Tex *tex);
-void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex);
bool has_current_material_texture(struct Material *ma);
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 76544e5..37ecbb3 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -55,7 +55,6 @@
#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h"
#include "DNA_object_types.h"
-#include "DNA_particle_types.h"
#include "DNA_sequence_types.h"
#include "DNA_sound_types.h"
#include "DNA_text_types.h"
@@ -462,7 +461,6 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
{
Object *ob = (Object *)id;
ModifierData *md;
- ParticleSystem *psys;
#define BPATH_TRAVERSE_POINTCACHE(ptcaches) \
{ \
@@ -515,10 +513,6 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
BPATH_TRAVERSE_POINTCACHE(ob->soft->ptcaches);
}
- for (psys = ob->particlesystem.first; psys; psys = psys->next) {
- BPATH_TRAVERSE_POINTCACHE(psys->ptcaches);
- }
-
#undef BPATH_TRAVERSE_POINTCACHE
break;
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 7a2a4e0..b183fe5 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -365,7 +365,7 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
mul_m4_v3(ob->obmat, verts->xconst);
}
- effectors = pdInitEffectors(clmd->scene, ob, NULL, clmd->sim_parms->effector_weights, true);
+ effectors = pdInitEffectors(clmd->scene, ob, clmd->sim_parms->effector_weights, true);
/* Support for dynamic vertex groups, changing from frame to frame */
cloth_apply_vgroup ( clmd, result );
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index b968f78..e49c57d 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3843,7 +3843,7 @@ static int dynamicPaint_prepareEffectStep(DynamicPaintSurface *surface, Scene *s
/* Init force data if required */
if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) {
float vel[3] = {0};
- ListBase *effectors = pdInitEffectors(scene, ob, NULL, surface->effector_weights, true);
+ ListBase *effectors = pdInitEffectors(scene, ob, surface->effector_weights, true);
/* allocate memory for force data (dir vector + strength) */
*force = MEM_mallocN(sData->total_points * 4 * sizeof(float), "PaintEffectForces");
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index c845bb5..97b8582 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -43,7 +43,6 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
-#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
@@ -147,12 +146,11 @@ void free_partdeflect(PartDeflect *pd)
MEM_freeN(pd);
}
-static EffectorCache *new_effector_cache(Scene *scene, Object *ob, ParticleSystem *psys, PartDeflect *pd)
+static EffectorCache *new_effector_cache(Scene *scene, Object *ob, PartDeflect *pd)
{
EffectorCache *eff = MEM_callocN(sizeof(EffectorCache), "EffectorCache");
eff->scene = scene;
eff->ob = ob;
- eff->psys = psys;
eff->pd = pd;
eff->frame = -1;
return eff;
@@ -170,7 +168,7 @@ static void add_object_to_effectors(ListBase **effectors, Scene *scene, Effector
if (*effectors == NULL)
*effectors = MEM_callocN(sizeof(ListBase), "effectors list");
- eff = new_effector_cache(scene, ob, NULL, ob->pd);
+ eff = new_effector_cache(scene, ob, ob->pd);
/* make sure imat is up to date */
invert_m4_m4(ob->imat, ob->obmat);
@@ -179,7 +177,7 @@ static void add_object_to_effectors(ListBase **effectors, Scene *scene, Effector
}
/* returns ListBase handle with objects taking part in the effecting */
-ListBase *pdInitEffectors(Scene *scene, Object *ob_src, ParticleSystem *UNUSED(psys_src),
+ListBase *pdInitEffectors(Scene *scene, Object *ob_src,
EffectorWeights *weights, bool precalc)
{
Base *base;
@@ -577,7 +575,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
return ret;
}
-static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int *tot, int *p, int *step)
+static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int *tot, int *p)
{
*p = 0;
efd->index = p;
@@ -590,31 +588,6 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin
*tot = *p+1;
}
}
- else if (eff->psys) {
- *tot = eff->psys->totpart;
-
- if (eff->pd->forcefield == PFIELD_CHARGE) {
- /* Only the charge of the effected particle is used for
- * interaction, not fall-offs. If the fall-offs aren't the
- * same this will be unphysical, but for animation this
- * could be the wanted behavior. If you want physical
- * correctness the fall-off should be spherical 2.0 anyways.
- */
- efd->charge = eff->pd->f_strength;
- }
- else if (eff->pd->forcefield == PFIELD_HARMONIC && (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS)==0) {
- /* every particle is mapped to only one harmonic effector particle */
- *p= point->index % eff->psys->totpart;
- *tot= *p + 1;
- }
-
- if (eff->psys->part->effector_amount) {
- int
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list