Innitial commit. Majority of texture baking moved into LLVOAvatarSelf. Very WIP. Not advisable to build off of this, although it does compile and mostly work.

This commit is contained in:
Shyotl
2011-10-22 20:36:04 -05:00
parent 0fde15246b
commit 722e7d09ff
27 changed files with 2018 additions and 1968 deletions

View File

@@ -91,15 +91,14 @@ void LLMorphView::initialize()
mCameraYaw = 0.f;
mCameraDist = -1.f;
LLVOAvatar *avatarp = gAgentAvatarp;
if (!avatarp || avatarp->isDead())
if (!isAgentAvatarValid())
{
gAgentCamera.changeCameraToDefault();
return;
}
avatarp->stopMotion( ANIM_AGENT_BODY_NOISE );
avatarp->mSpecialRenderMode = 3;
gAgentAvatarp->stopMotion( ANIM_AGENT_BODY_NOISE );
gAgentAvatarp->mSpecialRenderMode = 3;
// set up camera for close look at avatar
mOldCameraNearClip = LLViewerCamera::getInstance()->getNear();
@@ -111,13 +110,12 @@ void LLMorphView::initialize()
//-----------------------------------------------------------------------------
void LLMorphView::shutdown()
{
LLVOAvatar::onCustomizeEnd();
LLVOAvatarSelf::onCustomizeEnd();
LLVOAvatar *avatarp = gAgentAvatarp;
if(avatarp && !avatarp->isDead())
if (isAgentAvatarValid())
{
avatarp->startMotion( ANIM_AGENT_BODY_NOISE );
avatarp->mSpecialRenderMode = 0;
gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE );
gAgentAvatarp->mSpecialRenderMode = 0;
// reset camera
LLViewerCamera::getInstance()->setNear(mOldCameraNearClip);
}
@@ -167,14 +165,10 @@ void LLMorphView::updateCamera()
if (!mCameraTargetJoint)
{
setCameraTargetJoint(gAgentAvatarp->getJoint("mHead"));
}
LLVOAvatar* avatar = gAgentAvatarp;
if( !avatar )
{
return;
}
LLJoint* root_joint = avatar->getRootJoint();
}
if (!isAgentAvatarValid()) return;
LLJoint* root_joint = gAgentAvatarp->getRootJoint();
if( !root_joint )
{
return;