summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp41
-rw-r--r--indra/newview/llfloatermodelpreview.h3
2 files changed, 10 insertions, 34 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0748ed8039..9ef5c6022e 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -2196,15 +2196,11 @@ void LLModelPreview::critiqueRigForUploadApplicability( const std::vector<std::s
setRigValidForJointPositionUpload( true );
}
- if ( isRigLegacyOK )
- {
+ if ( isRigLegacyOK)
+ {
setLegacyRigValid( true );
}
- if ( getRigWithSceneParity() && isJointPositionUploadOK )
- {
- setResetJointFlag( true );
- }
}
//-----------------------------------------------------------------------------
// critiqueJointToNodeMappingFromScene()
@@ -2244,12 +2240,7 @@ void LLModelPreview::critiqueJointToNodeMappingFromScene( void )
//2. Partial rig but w/o parity between the scene and joint array
if ( result )
{
- setResetJointFlag( true );
setRigWithSceneParity( true );
- }
- else
- {
- setResetJointFlag( false );
}
}
//-----------------------------------------------------------------------------
@@ -3007,13 +2998,7 @@ U32 LLModelPreview::calcResourceCost()
if ( uploadingJointPositions && !isRigValidForJointPositionUpload() )
{
mFMP->childDisable("ok_btn");
- }
- else
- if ( !isLegacyRigValid() )
- {
- mFMP->childDisable("ok_btn");
- }
- //ok_btn should not have been changed unless something was wrong with joint list
+ }
}
std::set<LLModel*> accounted;
@@ -4224,12 +4209,7 @@ void LLModelPreview::updateStatusMessages()
if ( uploadingJointPositions && !isRigValidForJointPositionUpload() )
{
skinAndRigOk = false;
- }
- else
- if ( !isLegacyRigValid() )
- {
- skinAndRigOk = false;
- }
+ }
}
if(upload_ok && mModelLoader)
@@ -4807,8 +4787,12 @@ BOOL LLModelPreview::render()
mFMP->childSetValue("upload_joints", false);
upload_joints = false;
}
-
- mFMP->childSetEnabled("upload_joints", upload_skin);
+
+ //Only enable joint offsets if it passed the earlier critiquing
+ if ( isRigValidForJointPositionUpload() )
+ {
+ mFMP->childSetEnabled("upload_joints", upload_skin);
+ }
F32 explode = mFMP->childGetValue("physics_explode").asReal();
@@ -5468,11 +5452,6 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
{
mCalculateBtn->setVisible( false );
}
- else
- if ( !mModelPreview->isLegacyRigValid() )
- {
- mCalculateBtn->setVisible( false );
- }
}
mUploadBtn->setVisible(!visible);
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 3a5f7602fe..c24e171024 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -365,9 +365,6 @@ public:
void setLoadState( U32 state ) { mLoadState = state; }
U32 getLoadState() { return mLoadState; }
- //setRestJointFlag: If an asset comes through that changes the joints, we want the reset to persist
- void setResetJointFlag( bool state ) { if ( !mResetJoints ) mResetJoints = state; }
- const bool getResetJointFlag( void ) const { return mResetJoints; }
void setRigWithSceneParity( bool state ) { mRigParityWithScene = state; }
const bool getRigWithSceneParity( void ) const { return mRigParityWithScene; }