From 987bb50a74132e1f2489083c59daab892f24806f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Wed, 13 Apr 2016 18:10:23 +0200 Subject: Removed remaining use of pointers to particle types as well as boids headers. --- source/blender/CMakeLists.txt | 1 - source/blender/blenkernel/BKE_boids.h | 66 ------ source/blender/blenkernel/BKE_effect.h | 4 - source/blender/blenkernel/BKE_pointcache.h | 12 -- source/blender/blenkernel/BKE_texture.h | 1 - source/blender/blenkernel/CMakeLists.txt | 1 - source/blender/blenkernel/intern/depsgraph.c | 5 +- source/blender/blenkernel/intern/dynamicpaint.c | 3 - source/blender/blenkernel/intern/effect.c | 3 - source/blender/blenkernel/intern/pointcache.c | 3 +- source/blender/blenkernel/intern/smoke.c | 3 - source/blender/blenloader/intern/readfile.c | 2 - source/blender/editors/include/ED_anim_api.h | 1 - source/blender/editors/include/ED_buttons.h | 1 - source/blender/editors/object/object_edit.c | 3 +- source/blender/editors/object/object_modifier.c | 3 +- .../editors/space_buttons/buttons_texture.c | 15 -- source/blender/makesdna/DNA_boid_types.h | 225 --------------------- source/blender/makesdna/DNA_dynamicpaint_types.h | 1 - source/blender/makesdna/DNA_object_types.h | 5 - source/blender/makesdna/DNA_smoke_types.h | 1 - source/blender/makesdna/intern/makesdna.c | 2 - .../blender/render/intern/source/convertblender.c | 7 +- 23 files changed, 6 insertions(+), 362 deletions(-) delete mode 100644 source/blender/blenkernel/BKE_boids.h delete mode 100644 source/blender/makesdna/DNA_boid_types.h diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 0cfeae75c69..ca103e4f53e 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 582cd0cef8d..00000000000 --- 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 b3884830bb3..d3606e1f97d 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 926d66be4fe..c0ddfa35748 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 /* 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 e7b9e7a1a8f..43378551449 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 083c8b8f5ed..8f253e1219a 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 c2f64011e2e..0582d07d99c 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 e49c57dc6dc..ba9a47d9334 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 97b8582e346..38753f0aa43 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 d605232f97d..a3529d8e6f2 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<data.ave : NULL; pf->cur[BPHYS_DATA_SIZE] = (data_types & (1<data.size : NULL; pf->cur[BPHYS_DATA_TIMES] = (data_types & (1<data.times : NULL; - pf->cur[BPHYS_DATA_BOIDS] = (data_types & (1<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 fcb7320352f..0e95516ffc7 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_multi; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b0552bc03aa..b535d91e77d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4796,7 +4796,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) smd->flow->dm = NULL; smd->flow->verts_old = NULL; smd->flow->numverts = 0; - smd->flow->psys = newdataadr(fd, smd->flow->psys); } else if (smd->type == MOD_SMOKE_TYPE_COLL) { smd->flow = NULL; @@ -4842,7 +4841,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) if (pmd->brush) { pmd->brush = newdataadr(fd, pmd->brush); pmd->brush->pmd = pmd; - pmd->brush->psys = newdataadr(fd, pmd->brush->psys); pmd->brush->paint_ramp = newdataadr(fd, pmd->brush->paint_ramp); pmd->brush->vel_ramp = newdataadr(fd, pmd->brush->vel_ramp); pmd->brush->dm = NULL; diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 49720bf11ce..b35316700e2 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -272,7 +272,6 @@ typedef enum eAnimFilter_Flags { #define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Lamp *), ((la->flag & LA_DS_EXPAND))) #define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND))) #define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND))) -#define FILTER_PART_OBJD(part) (CHECK_TYPE_INLINE(part, ParticleSettings *), ((part->flag & PART_DS_EXPAND))) #define FILTER_MBALL_OBJD(mb) (CHECK_TYPE_INLINE(mb, MetaBall *), ((mb->flag2 & MB_DS_EXPAND))) #define FILTER_ARM_OBJD(arm) (CHECK_TYPE_INLINE(arm, bArmature *), ((arm->flag & ARM_DS_EXPAND))) #define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND))) diff --git a/source/blender/editors/include/ED_buttons.h b/source/blender/editors/include/ED_buttons.h index 9a987d7618c..1aee13a8ccf 100644 --- a/source/blender/editors/include/ED_buttons.h +++ b/source/blender/editors/include/ED_buttons.h @@ -33,7 +33,6 @@ bool ED_texture_context_check_world(const struct bContext *C); bool ED_texture_context_check_material(const struct bContext *C); bool ED_texture_context_check_lamp(const struct bContext *C); -bool ED_texture_context_check_particles(const struct bContext *C); bool ED_texture_context_check_linestyle(const struct bContext *C); bool ED_texture_context_check_others(const struct bContext *C); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 453cc0980d5..e746e3ee875 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1560,8 +1560,7 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED( ob = CTX_data_active_object(C); if (ob) { - const bool use_mode_particle_edit = (BLI_listbase_is_empty(&ob->particlesystem) == false) || - (ob->soft != NULL) || + const bool use_mode_particle_edit = (ob->soft != NULL) || (modifiers_findByType(ob, eModifierType_Cloth) != NULL); while (input->identifier) { if ((input->value == OB_MODE_EDIT && OB_TYPE_SUPPORT_EDITMODE(ob->type)) || diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 196721ade07..ce2edb756e5 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -299,8 +299,7 @@ static bool object_modifier_remove(Main *bmain, Object *ob, ModifierData *md, modifier_skin_customdata_delete(ob); } - if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) && - BLI_listbase_is_empty(&ob->particlesystem)) + if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth)) { ob->mode &= ~OB_MODE_PARTICLE_EDIT; } diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index ac762671380..d72b7dbd8dc 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -96,12 +96,6 @@ bool ED_texture_context_check_lamp(const bContext *C) return (ob && (ob->type == OB_LAMP)); } -bool ED_texture_context_check_particles(const bContext *C) -{ - Object *ob = CTX_data_active_object(C); - return (ob && ob->particlesystem.first); -} - bool ED_texture_context_check_linestyle(const bContext *C) { #ifdef WITH_FREESTYLE @@ -176,7 +170,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts) bool valid_world = ED_texture_context_check_world(C); bool valid_material = ED_texture_context_check_material(C); bool valid_lamp = ED_texture_context_check_lamp(C); - bool valid_particles = ED_texture_context_check_particles(C); bool valid_linestyle = ED_texture_context_check_linestyle(C); bool valid_others = ED_texture_context_check_others(C); @@ -190,9 +183,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts) else if ((sbuts->mainb == BCONTEXT_DATA) && valid_lamp) { sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LAMP; } - else if ((sbuts->mainb == BCONTEXT_PARTICLE) && valid_particles) { - sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_PARTICLES; - } else if ((sbuts->mainb == BCONTEXT_RENDER_LAYER) && valid_linestyle) { sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LINESTYLE; } @@ -204,7 +194,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts) (((sbuts->texture_context_prev == SB_TEXC_WORLD) && valid_world) || ((sbuts->texture_context_prev == SB_TEXC_MATERIAL) && valid_material) || ((sbuts->texture_context_prev == SB_TEXC_LAMP) && valid_lamp) || - ((sbuts->texture_context_prev == SB_TEXC_PARTICLES) && valid_particles) || ((sbuts->texture_context_prev == SB_TEXC_LINESTYLE) && valid_linestyle) || ((sbuts->texture_context_prev == SB_TEXC_OTHER) && valid_others))) { @@ -214,7 +203,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts) else if (((sbuts->texture_context == SB_TEXC_WORLD) && !valid_world) || ((sbuts->texture_context == SB_TEXC_MATERIAL) && !valid_material) || ((sbuts->texture_context == SB_TEXC_LAMP) && !valid_lamp) || - ((sbuts->texture_context == SB_TEXC_PARTICLES) && !valid_particles) || ((sbuts->texture_context == SB_TEXC_LINESTYLE) && !valid_linestyle) || ((sbuts->texture_context == SB_TEXC_OTHER) && !valid_others)) { @@ -226,9 +214,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts) else if (valid_lamp) { sbuts->texture_context = SB_TEXC_LAMP; } - else if (valid_particles) { - sbuts->texture_context = SB_TEXC_PARTICLES; - } else if (valid_linestyle) { sbuts->texture_context = SB_TEXC_LINESTYLE; } diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h deleted file mode 100644 index f1930ffd643..00000000000 --- a/source/blender/makesdna/DNA_boid_types.h +++ /dev/null @@ -1,225 +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 ***** - */ - -/** \file DNA_boid_types.h - * \ingroup DNA - */ - -#ifndef __DNA_BOID_TYPES_H__ -#define __DNA_BOID_TYPES_H__ - -#include "DNA_listBase.h" - -typedef enum BoidRuleType { - eBoidRuleType_None = 0, - eBoidRuleType_Goal = 1, /* go to goal assigned object or loudest assigned signal source */ - eBoidRuleType_Avoid = 2, /* get away from assigned object or loudest assigned signal source */ - eBoidRuleType_AvoidCollision = 3, /* manoeuver to avoid collisions with other boids and deflector object in near future */ - eBoidRuleType_Separate = 4, /* keep from going through other boids */ - eBoidRuleType_Flock = 5, /* move to center of neighbors and match their velocity */ - eBoidRuleType_FollowLeader = 6, /* follow a boid or assigned object */ - eBoidRuleType_AverageSpeed = 7, /* maintain speed, flight level or wander*/ - eBoidRuleType_Fight = 8, /* go to closest enemy and attack when in range */ - //eBoidRuleType_Protect = 9, /* go to enemy closest to target and attack when in range */ - //eBoidRuleType_Hide = 10, /* find a deflector move to it's other side from closest enemy */ - //eBoidRuleType_FollowPath = 11, /* move along a assigned curve or closest curve in a group */ - //eBoidRuleType_FollowWall = 12, /* move next to a deflector object's in direction of it's tangent */ - NUM_BOID_RULE_TYPES -} BoidRuleType; - -/* boidrule->flag */ -#define BOIDRULE_CURRENT 1 -#define BOIDRULE_IN_AIR 4 -#define BOIDRULE_ON_LAND 8 -typedef struct BoidRule { - struct BoidRule *next, *prev; - int type, flag; - char name[32]; -} BoidRule; -#define BRULE_GOAL_AVOID_PREDICT 1 -#define BRULE_GOAL_AVOID_ARRIVE 2 -#define BRULE_GOAL_AVOID_SIGNAL 4 -typedef struct BoidRuleGoalAvoid { - BoidRule rule; - struct Object *ob; - int options; - float fear_factor; - - /* signals */ - int signal_id, channels; -} BoidRuleGoalAvoid; -#define BRULE_ACOLL_WITH_BOIDS 1 -#define BRULE_ACOLL_WITH_DEFLECTORS 2 -typedef struct BoidRuleAvoidCollision { - BoidRule rule; - int options; - float look_ahead; -} BoidRuleAvoidCollision; -#define BRULE_LEADER_IN_LINE 1 -typedef struct BoidRuleFollowLeader { - BoidRule rule; - struct Object *ob; - float loc[3], oloc[3]; - float cfra, distance; - int options, queue_size; -} BoidRuleFollowLeader; -typedef struct BoidRuleAverageSpeed { - BoidRule rule; - float wander, level, speed, rt; -} BoidRuleAverageSpeed; -typedef struct BoidRuleFight { - BoidRule rule; - float distance, flee_distance; -} BoidRuleFight; - -typedef enum BoidMode { - eBoidMode_InAir = 0, - eBoidMode_OnLand = 1, - eBoidMode_Climbing = 2, - eBoidMode_Falling = 3, - eBoidMode_Liftoff = 4, - NUM_BOID_MODES -} BoidMode; - - -typedef struct BoidData { - float health, acc[3]; - short state_id, mode; -} BoidData; - -// planned for near future -//typedef enum BoidConditionMode { -// eBoidConditionType_Then = 0, -// eBoidConditionType_And = 1, -// eBoidConditionType_Or = 2, -// NUM_BOID_CONDITION_MODES -//} BoidConditionMode; -//typedef enum BoidConditionType { -// eBoidConditionType_None = 0, -// eBoidConditionType_Signal = 1, -// eBoidConditionType_NoSignal = 2, -// eBoidConditionType_HealthBelow = 3, -// eBoidConditionType_HealthAbove = 4, -// eBoidConditionType_See = 5, -// eBoidConditionType_NotSee = 6, -// eBoidConditionType_StateTime = 7, -// eBoidConditionType_Touching = 8, -// NUM_BOID_CONDITION_TYPES -//} BoidConditionType; -//typedef struct BoidCondition { -// struct BoidCondition *next, *prev; -// int state_id; -// short type, mode; -// float threshold, probability; -// -// /* signals */ -// int signal_id, channels; -//} BoidCondition; - -typedef enum BoidRulesetType { - eBoidRulesetType_Fuzzy = 0, - eBoidRulesetType_Random = 1, - eBoidRulesetType_Average = 2, - NUM_BOID_RULESET_TYPES -} BoidRulesetType; -#define BOIDSTATE_CURRENT 1 -typedef struct BoidState { - struct BoidState *next, *prev; - ListBase rules; - ListBase conditions; - ListBase actions; - char name[32]; - int id, flag; - - /* rules */ - int ruleset_type; - float rule_fuzziness; - - /* signal */ - int signal_id, channels; - float volume, falloff; -} BoidState; - -// planned for near future -//typedef struct BoidSignal { -// struct BoidSignal *next, *prev; -// float loc[3]; -// float volume, falloff; -// int id; -//} BoidSignal; -//typedef struct BoidSignalDefine { -// struct BoidSignalDefine *next, *prev; -// int id, rt; -// char name[32]; -//} BoidSignalDefine; - -//typedef struct BoidSimulationData { -// ListBase signal_defines;/* list of defined signals */ -// ListBase signals[20]; /* gathers signals from all channels */ -// struct KDTree *signaltrees[20]; -// char channel_names[20][32]; -// int last_signal_id; /* used for incrementing signal ids */ -// int flag; /* switches for drawing stuff */ -//} BoidSimulationData; - -typedef struct BoidSettings { - int options, last_state_id; - - float landing_smoothness, height; - float banking, pitch; - - float health, aggression; - float strength, accuracy, range; - - /* flying related */ - float air_min_speed, air_max_speed; - float air_max_acc, air_max_ave; - float air_personal_space; - - /* walk/run related */ - float land_jump_speed, land_max_speed; - float land_max_acc, land_max_ave; - float land_personal_space; - float land_stick_force; - - struct ListBase states; -} BoidSettings; - -/* boidsettings->options */ -#define BOID_ALLOW_FLIGHT 1 -#define BOID_ALLOW_LAND 2 -#define BOID_ALLOW_CLIMB 4 - -/* boidrule->options */ -//#define BOID_RULE_FOLLOW_LINE 1 /* follow leader */ -//#define BOID_RULE_PREDICT 2 /* goal/avoid */ -//#define BOID_RULE_ARRIVAL 4 /* goal */ -//#define BOID_RULE_LAND 8 /* goal */ -//#define BOID_RULE_WITH_BOIDS 16 /* avoid collision */ -//#define BOID_RULE_WITH_DEFLECTORS 32 /* avoid collision */ - -#endif diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index 17553e98817..defc51c8802 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -230,7 +230,6 @@ enum { typedef struct DynamicPaintBrushSettings { struct DynamicPaintModifierData *pmd; /* for fast RNA access */ struct DerivedMesh *dm; - struct ParticleSystem *psys; struct Material *mat; int flags; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index d53c8360bb5..097bf5b1eab 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -51,7 +51,6 @@ struct Material; struct PartDeflect; struct SoftBody; struct FluidsimSettings; -struct ParticleSystem; struct DerivedMesh; struct SculptSession; struct bGPdata; @@ -263,7 +262,6 @@ typedef struct Object { ListBase constraints; /* object constraints */ ListBase nlastrips DNA_DEPRECATED; // XXX deprecated... old animation system ListBase hooks DNA_DEPRECATED; // XXX deprecated... old animation system - ListBase particlesystem; /* particle systems */ struct PartDeflect *pd; /* particle deflector/attractor/collision data */ struct SoftBody *soft; /* if exists, saved in file */ @@ -332,9 +330,6 @@ typedef struct DupliObject { /* persistent identifier for a dupli object, for inter-frame matching of * objects with motion blur, or inter-update matching for syncing */ int persistent_id[8]; /* MAX_DUPLI_RECUR */ - - /* particle this dupli was generated from */ - struct ParticleSystem *particle_system; } DupliObject; /* **************** OBJECT ********************* */ diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 76de8443faa..ff85c254215 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -189,7 +189,6 @@ typedef struct SmokeDomainSettings { typedef struct SmokeFlowSettings { struct SmokeModifierData *smd; /* for fast RNA access */ struct DerivedMesh *dm; - struct ParticleSystem *psys; struct Tex *noise_texture; /* initial velocity */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 978d581668c..a714518c32f 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -118,7 +118,6 @@ static const char *includefiles[] = { "DNA_gpencil_types.h", "DNA_windowmanager_types.h", "DNA_anim_types.h", - "DNA_boid_types.h", "DNA_smoke_types.h", "DNA_speaker_types.h", "DNA_movieclip_types.h", @@ -1292,7 +1291,6 @@ int main(int argc, char **argv) #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" #include "DNA_anim_types.h" -#include "DNA_boid_types.h" #include "DNA_smoke_types.h" #include "DNA_speaker_types.h" #include "DNA_movieclip_types.h" diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index d39c3bc4d13..a02c262d58d 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3615,11 +3615,8 @@ static int allow_render_object(Render *re, Object *ob, int nolamps, int onlysele if (is_object_hidden(re, ob)) return 0; - /* Only handle dupli-hiding here if there is no particle systems. Else, let those handle show/noshow. */ - if (!ob->particlesystem.first) { - if ((ob->transflag & OB_DUPLI) && !(ob->transflag & OB_DUPLIFRAMES)) { - return 0; - } + if ((ob->transflag & OB_DUPLI) && !(ob->transflag & OB_DUPLIFRAMES)) { + return 0; } /* don't add non-basic meta objects, ends up having renderobjects with no geometry */ -- cgit v1.2.3