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-27 21:04:29 +0400
committerTon Roosendaal <ton@blender.org>2005-08-27 21:04:29 +0400
commiteb1f65768a742fce55dd755e9c51d4be2f73b5bc (patch)
tree1dff3d1bbd979d53620a5bade793a580d3486c49 /source/blender/src/editarmature.c
parent8f5bff6051025bbd4d5e0a127f7fef09ef226c1a (diff)
IK work-in-progress commit;
- Removed old convention that only allowed one "IK" connection for Bones in a joint. Was highly frustrating for editing trees or branches. In a next commit, there will be a different method to define IK target and IK root, so this option actually will become "Connect Bone" or so. - the IK group name is gone, now is just an option "Tree IK". When IK chains share a root they'll form a tree. Todo is preventing conflicts here (will be for editor to define IK Root) - Adding new IK constraint with CTRL+I activates Constraint
Diffstat (limited to 'source/blender/src/editarmature.c')
-rw-r--r--source/blender/src/editarmature.c56
1 files changed, 4 insertions, 52 deletions
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index c3a9a930958..78e72a4783c 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -1248,7 +1248,7 @@ void add_primitiveArmature(int type)
/* the ctrl-click method */
void addvert_armature(void)
{
- EditBone *ebone, *newbone, *partest;
+ EditBone *ebone, *newbone;
float *curs, mat[3][3],imat[3][3];
int to_root= 0;
@@ -1279,16 +1279,8 @@ void addvert_armature(void)
else {
VECCOPY(newbone->head, ebone->tail);
-
- /* See if there are any ik children of the parent */
- for (partest = G.edbo.first; partest; partest= partest->next){
- if ((partest->parent == ebone) && (partest->flag & BONE_IK_TOPARENT))
- break;
- }
- if(!partest)
- newbone->flag |= BONE_IK_TOPARENT;
-
newbone->parent= ebone;
+ newbone->flag |= BONE_IK_TOPARENT;
}
curs= give_cursor();
@@ -1453,37 +1445,6 @@ void show_all_armature_bones(void)
allqueue(REDRAWBUTSEDIT, 0);
}
-
-
-/* the "IK" button in editbuttons */
-void attach_bone_to_parent_cb(void *bonev, void *arg2_unused)
-{
- EditBone *ebone= bonev;
- attach_bone_to_parent(ebone);
-}
-
-void attach_bone_to_parent(EditBone *bone)
-{
- EditBone *ebone;
-
- if (bone->flag & BONE_IK_TOPARENT) {
-
- /* See if there are any other bones that refer to the same
- * parent and disconnect them
- */
- for (ebone = G.edbo.first; ebone; ebone=ebone->next){
- if (ebone!=bone){
- if (ebone->parent && (ebone->parent == bone->parent) &&
- (ebone->flag & BONE_IK_TOPARENT))
- ebone->flag &= ~BONE_IK_TOPARENT;
- }
- }
-
- /* Attach this bone to its parent */
- VECCOPY(bone->head, bone->parent->tail);
- }
-}
-
void make_bone_parent(void)
{
EditBone *ebone;
@@ -1631,7 +1592,7 @@ void unique_editbone_name (char *name)
void extrude_armature(int forked)
{
bArmature *arm= G.obedit->data;
- EditBone *newbone, *ebone, *flipbone, *first=NULL, *partest;
+ EditBone *newbone, *ebone, *flipbone, *first=NULL;
int a, totbone= 0, do_extrude;
TEST_EDITARMATURE;
@@ -1713,16 +1674,7 @@ void extrude_armature(int forked)
newbone->segments= 1;
newbone->boneclass= ebone->boneclass;
- /* See if there are any ik children of the parent */
- if(do_extrude==1) {
- for (partest = G.edbo.first; partest; partest=partest->next){
- if ((partest->parent == ebone) && (partest->flag & BONE_IK_TOPARENT))
- break;
- }
-
- if (!partest)
- newbone->flag |= BONE_IK_TOPARENT;
- }
+ newbone->flag |= BONE_IK_TOPARENT;
strcpy (newbone->name, ebone->name);