diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-10-17 13:43:41 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-10-17 13:43:41 +0300 |
commit | 21744217cea9bb8f767f47cb6c41446563e645ac (patch) | |
tree | 4cd38ca5ae9530eb99fcf91fa28530b42d0fce68 /source/blender/blenkernel/intern/armature.c | |
parent | c6eb5651ba26db3fa26179f2124c58f8c94b5ca3 (diff) |
Cleanup: remove some #if 0 blocks
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3802
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 131 |
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; |