Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2008-04-02 21:48:46 +0400
committerJanne Karhu <jhkarh@gmail.com>2008-04-02 21:48:46 +0400
commit49c65433cc87ceb8a40b52ccf9ed22151c425f4b (patch)
tree27c26e928b246b4ae20a628026100b0ff12b06fc /source/blender/src/buttons_editing.c
parentbab535ce1add9e8984b777480e7793958fd0794b (diff)
Fix for bug: [#8117] Particles with fluid broken
-Handling of fluid particles was not coded at all -Now things should work properly, but as fluid particles are not very familiar to me I'd appreciate some thorough testing
Diffstat (limited to 'source/blender/src/buttons_editing.c')
-rw-r--r--source/blender/src/buttons_editing.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 8080798c91f..144b266759d 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -1655,6 +1655,13 @@ void modifiers_explodeFacepa(void *arg1, void *arg2)
emd->flag |= eExplodeFlag_CalcFaces;
}
+static int modifier_is_fluid_particles(ModifierData *md) {
+ if(md->type == eModifierType_ParticleSystem) {
+ if(((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
+ return 1;
+ }
+ return 0;
+}
static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco, int *yco, int index, int cageIndex, int lastCageIndex)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -1732,7 +1739,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
uiBlockSetEmboss(block, UI_EMBOSSN);
// deletion over the deflection panel
- if(md->type!=eModifierType_Collision)
+ // fluid particle modifier can't be deleted here
+ if(md->type!=eModifierType_Collision && !modifier_is_fluid_particles(md))
{
but = uiDefIconBut(block, BUT, B_MODIFIER_RECALC, VICON_X, x+width-70+40, y, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Delete modifier");
uiButSetFunc(but, modifiers_del, ob, md);