Merge bento-box
commit
18dfdc2ae0
|
|
@ -1243,6 +1243,7 @@ Shnurui Troughton
|
|||
Shyotl Kuhr
|
||||
MAINT-1138
|
||||
MAINT-2334
|
||||
MAINT-6913
|
||||
Siana Gearz
|
||||
STORM-960
|
||||
STORM-1088
|
||||
|
|
@ -1276,6 +1277,7 @@ Sovereign Engineer
|
|||
MAINT-6107
|
||||
STORM-2107
|
||||
MAINT-6218
|
||||
MAINT-6913
|
||||
SpacedOut Frye
|
||||
VWR-34
|
||||
VWR-45
|
||||
|
|
|
|||
|
|
@ -532,10 +532,37 @@ void LLJoint::clearAttachmentPosOverrides()
|
|||
{
|
||||
m_attachmentPosOverrides.clear();
|
||||
setPosition(m_posBeforeOverrides);
|
||||
setId( LLUUID::null );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// getAllAttachmentPosOverrides()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::getAllAttachmentPosOverrides(S32& num_pos_overrides,
|
||||
std::set<LLVector3>& distinct_pos_overrides)
|
||||
{
|
||||
num_pos_overrides = m_attachmentPosOverrides.count();
|
||||
LLVector3OverrideMap::map_type::const_iterator it = m_attachmentPosOverrides.getMap().begin();
|
||||
for (; it != m_attachmentPosOverrides.getMap().end(); ++it)
|
||||
{
|
||||
distinct_pos_overrides.insert(it->second);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// getAllAttachmentScaleOverrides()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::getAllAttachmentScaleOverrides(S32& num_scale_overrides,
|
||||
std::set<LLVector3>& distinct_scale_overrides)
|
||||
{
|
||||
num_scale_overrides = m_attachmentScaleOverrides.count();
|
||||
LLVector3OverrideMap::map_type::const_iterator it = m_attachmentScaleOverrides.getMap().begin();
|
||||
for (; it != m_attachmentScaleOverrides.getMap().end(); ++it)
|
||||
{
|
||||
distinct_scale_overrides.insert(it->second);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// showAttachmentPosOverrides()
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -694,7 +721,6 @@ void LLJoint::clearAttachmentScaleOverrides()
|
|||
{
|
||||
m_attachmentScaleOverrides.clear();
|
||||
setScale(m_scaleBeforeOverrides);
|
||||
setId( LLUUID::null );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,8 +138,6 @@ protected:
|
|||
// explicit transformation members
|
||||
LLXformMatrix mXform;
|
||||
|
||||
LLUUID mId;
|
||||
|
||||
LLVector3 mDefaultPosition;
|
||||
LLVector3 mDefaultScale;
|
||||
|
||||
|
|
@ -304,14 +302,14 @@ public:
|
|||
void clearAttachmentScaleOverrides();
|
||||
void showAttachmentScaleOverrides(const std::string& av_info) const;
|
||||
|
||||
void getAllAttachmentPosOverrides(S32& num_pos_overrides,
|
||||
std::set<LLVector3>& distinct_pos_overrides);
|
||||
void getAllAttachmentScaleOverrides(S32& num_scale_overrides,
|
||||
std::set<LLVector3>& distinct_scale_overrides);
|
||||
|
||||
// These are used in checks of whether a pos/scale override is considered significant.
|
||||
bool aboveJointPosThreshold(const LLVector3& pos) const;
|
||||
bool aboveJointScaleThreshold(const LLVector3& scale) const;
|
||||
|
||||
//Accessor for the joint id
|
||||
LLUUID getId( void ) { return mId; }
|
||||
//Setter for the joints id
|
||||
void setId( const LLUUID& id ) { mId = id;}
|
||||
};
|
||||
#endif // LL_LLJOINT_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1400,13 +1400,15 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is)
|
|||
|
||||
LLMeshSkinInfo::LLMeshSkinInfo():
|
||||
mPelvisOffset(0.0),
|
||||
mLockScaleIfJointPosition(false)
|
||||
mLockScaleIfJointPosition(false),
|
||||
mInvalidJointsScrubbed(false)
|
||||
{
|
||||
}
|
||||
|
||||
LLMeshSkinInfo::LLMeshSkinInfo(LLSD& skin):
|
||||
mPelvisOffset(0.0),
|
||||
mLockScaleIfJointPosition(false)
|
||||
mLockScaleIfJointPosition(false),
|
||||
mInvalidJointsScrubbed(false)
|
||||
{
|
||||
fromLLSD(skin);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public:
|
|||
LLMatrix4 mBindShapeMatrix;
|
||||
float mPelvisOffset;
|
||||
bool mLockScaleIfJointPosition;
|
||||
bool mInvalidJointsScrubbed;
|
||||
};
|
||||
|
||||
class LLModel : public LLVolume
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ PFNGLUNIFORM3IVARBPROC glUniform3ivARB = NULL;
|
|||
PFNGLUNIFORM4IVARBPROC glUniform4ivARB = NULL;
|
||||
PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB = NULL;
|
||||
PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB = NULL;
|
||||
PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv = NULL;
|
||||
PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB = NULL;
|
||||
PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB = NULL;
|
||||
PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB = NULL;
|
||||
|
|
@ -1344,6 +1345,7 @@ void LLGLManager::initExtensions()
|
|||
glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4ivARB");
|
||||
glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2fvARB");
|
||||
glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3fvARB");
|
||||
glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4fv");
|
||||
glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4fvARB");
|
||||
glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterfvARB");
|
||||
glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterivARB");
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
|
|||
extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
|
||||
extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
|
||||
extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
|
|
@ -422,6 +423,7 @@ extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
|
|||
extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
|
||||
extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
|
||||
extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
|
|
@ -668,6 +670,7 @@ extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
|
|||
extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
|
||||
extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
|
||||
extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
|
||||
extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
|
||||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
|
|
|
|||
|
|
@ -1260,6 +1260,23 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c
|
|||
}
|
||||
}
|
||||
|
||||
void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
|
||||
{
|
||||
if (mProgramObject > 0)
|
||||
{
|
||||
if (mUniform.size() <= index)
|
||||
{
|
||||
UNIFORM_ERRS << "Uniform index out of bounds." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mUniform[index] >= 0)
|
||||
{
|
||||
glUniformMatrix3x4fv(mUniform[index], count, transpose, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
|
||||
{
|
||||
if (mProgramObject > 0)
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ public:
|
|||
void uniform2i(const LLStaticHashedString& uniform, GLint i, GLint j);
|
||||
void uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v);
|
||||
void uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v);
|
||||
void uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v);
|
||||
void uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v);
|
||||
void uniform1i(const LLStaticHashedString& uniform, GLint i);
|
||||
void uniform1f(const LLStaticHashedString& uniform, GLfloat v);
|
||||
|
|
|
|||
|
|
@ -24,11 +24,7 @@
|
|||
|
||||
ATTRIBUTE vec4 weight4;
|
||||
|
||||
/* BENTO JOINT COUNT LIMITS
|
||||
* Note that the value in these two lines also needs to be updated to value-1 several places below.
|
||||
*/
|
||||
uniform mat3 matrixPalette[MAX_JOINTS_PER_MESH_OBJECT];
|
||||
uniform vec3 translationPalette[MAX_JOINTS_PER_MESH_OBJECT];
|
||||
uniform mat3x4 matrixPalette[MAX_JOINTS_PER_MESH_OBJECT];
|
||||
|
||||
mat4 getObjectSkinnedTransform()
|
||||
{
|
||||
|
|
@ -37,8 +33,8 @@ mat4 getObjectSkinnedTransform()
|
|||
vec4 w = fract(weight4);
|
||||
vec4 index = floor(weight4);
|
||||
|
||||
index = min(index, vec4(MAX_JOINTS_PER_MESH_OBJECT-1));
|
||||
index = max(index, vec4( 0.0));
|
||||
index = min(index, vec4(MAX_JOINTS_PER_MESH_OBJECT-1));
|
||||
index = max(index, vec4( 0.0));
|
||||
|
||||
w *= 1.0/(w.x+w.y+w.z+w.w);
|
||||
|
||||
|
|
@ -46,16 +42,16 @@ mat4 getObjectSkinnedTransform()
|
|||
int i2 = int(index.y);
|
||||
int i3 = int(index.z);
|
||||
int i4 = int(index.w);
|
||||
|
||||
mat3 mat = matrixPalette[i1]*w.x;
|
||||
mat += matrixPalette[i2]*w.y;
|
||||
mat += matrixPalette[i3]*w.z;
|
||||
mat += matrixPalette[i4]*w.w;
|
||||
|
||||
vec3 trans = translationPalette[i1]*w.x;
|
||||
trans += translationPalette[i2]*w.y;
|
||||
trans += translationPalette[i3]*w.z;
|
||||
trans += translationPalette[i4]*w.w;
|
||||
mat3 mat = mat3(matrixPalette[i1])*w.x;
|
||||
mat += mat3(matrixPalette[i2])*w.y;
|
||||
mat += mat3(matrixPalette[i3])*w.z;
|
||||
mat += mat3(matrixPalette[i4])*w.w;
|
||||
|
||||
vec3 trans = vec3(matrixPalette[i1][0].w,matrixPalette[i1][1].w,matrixPalette[i1][2].w)*w.x;
|
||||
trans += vec3(matrixPalette[i2][0].w,matrixPalette[i2][1].w,matrixPalette[i2][2].w)*w.y;
|
||||
trans += vec3(matrixPalette[i3][0].w,matrixPalette[i3][1].w,matrixPalette[i3][2].w)*w.z;
|
||||
trans += vec3(matrixPalette[i4][0].w,matrixPalette[i4][1].w,matrixPalette[i4][2].w)*w.w;
|
||||
|
||||
mat4 ret;
|
||||
|
||||
|
|
@ -68,10 +64,8 @@ mat4 getObjectSkinnedTransform()
|
|||
|
||||
#ifdef IS_AMD_CARD
|
||||
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
|
||||
mat3 dummy1 = matrixPalette[0];
|
||||
vec3 dummy2 = translationPalette[0];
|
||||
mat3 dummy3 = matrixPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
|
||||
vec3 dummy4 = translationPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
|
||||
mat3x4 dummy1 = matrixPalette[0];
|
||||
mat3x4 dummy2 = matrixPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1855,43 +1855,35 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
|||
|
||||
stop_glerror();
|
||||
|
||||
F32 mp[LL_MAX_JOINTS_PER_MESH_OBJECT*9];
|
||||
|
||||
F32 transp[LL_MAX_JOINTS_PER_MESH_OBJECT*3];
|
||||
F32 mp[LL_MAX_JOINTS_PER_MESH_OBJECT*12];
|
||||
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{
|
||||
F32* m = (F32*) mat[i].mMatrix[0].getF32ptr();
|
||||
|
||||
U32 idx = i*9;
|
||||
U32 idx = i*12;
|
||||
|
||||
mp[idx+0] = m[0];
|
||||
mp[idx+1] = m[1];
|
||||
mp[idx+2] = m[2];
|
||||
mp[idx+3] = m[12];
|
||||
|
||||
mp[idx+3] = m[4];
|
||||
mp[idx+4] = m[5];
|
||||
mp[idx+5] = m[6];
|
||||
mp[idx+4] = m[4];
|
||||
mp[idx+5] = m[5];
|
||||
mp[idx+6] = m[6];
|
||||
mp[idx+7] = m[13];
|
||||
|
||||
mp[idx+6] = m[8];
|
||||
mp[idx+7] = m[9];
|
||||
mp[idx+8] = m[10];
|
||||
|
||||
idx = i*3;
|
||||
|
||||
transp[idx+0] = m[12];
|
||||
transp[idx+1] = m[13];
|
||||
transp[idx+2] = m[14];
|
||||
mp[idx+8] = m[8];
|
||||
mp[idx+9] = m[9];
|
||||
mp[idx+10] = m[10];
|
||||
mp[idx+11] = m[14];
|
||||
}
|
||||
|
||||
LLDrawPoolAvatar::sVertexProgram->uniformMatrix3fv(LLViewerShaderMgr::AVATAR_MATRIX,
|
||||
LLDrawPoolAvatar::sVertexProgram->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
|
||||
count,
|
||||
FALSE,
|
||||
(GLfloat*) mp);
|
||||
|
||||
LLDrawPoolAvatar::sVertexProgram->uniform3fv(LLShaderMgr::AVATAR_TRANSLATION, count, transp);
|
||||
|
||||
|
||||
stop_glerror();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin)
|
|||
// static
|
||||
void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin)
|
||||
{
|
||||
if (skin->mInvalidJointsScrubbed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (U32 j = 0; j < skin->mJointNames.size(); ++j)
|
||||
{
|
||||
// Fix invalid names to "mPelvis". Currently meshes with
|
||||
|
|
@ -66,6 +70,7 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin
|
|||
//</FS:ND>
|
||||
}
|
||||
}
|
||||
skin->mInvalidJointsScrubbed = true;
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -7413,12 +7413,25 @@ class LLAvatarResetSkeleton: public view_listener_t
|
|||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
if(avatar)
|
||||
{
|
||||
avatar->resetSkeleton();
|
||||
avatar->resetSkeleton(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLAvatarResetSkeletonAndAnimations : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
|
||||
if (avatar)
|
||||
{
|
||||
avatar->resetSkeleton(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLAvatarAddContact : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
|
|
@ -11325,6 +11338,7 @@ void initialize_menus()
|
|||
|
||||
view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
|
||||
view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
|
||||
view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeletonAndAnimations");
|
||||
enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
|
||||
|
||||
commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
|
||||
|
|
|
|||
|
|
@ -1949,7 +1949,7 @@ void LLVOAvatar::resetVisualParams()
|
|||
//-----------------------------------------------------------------------------
|
||||
// resetSkeleton()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::resetSkeleton()
|
||||
void LLVOAvatar::resetSkeleton(bool reset_animations)
|
||||
{
|
||||
LL_DEBUGS("Avatar") << avString() << " reset starts" << LL_ENDL;
|
||||
if (!mLastProcessedAppearance)
|
||||
|
|
@ -2008,12 +2008,17 @@ void LLVOAvatar::resetSkeleton()
|
|||
// Reset tweakable params to preserved state
|
||||
bool slam_params = true;
|
||||
applyParsedAppearanceMessage(*mLastProcessedAppearance, slam_params);
|
||||
|
||||
updateVisualParams();
|
||||
|
||||
// Restore attachment pos overrides
|
||||
rebuildAttachmentOverrides();
|
||||
|
||||
// Animations
|
||||
if (reset_animations)
|
||||
{
|
||||
resetAnimations();
|
||||
}
|
||||
|
||||
LL_DEBUGS("Avatar") << avString() << " reset ends" << LL_ENDL;
|
||||
}
|
||||
|
||||
|
|
@ -6122,32 +6127,13 @@ void LLVOAvatar::clearAttachmentOverrides()
|
|||
{
|
||||
LLScopedContextString str("clearAttachmentOverrides " + getFullname());
|
||||
|
||||
//Subsequent joints are relative to pelvis
|
||||
avatar_joint_list_t::iterator iter = mSkeleton.begin();
|
||||
avatar_joint_list_t::iterator end = mSkeleton.end();
|
||||
|
||||
for (; iter != end; ++iter)
|
||||
{
|
||||
LLJoint* pJoint = (*iter);
|
||||
if (pJoint)
|
||||
{
|
||||
pJoint->clearAttachmentPosOverrides();
|
||||
}
|
||||
if (pJoint)
|
||||
{
|
||||
pJoint->clearAttachmentScaleOverrides();
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment points
|
||||
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
|
||||
iter != mAttachmentPoints.end();
|
||||
++iter)
|
||||
{
|
||||
LLViewerJointAttachment *attachment_pt = (*iter).second;
|
||||
if (attachment_pt)
|
||||
for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
|
||||
{
|
||||
LLJoint *pJoint = getJoint(i);
|
||||
if (pJoint)
|
||||
{
|
||||
attachment_pt->clearAttachmentPosOverrides();
|
||||
pJoint->clearAttachmentPosOverrides();
|
||||
pJoint->clearAttachmentScaleOverrides();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6236,9 +6222,8 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo)
|
|||
// </FS:ND>
|
||||
|
||||
LLJoint* pJoint = getJoint( lookingForJoint );
|
||||
if ( pJoint && pJoint->getId() != currentId )
|
||||
if (pJoint)
|
||||
{
|
||||
pJoint->setId( currentId );
|
||||
const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();
|
||||
if (pJoint->aboveJointPosThreshold(jointPos))
|
||||
{
|
||||
|
|
@ -6451,7 +6436,6 @@ void LLVOAvatar::resetJointsOnDetach(const LLUUID& mesh_id)
|
|||
if ( pJoint )
|
||||
{
|
||||
bool dummy; // unused
|
||||
pJoint->setId( LLUUID::null );
|
||||
pJoint->removeAttachmentPosOverride(mesh_id, avString(),dummy);
|
||||
pJoint->removeAttachmentScaleOverride(mesh_id, avString());
|
||||
}
|
||||
|
|
@ -8491,12 +8475,10 @@ void dump_visual_param(LLAPRFile::tFiletype* file, LLVisualParam* viewer_param,
|
|||
wtype = vparam->getWearableType();
|
||||
}
|
||||
S32 u8_value = F32_to_U8(value,viewer_param->getMinWeight(),viewer_param->getMaxWeight());
|
||||
apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
|
||||
viewer_param->getID(), viewer_param->getName().c_str(), value, u8_value, type_string.c_str(),
|
||||
apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" display=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
|
||||
viewer_param->getID(), viewer_param->getName().c_str(), viewer_param->getDisplayName().c_str(), value, u8_value, type_string.c_str(),
|
||||
LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str(),
|
||||
viewer_param->getGroup()
|
||||
// param_location_name(vparam->getParamLocation()).c_str()
|
||||
);
|
||||
viewer_param->getGroup());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -9435,8 +9417,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
|
|||
|
||||
if (pJoint && pJoint->hasAttachmentPosOverride(pos,mesh_id))
|
||||
{
|
||||
apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\"/>\n",
|
||||
pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str());
|
||||
S32 num_pos_overrides;
|
||||
std::set<LLVector3> distinct_pos_overrides;
|
||||
pJoint->getAllAttachmentPosOverrides(num_pos_overrides, distinct_pos_overrides);
|
||||
apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\" count=\"%d\" distinct=\"%d\"/>\n",
|
||||
pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str(),
|
||||
num_pos_overrides, (S32) distinct_pos_overrides.size());
|
||||
}
|
||||
}
|
||||
// Joint scale overrides
|
||||
|
|
@ -9450,8 +9436,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
|
|||
|
||||
if (pJoint && pJoint->hasAttachmentScaleOverride(scale,mesh_id))
|
||||
{
|
||||
apr_file_printf( file, "\t\t<joint_scale name=\"%s\" scale=\"%f %f %f\" mesh_id=\"%s\"/>\n",
|
||||
pJoint->getName().c_str(), scale[0], scale[1], scale[2], mesh_id.asString().c_str());
|
||||
S32 num_scale_overrides;
|
||||
std::set<LLVector3> distinct_scale_overrides;
|
||||
pJoint->getAllAttachmentPosOverrides(num_scale_overrides, distinct_scale_overrides);
|
||||
apr_file_printf( file, "\t\t<joint_scale name=\"%s\" scale=\"%f %f %f\" mesh_id=\"%s\" count=\"%d\" distinct=\"%d\"/>\n",
|
||||
pJoint->getName().c_str(), scale[0], scale[1], scale[2], mesh_id.asString().c_str(),
|
||||
num_scale_overrides, (S32) distinct_scale_overrides.size());
|
||||
}
|
||||
}
|
||||
F32 pelvis_fixup;
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ public:
|
|||
void initAttachmentPoints(bool ignore_hud_joints = false);
|
||||
/*virtual*/ void buildCharacter();
|
||||
void resetVisualParams();
|
||||
void resetSkeleton();
|
||||
void resetSkeleton(bool reset_animations);
|
||||
|
||||
LLVector3 mCurRootToHeadOffset;
|
||||
LLVector3 mTargetRootToHeadOffset;
|
||||
|
|
|
|||
|
|
@ -4937,7 +4937,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
if (rigged && pAvatarVO)
|
||||
{
|
||||
pAvatarVO->addAttachmentOverridesForObject(vobj);
|
||||
if (debugLoggingEnabled("AvatarAttachments") && pAvatarVO->isSelf())
|
||||
if (!LLApp::isExiting() && pAvatarVO->isSelf() && debugLoggingEnabled("AvatarAttachments"))
|
||||
{
|
||||
bool verbose = true;
|
||||
pAvatarVO->showAttachmentOverrides(verbose);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,13 @@
|
|||
function="Avatar.ResetSkeleton" />
|
||||
</menu_item_call>
|
||||
|
||||
<menu_item_call label="Reset Skeleton And Animations"
|
||||
layout="topleft"
|
||||
name="Reset Skeleton And Animations">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeletonAndAnimations" />
|
||||
</menu_item_call>
|
||||
|
||||
<menu_item_separator />
|
||||
<context_menu
|
||||
label="Annoyance"
|
||||
|
|
|
|||
|
|
@ -125,6 +125,12 @@ name="Edit Outfit">
|
|||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeleton" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Reset Skeleton And Animations"
|
||||
layout="topleft"
|
||||
name="Reset Skeleton And Animations">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeletonAndAnimations" />
|
||||
</menu_item_call>
|
||||
|
||||
<menu_item_call
|
||||
label="Friends"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,13 @@
|
|||
function="Avatar.ResetSkeleton" />
|
||||
</menu_item_call>
|
||||
|
||||
<menu_item_call label="Reset Skeleton And Animations"
|
||||
layout="topleft"
|
||||
name="Reset Skeleton And Animations">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeletonAndAnimations" />
|
||||
</menu_item_call>
|
||||
|
||||
<menu_item_separator />
|
||||
|
||||
<context_menu
|
||||
|
|
|
|||
|
|
@ -243,6 +243,12 @@
|
|||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeleton" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Reset Skeleton And Animations"
|
||||
layout="topleft"
|
||||
name="Reset Skeleton And Animations">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.ResetSkeletonAndAnimations" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Friends"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue