diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index dc0a009ef7..53f37635f3 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -82,7 +82,7 @@ const float MyAvatar::ZOOM_MIN = 0.5f; const float MyAvatar::ZOOM_MAX = 25.0f; const float MyAvatar::ZOOM_DEFAULT = 1.5f; -extern bool HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS; +extern bool OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS; MyAvatar::MyAvatar(RigPointer rig) : Avatar(rig), @@ -839,7 +839,7 @@ void MyAvatar::setEnableDebugDrawSensorToWorldMatrix(bool isEnabled) { void MyAvatar::setEnableDebugDrawIKTargets(bool isEnabled) { _enableDebugDrawIKTargets = isEnabled; - HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS = isEnabled; + OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS = isEnabled; } diff --git a/libraries/animation/src/AnimInverseKinematics.cpp b/libraries/animation/src/AnimInverseKinematics.cpp index 93ba3bd689..27300699c4 100644 --- a/libraries/animation/src/AnimInverseKinematics.cpp +++ b/libraries/animation/src/AnimInverseKinematics.cpp @@ -21,8 +21,8 @@ #include "SwingTwistConstraint.h" #include "AnimationLogging.h" -bool HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS = false; -Rig* HACKY_GLOBAL_RIG_POINTER = nullptr; +bool OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS = false; +Rig* OUTOFBODY_HACK_RIG_POINTER = nullptr; AnimInverseKinematics::AnimInverseKinematics(const QString& id) : AnimNode(AnimNode::Type::InverseKinematics, id) { } @@ -442,10 +442,9 @@ const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars computeTargets(animVars, targets, underPoses); } - // AJT: HACK - if (HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS && HACKY_GLOBAL_RIG_POINTER) { + if (OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS && OUTOFBODY_HACK_RIG_POINTER) { const vec4 WHITE(1.0f); - glm::mat4 geomToRigMat = HACKY_GLOBAL_RIG_POINTER->getGeometryToRigTransform(); + glm::mat4 geomToRigMat = OUTOFBODY_HACK_RIG_POINTER->getGeometryToRigTransform(); glm::mat4 rigToAvatarMat = createMatFromQuatAndPos(Quaternions::Y_180, glm::vec3()); for (auto& target : targets) { diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 22486b5172..f0c7f85011 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -51,7 +51,7 @@ const glm::vec3 TRUNCATE_IK_CAPSULE_POSITION(0.0f, 0.0f, 0.0f); float TRUNCATE_IK_CAPSULE_LENGTH = 1000.0; float TRUNCATE_IK_CAPSULE_RADIUS = 0.5; -extern Rig* HACKY_GLOBAL_RIG_POINTER; +extern Rig* OUTOFBODY_HACK_RIG_POINTER; void Rig::overrideAnimation(const QString& url, float fps, bool loop, float firstFrame, float lastFrame) { @@ -881,7 +881,7 @@ void Rig::updateAnimations(float deltaTime, glm::mat4 rootTransform) { _animVars.setRigToGeometryTransform(_rigToGeometryTransform); // evaluate the animation - HACKY_GLOBAL_RIG_POINTER = this; + OUTOFBODY_HACK_RIG_POINTER = this; AnimNode::Triggers triggersOut; _internalPoseSet._relativePoses = _animNode->evaluate(_animVars, deltaTime, triggersOut); if ((int)_internalPoseSet._relativePoses.size() != _animSkeleton->getNumJoints()) { @@ -892,7 +892,7 @@ void Rig::updateAnimations(float deltaTime, glm::mat4 rootTransform) { for (auto& trigger : triggersOut) { _animVars.setTrigger(trigger); } - HACKY_GLOBAL_RIG_POINTER = nullptr; + OUTOFBODY_HACK_RIG_POINTER = nullptr; } applyOverridePoses();