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:
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 23f6fa28d76..4161179a0a1 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -985,12 +985,18 @@ static void cyclic_offs_bone(Object *ob, bPose *pose, bActionStrip *strip, float
Mat4Mul3Vecfl(bone->arm_mat, min);
/* dominant motion, cyclic_offset was cleared in rest_pose */
- if( fabs(min[0]) >= fabs(min[1]) && fabs(min[0]) >= fabs(min[2]))
- pose->cyclic_offset[0]= time*min[0];
- else if( fabs(min[1]) >= fabs(min[0]) && fabs(min[1]) >= fabs(min[2]))
- pose->cyclic_offset[1]= time*min[1];
- else
- pose->cyclic_offset[2]= time*min[2];
+ if (strip->flag & (ACTSTRIP_CYCLIC_USEX | ACTSTRIP_CYCLIC_USEY | ACTSTRIP_CYCLIC_USEZ)) {
+ if (strip->flag & ACTSTRIP_CYCLIC_USEX) pose->cyclic_offset[0]= time*min[0];
+ if (strip->flag & ACTSTRIP_CYCLIC_USEY) pose->cyclic_offset[1]= time*min[1];
+ if (strip->flag & ACTSTRIP_CYCLIC_USEZ) pose->cyclic_offset[2]= time*min[2];
+ } else {
+ if( fabs(min[0]) >= fabs(min[1]) && fabs(min[0]) >= fabs(min[2]))
+ pose->cyclic_offset[0]= time*min[0];
+ else if( fabs(min[1]) >= fabs(min[0]) && fabs(min[1]) >= fabs(min[2]))
+ pose->cyclic_offset[1]= time*min[1];
+ else
+ pose->cyclic_offset[2]= time*min[2];
+ }
}
}
}