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:
authorTon Roosendaal <ton@blender.org>2005-08-19 16:35:15 +0400
committerTon Roosendaal <ton@blender.org>2005-08-19 16:35:15 +0400
commit9e05d6efb5acb808b43ecb9f8aed9e1fd99eebc8 (patch)
treea10272e6a06399c5f098afb428443debaefb4431 /source/blender/src/transform_generics.c
parent92731af84f3f2bd77e844c722a69667de1329efd (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/transform_generics.c')
-rwxr-xr-xsource/blender/src/transform_generics.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c
index d938b43299d..9ab175d2681 100755
--- a/source/blender/src/transform_generics.c
+++ b/source/blender/src/transform_generics.c
@@ -127,12 +127,16 @@ static void transform_armature_mirror_update(void)
eboflip->tail[0]= -ebo->tail[0];
eboflip->tail[1]= ebo->tail[1];
eboflip->tail[2]= ebo->tail[2];
+ eboflip->rad_tail= ebo->rad_tail;
}
if(ebo->flag & BONE_ROOTSEL) {
eboflip->head[0]= -ebo->head[0];
eboflip->head[1]= ebo->head[1];
eboflip->head[2]= ebo->head[2];
+ eboflip->rad_head= ebo->rad_head;
}
+ if(ebo->flag & BONE_SELECTED)
+ eboflip->dist= ebo->dist;
}
}
}
@@ -176,6 +180,17 @@ void recalcData(TransInfo *t)
VECCOPY (ebo->parent->tail, ebo->head);
}
}
+
+ if(arm->drawtype==ARM_ENVELOPE) {
+ if(ebo->oldlength==0.0f) {
+ ebo->rad_head= 0.25f*ebo->length;
+ ebo->rad_tail= 0.10f*ebo->length;
+ if(ebo->parent) {
+ if(ebo->rad_head > ebo->parent->rad_tail)
+ ebo->rad_head= ebo->parent->rad_tail;
+ }
+ }
+ }
}
if(arm->flag & ARM_MIRROR_EDIT)
transform_armature_mirror_update();
@@ -260,9 +275,8 @@ void initTransModeFlags(TransInfo *t, int mode)
t->flag |= T_NO_CONSTRAINT;
break;
case TFM_SHEAR:
- t->flag |= T_NO_CONSTRAINT;
- break;
case TFM_CREASE:
+ case TFM_BONE_ENVELOPE:
t->flag |= T_NO_CONSTRAINT;
break;
}