diff options
author | Ton Roosendaal <ton@blender.org> | 2005-08-19 16:35:15 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-08-19 16:35:15 +0400 |
commit | 9e05d6efb5acb808b43ecb9f8aed9e1fd99eebc8 (patch) | |
tree | a10272e6a06399c5f098afb428443debaefb4431 /source/blender/src/editdeform.c | |
parent | 92731af84f3f2bd77e844c722a69667de1329efd (diff) |
Armature "Envelope" editing.
For defining the deformation distances of Bones, three values are being
used now. The bone tip and root radius define the bone-shape itself and the
"dist" defines the soft area around it. A full (user) doc is in CMS here;
http://www.blender3d.org/cms/Armature_Envelopes.647.0.html
Note: todo still is allowing both Vertex Deform Groups and these Envelopes
together (and or per Bone).
Also part of this commit is:
- New: Hiding bones in EditMode. This is a separate 'hide flag', so you can
keep the PoseMode hidden Bones separate from EditMode.
(In the future we should do some kind of bone-grouping or so)
- While transform(), the hotkeys G,R,S only switch mode when the previous
mode was compatible. Caused conflicts with Crease/BoneDist/etc.
- Deleting the last VertexGroup now also deletes the entire Mesh 'dvert'
data. Sounds logical, but remember that VertexGroups are partial on a
Mesh, partial on Object. Weird design decision though...
Anyhoo, at this moment the only way to have Bone Envelopes deform, is
by deleting all VertexGroups!
- In PoseMode, the hotkey ALT+S now does both B-Bone size or Envelope,
depending draw type.
- In EditMode, Extrude now also works when only Root points were selected.
- Weight editing is also symmetrical btw, with the "X-axis Mirror" option
set.
Diffstat (limited to 'source/blender/src/editdeform.c')
-rw-r--r-- | source/blender/src/editdeform.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c index f600c8e5537..053151e5c4b 100644 --- a/source/blender/src/editdeform.c +++ b/source/blender/src/editdeform.c @@ -193,9 +193,16 @@ void del_defgroup (Object *ob) /* Update the active material index if necessary */ if (ob->actdef==BLI_countlist(&ob->defbase)) ob->actdef--; - + /* Remove the group */ BLI_freelinkN (&ob->defbase, defgroup); + + /* remove all dverts */ + if(ob->actdef==0) { + Mesh *me= ob->data; + free_dverts(me->dvert, me->totvert); + me->dvert= NULL; + } } void create_dverts(Mesh *me) @@ -288,8 +295,11 @@ void add_vert_defnr (Object *ob, int def_nr, int vertnum, /* get the vert */ - dv = ((Mesh*)ob->data)->dvert + vertnum; - + if(((Mesh*)ob->data)->dvert) + dv = ((Mesh*)ob->data)->dvert + vertnum; + else + return; + /* Lets first check to see if this vert is * already in the weight group -- if so * lets update it |