SL-16746 Hide hair and fix missing light for animation preview

master
Andrey Kleshchev 2022-05-14 01:11:08 +03:00
parent 58ceaacafd
commit 28ae135375
3 changed files with 11 additions and 0 deletions

View File

@ -1051,6 +1051,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT
// on idle overall apperance update will set skirt to visible, so either
// call early or account for mSpecialRenderMode in updateMeshVisibility
mDummyAvatar->updateOverallAppearance();
mDummyAvatar->hideHair();
mDummyAvatar->hideSkirt();
// stop extraneous animations
@ -1142,6 +1143,7 @@ BOOL LLPreviewAnimation::render()
{
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)face->getPool();
avatarp->dirtyMesh();
gPipeline.enableLightsPreview();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
}

View File

@ -7144,6 +7144,14 @@ LLViewerJoint* LLVOAvatar::getViewerJoint(S32 idx)
return dynamic_cast<LLViewerJoint*>(mMeshLOD[idx]);
}
//-----------------------------------------------------------------------------
// hideHair()
//-----------------------------------------------------------------------------
void LLVOAvatar::hideHair()
{
mMeshLOD[MESH_ID_HAIR]->setVisible(FALSE, TRUE);
}
//-----------------------------------------------------------------------------
// hideSkirt()
//-----------------------------------------------------------------------------

View File

@ -769,6 +769,7 @@ public:
void parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& msg);
void processAvatarAppearance(LLMessageSystem* mesgsys);
void applyParsedAppearanceMessage(LLAppearanceMessageContents& contents, bool slam_params);
void hideHair();
void hideSkirt();
void startAppearanceAnimation();