diff options
author | Ton Roosendaal <ton@blender.org> | 2005-05-20 16:15:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-05-20 16:15:50 +0400 |
commit | 83792faa3f6db282b9c0ce3bd965db2058aced32 (patch) | |
tree | e8a1c8c22751b161eeef997ea94dcdcd7a524ec7 | |
parent | 32fd7ad4c9747577045aed0660e56cd8dc25a5c2 (diff) |
Two softbody thingies;
- fixed error in option "Enable Goal" which didn't work with Vertex groups
assigned
- renamed some buttons & fixed tooltips. A doc online will be there soon
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 4 | ||||
-rw-r--r-- | source/blender/src/buttons_object.c | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 7c7bd53b478..a56c42d85f6 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -862,8 +862,8 @@ static void mesh_to_softbody(Object *ob) they are normalized [0.0..1.0] so may be we need amplitude for scale which can be done by caller but still .. i'd like it to go this way */ - - if(sb->vertgroup) { + + if((ob->softflag & OB_SB_GOAL) && sb->vertgroup) { get_scalar_from_vertexgroup(ob, me->totvert - a, sb->vertgroup-1, &bp->goal); // do this always, regardless successfull read from vertex group bp->goal= sb->mingoal + bp->goal*goalfac; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index bf1ce1bd6df..bf43005c5fd 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -1617,17 +1617,17 @@ static void object_softbodies(Object *ob) else { /* GENERAL STUFF */ uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_DIFF, "Friction:", 10, 170,150,20, &sb->mediafrict, 0.0, 10.0, 10, 0, "General Friction for point movements"); + uiDefButF(block, NUM, B_DIFF, "Friction:", 10, 170,150,20, &sb->mediafrict, 0.0, 10.0, 10, 0, "General media friction for point movements"); uiDefButF(block, NUM, B_DIFF, "Mass:", 160, 170,150,20, &sb->nodemass , 0.001, 50.0, 10, 0, "Point Mass, the heavier the slower"); uiDefButF(block, NUM, B_DIFF, "Grav:", 10,150,100,20, &sb->grav , 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_DIFF, "RKL:", 110,150,100,20, &sb->rklimit , 0.01, 1.0, 10, 0, "Runge-Kutta ODE solver error limit"); - uiDefButF(block, NUM, B_DIFF, "Time:", 210,150,100,20, &sb->physics_speed , 0.01, 100.0, 10, 0, "Tweak timing for physics to control frequency and speed"); - uiDefButBitS(block, TOG, OB_SB_POSTDEF, B_DIFF, "PostDef", 10,130,300,20, &ob->softflag, 0, 0, 0, 0, "Apply Soft AFTER Deform"); + uiDefButF(block, NUM, B_DIFF, "Prec:", 110,150,100,20, &sb->rklimit , 0.01, 1.0, 10, 0, "Precision, the Runge-Kutta ODE solver error limit"); + uiDefButF(block, NUM, B_DIFF, "Speed:", 210,150,100,20, &sb->physics_speed , 0.01, 100.0, 10, 0, "Tweak timing for physics to control frequency and speed"); + uiDefButBitS(block, TOG, OB_SB_POSTDEF, B_DIFF, "Apply Deform First", 10,130,300,20, &ob->softflag, 0, 0, 0, 0, "Softbody is calculated AFTER Deformation"); uiBlockEndAlign(block); /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, OB_SB_GOAL, B_DIFF, "Use Goal", 10,100,130,20, &ob->softflag, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + uiDefButBitS(block, TOG, OB_SB_GOAL, B_SOFTBODY_CHANGE, "Use Goal", 10,100,130,20, &ob->softflag, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); menustr= get_vertexgroup_menustr(ob); defCount=BLI_countlist(&ob->defbase); @@ -1649,16 +1649,16 @@ static void object_softbodies(Object *ob) uiDefButF(block, NUM, B_DIFF, "G Stiff:", 10,80,150,20, &sb->goalspring, 0.0, 0.999, 10, 0, "Goal (vertex target position) spring stiffness"); uiDefButF(block, NUM, B_DIFF, "G Damp:", 160,80,150,20, &sb->goalfrict , 0.0, 10.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, B_SOFTBODY_CHANGE, "G Min:", 10,60,150,20, &sb->mingoal, 0.0, 1.0, 10, 0, "Min Goal bound"); - uiDefButF(block, NUM, B_SOFTBODY_CHANGE, "G Max:", 160,60,150,20, &sb->maxgoal, 0.0, 1.0, 10, 0, "Max Goal bound"); + uiDefButF(block, NUM, B_SOFTBODY_CHANGE, "G Min:", 10,60,150,20, &sb->mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_SOFTBODY_CHANGE, "G Max:", 160,60,150,20, &sb->maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); uiBlockEndAlign(block); /* EDGE SPRING STUFF */ uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, OB_SB_EDGES, B_SOFTBODY_CHANGE, "Use Edges", 10,30,150,20, &ob->softflag, 0, 0, 0, 0, "Use Robust 2nd order solver"); - uiDefButBitS(block, TOG, OB_SB_QUADS, B_SOFTBODY_CHANGE, "Stiff Quads", 160,30,150,20, &ob->softflag, 0, 0, 0, 0, "Sets object to have diagonal springs on 4-gons"); + uiDefButBitS(block, TOG, OB_SB_EDGES, B_SOFTBODY_CHANGE, "Use Edges", 10,30,150,20, &ob->softflag, 0, 0, 0, 0, "Use Edges as springs"); + uiDefButBitS(block, TOG, OB_SB_QUADS, B_SOFTBODY_CHANGE, "Stiff Quads", 160,30,150,20, &ob->softflag, 0, 0, 0, 0, "Adds diagonal springs on 4-gons"); uiDefButF(block, NUM, B_DIFF, "E Stiff:", 10,10,150,20, &sb->inspring, 0.0, 0.999, 10, 0, "Edge spring stiffness"); - uiDefButF(block, NUM, B_DIFF, "E Damp:", 160,10,150,20, &sb->infrict, 0.0, 10.0, 10, 0, "Edge friction"); + uiDefButF(block, NUM, B_DIFF, "E Damp:", 160,10,150,20, &sb->infrict, 0.0, 10.0, 10, 0, "Edge spring friction"); uiBlockEndAlign(block); } } |