From 159806140fd33e6ddab951c0f6f180cfbf927d38 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 16 Apr 2018 14:07:42 +0200 Subject: Removing Blender Game Engine from Blender 2.8 Folders removed entirely: * //extern/recastnavigation * //intern/decklink * //intern/moto * //source/blender/editors/space_logic * //source/blenderplayer * //source/gameengine This includes DNA data and any reference to the BGE code in Blender itself. We are bumping the subversion. Pending tasks: * Tile/clamp code in image editor draw code. * Viewport drawing code (so much of this will go away because of BI removal that we can wait until then to remove this. --- source/blender/ikplugin/intern/itasc_plugin.cpp | 39 ++++--------------------- 1 file changed, 6 insertions(+), 33 deletions(-) (limited to 'source/blender/ikplugin') diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index dc2d081f835..af303556090 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -1072,12 +1072,11 @@ static IK_Scene *convert_tree(struct Depsgraph *depsgraph, Scene *blscene, Objec IK_Scene *ikscene; IK_Channel *ikchan; KDL::Frame initPose; - KDL::Rotation boneRot; Bone *bone; int a, numtarget; unsigned int t; float length; - bool ret = true, ingame; + bool ret = true; double *rot; float start[3]; @@ -1094,26 +1093,13 @@ static IK_Scene *convert_tree(struct Depsgraph *depsgraph, Scene *blscene, Objec ikscene->armature = arm; ikscene->scene = scene; ikparam = (bItasc *)ob->pose->ikparam; - ingame = (ob->pose->flag & POSE_GAME_ENGINE); + if (!ikparam) { // you must have our own copy ikparam = &DefIKParam; } - else if (ingame) { - // tweak the param when in game to have efficient stepping - // using fixed substep is not effecient since frames in the GE are often - // shorter than in animation => move to auto step automatically and set - // the target substep duration via min/max - if (!(ikparam->flag & ITASC_AUTO_STEP)) { - float timestep = blscene->r.frs_sec_base / blscene->r.frs_sec; - if (ikparam->numstep > 0) - timestep /= ikparam->numstep; - // with equal min and max, the algorythm will take this step and the indicative substep most of the time - ikparam->minstep = ikparam->maxstep = timestep; - ikparam->flag |= ITASC_AUTO_STEP; - } - } - if ((ikparam->flag & ITASC_SIMULATION) && !ingame) + + if (ikparam->flag & ITASC_SIMULATION) // no cache in animation mode ikscene->cache = new iTaSC::Cache(); @@ -1140,15 +1126,8 @@ static IK_Scene *convert_tree(struct Depsgraph *depsgraph, Scene *blscene, Objec double weight[3]; // build the array of joints corresponding to the IK chain convert_channels(depsgraph, ikscene, tree, ctime); - if (ingame) { - // in the GE, set the initial joint angle to match the current pose - // this will update the jointArray in ikscene - convert_pose(ikscene); - } - else { - // in Blender, the rest pose is always 0 for joints - BKE_pose_rest(ikscene); - } + // in Blender, the rest pose is always 0 for joints + BKE_pose_rest(ikscene); rot = ikscene->jointArray(0); for (a = 0, ikchan = ikscene->channels; a < tree->totchannel; ++a, ++ikchan) { @@ -1787,12 +1766,6 @@ void itasc_execute_tree(struct Depsgraph *depsgraph, struct Scene *scene, Object for (IK_Scene *ikscene = ikdata->first; ikscene; ikscene = ikscene->next) { if (ikscene->channels[0].pchan == pchan_root) { float timestep = scene->r.frs_sec_base / scene->r.frs_sec; - if (ob->pose->flag & POSE_GAME_ENGINE) { - timestep = ob->pose->ctime; - // limit the timestep to avoid excessive number of iteration - if (timestep > 0.2f) - timestep = 0.2f; - } execute_scene(depsgraph, scene, ikscene, ikparam, ctime, timestep); break; } -- cgit v1.2.3