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/armature.c')
-rw-r--r--source/blender/blenkernel/intern/armature.c131
1 files changed, 0 insertions, 131 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 22059a1ff0a..e0caec323c1 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2212,132 +2212,6 @@ void BKE_pchan_calc_mat(bPoseChannel *pchan)
BKE_pchan_to_mat4(pchan, pchan->chan_mat);
}
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
-
-/* NLA strip modifiers */
-static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan)
-{
- bActionModifier *amod;
- bActionStrip *strip, *strip2;
- float scene_cfra = BKE_scene_frame_get(scene);
- int do_modif;
-
- for (strip = armob->nlastrips.first; strip; strip = strip->next) {
- do_modif = false;
-
- if (scene_cfra >= strip->start && scene_cfra <= strip->end)
- do_modif = true;
-
- if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) {
- do_modif = true;
-
- /* if there are any other strips active, ignore modifiers for this strip -
- * 'hold' option should only hold action modifiers if there are
- * no other active strips */
- for (strip2 = strip->next; strip2; strip2 = strip2->next) {
- if (strip2 == strip) continue;
-
- if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) {
- if (!(strip2->flag & ACTSTRIP_MUTE))
- do_modif = false;
- }
- }
-
- /* if there are any later, activated, strips with 'hold' set, they take precedence,
- * so ignore modifiers for this strip */
- for (strip2 = strip->next; strip2; strip2 = strip2->next) {
- if (scene_cfra < strip2->start) continue;
- if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) {
- do_modif = false;
- }
- }
- }
-
- if (do_modif) {
- /* temporal solution to prevent 2 strips accumulating */
- if (scene_cfra == strip->end && strip->next && strip->next->start == scene_cfra)
- continue;
-
- for (amod = strip->modifiers.first; amod; amod = amod->next) {
- switch (amod->type) {
- case ACTSTRIP_MOD_DEFORM:
- {
- /* validate first */
- if (amod->ob && amod->ob->type == OB_CURVE && amod->channel[0]) {
-
- if (STREQ(pchan->name, amod->channel)) {
- float mat4[4][4], mat3[3][3];
-
- curve_deform_vector(amod->ob, armob, bone->arm_mat[3], pchan->pose_mat[3], mat3, amod->no_rot_axis);
- copy_m4_m4(mat4, pchan->pose_mat);
- mul_m4_m3m4(pchan->pose_mat, mat3, mat4);
-
- }
- }
- }
- break;
- case ACTSTRIP_MOD_NOISE:
- {
- if (STREQ(pchan->name, amod->channel)) {
- float nor[3], loc[3], ofs;
- float eul[3], size[3], eulo[3], sizeo[3];
-
- /* calculate turbulance */
- ofs = amod->turbul / 200.0f;
-
- /* make a copy of starting conditions */
- copy_v3_v3(loc, pchan->pose_mat[3]);
- mat4_to_eul(eul, pchan->pose_mat);
- mat4_to_size(size, pchan->pose_mat);
- copy_v3_v3(eulo, eul);
- copy_v3_v3(sizeo, size);
-
- /* apply noise to each set of channels */
- if (amod->channels & 4) {
- /* for scaling */
- nor[0] = BLI_gNoise(amod->noisesize, size[0] + ofs, size[1], size[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, size[0], size[1] + ofs, size[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, size[0], size[1], size[2] + ofs, 0, 0) - ofs;
- add_v3_v3(size, nor);
-
- if (sizeo[0] != 0)
- mul_v3_fl(pchan->pose_mat[0], size[0] / sizeo[0]);
- if (sizeo[1] != 0)
- mul_v3_fl(pchan->pose_mat[1], size[1] / sizeo[1]);
- if (sizeo[2] != 0)
- mul_v3_fl(pchan->pose_mat[2], size[2] / sizeo[2]);
- }
- if (amod->channels & 2) {
- /* for rotation */
- nor[0] = BLI_gNoise(amod->noisesize, eul[0] + ofs, eul[1], eul[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, eul[0], eul[1] + ofs, eul[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, eul[0], eul[1], eul[2] + ofs, 0, 0) - ofs;
-
- compatible_eul(nor, eulo);
- add_v3_v3(eul, nor);
- compatible_eul(eul, eulo);
-
- loc_eul_size_to_mat4(pchan->pose_mat, loc, eul, size);
- }
- if (amod->channels & 1) {
- /* for location */
- nor[0] = BLI_gNoise(amod->noisesize, loc[0] + ofs, loc[1], loc[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, loc[0], loc[1] + ofs, loc[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, loc[0], loc[1], loc[2] + ofs, 0, 0) - ofs;
-
- add_v3_v3v3(pchan->pose_mat[3], loc, nor);
- }
- }
- }
- break;
- }
- }
- }
- }
-}
-
-#endif
-
/* calculate tail of posechannel */
void BKE_pose_where_is_bone_tail(bPoseChannel *pchan)
{
@@ -2374,11 +2248,6 @@ void BKE_pose_where_is_bone(
}
if (do_extra) {
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
- /* do NLA strip modifiers - i.e. curve follow */
- do_strip_modifiers(scene, ob, bone, pchan);
-#endif
-
/* Do constraints */
if (pchan->constraints.first) {
bConstraintOb *cob;