Two small fixes;

- ALT+R clear rotation on PoseMode didn't work when an Action was assigned
- 'Delete object' didn't set object pointers to NULL for Armature/Pose
  constraints (old bug)
This commit is contained in:
Ton Roosendaal 2005-07-07 07:03:35 +00:00
parent 6a2cf42b7d
commit 895c9a55d8
3 changed files with 14 additions and 2 deletions

@ -702,6 +702,7 @@ static void initialize_posechain(struct Object *ob, bPoseChannel *pchan_tip)
data=(bKinematicConstraint*)con->data;
if(data->tar==NULL) return;
if(data->tar->type==OB_ARMATURE && data->subtarget[0]==0) return;
/* Find the chain's root & count the segments needed */
for (curchan = pchan_tip; curchan; curchan=curchan->parent){

@ -280,6 +280,17 @@ void unlink_object(Object *ob)
obt->recalc |= OB_RECALC;
}
}
else if(obt->type==OB_ARMATURE && obt->pose) {
bPoseChannel *pchan;
for(pchan= obt->pose->chanbase.first; pchan; pchan= pchan->next) {
for (con = pchan->constraints.first; con; con=con->next) {
if(ob==get_constraint_target(con, &str)) {
set_constraint_target(con, NULL);
obt->recalc |= OB_RECALC_DATA;
}
}
}
}
sca_remove_ob_poin(obt, ob);

@ -2103,8 +2103,8 @@ void clear_armature(Object *ob, char mode)
}
}
}
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
/* no DAG flush, this will execture the action again */
where_is_pose (ob);
}
/* helper for function below */