From 66521b382b33168dc661f53b20a3cde7933eecf6 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Feb 2018 14:47:02 +0100 Subject: Depsgraph: Correction to previous particle fix The reason it appeared working was due to left-over debug code to force time dependency. Real fix seems to include force tagging objects used by duplication, similar to what we do for some other modifiers already. --- .../intern/builder/deg_builder_relations.cc | 1 - source/blender/render/intern/source/pipeline.c | 24 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index c30d3fecdd5..553442e3ca5 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -193,7 +193,6 @@ static bool particle_system_depends_on_time(ParticleSystem *psys) static bool object_particles_depends_on_time(Object *object) { - return true; BLI_LISTBASE_FOREACH (ParticleSystem *, psys, &object->particlesystem) { if (particle_system_depends_on_time(psys)) { return true; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index f1dce4d0cfb..6ed2534f152 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -37,9 +37,11 @@ #include #include "DNA_anim_types.h" +#include "DNA_group_types.h" #include "DNA_image_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" +#include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" #include "DNA_userdef_types.h" @@ -2088,6 +2090,28 @@ static void tag_dependend_objects_for_render(Scene *scene, int renderlay) DAG_id_tag_update(&smd->target->id, OB_RECALC_DATA); } } + else if (md->type == eModifierType_ParticleSystem) { + ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md; + ParticleSystem *psys = psmd->psys; + ParticleSettings *part = psys->part; + switch (part->ren_as) { + case PART_DRAW_OB: + if (part->dup_ob != NULL) { + DAG_id_tag_update(&part->dup_ob->id, OB_RECALC_DATA); + } + break; + case PART_DRAW_GR: + if (part->dup_group != NULL) { + for (GroupObject *go = part->dup_group->gobject.first; + go != NULL; + go = go->next) + { + DAG_id_tag_update(&go->ob->id, OB_RECALC_DATA); + } + } + break; + } + } } } } -- cgit v1.2.3 From 1e4b612d6a63ce781f229ddd6e3073a5d6951950 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Feb 2018 11:14:08 +1100 Subject: Cleanup: add _types.h suffix to DNA headers --- intern/elbeem/extern/elbeem.h | 2 +- source/blender/CMakeLists.txt | 4 +- source/blender/alembic/intern/abc_mesh.cc | 2 +- source/blender/blenkernel/BKE_pointcache.h | 4 +- source/blender/blenkernel/intern/boids.c | 2 +- source/blender/blenkernel/intern/bpath.c | 4 +- source/blender/blenkernel/intern/bullet.c | 2 +- source/blender/blenkernel/intern/collision.c | 2 +- source/blender/blenkernel/intern/effect.c | 2 +- source/blender/blenkernel/intern/fluidsim.c | 4 +- source/blender/blenkernel/intern/library_query.c | 2 +- source/blender/blenkernel/intern/object_deform.c | 2 +- source/blender/blenkernel/intern/particle_system.c | 4 +- source/blender/blenkernel/intern/pointcache.c | 2 +- source/blender/blenkernel/intern/rigidbody.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/blenloader/intern/versioning_250.c | 2 +- source/blender/blenloader/intern/versioning_260.c | 2 +- source/blender/blenloader/intern/versioning_270.c | 2 +- .../blender/blenloader/intern/versioning_legacy.c | 2 +- source/blender/blenloader/intern/writefile.c | 2 +- .../intern/builder/deg_builder_relations.cc | 2 +- source/blender/depsgraph/intern/depsgraph_build.cc | 2 +- .../editors/interface/interface_templates.c | 2 +- source/blender/editors/object/object_add.c | 4 +- source/blender/editors/object/object_edit.c | 2 +- source/blender/editors/object/object_modifier.c | 2 +- source/blender/editors/physics/physics_fluid.c | 2 +- .../editors/space_buttons/buttons_texture.c | 2 +- source/blender/makesdna/DNA_modifier_types.h | 6 +- source/blender/makesdna/DNA_object_fluidsim.h | 194 --------- .../blender/makesdna/DNA_object_fluidsim_types.h | 194 +++++++++ source/blender/makesdna/DNA_object_force.h | 457 --------------------- source/blender/makesdna/DNA_object_force_types.h | 457 +++++++++++++++++++++ source/blender/makesdna/DNA_smoke_types.h | 2 +- source/blender/makesdna/intern/makesdna.c | 8 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 2 +- source/blender/makesrna/intern/rna_fluidsim.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/makesrna/intern/rna_object.c | 2 +- source/blender/makesrna/intern/rna_object_force.c | 2 +- source/blender/makesrna/intern/rna_particle.c | 2 +- source/blender/makesrna/intern/rna_smoke.c | 2 +- source/blender/modifiers/intern/MOD_dynamicpaint.c | 2 +- source/blender/modifiers/intern/MOD_fluidsim.c | 2 +- .../blender/modifiers/intern/MOD_fluidsim_util.c | 2 +- source/blender/modifiers/intern/MOD_smoke.c | 2 +- source/blender/modifiers/intern/MOD_softbody.c | 2 +- source/blender/physics/intern/BPH_mass_spring.cpp | 2 +- source/blender/physics/intern/implicit_blender.c | 2 +- source/blender/physics/intern/implicit_eigen.cpp | 2 +- .../blender/render/intern/source/convertblender.c | 2 +- source/blender/render/intern/source/voxeldata.c | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 2 +- .../Physics/Bullet/CcdPhysicsEnvironment.cpp | 2 +- 55 files changed, 713 insertions(+), 713 deletions(-) delete mode 100644 source/blender/makesdna/DNA_object_fluidsim.h create mode 100644 source/blender/makesdna/DNA_object_fluidsim_types.h delete mode 100644 source/blender/makesdna/DNA_object_force.h create mode 100644 source/blender/makesdna/DNA_object_force_types.h diff --git a/intern/elbeem/extern/elbeem.h b/intern/elbeem/extern/elbeem.h index bd50b6f08dc..6cc2024dde7 100644 --- a/intern/elbeem/extern/elbeem.h +++ b/intern/elbeem/extern/elbeem.h @@ -106,7 +106,7 @@ typedef struct elbeemSimulationSettings { // defines for elbeemMesh->type below -/* please keep in sync with DNA_object_fluidsim.h */ +/* please keep in sync with DNA_object_fluidsim_types.h */ #define OB_FLUIDSIM_FLUID 4 #define OB_FLUIDSIM_OBSTACLE 8 #define OB_FLUIDSIM_INFLOW 16 diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 905abba5a7e..690e1bcf318 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -63,8 +63,8 @@ set(SRC_DNA_INC ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_modifier_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_nla_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_node_types.h - ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_fluidsim.h - ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_force.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_fluidsim_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_force_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_enums.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index ffaa516d81a..90e95542a9a 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -31,7 +31,7 @@ extern "C" { #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "BLI_math_geom.h" diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index f0819c8d79d..f31ae715539 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -34,7 +34,7 @@ #include "DNA_ID.h" #include "DNA_dynamicpaint_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_boid_types.h" #include /* for FILE */ @@ -140,7 +140,7 @@ typedef struct PTCacheID { unsigned int default_step; unsigned int max_step; - /* flags defined in DNA_object_force.h */ + /* flags defined in DNA_object_force_types.h */ unsigned int data_types, info_types; /* copies point data to cache data */ diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 7ca4e07076d..a2a242e7519 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -35,7 +35,7 @@ #include "MEM_guardedalloc.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_scene_types.h" #include "BLI_rand.h" diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 158c6c31432..e9a8de4469d 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -53,8 +53,8 @@ #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" #include "DNA_movieclip_types.h" -#include "DNA_object_fluidsim.h" -#include "DNA_object_force.h" +#include "DNA_object_fluidsim_types.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_sequence_types.h" diff --git a/source/blender/blenkernel/intern/bullet.c b/source/blender/blenkernel/intern/bullet.c index 088031e16a7..c16c0f7af31 100644 --- a/source/blender/blenkernel/intern/bullet.c +++ b/source/blender/blenkernel/intern/bullet.c @@ -33,7 +33,7 @@ #include "MEM_guardedalloc.h" /* types */ -#include "DNA_object_force.h" /* here is the softbody struct */ +#include "DNA_object_force_types.h" /* here is the softbody struct */ #include "BKE_bullet.h" diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 21e28f5180c..bd336016838 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -36,7 +36,7 @@ #include "DNA_effect_types.h" #include "DNA_group_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_scene_types.h" #include "DNA_meshdata_types.h" diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 38f5c00941c..749c5897abb 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -42,7 +42,7 @@ #include "DNA_listBase.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_particle_types.h" #include "DNA_texture_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index 8e98a9f672d..30ead3ffbb6 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -40,8 +40,8 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_object_fluidsim.h" -#include "DNA_object_force.h" // for pointcache +#include "DNA_object_fluidsim_types.h" +#include "DNA_object_force_types.h" // for pointcache #include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 0dda3d3c7d6..8d92ddcb053 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -51,7 +51,7 @@ #include "DNA_movieclip_types.h" #include "DNA_mask_types.h" #include "DNA_node_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" #include "DNA_sensor_types.h" diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index d387e30050c..4f92509827f 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -42,7 +42,7 @@ #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index c5cc7c28243..dfc732dcb74 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -48,7 +48,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_curve_types.h" #include "DNA_scene_types.h" @@ -96,7 +96,7 @@ /* fluid sim particle import */ #ifdef WITH_MOD_FLUID -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "LBM_fluidsim.h" #include #include diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 7a1b378b3c4..dc1c0da4401 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -40,7 +40,7 @@ #include "DNA_dynamicpaint_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_particle_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 03eb83376e7..39b0668f0b9 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -50,7 +50,7 @@ #include "DNA_group_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4c1beb78bbf..2a25de121b3 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -81,7 +81,7 @@ #include "DNA_meshdata_types.h" #include "DNA_nla_types.h" #include "DNA_node_types.h" -#include "DNA_object_fluidsim.h" // NT +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "DNA_packedFile_types.h" #include "DNA_particle_types.h" diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 5ec81f62bd0..d308bd54da3 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -52,7 +52,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_node_types.h" -#include "DNA_object_fluidsim.h" // NT +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "DNA_view3d_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 77542d8deb9..dad61868961 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -41,7 +41,7 @@ #include "DNA_linestyle_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_object_fluidsim.h" // NT +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "DNA_property_types.h" #include "DNA_text_types.h" diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 75acd620c86..d27c1ce16d3 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -45,7 +45,7 @@ #include "DNA_sequence_types.h" #include "DNA_space_types.h" #include "DNA_screen_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_mask_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index a7a3ff6e323..80490081337 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -58,7 +58,7 @@ #include "DNA_meshdata_types.h" #include "DNA_nla_types.h" #include "DNA_node_types.h" -#include "DNA_object_fluidsim.h" // NT +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "DNA_property_types.h" #include "DNA_view3d_types.h" diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 11ad960259f..ceb1233596a 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -127,7 +127,7 @@ #include "DNA_material_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_packedFile_types.h" #include "DNA_particle_types.h" #include "DNA_property_types.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 553442e3ca5..65f45186ba4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -66,7 +66,7 @@ extern "C" { #include "DNA_scene_types.h" #include "DNA_texture_types.h" #include "DNA_world_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "BKE_action.h" #include "BKE_armature.h" diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 3884cfe49e7..0c093c26fc5 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -46,7 +46,7 @@ extern "C" { #include "DNA_cachefile_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "BKE_main.h" #include "BKE_collision.h" diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1a1f2b42322..82a502db0ad 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -36,7 +36,7 @@ #include "DNA_node_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_brush_types.h" #include "DNA_texture_types.h" diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9746acc7f8e..8d5c4684c2b 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -42,8 +42,8 @@ #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meta_types.h" -#include "DNA_object_fluidsim.h" -#include "DNA_object_force.h" +#include "DNA_object_fluidsim_types.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_vfont_types.h" diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 43a5307de1c..9bdd20b0ae8 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -54,7 +54,7 @@ #include "DNA_property_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_meshdata_types.h" #include "DNA_vfont_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 4e90a9bc7c4..81883725f64 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -40,7 +40,7 @@ #include "DNA_key_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_scene_types.h" #include "BLI_bitmap.h" diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 6460e83e2a0..2f95f360fe2 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -39,7 +39,7 @@ /* types */ #include "DNA_action_types.h" #include "DNA_object_types.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "BLI_blenlib.h" #include "BLI_math.h" diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index e3d72ba67d8..3c48f3c1111 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -45,7 +45,7 @@ #include "DNA_material_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index f7136e6e438..bbacdaebe5d 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -603,7 +603,7 @@ typedef struct ClothModifierData { struct Cloth *clothObject; /* The internal data structure for cloth. */ struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */ struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */ - struct PointCache *point_cache; /* definition is in DNA_object_force.h */ + struct PointCache *point_cache; /* definition is in DNA_object_force_types.h */ struct ListBase ptcaches; /* XXX nasty hack, remove once hair can be separated from cloth modifier data */ struct ClothHairData *hairdata; @@ -800,8 +800,8 @@ typedef enum { typedef struct FluidsimModifierData { ModifierData modifier; - struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */ - struct PointCache *point_cache; /* definition is in DNA_object_force.h */ + struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim_types.h */ + struct PointCache *point_cache; /* definition is in DNA_object_force_types.h */ } FluidsimModifierData; typedef struct ShrinkwrapModifierData { diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h deleted file mode 100644 index 846d5788d63..00000000000 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ /dev/null @@ -1,194 +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) 2004-2005 by Blender Foundation - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file DNA_object_fluidsim.h - * \ingroup DNA - */ - -#ifndef __DNA_OBJECT_FLUIDSIM_H__ -#define __DNA_OBJECT_FLUIDSIM_H__ - -#include "DNA_ID.h" -#include "DNA_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct Mesh; -struct Ipo; - -typedef struct FluidVertexVelocity { - float vel[3]; -} FluidVertexVelocity; - -typedef struct FluidsimSettings { - struct FluidsimModifierData *fmd; /* for fast RNA access */ - /* threadcont the calculation is done with */ - int threads; - int pad1; - /* domain, fluid or obstacle */ - short type; - /* display advanced options in fluid sim tab (on=1, off=0)*/ - short show_advancedoptions; - - /* domain object settings */ - /* resolutions */ - short resolutionxyz; - short previewresxyz; - /* size of the domain in real units (meters along largest resolution x, y, z extent) */ - float realsize; - /* show original meshes, preview or final sim */ - short guiDisplayMode; - short renderDisplayMode; - - /* fluid properties */ - float viscosityValue; - short viscosityMode DNA_DEPRECATED; - short viscosityExponent; - /* gravity strength */ - float grav[3]; - /* anim start end time (in seconds) */ - float animStart, animEnd; - /* bake start end time (in blender frames) */ - int bakeStart, bakeEnd; - /* offset for baked frames */ - int frameOffset; - int pad2; - /* g star param (LBM compressibility) */ - float gstar; - /* activate refinement? */ - int maxRefine; - - /* fluid object type settings */ - /* gravity strength */ - float iniVelx, iniVely, iniVelz; - - /* store output path, and file prefix for baked fluid surface */ - /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */ - char surfdataPath[1024]; - - /* store start coords of axis aligned bounding box together with size */ - /* values are inited during derived mesh display */ - float bbStart[3], bbSize[3]; - - /* animated params */ - struct Ipo *ipo; - - /* additional flags depending on the type, lower short contains flags - * to check validity, higher short additional flags */ - short typeFlags; - /* switch off velocity genration, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */ - char domainNovecgen, volumeInitType; - - /* boundary "stickiness" for part slip values */ - float partSlipValue; - - /* number of tracers to generate */ - int generateTracers; - /* particle generation - on if >0, then determines amount (experimental...) */ - float generateParticles; - /* smooth fluid surface? */ - float surfaceSmoothing; - /* number of surface subdivisions*/ - int surfaceSubdivs; - int flag; /* GUI flags */ - - /* particle display - size scaling, and alpha influence */ - float particleInfSize, particleInfAlpha; - /* testing vars */ - float farFieldSize; - - /* vertex velocities of simulated fluid mesh */ - struct FluidVertexVelocity *meshVelocities; - /* number of vertices in simulated fluid mesh */ - int totvert; - - /* Fluid control settings */ - float cpsTimeStart; - float cpsTimeEnd; - float cpsQuality; - - float attractforceStrength; - float attractforceRadius; - float velocityforceStrength; - float velocityforceRadius; - - int lastgoodframe; - - /* Simulation/flow rate control (i.e. old "Fac-Time") */ - float animRate; -} FluidsimSettings; - -/* ob->fluidsimSettings defines */ -#define OB_FLUIDSIM_ENABLE 1 -#define OB_FLUIDSIM_DOMAIN 2 -#define OB_FLUIDSIM_FLUID 4 -#define OB_FLUIDSIM_OBSTACLE 8 -#define OB_FLUIDSIM_INFLOW 16 -#define OB_FLUIDSIM_OUTFLOW 32 -#define OB_FLUIDSIM_PARTICLE 64 -#define OB_FLUIDSIM_CONTROL 128 - -#define OB_TYPEFLAG_START 7 -#define OB_FSGEO_THIN (1<<(OB_TYPEFLAG_START+1)) -#define OB_FSBND_NOSLIP (1<<(OB_TYPEFLAG_START+2)) -#define OB_FSBND_PARTSLIP (1<<(OB_TYPEFLAG_START+3)) -#define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4)) -#define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5)) - -/* surface generation flag (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") */ -#define OB_FSSG_NOOBS (1<<(OB_TYPEFLAG_START+6)) - -// guiDisplayMode particle flags -#define OB_FSDOM_GEOM 1 -#define OB_FSDOM_PREVIEW 2 -#define OB_FSDOM_FINAL 3 -#define OB_FSPART_BUBBLE (1<<1) -#define OB_FSPART_DROP (1<<2) -#define OB_FSPART_NEWPART (1<<3) -#define OB_FSPART_FLOAT (1<<4) -#define OB_FSPART_TRACER (1<<5) - -// new fluid bit flags for fss->flags -#define OB_FLUIDSIM_REVERSE (1 << 0) -#define OB_FLUIDSIM_ACTIVE (1 << 1) -#define OB_FLUIDSIM_OVERRIDE_TIME (1 << 2) - -#define OB_FLUIDSIM_SURF_DIR_DEFAULT "cache_fluid" -#define OB_FLUIDSIM_SURF_PREVIEW_OBJ_FNAME "fluidsurface_preview_####.bobj.gz" -#define OB_FLUIDSIM_SURF_FINAL_OBJ_FNAME "fluidsurface_final_####.bobj.gz" -#define OB_FLUIDSIM_SURF_FINAL_VEL_FNAME "fluidsurface_final_####.bvel.gz" -#define OB_FLUIDSIM_SURF_PARTICLES_FNAME "fluidsurface_particles_####.gz" - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h new file mode 100644 index 00000000000..c2816383ffb --- /dev/null +++ b/source/blender/makesdna/DNA_object_fluidsim_types.h @@ -0,0 +1,194 @@ +/* + * ***** 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) 2004-2005 by Blender Foundation + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_object_fluidsim_types.h + * \ingroup DNA + */ + +#ifndef __DNA_OBJECT_FLUIDSIM_H__ +#define __DNA_OBJECT_FLUIDSIM_H__ + +#include "DNA_ID.h" +#include "DNA_defs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct Mesh; +struct Ipo; + +typedef struct FluidVertexVelocity { + float vel[3]; +} FluidVertexVelocity; + +typedef struct FluidsimSettings { + struct FluidsimModifierData *fmd; /* for fast RNA access */ + /* threadcont the calculation is done with */ + int threads; + int pad1; + /* domain, fluid or obstacle */ + short type; + /* display advanced options in fluid sim tab (on=1, off=0)*/ + short show_advancedoptions; + + /* domain object settings */ + /* resolutions */ + short resolutionxyz; + short previewresxyz; + /* size of the domain in real units (meters along largest resolution x, y, z extent) */ + float realsize; + /* show original meshes, preview or final sim */ + short guiDisplayMode; + short renderDisplayMode; + + /* fluid properties */ + float viscosityValue; + short viscosityMode DNA_DEPRECATED; + short viscosityExponent; + /* gravity strength */ + float grav[3]; + /* anim start end time (in seconds) */ + float animStart, animEnd; + /* bake start end time (in blender frames) */ + int bakeStart, bakeEnd; + /* offset for baked frames */ + int frameOffset; + int pad2; + /* g star param (LBM compressibility) */ + float gstar; + /* activate refinement? */ + int maxRefine; + + /* fluid object type settings */ + /* gravity strength */ + float iniVelx, iniVely, iniVelz; + + /* store output path, and file prefix for baked fluid surface */ + /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */ + char surfdataPath[1024]; + + /* store start coords of axis aligned bounding box together with size */ + /* values are inited during derived mesh display */ + float bbStart[3], bbSize[3]; + + /* animated params */ + struct Ipo *ipo; + + /* additional flags depending on the type, lower short contains flags + * to check validity, higher short additional flags */ + short typeFlags; + /* switch off velocity genration, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */ + char domainNovecgen, volumeInitType; + + /* boundary "stickiness" for part slip values */ + float partSlipValue; + + /* number of tracers to generate */ + int generateTracers; + /* particle generation - on if >0, then determines amount (experimental...) */ + float generateParticles; + /* smooth fluid surface? */ + float surfaceSmoothing; + /* number of surface subdivisions*/ + int surfaceSubdivs; + int flag; /* GUI flags */ + + /* particle display - size scaling, and alpha influence */ + float particleInfSize, particleInfAlpha; + /* testing vars */ + float farFieldSize; + + /* vertex velocities of simulated fluid mesh */ + struct FluidVertexVelocity *meshVelocities; + /* number of vertices in simulated fluid mesh */ + int totvert; + + /* Fluid control settings */ + float cpsTimeStart; + float cpsTimeEnd; + float cpsQuality; + + float attractforceStrength; + float attractforceRadius; + float velocityforceStrength; + float velocityforceRadius; + + int lastgoodframe; + + /* Simulation/flow rate control (i.e. old "Fac-Time") */ + float animRate; +} FluidsimSettings; + +/* ob->fluidsimSettings defines */ +#define OB_FLUIDSIM_ENABLE 1 +#define OB_FLUIDSIM_DOMAIN 2 +#define OB_FLUIDSIM_FLUID 4 +#define OB_FLUIDSIM_OBSTACLE 8 +#define OB_FLUIDSIM_INFLOW 16 +#define OB_FLUIDSIM_OUTFLOW 32 +#define OB_FLUIDSIM_PARTICLE 64 +#define OB_FLUIDSIM_CONTROL 128 + +#define OB_TYPEFLAG_START 7 +#define OB_FSGEO_THIN (1<<(OB_TYPEFLAG_START+1)) +#define OB_FSBND_NOSLIP (1<<(OB_TYPEFLAG_START+2)) +#define OB_FSBND_PARTSLIP (1<<(OB_TYPEFLAG_START+3)) +#define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4)) +#define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5)) + +/* surface generation flag (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") */ +#define OB_FSSG_NOOBS (1<<(OB_TYPEFLAG_START+6)) + +// guiDisplayMode particle flags +#define OB_FSDOM_GEOM 1 +#define OB_FSDOM_PREVIEW 2 +#define OB_FSDOM_FINAL 3 +#define OB_FSPART_BUBBLE (1<<1) +#define OB_FSPART_DROP (1<<2) +#define OB_FSPART_NEWPART (1<<3) +#define OB_FSPART_FLOAT (1<<4) +#define OB_FSPART_TRACER (1<<5) + +// new fluid bit flags for fss->flags +#define OB_FLUIDSIM_REVERSE (1 << 0) +#define OB_FLUIDSIM_ACTIVE (1 << 1) +#define OB_FLUIDSIM_OVERRIDE_TIME (1 << 2) + +#define OB_FLUIDSIM_SURF_DIR_DEFAULT "cache_fluid" +#define OB_FLUIDSIM_SURF_PREVIEW_OBJ_FNAME "fluidsurface_preview_####.bobj.gz" +#define OB_FLUIDSIM_SURF_FINAL_OBJ_FNAME "fluidsurface_final_####.bobj.gz" +#define OB_FLUIDSIM_SURF_FINAL_VEL_FNAME "fluidsurface_final_####.bvel.gz" +#define OB_FLUIDSIM_SURF_PARTICLES_FNAME "fluidsurface_particles_####.gz" + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h deleted file mode 100644 index 6e8d4a0480c..00000000000 --- a/source/blender/makesdna/DNA_object_force.h +++ /dev/null @@ -1,457 +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) 2004-2005 by Blender Foundation - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file DNA_object_force.h - * \ingroup DNA - */ - -#ifndef __DNA_OBJECT_FORCE_H__ -#define __DNA_OBJECT_FORCE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "DNA_listBase.h" - -/* pd->forcefield: Effector Fields types */ -typedef enum ePFieldType { - PFIELD_NULL = 0, /* (this is used for general effector weight) */ - PFIELD_FORCE = 1, /* Force away/towards a point depending on force strength */ - PFIELD_VORTEX = 2, /* Force around the effector normal */ - PFIELD_MAGNET = 3, /* Force from the cross product of effector normal and point velocity */ - PFIELD_WIND = 4, /* Force away and towards a point depending which side of the effector */ - /* normal the point is */ - PFIELD_GUIDE = 5, /* Force along curve for dynamics, a shaping curve for hair paths */ - PFIELD_TEXTURE = 6, /* Force based on texture values calculated at point coordinates */ - PFIELD_HARMONIC = 7, /* Force of a harmonic (damped) oscillator */ - PFIELD_CHARGE = 8, /* Force away/towards a point depending on point charge */ - PFIELD_LENNARDJ = 9, /* Force due to a Lennard-Jones potential */ - PFIELD_BOID = 10, /* Defines predator / goal for boids */ - PFIELD_TURBULENCE = 11, /* Force defined by BLI_gTurbulence */ - PFIELD_DRAG = 12, /* Linear & quadratic drag */ - PFIELD_SMOKEFLOW = 13, /* Force based on smoke simulation air flow */ - NUM_PFIELD_TYPES -} ePFieldType; - -typedef struct PartDeflect { - int flag; /* general settings flag */ - short deflect; /* Deflection flag - does mesh deflect particles */ - short forcefield; /* Force field type, do the vertices attract / repel particles? */ - short falloff; /* fall-off type */ - short shape; /* point, plane or surface */ - short tex_mode; /* texture effector */ - short kink, kink_axis; /* for curve guide */ - short zdir; - - /* Main effector values */ - float f_strength; /* The strength of the force (+ or - ) */ - float f_damp; /* Damping ratio of the harmonic effector. */ - float f_flow; /* How much force is converted into "air flow", i.e. */ - /* force used as the velocity of surrounding medium. */ - - float f_size; /* Noise size for noise effector, restlength for harmonic effector */ - - /* fall-off */ - float f_power; /* The power law - real gravitation is 2 (square) */ - float maxdist; /* if indicated, use this maximum */ - float mindist; /* if indicated, use this minimum */ - float f_power_r; /* radial fall-off power */ - float maxrad; /* radial versions of above */ - float minrad; - - /* particle collisions */ - float pdef_damp; /* Damping factor for particle deflection */ - float pdef_rdamp; /* Random element of damping for deflection */ - float pdef_perm; /* Chance of particle passing through mesh */ - float pdef_frict; /* Friction factor for particle deflection */ - float pdef_rfrict; /* Random element of friction for deflection */ - float pdef_stickness;/* surface particle stickiness */ - - float absorption; /* used for forces */ - - /* softbody collisions */ - float pdef_sbdamp; /* Damping factor for softbody deflection */ - float pdef_sbift; /* inner face thickness for softbody deflection */ - float pdef_sboft; /* outer face thickness for softbody deflection */ - - /* guide curve, same as for particle child effects */ - float clump_fac, clump_pow; - float kink_freq, kink_shape, kink_amp, free_end; - - /* texture effector */ - float tex_nabla; /* Used for calculating partial derivatives */ - struct Tex *tex; /* Texture of the texture effector */ - - /* effector noise */ - struct RNG *rng; /* random noise generator for e.g. wind */ - float f_noise; /* noise of force */ - int seed; /* noise random seed */ - - struct Object *f_source; /* force source object */ -} PartDeflect; - -typedef struct EffectorWeights { - struct Group *group; /* only use effectors from this group of objects */ - - float weight[14]; /* effector type specific weights */ - float global_gravity; - short flag, rt[3]; - int pad; -} EffectorWeights; - -/* EffectorWeights->flag */ -#define EFF_WEIGHT_DO_HAIR 1 - -/* Point cache file data types: - * - used as (1< 1) these velocities are interpolated into movement for the non-cached - * frames. The result will look like the point is oscillating around the collision location. So for - * now cache step should be set to 1 for accurate reproduction of collisions. - */ - - int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ - int startframe; /* simulation start frame */ - int endframe; /* simulation end frame */ - int editframe; /* frame being edited (runtime only) */ - int last_exact; /* last exact frame that's cached */ - int last_valid; /* used for editing cache - what is the last baked frame */ - int pad; - - /* for external cache files */ - int totpoint; /* number of cached points */ - int index; /* modifier stack index */ - short compression, rt; - - char name[64]; - char prev_name[64]; - char info[64]; - char path[1024]; /* file path, 1024 = FILE_MAX */ - char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */ - /* can be later used for other per frame flags too if needed */ - struct ListBase mem_cache; - - struct PTCacheEdit *edit; - void (*free_edit)(struct PTCacheEdit *edit); /* free callback */ -} PointCache; - -typedef struct SBVertex { - float vec[4]; -} SBVertex; - -typedef struct BulletSoftBody { - int flag; /* various boolean options */ - float linStiff; /* linear stiffness 0..1 */ - float angStiff; /* angular stiffness 0..1 */ - float volume; /* volume preservation 0..1 */ - - int viterations; /* Velocities solver iterations */ - int piterations; /* Positions solver iterations */ - int diterations; /* Drift solver iterations */ - int citerations; /* Cluster solver iterations */ - - float kSRHR_CL; /* Soft vs rigid hardness [0,1] (cluster only) */ - float kSKHR_CL; /* Soft vs kinetic hardness [0,1] (cluster only) */ - float kSSHR_CL; /* Soft vs soft hardness [0,1] (cluster only) */ - float kSR_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ - - float kSK_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ - float kSS_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ - float kVCF; /* Velocities correction factor (Baumgarte) */ - float kDP; /* Damping coefficient [0,1] */ - - float kDG; /* Drag coefficient [0,+inf] */ - float kLF; /* Lift coefficient [0,+inf] */ - float kPR; /* Pressure coefficient [-inf,+inf] */ - float kVC; /* Volume conversation coefficient [0,+inf] */ - - float kDF; /* Dynamic friction coefficient [0,1] */ - float kMT; /* Pose matching coefficient [0,1] */ - float kCHR; /* Rigid contacts hardness [0,1] */ - float kKHR; /* Kinetic contacts hardness [0,1] */ - - float kSHR; /* Soft contacts hardness [0,1] */ - float kAHR; /* Anchors hardness [0,1] */ - int collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */ - int numclusteriterations; /* number of iterations to refine collision clusters*/ - float welding; /* welding limit to remove duplicate/nearby vertices, 0.0..0.01 */ - float margin; /* margin specific to softbody */ -} BulletSoftBody; - -/* BulletSoftBody.flag */ -#define OB_BSB_SHAPE_MATCHING 2 -// #define OB_BSB_UNUSED 4 -#define OB_BSB_BENDING_CONSTRAINTS 8 -#define OB_BSB_AERO_VPOINT 16 /* aero model, Vertex normals are oriented toward velocity*/ -// #define OB_BSB_AERO_VTWOSIDE 32 /* aero model, Vertex normals are flipped to match velocity */ - -/* BulletSoftBody.collisionflags */ -#define OB_BSB_COL_SDF_RS 2 /* SDF based rigid vs soft */ -#define OB_BSB_COL_CL_RS 4 /* Cluster based rigid vs soft */ -#define OB_BSB_COL_CL_SS 8 /* Cluster based soft vs soft */ -#define OB_BSB_COL_VF_SS 16 /* Vertex/Face based soft vs soft */ - - -typedef struct SoftBody { - /* dynamic data */ - int totpoint, totspring; - struct BodyPoint *bpoint; /* not saved in file */ - struct BodySpring *bspring; /* not saved in file */ - char pad; - char msg_lock; - short msg_value; - - /* part of UI: */ - - /* general options */ - float nodemass; /* softbody mass of *vertex* */ - char namedVG_Mass[64]; /* MAX_VGROUP_NAME */ - /* along with it introduce mass painting - * starting to fix old bug .. nastiness that VG are indexes - * rather find them by name tag to find it -> jow20090613 */ - float grav; /* softbody amount of gravitaion to apply */ - float mediafrict; /* friction to env */ - float rklimit; /* error limit for ODE solver */ - float physics_speed;/* user control over simulation speed */ - - /* goal */ - float goalspring; /* softbody goal springs */ - float goalfrict; /* softbody goal springs friction */ - float mingoal; /* quick limits for goal */ - float maxgoal; - float defgoal; /* default goal for vertices without vgroup */ - short vertgroup; /* index starting at 1 */ - char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */ - /* starting to fix old bug .. nastiness that VG are indexes - * rather find them by name tag to find it -> jow20090613 */ - - short fuzzyness; /* */ - - /* springs */ - float inspring; /* softbody inner springs */ - float infrict; /* softbody inner springs friction */ - char namedVG_Spring_K[64]; /* MAX_VGROUP_NAME */ - /* along with it introduce Spring_K painting - * starting to fix old bug .. nastiness that VG are indexes - * rather find them by name tag to find it -> jow20090613 */ - - /* baking */ - int sfra, efra; - int interval; - short local, solverflags; /* local==1: use local coords for baking */ - - /* -- these must be kept for backwards compatibility -- */ - SBVertex **keys; /* array of size totpointkey */ - int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */ - /* ---------------------------------------------------- */ - float secondspring; - - /* self collision*/ - float colball; /* fixed collision ball size if > 0 */ - float balldamp; /* cooling down collision response */ - float ballstiff; /* pressure the ball is loaded with */ - short sbc_mode; - short aeroedge, - minloops, - maxloops, - choke, - solver_ID, - plastic, springpreload - ; - - struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ - float shearstiff; - float inpush; - - struct PointCache *pointcache; - struct ListBase ptcaches; - - struct Group *collision_group; - - struct EffectorWeights *effector_weights; - /* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */ - float lcom[3]; - float lrot[3][3]; - float lscale[3][3]; - - int last_frame; -} SoftBody; - - -/* pd->flag: various settings */ -#define PFIELD_USEMAX 1 -/*#define PDEFLE_DEFORM 2*/ /*UNUSED*/ -#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */ -#define PFIELD_PLANAR 8 /* used for do_versions */ -#define PDEFLE_KILL_PART 16 -#define PFIELD_POSZ 32 /* used for do_versions */ -#define PFIELD_TEX_OBJECT 64 -#define PFIELD_GLOBAL_CO 64 /* used for turbulence */ -#define PFIELD_TEX_2D 128 -#define PFIELD_MULTIPLE_SPRINGS 128 /* used for harmonic force */ -#define PFIELD_USEMIN 256 -#define PFIELD_USEMAXR 512 -#define PFIELD_USEMINR 1024 -#define PFIELD_TEX_ROOTCO 2048 -#define PFIELD_SURFACE (1<<12) /* used for do_versions */ -#define PFIELD_VISIBILITY (1<<13) -#define PFIELD_DO_LOCATION (1<<14) -#define PFIELD_DO_ROTATION (1<<15) -#define PFIELD_GUIDE_PATH_WEIGHT (1<<16) /* apply curve weights */ -#define PFIELD_SMOKE_DENSITY (1<<17) /* multiply smoke force by density */ -#define PFIELD_GRAVITATION (1<<18) /* used for (simple) force */ - -/* pd->falloff */ -#define PFIELD_FALL_SPHERE 0 -#define PFIELD_FALL_TUBE 1 -#define PFIELD_FALL_CONE 2 - -/* pd->shape */ -#define PFIELD_SHAPE_POINT 0 -#define PFIELD_SHAPE_PLANE 1 -#define PFIELD_SHAPE_SURFACE 2 -#define PFIELD_SHAPE_POINTS 3 - -/* pd->tex_mode */ -#define PFIELD_TEX_RGB 0 -#define PFIELD_TEX_GRAD 1 -#define PFIELD_TEX_CURL 2 - -/* pd->zdir */ -#define PFIELD_Z_BOTH 0 -#define PFIELD_Z_POS 1 -#define PFIELD_Z_NEG 2 - -/* pointcache->flag */ -#define PTCACHE_BAKED 1 -#define PTCACHE_OUTDATED 2 -#define PTCACHE_SIMULATION_VALID 4 -#define PTCACHE_BAKING 8 -//#define PTCACHE_BAKE_EDIT 16 -//#define PTCACHE_BAKE_EDIT_ACTIVE 32 -#define PTCACHE_DISK_CACHE 64 -//#define PTCACHE_QUICK_CACHE 128 /* removed since 2.64 - [#30974], could be added back in a more useful way */ -#define PTCACHE_FRAMES_SKIPPED 256 -#define PTCACHE_EXTERNAL 512 -#define PTCACHE_READ_INFO 1024 -/* don't use the filename of the blendfile the data is linked from (write a local cache) */ -#define PTCACHE_IGNORE_LIBPATH 2048 -/* high resolution cache is saved for smoke for backwards compatibility, so set this flag to know it's a "fake" cache */ -#define PTCACHE_FAKE_SMOKE (1<<12) -#define PTCACHE_IGNORE_CLEAR (1<<13) - -/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */ -#define PTCACHE_REDO_NEEDED 258 - -#define PTCACHE_COMPRESS_NO 0 -#define PTCACHE_COMPRESS_LZO 1 -#define PTCACHE_COMPRESS_LZMA 2 - -/* ob->softflag */ -#define OB_SB_ENABLE 1 /* deprecated, use modifier */ -#define OB_SB_GOAL 2 -#define OB_SB_EDGES 4 -#define OB_SB_QUADS 8 -#define OB_SB_POSTDEF 16 -// #define OB_SB_REDO 32 -// #define OB_SB_BAKESET 64 -// #define OB_SB_BAKEDO 128 -// #define OB_SB_RESET 256 -#define OB_SB_SELF 512 -#define OB_SB_FACECOLL 1024 -#define OB_SB_EDGECOLL 2048 -/* #define OB_SB_COLLFINAL 4096 */ /* deprecated */ -/* #define OB_SB_BIG_UI 8192 */ /* deprecated */ -#define OB_SB_AERO_ANGLE 16384 - -/* sb->solverflags */ -#define SBSO_MONITOR 1 -#define SBSO_OLDERR 2 -#define SBSO_ESTIMATEIPO 4 - -/* sb->sbc_mode */ -#define SBC_MODE_MANUAL 0 -#define SBC_MODE_AVG 1 -#define SBC_MODE_MIN 2 -#define SBC_MODE_MAX 3 -#define SBC_MODE_AVGMINMAX 4 - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h new file mode 100644 index 00000000000..605463be1f1 --- /dev/null +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -0,0 +1,457 @@ +/* + * ***** 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) 2004-2005 by Blender Foundation + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_object_force_types.h + * \ingroup DNA + */ + +#ifndef __DNA_OBJECT_FORCE_H__ +#define __DNA_OBJECT_FORCE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "DNA_listBase.h" + +/* pd->forcefield: Effector Fields types */ +typedef enum ePFieldType { + PFIELD_NULL = 0, /* (this is used for general effector weight) */ + PFIELD_FORCE = 1, /* Force away/towards a point depending on force strength */ + PFIELD_VORTEX = 2, /* Force around the effector normal */ + PFIELD_MAGNET = 3, /* Force from the cross product of effector normal and point velocity */ + PFIELD_WIND = 4, /* Force away and towards a point depending which side of the effector */ + /* normal the point is */ + PFIELD_GUIDE = 5, /* Force along curve for dynamics, a shaping curve for hair paths */ + PFIELD_TEXTURE = 6, /* Force based on texture values calculated at point coordinates */ + PFIELD_HARMONIC = 7, /* Force of a harmonic (damped) oscillator */ + PFIELD_CHARGE = 8, /* Force away/towards a point depending on point charge */ + PFIELD_LENNARDJ = 9, /* Force due to a Lennard-Jones potential */ + PFIELD_BOID = 10, /* Defines predator / goal for boids */ + PFIELD_TURBULENCE = 11, /* Force defined by BLI_gTurbulence */ + PFIELD_DRAG = 12, /* Linear & quadratic drag */ + PFIELD_SMOKEFLOW = 13, /* Force based on smoke simulation air flow */ + NUM_PFIELD_TYPES +} ePFieldType; + +typedef struct PartDeflect { + int flag; /* general settings flag */ + short deflect; /* Deflection flag - does mesh deflect particles */ + short forcefield; /* Force field type, do the vertices attract / repel particles? */ + short falloff; /* fall-off type */ + short shape; /* point, plane or surface */ + short tex_mode; /* texture effector */ + short kink, kink_axis; /* for curve guide */ + short zdir; + + /* Main effector values */ + float f_strength; /* The strength of the force (+ or - ) */ + float f_damp; /* Damping ratio of the harmonic effector. */ + float f_flow; /* How much force is converted into "air flow", i.e. */ + /* force used as the velocity of surrounding medium. */ + + float f_size; /* Noise size for noise effector, restlength for harmonic effector */ + + /* fall-off */ + float f_power; /* The power law - real gravitation is 2 (square) */ + float maxdist; /* if indicated, use this maximum */ + float mindist; /* if indicated, use this minimum */ + float f_power_r; /* radial fall-off power */ + float maxrad; /* radial versions of above */ + float minrad; + + /* particle collisions */ + float pdef_damp; /* Damping factor for particle deflection */ + float pdef_rdamp; /* Random element of damping for deflection */ + float pdef_perm; /* Chance of particle passing through mesh */ + float pdef_frict; /* Friction factor for particle deflection */ + float pdef_rfrict; /* Random element of friction for deflection */ + float pdef_stickness;/* surface particle stickiness */ + + float absorption; /* used for forces */ + + /* softbody collisions */ + float pdef_sbdamp; /* Damping factor for softbody deflection */ + float pdef_sbift; /* inner face thickness for softbody deflection */ + float pdef_sboft; /* outer face thickness for softbody deflection */ + + /* guide curve, same as for particle child effects */ + float clump_fac, clump_pow; + float kink_freq, kink_shape, kink_amp, free_end; + + /* texture effector */ + float tex_nabla; /* Used for calculating partial derivatives */ + struct Tex *tex; /* Texture of the texture effector */ + + /* effector noise */ + struct RNG *rng; /* random noise generator for e.g. wind */ + float f_noise; /* noise of force */ + int seed; /* noise random seed */ + + struct Object *f_source; /* force source object */ +} PartDeflect; + +typedef struct EffectorWeights { + struct Group *group; /* only use effectors from this group of objects */ + + float weight[14]; /* effector type specific weights */ + float global_gravity; + short flag, rt[3]; + int pad; +} EffectorWeights; + +/* EffectorWeights->flag */ +#define EFF_WEIGHT_DO_HAIR 1 + +/* Point cache file data types: + * - used as (1< 1) these velocities are interpolated into movement for the non-cached + * frames. The result will look like the point is oscillating around the collision location. So for + * now cache step should be set to 1 for accurate reproduction of collisions. + */ + + int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ + int startframe; /* simulation start frame */ + int endframe; /* simulation end frame */ + int editframe; /* frame being edited (runtime only) */ + int last_exact; /* last exact frame that's cached */ + int last_valid; /* used for editing cache - what is the last baked frame */ + int pad; + + /* for external cache files */ + int totpoint; /* number of cached points */ + int index; /* modifier stack index */ + short compression, rt; + + char name[64]; + char prev_name[64]; + char info[64]; + char path[1024]; /* file path, 1024 = FILE_MAX */ + char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */ + /* can be later used for other per frame flags too if needed */ + struct ListBase mem_cache; + + struct PTCacheEdit *edit; + void (*free_edit)(struct PTCacheEdit *edit); /* free callback */ +} PointCache; + +typedef struct SBVertex { + float vec[4]; +} SBVertex; + +typedef struct BulletSoftBody { + int flag; /* various boolean options */ + float linStiff; /* linear stiffness 0..1 */ + float angStiff; /* angular stiffness 0..1 */ + float volume; /* volume preservation 0..1 */ + + int viterations; /* Velocities solver iterations */ + int piterations; /* Positions solver iterations */ + int diterations; /* Drift solver iterations */ + int citerations; /* Cluster solver iterations */ + + float kSRHR_CL; /* Soft vs rigid hardness [0,1] (cluster only) */ + float kSKHR_CL; /* Soft vs kinetic hardness [0,1] (cluster only) */ + float kSSHR_CL; /* Soft vs soft hardness [0,1] (cluster only) */ + float kSR_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + + float kSK_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + float kSS_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */ + float kVCF; /* Velocities correction factor (Baumgarte) */ + float kDP; /* Damping coefficient [0,1] */ + + float kDG; /* Drag coefficient [0,+inf] */ + float kLF; /* Lift coefficient [0,+inf] */ + float kPR; /* Pressure coefficient [-inf,+inf] */ + float kVC; /* Volume conversation coefficient [0,+inf] */ + + float kDF; /* Dynamic friction coefficient [0,1] */ + float kMT; /* Pose matching coefficient [0,1] */ + float kCHR; /* Rigid contacts hardness [0,1] */ + float kKHR; /* Kinetic contacts hardness [0,1] */ + + float kSHR; /* Soft contacts hardness [0,1] */ + float kAHR; /* Anchors hardness [0,1] */ + int collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */ + int numclusteriterations; /* number of iterations to refine collision clusters*/ + float welding; /* welding limit to remove duplicate/nearby vertices, 0.0..0.01 */ + float margin; /* margin specific to softbody */ +} BulletSoftBody; + +/* BulletSoftBody.flag */ +#define OB_BSB_SHAPE_MATCHING 2 +// #define OB_BSB_UNUSED 4 +#define OB_BSB_BENDING_CONSTRAINTS 8 +#define OB_BSB_AERO_VPOINT 16 /* aero model, Vertex normals are oriented toward velocity*/ +// #define OB_BSB_AERO_VTWOSIDE 32 /* aero model, Vertex normals are flipped to match velocity */ + +/* BulletSoftBody.collisionflags */ +#define OB_BSB_COL_SDF_RS 2 /* SDF based rigid vs soft */ +#define OB_BSB_COL_CL_RS 4 /* Cluster based rigid vs soft */ +#define OB_BSB_COL_CL_SS 8 /* Cluster based soft vs soft */ +#define OB_BSB_COL_VF_SS 16 /* Vertex/Face based soft vs soft */ + + +typedef struct SoftBody { + /* dynamic data */ + int totpoint, totspring; + struct BodyPoint *bpoint; /* not saved in file */ + struct BodySpring *bspring; /* not saved in file */ + char pad; + char msg_lock; + short msg_value; + + /* part of UI: */ + + /* general options */ + float nodemass; /* softbody mass of *vertex* */ + char namedVG_Mass[64]; /* MAX_VGROUP_NAME */ + /* along with it introduce mass painting + * starting to fix old bug .. nastiness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ + float grav; /* softbody amount of gravitaion to apply */ + float mediafrict; /* friction to env */ + float rklimit; /* error limit for ODE solver */ + float physics_speed;/* user control over simulation speed */ + + /* goal */ + float goalspring; /* softbody goal springs */ + float goalfrict; /* softbody goal springs friction */ + float mingoal; /* quick limits for goal */ + float maxgoal; + float defgoal; /* default goal for vertices without vgroup */ + short vertgroup; /* index starting at 1 */ + char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */ + /* starting to fix old bug .. nastiness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ + + short fuzzyness; /* */ + + /* springs */ + float inspring; /* softbody inner springs */ + float infrict; /* softbody inner springs friction */ + char namedVG_Spring_K[64]; /* MAX_VGROUP_NAME */ + /* along with it introduce Spring_K painting + * starting to fix old bug .. nastiness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ + + /* baking */ + int sfra, efra; + int interval; + short local, solverflags; /* local==1: use local coords for baking */ + + /* -- these must be kept for backwards compatibility -- */ + SBVertex **keys; /* array of size totpointkey */ + int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */ + /* ---------------------------------------------------- */ + float secondspring; + + /* self collision*/ + float colball; /* fixed collision ball size if > 0 */ + float balldamp; /* cooling down collision response */ + float ballstiff; /* pressure the ball is loaded with */ + short sbc_mode; + short aeroedge, + minloops, + maxloops, + choke, + solver_ID, + plastic, springpreload + ; + + struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ + float shearstiff; + float inpush; + + struct PointCache *pointcache; + struct ListBase ptcaches; + + struct Group *collision_group; + + struct EffectorWeights *effector_weights; + /* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */ + float lcom[3]; + float lrot[3][3]; + float lscale[3][3]; + + int last_frame; +} SoftBody; + + +/* pd->flag: various settings */ +#define PFIELD_USEMAX 1 +/*#define PDEFLE_DEFORM 2*/ /*UNUSED*/ +#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */ +#define PFIELD_PLANAR 8 /* used for do_versions */ +#define PDEFLE_KILL_PART 16 +#define PFIELD_POSZ 32 /* used for do_versions */ +#define PFIELD_TEX_OBJECT 64 +#define PFIELD_GLOBAL_CO 64 /* used for turbulence */ +#define PFIELD_TEX_2D 128 +#define PFIELD_MULTIPLE_SPRINGS 128 /* used for harmonic force */ +#define PFIELD_USEMIN 256 +#define PFIELD_USEMAXR 512 +#define PFIELD_USEMINR 1024 +#define PFIELD_TEX_ROOTCO 2048 +#define PFIELD_SURFACE (1<<12) /* used for do_versions */ +#define PFIELD_VISIBILITY (1<<13) +#define PFIELD_DO_LOCATION (1<<14) +#define PFIELD_DO_ROTATION (1<<15) +#define PFIELD_GUIDE_PATH_WEIGHT (1<<16) /* apply curve weights */ +#define PFIELD_SMOKE_DENSITY (1<<17) /* multiply smoke force by density */ +#define PFIELD_GRAVITATION (1<<18) /* used for (simple) force */ + +/* pd->falloff */ +#define PFIELD_FALL_SPHERE 0 +#define PFIELD_FALL_TUBE 1 +#define PFIELD_FALL_CONE 2 + +/* pd->shape */ +#define PFIELD_SHAPE_POINT 0 +#define PFIELD_SHAPE_PLANE 1 +#define PFIELD_SHAPE_SURFACE 2 +#define PFIELD_SHAPE_POINTS 3 + +/* pd->tex_mode */ +#define PFIELD_TEX_RGB 0 +#define PFIELD_TEX_GRAD 1 +#define PFIELD_TEX_CURL 2 + +/* pd->zdir */ +#define PFIELD_Z_BOTH 0 +#define PFIELD_Z_POS 1 +#define PFIELD_Z_NEG 2 + +/* pointcache->flag */ +#define PTCACHE_BAKED 1 +#define PTCACHE_OUTDATED 2 +#define PTCACHE_SIMULATION_VALID 4 +#define PTCACHE_BAKING 8 +//#define PTCACHE_BAKE_EDIT 16 +//#define PTCACHE_BAKE_EDIT_ACTIVE 32 +#define PTCACHE_DISK_CACHE 64 +//#define PTCACHE_QUICK_CACHE 128 /* removed since 2.64 - [#30974], could be added back in a more useful way */ +#define PTCACHE_FRAMES_SKIPPED 256 +#define PTCACHE_EXTERNAL 512 +#define PTCACHE_READ_INFO 1024 +/* don't use the filename of the blendfile the data is linked from (write a local cache) */ +#define PTCACHE_IGNORE_LIBPATH 2048 +/* high resolution cache is saved for smoke for backwards compatibility, so set this flag to know it's a "fake" cache */ +#define PTCACHE_FAKE_SMOKE (1<<12) +#define PTCACHE_IGNORE_CLEAR (1<<13) + +/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */ +#define PTCACHE_REDO_NEEDED 258 + +#define PTCACHE_COMPRESS_NO 0 +#define PTCACHE_COMPRESS_LZO 1 +#define PTCACHE_COMPRESS_LZMA 2 + +/* ob->softflag */ +#define OB_SB_ENABLE 1 /* deprecated, use modifier */ +#define OB_SB_GOAL 2 +#define OB_SB_EDGES 4 +#define OB_SB_QUADS 8 +#define OB_SB_POSTDEF 16 +// #define OB_SB_REDO 32 +// #define OB_SB_BAKESET 64 +// #define OB_SB_BAKEDO 128 +// #define OB_SB_RESET 256 +#define OB_SB_SELF 512 +#define OB_SB_FACECOLL 1024 +#define OB_SB_EDGECOLL 2048 +/* #define OB_SB_COLLFINAL 4096 */ /* deprecated */ +/* #define OB_SB_BIG_UI 8192 */ /* deprecated */ +#define OB_SB_AERO_ANGLE 16384 + +/* sb->solverflags */ +#define SBSO_MONITOR 1 +#define SBSO_OLDERR 2 +#define SBSO_ESTIMATEIPO 4 + +/* sb->sbc_mode */ +#define SBC_MODE_MANUAL 0 +#define SBC_MODE_AVG 1 +#define SBC_MODE_MIN 2 +#define SBC_MODE_MAX 3 +#define SBC_MODE_AVGMINMAX 4 + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index c95e0a1f54a..9932e16e988 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -189,7 +189,7 @@ typedef struct SmokeDomainSettings { char pad[2]; /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ - struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */ + struct PointCache *point_cache[2]; /* definition is in DNA_object_force_types.h */ struct ListBase ptcaches[2]; struct EffectorWeights *effector_weights; int border_collisions; /* How domain border collisions are handled */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 17e30de4509..92d54e25829 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -86,8 +86,8 @@ static const char *includefiles[] = { "DNA_modifier_types.h", "DNA_lattice_types.h", "DNA_object_types.h", - "DNA_object_force.h", - "DNA_object_fluidsim.h", + "DNA_object_force_types.h", + "DNA_object_fluidsim_types.h", "DNA_world_types.h", "DNA_scene_types.h", "DNA_view3d_types.h", @@ -1298,8 +1298,8 @@ int main(int argc, char **argv) #include "DNA_modifier_types.h" #include "DNA_lattice_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_force_types.h" +#include "DNA_object_fluidsim_types.h" #include "DNA_world_types.h" #include "DNA_scene_types.h" #include "DNA_view3d_types.h" diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index fb8389fc2e9..6d93c56885e 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -34,7 +34,7 @@ #include "DNA_dynamicpaint_types.h" #include "DNA_modifier_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 29354837449..c7cfde18723 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -26,7 +26,7 @@ #include -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "BLI_threads.h" #include "BLI_utildefines.h" diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index bc36af8d751..f3d3ed4692b 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -34,7 +34,7 @@ #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_scene_types.h" #include "MEM_guardedalloc.h" diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 52bcb29d21f..7800edc3086 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -33,7 +33,7 @@ #include "DNA_group_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_property_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 3fa7eb068d1..b3808e4dde0 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -28,7 +28,7 @@ #include "DNA_cloth_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_smoke_types.h" diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 53fe84707d1..9e52457d32a 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -36,7 +36,7 @@ #include "DNA_modifier_types.h" #include "DNA_cloth_types.h" #include "DNA_particle_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_boid_types.h" diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 9b206f3ee12..08665f3007a 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -42,7 +42,7 @@ #include "BKE_pointcache.h" #include "DNA_modifier_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_smoke_types.h" diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index eec97828091..cf777fc82ce 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -29,7 +29,7 @@ #include "DNA_dynamicpaint_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_scene_types.h" #include "BLI_utildefines.h" diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index 53f955b15f0..368c8209694 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -34,7 +34,7 @@ #include "DNA_scene_types.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "DNA_object_types.h" #include "BLI_utildefines.h" diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index c9f475ad228..65f45c9af64 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -40,7 +40,7 @@ #include "DNA_scene_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "BLI_blenlib.h" #include "BLI_math.h" diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index 7f2d9e42fe6..ab4952a3aa9 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -41,7 +41,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_smoke_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "BLI_utildefines.h" diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index a0bbe5da04a..8b33f197490 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -35,7 +35,7 @@ #include #include "DNA_scene_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "BLI_utildefines.h" diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index b694b6e994d..5b5639495da 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -34,7 +34,7 @@ extern "C" { #include "DNA_cloth_types.h" #include "DNA_scene_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c index 16cd335dc0c..d676b1a1521 100644 --- a/source/blender/physics/intern/implicit_blender.c +++ b/source/blender/physics/intern/implicit_blender.c @@ -37,7 +37,7 @@ #include "DNA_scene_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_meshdata_types.h" #include "DNA_texture_types.h" diff --git a/source/blender/physics/intern/implicit_eigen.cpp b/source/blender/physics/intern/implicit_eigen.cpp index afe1b441632..c36fabcffb0 100644 --- a/source/blender/physics/intern/implicit_eigen.cpp +++ b/source/blender/physics/intern/implicit_eigen.cpp @@ -73,7 +73,7 @@ extern "C" { #include "DNA_scene_types.h" #include "DNA_object_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_meshdata_types.h" #include "DNA_texture_types.h" diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index c1c968d5ae6..52cd5c3449e 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -56,7 +56,7 @@ #include "DNA_modifier_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" -#include "DNA_object_fluidsim.h" +#include "DNA_object_fluidsim_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 1022aeeec66..c45bde300e7 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -61,7 +61,7 @@ #include "BPH_mass_spring.h" #include "DNA_texture_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_modifier_types.h" diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 4751e60996d..8ba39e288ca 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -130,7 +130,7 @@ #include "DNA_key_types.h" #include "DNA_armature_types.h" #include "DNA_action_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" #include "DNA_constraint_types.h" #include "MEM_guardedalloc.h" diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 72c96668fe7..78d2d88cc65 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -49,7 +49,7 @@ subject to the following restrictions: #include "DNA_scene_types.h" #include "DNA_world_types.h" -#include "DNA_object_force.h" +#include "DNA_object_force_types.h" extern "C" { #include "BLI_utildefines.h" -- cgit v1.2.3