From 61d84eeb2de91c1a4f04521c39bcce6344c7b664 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Mon, 11 Feb 2008 14:38:30 +0000 Subject: [PATCH] Fix for bug #7857. --- source/blender/src/buttons_object.c | 6 +++--- source/blender/src/vpaint.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 8773acd0bc1..8ac960e92cd 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4156,12 +4156,12 @@ static void object_panel_particle_extra(Object *ob) uiBlockBeginAlign(block); uiDefButS(block, MENU, B_PART_REDRAW, "Attribute%t|Effector%x11|TanRot%x10|TanVel%x9|Size%x8|RoughE%x7|Rough2%x6|Rough1%x5|Kink%x4|Clump%x3|Length%x2|Velocity%x1|Density%x0", butx,(buty-=buth),butw-40,buth, &vgnum, 14.0, 0.0, 0, 0, "Attribute effected by vertex group"); - but=uiDefButBitS(block, TOG, (1<vg_neg, 0, 0, 0, 0, "Negate the effect of the vertex group"); + but=uiDefButBitS(block, TOG, (1<vg_neg, 0, 0, 0, 0, "Negate the effect of the vertex group"); uiButSetFunc(but, particle_set_vg, (void *)ob, (void *)(&vgnum)); butx+=butw; - but= uiDefButS(block, MENU, B_PART_REDRAW, menustr, butx,buty,buth,buth, psys->vgroup+vgnum, 0, defCount, 0, 0, "Browses available vertex groups"); + but= uiDefButS(block, MENU, B_PART_RECALC, menustr, butx,buty,buth,buth, psys->vgroup+vgnum, 0, defCount, 0, 0, "Browses available vertex groups"); uiButSetFunc(but, particle_set_vg, (void *)ob, (void *)(&vgnum)); MEM_freeN (menustr); @@ -4172,7 +4172,7 @@ static void object_panel_particle_extra(Object *ob) else{ uiDefBut(block, BUT, B_PART_REDRAW, "(no group)", butx+buth,buty,butw-2*buth,buth, NULL, 0.0, 0.0, 0, 0, "Vertex Group doesn't exist anymore"); } - but=uiDefIconBut(block, BUT, B_PART_REDRAW, ICON_X, butx+butw-buth,buty,buth,buth, 0, 0, 0, 0, 0, "Disable use of vertex group"); + but=uiDefIconBut(block, BUT, B_PART_RECALC, ICON_X, butx+butw-buth,buty,buth,buth, 0, 0, 0, 0, 0, "Disable use of vertex group"); uiButSetFunc(but, particle_del_vg, (void *)ob, (void *)(&vgnum)); } diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index c5bc84a513e..dd60b808e2a 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -57,6 +57,7 @@ #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" +#include "DNA_particle_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_scene_types.h" @@ -1355,6 +1356,24 @@ void weight_paint(void) if(clmd) clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } + + /* and particles too */ + if(ob->particlesystem.first) { + ParticleSystem *psys; + int i; + + psys= ob->particlesystem.first; + while(psys) { + for(i=0; ivgroup[i]==ob->actdef) { + psys->recalc |= PSYS_RECALC_HAIR; + break; + } + } + + psys= psys->next; + } + } BIF_undo_push("Weight Paint"); allqueue(REDRAWVIEW3D, 0);