diff options
author | Ton Roosendaal <ton@blender.org> | 2005-04-16 18:01:49 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-04-16 18:01:49 +0400 |
commit | 7943f7990ef3553761ce492237dc669cae3843db (patch) | |
tree | 6390e6da042375d8f8895fe6eddc275259f8d214 /source/blender/blenloader/intern | |
parent | 097726eb50226028cdfd41da9457769ac7e48834 (diff) |
Softbody:
- Added browsing for vertex group for "Goal" in SoftBody buttons.
- Means the default name "SOFTGOAL" isn't needed anymore
- temporally, on file read, the "SOFTGOAL" vertex group is set, if exists
- removing vertex group possible too
- changed softbody.c code to use this
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b2fce9edfe6..0d04fff7343 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -110,6 +110,7 @@ #include "BKE_action.h" #include "BKE_constraint.h" #include "BKE_curve.h" +#include "BKE_deform.h" #include "BKE_effect.h" // for give_parteff #include "BKE_global.h" // for G #include "BKE_property.h" // for get_property @@ -4681,6 +4682,13 @@ static void do_versions(Main *main) ob->softflag |= OB_SB_GOAL|OB_SB_EDGES; } + if(ob->soft && ob->soft->vertgroup==0) { + bDeformGroup *locGroup = get_named_vertexgroup(ob, "SOFTGOAL"); + if(locGroup){ + /* retrieve index for that group */ + ob->soft->vertgroup = 1 + get_defgroup_num(ob, locGroup); + } + } } } |