for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
bone = pchan->bone;
if(bone->flag & BONE_TRANSFORM) {
-
total++;
-
+
if(mode == TFM_TRANSLATION) {
if( has_targetless_ik(pchan)==NULL ) {
if(pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) {
for (con= pchan->constraints.first; con; con= con->next) {
if (con->type == CONSTRAINT_TYPE_KINEMATIC && (con->enforce!=0.0)) {
bKinematicConstraint *data= con->data;
-
+
/* only accept if a temporary one (for auto-ik) */
if (data->flag & CONSTRAINT_IK_TEMP) {
/* chainlen is new chainlen, but is limited by maximum chainlen */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
/* clear all temporary lock flags */
pchan->ikflag &= ~(BONE_IK_NO_XDOF_TEMP|BONE_IK_NO_YDOF_TEMP|BONE_IK_NO_ZDOF_TEMP);
-
+
pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_TARGET);
+
/* remove all temporary IK-constraints added */
for (con= pchan->constraints.first; con; con= next) {
next= con->next;
pchan = pchan->parent;
else
pchan = NULL;
-
- /* but, constrainted bones can't get auto-ik transform applied, exclude these */
- if(pchan && pchan->constraints.first) {
- /* if constraint is disabled or has no influence, OK then we allow :) */
- for (con= pchan->constraints.first; con; con= con->next) {
- if ((con->enforce==0.0f) || (con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF)));
- else break;
- }
- if(con) {
- data->rootbone--;
- pchan= NULL;
- }
- }
}
/* make a copy of maximum chain-length */
/* ------------------------ */
-/* struct for use in re-sorting BezTriples during IPO transform */
+/* struct for use in re-sorting BezTriples during Graph Editor transform */
typedef struct BeztMap {
BezTriple *bezt;
- int oldIndex; /* index of bezt in icu->bezt array before sorting */
- int newIndex; /* index of bezt in icu->bezt array after sorting */
- short swapHs; /* swap order of handles (-1=clear; 0=not checked, 1=swap) */
- char pipo, cipo; /* interpolation of current and next segments */
+ unsigned int oldIndex; /* index of bezt in fcu->bezt array before sorting */
+ unsigned int newIndex; /* index of bezt in fcu->bezt array after sorting */
+ short swapHs; /* swap order of handles (-1=clear; 0=not checked, 1=swap) */
+ char pipo, cipo; /* interpolation of current and next segments */
} BeztMap;
if (bezm->bezt->f2 & SELECT) {
if (td->loc2d == bezm->bezt->vec[1]) {
td->loc2d= (bezts + bezm->newIndex)->vec[1];
-
+
/* if only control point is selected, the handle pointers need to be updated as well */
td->h1= (bezts + bezm->newIndex)->vec[0];
td->h2= (bezts + bezm->newIndex)->vec[2];
-
+
adjusted[j] = 1;
}
}
break;
}
}
-
+
/* we need to unapply the nla-mapping from the time in some situations */
if (adt)
td2d->loc2d[0]= BKE_nla_tweakedit_remap(adt, td2d->loc[0], NLATIME_CONVERT_UNMAP);
td2d->loc2d[1]= (float)((int)td2d->loc[1]);
else
td2d->loc2d[1]= td2d->loc[1];
-
+
if ((td->flag & TD_MOVEHANDLE1) && td2d->h1) {
td2d->h1[0] = td2d->ih1[0] + td->loc[0] - td->iloc[0];
td2d->h1[1] = td2d->ih1[1] + td->loc[1] - td->iloc[1];
}
-
+
if ((td->flag & TD_MOVEHANDLE2) && td2d->h2) {
td2d->h2[0] = td2d->ih2[0] + td->loc[0] - td->iloc[0];
td2d->h2[1] = td2d->ih2[1] + td->loc[1] - td->iloc[1];