summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgtags3
-rw-r--r--indra/llprimitive/llmodel.cpp7
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llagentcamera.cpp4
-rw-r--r--indra/newview/llfirstuse.cpp2
-rw-r--r--indra/newview/llfloatermodelpreview.cpp184
-rw-r--r--indra/newview/llfloatermodelpreview.h13
-rw-r--r--indra/newview/llfloaterregioninfo.cpp5
-rw-r--r--indra/newview/llfloatersearch.cpp11
-rw-r--r--indra/newview/llmeshrepository.cpp77
-rw-r--r--indra/newview/llmeshrepository.h3
-rw-r--r--indra/newview/llpanelobject.cpp96
-rw-r--r--indra/newview/llpanelobject.h5
-rw-r--r--indra/newview/llpanelvolume.cpp94
-rw-r--r--indra/newview/llpanelvolume.h6
-rw-r--r--indra/newview/llselectmgr.cpp10
-rw-r--r--indra/newview/llviewerobject.cpp17
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_wizard.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml80
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_general.xml1
23 files changed, 366 insertions, 287 deletions
diff --git a/.hgtags b/.hgtags
index 9a32bc53cc..f32e71f85c 100644
--- a/.hgtags
+++ b/.hgtags
@@ -111,3 +111,6 @@ d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc 2.6.3-beta1
bb1075286b3b147b1dae2e3d6b2d56f04ff03f35 DRTVWR-52_2.6.6-beta1
bb1075286b3b147b1dae2e3d6b2d56f04ff03f35 2.6.6-beta1
5e349dbe9cc84ea5795af8aeb6d473a0af9d4953 2.6.8-start
+11d5d8080e67c3955914caf98f2eb116af30e55a 2.6.9-start
+11d5d8080e67c3955914caf98f2eb116af30e55a 2.6.9-start
+e67da2c6e3125966dd49eef98b36317afac1fcfe 2.6.9-start
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 794cdb83d5..57ac7a143f 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -991,6 +991,9 @@ void LLModel::normalizeVolumeFaces()
scale.splat(1.f);
scale.div(size);
+ LLVector4a inv_scale(1.f);
+ inv_scale.div(scale);
+
for (U32 i = 0; i < mVolumeFaces.size(); ++i)
{
LLVolumeFace& face = mVolumeFaces[i];
@@ -1007,10 +1010,14 @@ void LLModel::normalizeVolumeFaces()
// For all the positions, we scale
// the positions to fit within the unit cube.
LLVector4a* pos = (LLVector4a*) face.mPositions;
+ LLVector4a* norm = (LLVector4a*) face.mNormals;
+
for (U32 j = 0; j < face.mNumVertices; ++j)
{
pos[j].add(trans);
pos[j].mul(scale);
+ norm[j].mul(inv_scale);
+ norm[j].normalize3();
}
}
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 071fcd2a3f..78db307d64 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3982,17 +3982,6 @@
<key>Value</key>
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
- <key>SearchURLBeta</key>
- <map>
- <key>Comment</key>
- <string>URL for Search website, displayed in the Find floater</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>http://beta.search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
- </map>
<key>WebProfileURL</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index c6b5a0113f..80085dad9d 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -394,7 +394,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
LLVector3 object_extents;
const LLVector4a* oe4 = object->mDrawable->getSpatialExtents();
- object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] );
+ LLVector4a size;
+ size.setSub(oe4[1], oe4[0]);
+ object_extents.set( size[0], size[1], size[2] );
// make sure they object extents are non-zero
object_extents.clamp(0.001f, F32_MAX);
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 2c4153688a..a9f52282a5 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -131,7 +131,7 @@ void LLFirstUse::notMoving(bool enable)
// static
void LLFirstUse::viewPopup(bool enable)
{
- firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right"));
+// firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right"));
}
// static
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index e8da1aa42c..9dd5269a6b 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -98,7 +98,8 @@
#include "llvfile.h"
#include "llvfs.h"
#include "llcallbacklist.h"
-
+#include "llviewerobjectlist.h"
+#include "llanimationstates.h"
#include "glod/glod.h"
//static
@@ -381,12 +382,6 @@ LLFloaterModelPreview::~LLFloaterModelPreview()
{
sInstance = NULL;
- if ( mModelPreview && mModelPreview->getResetJointFlag() )
- {
- gAgentAvatarp->resetJointPositions();
- }
-
-
if ( mModelPreview )
{
delete mModelPreview;
@@ -1577,7 +1572,7 @@ bool LLModelLoader::doLoadModel()
{
//llinfos<<"joint "<<lookingForJoint.c_str()<<llendl;
LLMatrix4 jointTransform = mJointList[lookingForJoint];
- LLJoint* pJoint = gAgentAvatarp->getJoint( lookingForJoint );
+ LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
if ( pJoint )
{
pJoint->storeCurrentXform( jointTransform.getTranslation() );
@@ -2597,6 +2592,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
mLoading = false;
mLoadState = LLModelLoader::STARTING;
mGroup = 0;
+ mLODFrozen = false;
mBuildShareTolerance = 0.f;
mBuildQueueMode = GLOD_QUEUE_GREEDY;
mBuildBorderMode = GLOD_BORDER_UNLOCK;
@@ -2605,6 +2601,13 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
for (U32 i = 0; i < LLModel::NUM_LODS; ++i)
{
mRequestedTriangleCount[i] = 0;
+ mRequestedCreaseAngle[i] = -1.f;
+ mRequestedLoDMode[i] = 0;
+ mRequestedErrorThreshold[i] = 0.f;
+ mRequestedBuildOperator[i] = 0;
+ mRequestedQueueMode[i] = 0;
+ mRequestedBorderMode[i] = 0;
+ mRequestedShareTolerance[i] = 0.f;
}
mViewOption["show_textures"] = false;
@@ -2649,6 +2652,8 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
mMasterLegacyJointList.push_front("mHipLeft");
mMasterLegacyJointList.push_front("mKneeLeft");
mMasterLegacyJointList.push_front("mFootLeft");
+
+ createPreviewAvatar();
}
LLModelPreview::~LLModelPreview()
@@ -2702,7 +2707,7 @@ U32 LLModelPreview::calcResourceCost()
if ( mFMP && mFMP->childGetValue("upload_joints").asBoolean() )
{
- gAgentAvatarp->setPelvisOffset( mPelvisZOffset );
+ getPreviewAvatar()->setPelvisOffset( mPelvisZOffset );
}
F32 streaming_cost = 0.f;
@@ -3247,6 +3252,8 @@ void LLModelPreview::generateNormals()
F32 angle_cutoff = mFMP->childGetValue("crease_angle").asReal();
+ mRequestedCreaseAngle[which_lod] = angle_cutoff;
+
angle_cutoff *= DEG_TO_RAD;
if (which_lod == 3 && !mBaseModel.empty())
@@ -3266,7 +3273,7 @@ void LLModelPreview::generateNormals()
mVertexBuffer[which_lod].clear();
refresh();
-
+ updateStatusMessages();
}
void LLModelPreview::clearMaterials()
@@ -3342,6 +3349,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
{
lod_mode = iface->getFirstSelectedIndex();
}
+ mRequestedLoDMode[mPreviewLOD] = lod_mode;
F32 lod_error_threshold = mFMP->childGetValue("lod_error_threshold").asReal();
@@ -3365,6 +3373,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
{
build_operator = iface->getFirstSelectedIndex();
}
+ mRequestedBuildOperator[mPreviewLOD] = build_operator;
if (build_operator == 0)
{
@@ -3381,6 +3390,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
{
queue_mode = iface->getFirstSelectedIndex();
}
+ mRequestedQueueMode[mPreviewLOD] = queue_mode;
if (queue_mode == 0)
{
@@ -3402,6 +3412,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
{
border_mode = iface->getFirstSelectedIndex();
}
+ mRequestedBorderMode[mPreviewLOD] = border_mode;
if (border_mode == 0)
{
@@ -3437,6 +3448,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
mBuildShareTolerance = share_tolerance;
object_dirty = true;
}
+ mRequestedShareTolerance[mPreviewLOD] = share_tolerance;
if (mGroup == 0)
{
@@ -3545,6 +3557,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 submeshes = 0;
mRequestedTriangleCount[lod] = triangle_count;
+ mRequestedErrorThreshold[lod] = lod_error_threshold;
glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode);
stop_gloderror();
@@ -3832,6 +3845,18 @@ void LLModelPreview::updateStatusMessages()
}
}
+
+ //make sure no hulls have more than 256 points in them
+ for (U32 i = 0; upload_ok && i < mModel[LLModel::LOD_PHYSICS].size(); ++i)
+ {
+ LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i];
+
+ for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j)
+ {
+ upload_ok = upload_ok && mdl->mPhysics.mHull[i].size() <= 256;
+ }
+ }
+
bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false;
bool skinAndRigOk = true;
@@ -3855,6 +3880,10 @@ void LLModelPreview::updateStatusMessages()
{
mFMP->childEnable("ok_btn");
}
+ else
+ {
+ mFMP->childDisable("ok_btn");
+ }
//add up physics triangles etc
S32 start = 0;
@@ -4021,6 +4050,9 @@ void LLModelPreview::updateStatusMessages()
{ // auto generate, also the default case for wizard which has no radio selection
fmp->mLODMode[mPreviewLOD] = 1;
+ //don't actually regenerate lod when refreshing UI
+ mLODFrozen = true;
+
for (U32 i = 0; i < num_file_controls; ++i)
{
mFMP->childDisable(file_controls[i]);
@@ -4033,20 +4065,21 @@ void LLModelPreview::updateStatusMessages()
//if (threshold)
{
- U32 lod_mode = 0;
- LLCtrlSelectionInterface* iface = mFMP->childGetSelectionInterface("lod_mode");
- if (iface)
- {
- lod_mode = iface->getFirstSelectedIndex();
- }
-
LLSpinCtrl* threshold = mFMP->getChild<LLSpinCtrl>("lod_error_threshold");
LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit");
limit->setMaxValue(mMaxTriangleLimit);
- limit->setValue(mRequestedTriangleCount[mPreviewLOD]);
+ limit->forceSetValue(mRequestedTriangleCount[mPreviewLOD]);
+
+ threshold->forceSetValue(mRequestedErrorThreshold[mPreviewLOD]);
- if (lod_mode == 0)
+ mFMP->getChild<LLComboBox>("lod_mode")->selectNthItem(mRequestedLoDMode[mPreviewLOD]);
+ mFMP->getChild<LLComboBox>("build_operator")->selectNthItem(mRequestedBuildOperator[mPreviewLOD]);
+ mFMP->getChild<LLComboBox>("queue_mode")->selectNthItem(mRequestedQueueMode[mPreviewLOD]);
+ mFMP->getChild<LLComboBox>("border_mode")->selectNthItem(mRequestedBorderMode[mPreviewLOD]);
+ mFMP->getChild<LLSpinCtrl>("share_tolerance")->setValue(mRequestedShareTolerance[mPreviewLOD]);
+
+ if (mRequestedLoDMode[mPreviewLOD] == 0)
{
limit->setVisible(true);
threshold->setVisible(false);
@@ -4060,6 +4093,8 @@ void LLModelPreview::updateStatusMessages()
threshold->setVisible(true);
}
}
+
+ mLODFrozen = false;
}
}
@@ -4075,6 +4110,20 @@ void LLModelPreview::updateStatusMessages()
mFMP->childDisable("physics_file");
mFMP->childDisable("physics_browse");
}
+
+ LLSpinCtrl* crease = mFMP->getChild<LLSpinCtrl>("crease_angle");
+
+ if (mRequestedCreaseAngle[mPreviewLOD] == -1.f)
+ {
+ mFMP->childSetColor("crease_label", LLColor4::grey);
+ crease->forceSetValue(75.f);
+ }
+ else
+ {
+ mFMP->childSetColor("crease_label", LLColor4::white);
+ crease->forceSetValue(mRequestedCreaseAngle[mPreviewLOD]);
+ }
+
}
void LLModelPreview::setPreviewTarget(F32 distance)
@@ -4241,42 +4290,6 @@ void LLModelPreview::update()
}
//-----------------------------------------------------------------------------
-// changeAvatarsJointPositions()
-//-----------------------------------------------------------------------------
-void LLModelPreview::changeAvatarsJointPositions( LLModel* pModel )
-{
- if ( mMasterJointList.empty() )
- {
- return;
- }
-
- std::vector<std::string> :: const_iterator jointListItBegin = pModel->mSkinInfo.mJointNames.begin();
- std::vector<std::string> :: const_iterator jointListItEnd = pModel->mSkinInfo.mJointNames.end();
-
- S32 index = 0;
- for ( ; jointListItBegin!=jointListItEnd; ++jointListItBegin, ++index )
- {
- std::string elem = *jointListItBegin;
- //llinfos<<"joint "<<elem<<llendl;
-
- S32 matrixCnt = pModel->mSkinInfo.mAlternateBindMatrix.size();
- if ( matrixCnt < 1 )
- {
- llinfos<<"Total WTF moment :"<<matrixCnt<<llendl;
- }
- else
- {
- LLMatrix4 jointTransform = pModel->mSkinInfo.mAlternateBindMatrix[index];
-
- LLJoint* pJoint = gAgentAvatarp->getJoint( elem );
- if ( pJoint )
- {
- pJoint->storeCurrentXform( jointTransform.getTranslation() );
- }
- }
- }
-}
-//-----------------------------------------------------------------------------
// getTranslationForJointOffset()
//-----------------------------------------------------------------------------
LLVector3 LLModelPreview::getTranslationForJointOffset( std::string joint )
@@ -4290,6 +4303,30 @@ LLVector3 LLModelPreview::getTranslationForJointOffset( std::string joint )
return LLVector3(0.0f,0.0f,0.0f);
}
//-----------------------------------------------------------------------------
+// createPreviewAvatar
+//-----------------------------------------------------------------------------
+void LLModelPreview::createPreviewAvatar( void )
+{
+ mPreviewAvatar = (LLVOAvatar*)gObjectList.createObjectViewer( LL_PCODE_LEGACY_AVATAR, gAgent.getRegion() );
+ if ( mPreviewAvatar )
+ {
+ mPreviewAvatar->createDrawable( &gPipeline );
+ mPreviewAvatar->mIsDummy = TRUE;
+ mPreviewAvatar->mSpecialRenderMode = 1;
+ mPreviewAvatar->setPositionAgent( LLVector3::zero );
+ mPreviewAvatar->slamPosition();
+ mPreviewAvatar->updateJointLODs();
+ mPreviewAvatar->updateGeometry( mPreviewAvatar->mDrawable );
+ mPreviewAvatar->startMotion( ANIM_AGENT_STAND );
+ mPreviewAvatar->hideSkirt();
+ }
+ else
+ {
+ llinfos<<"Failed to create preview avatar for upload model window"<<llendl;
+ }
+}
+
+//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
BOOL LLModelPreview::render()
@@ -4403,25 +4440,6 @@ BOOL LLModelPreview::render()
mFMP->childSetEnabled("upload_joints", upload_skin);
- //poke at avatar when we upload custom joints
- /*
- if ( upload_joints )
- {
- for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
- {
- for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter)
- {
- LLModelInstance& instance = *model_iter;
- LLModel* model = instance.mModel;
- if ( !model->mSkinWeights.empty() )
- {
- changeAvatarsJointPositions( model );
- }
- }
- }
- }
- */
-
F32 explode = mFMP->childGetValue("physics_explode").asReal();
glClear(GL_DEPTH_BUFFER_BIT);
@@ -4441,7 +4459,7 @@ BOOL LLModelPreview::render()
if (skin_weight)
{
- target_pos = gAgentAvatarp->getPositionAgent();
+ target_pos = getPreviewAvatar()->getPositionAgent();
z_near = 0.01f;
z_far = 1024.f;
mCameraDistance = 16.f;
@@ -4661,8 +4679,7 @@ BOOL LLModelPreview::render()
}
else
{
- LLVOAvatarSelf* avatar = gAgentAvatarp;
- target_pos = avatar->getPositionAgent();
+ target_pos = getPreviewAvatar()->getPositionAgent();
LLViewerCamera::getInstance()->setOriginAndLookAt(
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + offset) * av_rot), // camera
@@ -4671,7 +4688,7 @@ BOOL LLModelPreview::render()
if (joint_positions)
{
- avatar->renderCollisionVolumes();
+ getPreviewAvatar()->renderCollisionVolumes();
}
for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
@@ -4702,7 +4719,7 @@ BOOL LLModelPreview::render()
LLMatrix4 mat[64];
for (U32 j = 0; j < model->mSkinInfo.mJointNames.size(); ++j)
{
- LLJoint* joint = avatar->getJoint(model->mSkinInfo.mJointNames[j]);
+ LLJoint* joint = getPreviewAvatar()->getJoint(model->mSkinInfo.mJointNames[j]);
if (joint)
{
mat[j] = model->mSkinInfo.mInvBindMatrix[j];
@@ -4925,9 +4942,12 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture
void LLModelPreview::onLODParamCommit(bool enforce_tri_limit)
{
- genLODs(mPreviewLOD, 3, enforce_tri_limit);
- updateStatusMessages();
- refresh();
+ if (!mLODFrozen)
+ {
+ genLODs(mPreviewLOD, 3, enforce_tri_limit);
+ updateStatusMessages();
+ refresh();
+ }
}
LLFloaterModelPreview::DecompRequest::DecompRequest(const std::string& stage, LLModel* mdl)
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 4d8b46807f..f6d4a08d1f 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -341,6 +341,9 @@ public:
LLVector3 getTranslationForJointOffset( std::string joint );
+ void createPreviewAvatar( void );
+ LLVOAvatar* getPreviewAvatar( void ) { return mPreviewAvatar; }
+
protected:
friend class LLModelLoader;
friend class LLFloaterModelPreview;
@@ -373,13 +376,20 @@ public:
std::map<std::string, bool> mViewOption;
//GLOD object parameters (must rebuild object if these change)
+ bool mLODFrozen;
F32 mBuildShareTolerance;
U32 mBuildQueueMode;
U32 mBuildOperator;
U32 mBuildBorderMode;
+ U32 mRequestedLoDMode[LLModel::NUM_LODS];
S32 mRequestedTriangleCount[LLModel::NUM_LODS];
+ F32 mRequestedErrorThreshold[LLModel::NUM_LODS];
+ U32 mRequestedBuildOperator[LLModel::NUM_LODS];
+ U32 mRequestedQueueMode[LLModel::NUM_LODS];
+ U32 mRequestedBorderMode[LLModel::NUM_LODS];
+ F32 mRequestedShareTolerance[LLModel::NUM_LODS];
+ F32 mRequestedCreaseAngle[LLModel::NUM_LODS];
-
LLModelLoader* mModelLoader;
LLModelLoader::scene mScene[LLModel::NUM_LODS];
@@ -415,6 +425,7 @@ public:
std::deque<std::string> mMasterLegacyJointList;
std::deque<std::string> mJointsFromNode;
JointTransformMap mJointTransformMap;
+ LLPointer<LLVOAvatar> mPreviewAvatar;
};
#endif // LL_LLFLOATERMODELPREVIEW_H
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 34fda49375..fc6976755f 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -590,6 +590,11 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
getChildView("im_btn")->setEnabled(allow_modify);
getChildView("manage_telehub_btn")->setEnabled(allow_modify);
+ const bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") &&
+ gAgent.getRegion() &&
+ !gAgent.getRegion()->getCapability("GetMesh").empty();
+ getChildView("mesh_rez_enabled_check")->setVisible(enable_mesh);
+ getChildView("mesh_rez_enabled_check")->setEnabled(getChildView("mesh_rez_enabled_check")->getEnabled() && enable_mesh);
// Data gets filled in by processRegionInfo
return LLPanelRegionInfo::refreshFromRegion(region);
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index c8fe380710..d5806e375c 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -38,7 +38,6 @@
#include "llui.h"
#include "llviewercontrol.h"
#include "llweb.h"
-#include "llversioninfo.h"
// support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps
class LLSearchHandler : public LLCommandHandler
@@ -204,15 +203,7 @@ void LLFloaterSearch::search(const LLSD &key)
// get the search URL and expand all of the substitutions
// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
- std::string url;
- if (LLVersionInfo::getChannel().find("Beta") != std::string::npos)
- {
- url = gSavedSettings.getString("SearchURLBeta");
- }
- else
- {
- url = gSavedSettings.getString("SearchURL");
- }
+ std::string url = gSavedSettings.getString("SearchURL");
url = LLWeb::expandURLSubstitutions(url, subs);
// and load the URL in the web view
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 0a1eadf4d0..d9a58d56fe 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -85,6 +85,8 @@ U32 LLMeshRepository::sPeakKbps = 0;
const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5;
+void dumpLLSDToFile(const LLSD& content, std::string filename);
+
std::string header_lod[] =
{
"lowest_lod",
@@ -489,15 +491,36 @@ public:
mThread(thread)
{
}
- virtual void completedRaw(U32 status, const std::string& reason,
- const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
+ virtual void completed(U32 status,
+ const std::string& reason,
+ const LLSD& content)
{
- assert_main_thread();
+ //assert_main_thread();
llinfos << "completed" << llendl;
mThread->mPendingUploads--;
+ dumpLLSDToFile(content,"whole_model_response.xml");
+
+ mThread->mWholeModelUploadURL = content["uploader"].asString();
+ }
+};
+
+class LLWholeModelUploadResponder: public LLCurl::Responder
+{
+ LLMeshUploadThread* mThread;
+public:
+ LLWholeModelUploadResponder(LLMeshUploadThread* thread):
+ mThread(thread)
+ {
+ }
+ virtual void completed(U32 status,
+ const std::string& reason,
+ const LLSD& content)
+ {
+ //assert_main_thread();
+ llinfos << "upload completed" << llendl;
+ mThread->mPendingUploads--;
+ dumpLLSDToFile(content,"whole_model_upload_response.xml");
}
-
};
LLMeshRepoThread::LLMeshRepoThread()
@@ -1261,7 +1284,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mUploadObjectAssetCapability = gAgent.getRegion()->getCapability("UploadObjectAsset");
mNewInventoryCapability = gAgent.getRegion()->getCapability("NewFileAgentInventoryVariablePrice");
- mWholeModelUploadCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
+ mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
mOrigin += gAgent.getAtAxis() * scale.magVec();
}
@@ -1363,10 +1386,10 @@ void LLMeshUploadThread::run()
}
}
-#if 0
-void dumpLLSDToFile(LLSD& content, std::string& filename)
+#if 1
+void dumpLLSDToFile(const LLSD& content, std::string filename)
{
- std::ofstream of(filename);
+ std::ofstream of(filename.c_str());
LLSDSerialize::toPrettyXML(content,of);
}
#endif
@@ -1374,9 +1397,10 @@ void dumpLLSDToFile(LLSD& content, std::string& filename)
void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
{
// TODO where do textures go?
-
+
LLSD result;
+ LLSD res;
result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
result["asset_type"] = "mesh";
result["inventory_type"] = "object";
@@ -1385,9 +1409,9 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
// TODO "optional" fields from the spec
- LLSD res;
res["mesh_list"] = LLSD::emptyArray();
- res["texture_list"] = LLSD::emptyArray();
+// TODO Textures
+ //res["texture_list"] = LLSD::emptyArray();
S32 mesh_num = 0;
S32 texture_num = 0;
@@ -1433,10 +1457,15 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
LLQuaternion rot;
LLMatrix4 transformation = instance.mTransform;
decomposeMeshMatrix(transformation,pos,rot,scale);
-
+
+#if 0
mesh_entry["childpos"] = ll_sd_from_vector3(pos);
mesh_entry["childrot"] = ll_sd_from_quaternion(rot);
mesh_entry["scale"] = ll_sd_from_vector3(scale);
+#endif
+ mesh_entry["position"] = ll_sd_from_vector3(LLVector3());
+ mesh_entry["rotation"] = ll_sd_from_quaternion(rot);
+ mesh_entry["scale"] = ll_sd_from_vector3(scale);
// TODO should be binary.
std::string str = ostr.str();
@@ -1480,9 +1509,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
}
result["asset_resources"] = res;
-#if 0
- std::string name("whole_model.xml");
- dumpLLSDToFile(result,name);
+#if 1
+ dumpLLSDToFile(result,"whole_model.xml");
#endif
dest = result;
@@ -1541,9 +1569,24 @@ void LLMeshUploadThread::doWholeModelUpload()
mPendingUploads++;
LLCurlRequest::headers_t headers;
- mCurlRequest->post(mWholeModelUploadCapability, headers, model_data.asString(),
+ mCurlRequest->post(mWholeModelFeeCapability, headers, model_data,
new LLWholeModelFeeResponder(this));
+ do
+ {
+ mCurlRequest->process();
+ } while (mCurlRequest->getQueued() > 0);
+
+ mCurlRequest->post(mWholeModelUploadURL, headers, model_data["asset_resources"], new LLWholeModelUploadResponder(this));
+
+ do
+ {
+ mCurlRequest->process();
+ } while (mCurlRequest->getQueued() > 0);
+
+ delete mCurlRequest;
+ mCurlRequest = NULL;
+
// Currently a no-op.
mFinished = true;
}
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 802e3e1aba..f859e29c07 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -387,7 +387,8 @@ public:
LLHost mHost;
std::string mUploadObjectAssetCapability;
std::string mNewInventoryCapability;
- std::string mWholeModelUploadCapability;
+ std::string mWholeModelFeeCapability;
+ std::string mWholeModelUploadURL;
std::queue<LLMeshUploadData> mUploadQ;
std::queue<LLMeshUploadData> mConfirmedQ;
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 64af6c2157..34a92cd0ac 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -33,11 +33,9 @@
#include "lleconomy.h"
#include "llerror.h"
#include "llfontgl.h"
-#include "llmaterialtable.h"
#include "llpermissionsflags.h"
#include "llstring.h"
#include "llvolume.h"
-#include "material_codes.h"
#include "m3math.h"
// project includes
@@ -57,7 +55,6 @@
#include "lltool.h"
#include "lltoolcomp.h"
#include "lltoolmgr.h"
-#include "lltrans.h"
#include "llui.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
@@ -101,17 +98,6 @@ BOOL LLPanelObject::postBuild()
{
setMouseOpaque(FALSE);
- std::map<std::string, std::string> material_name_map;
- material_name_map["Stone"]= LLTrans::getString("Stone");
- material_name_map["Metal"]= LLTrans::getString("Metal");
- material_name_map["Glass"]= LLTrans::getString("Glass");
- material_name_map["Wood"]= LLTrans::getString("Wood");
- material_name_map["Flesh"]= LLTrans::getString("Flesh");
- material_name_map["Plastic"]= LLTrans::getString("Plastic");
- material_name_map["Rubber"]= LLTrans::getString("Rubber");
- material_name_map["Light"]= LLTrans::getString("Light");
-
- LLMaterialTable::basic.initTableTransNames(material_name_map);
//--------------------------------------------------------
// Top
//--------------------------------------------------------
@@ -166,22 +152,6 @@ BOOL LLPanelObject::postBuild()
//--------------------------------------------------------
- // material type popup
- mComboMaterial = getChild<LLComboBox>("material");
- childSetCommitCallback("material",onCommitMaterial,this);
- mComboMaterial->removeall();
-
- for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin();
- iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter)
- {
- LLMaterialInfo* minfop = *iter;
- if (minfop->mMCode != LL_MCODE_LIGHT)
- {
- mComboMaterial->add(minfop->mName);
- }
- }
- mComboMaterialItemCount = mComboMaterial->getItemCount();
-
// Base Type
mComboBaseType = getChild<LLComboBox>("comboBaseType");
childSetCommitCallback("comboBaseType",onCommitParametric,this);
@@ -309,7 +279,6 @@ BOOL LLPanelObject::postBuild()
LLPanelObject::LLPanelObject()
: LLPanel(),
- mComboMaterialItemCount(0),
mIsPhysical(FALSE),
mIsTemporary(FALSE),
mIsPhantom(FALSE),
@@ -527,43 +496,6 @@ void LLPanelObject::getState( )
mCheckCastShadows->setEnabled( roots_selected==1 && editable );
#endif
- // Update material part
- // slightly inefficient - materials are unique per object, not per TE
- U8 material_code = 0;
- struct f : public LLSelectedTEGetFunctor<U8>
- {
- U8 get(LLViewerObject* object, S32 te)
- {
- return object->getMaterial();
- }
- } func;
- bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code );
- std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
- if (editable && single_volume && material_same)
- {
- mComboMaterial->setEnabled( TRUE );
- if (material_code == LL_MCODE_LIGHT)
- {
- if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
- {
- mComboMaterial->add(LEGACY_FULLBRIGHT_DESC);
- }
- mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC);
- }
- else
- {
- if (mComboMaterial->getItemCount() != mComboMaterialItemCount)
- {
- mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC);
- }
-
- mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
- }
- }
- else
- {
- mComboMaterial->setEnabled( FALSE );
- }
//----------------------------------------------------------------------------
S32 selected_item = MI_BOX;
@@ -1095,12 +1027,9 @@ void LLPanelObject::getState( )
mCtrlSculptTexture->setVisible(sculpt_texture_visible);
mLabelSculptType->setVisible(sculpt_texture_visible);
mCtrlSculptType->setVisible(sculpt_texture_visible);
- mCtrlSculptMirror->setVisible(sculpt_texture_visible);
- mCtrlSculptInvert->setVisible(sculpt_texture_visible);
// sculpt texture
-
if (selected_item == MI_SCULPT)
{
@@ -1145,7 +1074,7 @@ void LLPanelObject::getState( )
if (mCtrlSculptMirror)
{
mCtrlSculptMirror->set(sculpt_mirror);
- mCtrlSculptMirror->setEnabled(editable);
+ mCtrlSculptMirror->setEnabled(editable && !isMesh);
}
if (mCtrlSculptInvert)
@@ -1166,6 +1095,9 @@ void LLPanelObject::getState( )
mSculptTextureRevert = LLUUID::null;
}
+ mCtrlSculptMirror->setVisible(sculpt_texture_visible && !isMesh);
+ mCtrlSculptInvert->setVisible(sculpt_texture_visible && !isMesh);
+
//----------------------------------------------------------------------------
mObject = objectp;
@@ -1245,25 +1177,6 @@ void LLPanelObject::sendCastShadows()
}
// static
-void LLPanelObject::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
-{
- //LLPanelObject* self = (LLPanelObject*) userdata;
- LLComboBox* box = (LLComboBox*) ctrl;
-
- if (box)
- {
- // apply the currently selected material to the object
- const std::string& material_name = box->getSimple();
- std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
- if (material_name != LEGACY_FULLBRIGHT_DESC)
- {
- U8 material_code = LLMaterialTable::basic.getMCode(material_name);
- LLSelectMgr::getInstance()->selectionSetMaterial(material_code);
- }
- }
-}
-
-// static
void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
{
LLPanelObject* self = (LLPanelObject*) userdata;
@@ -1937,7 +1850,6 @@ void LLPanelObject::clearCtrls()
mCheckCastShadows->set(FALSE);
mCheckCastShadows->setEnabled( FALSE );
#endif
- mComboMaterial ->setEnabled( FALSE );
// Disable text labels
mLabelPosition ->setEnabled( FALSE );
mLabelSize ->setEnabled( FALSE );
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index e2f2a4400d..475dfdaedb 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -66,7 +66,6 @@ public:
static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
static void onCommitCastShadows( LLUICtrl* ctrl, void* userdata);
static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterial( LLUICtrl* ctrl, void* userdata);
static void onCommitParametric(LLUICtrl* ctrl, void* userdata);
@@ -94,10 +93,6 @@ protected:
void getVolumeParams(LLVolumeParams& volume_params);
protected:
- S32 mComboMaterialItemCount;
-
- LLComboBox* mComboMaterial;
-
// Per-object options
LLComboBox* mComboBaseType;
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index c443814c89..ebddaa90bc 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -59,6 +59,7 @@
#include "lltool.h"
#include "lltoolcomp.h"
#include "lltoolmgr.h"
+#include "lltrans.h"
#include "llui.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
@@ -156,6 +157,34 @@ BOOL LLPanelVolume::postBuild()
mSpinPhysicsRestitution = getChild<LLSpinCtrl>("Physics Restitution");
mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution));
}
+
+ std::map<std::string, std::string> material_name_map;
+ material_name_map["Stone"]= LLTrans::getString("Stone");
+ material_name_map["Metal"]= LLTrans::getString("Metal");
+ material_name_map["Glass"]= LLTrans::getString("Glass");
+ material_name_map["Wood"]= LLTrans::getString("Wood");
+ material_name_map["Flesh"]= LLTrans::getString("Flesh");
+ material_name_map["Plastic"]= LLTrans::getString("Plastic");
+ material_name_map["Rubber"]= LLTrans::getString("Rubber");
+ material_name_map["Light"]= LLTrans::getString("Light");
+
+ LLMaterialTable::basic.initTableTransNames(material_name_map);
+
+ // material type popup
+ mComboMaterial = getChild<LLComboBox>("material");
+ childSetCommitCallback("material",onCommitMaterial,this);
+ mComboMaterial->removeall();
+
+ for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin();
+ iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter)
+ {
+ LLMaterialInfo* minfop = *iter;
+ if (minfop->mMCode != LL_MCODE_LIGHT)
+ {
+ mComboMaterial->add(minfop->mName);
+ }
+ }
+ mComboMaterialItemCount = mComboMaterial->getItemCount();
// Start with everyone disabled
clearCtrls();
@@ -164,7 +193,8 @@ BOOL LLPanelVolume::postBuild()
}
LLPanelVolume::LLPanelVolume()
- : LLPanel()
+ : LLPanel(),
+ mComboMaterialItemCount(0)
{
setMouseOpaque(FALSE);
@@ -379,6 +409,46 @@ void LLPanelVolume::getState( )
getChildView("FlexForceZ")->setEnabled(false);
}
+ // Material properties
+
+ // Update material part
+ // slightly inefficient - materials are unique per object, not per TE
+ U8 material_code = 0;
+ struct f : public LLSelectedTEGetFunctor<U8>
+ {
+ U8 get(LLViewerObject* object, S32 te)
+ {
+ return object->getMaterial();
+ }
+ } func;
+ bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code );
+ std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
+ if (editable && single_volume && material_same)
+ {
+ mComboMaterial->setEnabled( TRUE );
+ if (material_code == LL_MCODE_LIGHT)
+ {
+ if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
+ {
+ mComboMaterial->add(LEGACY_FULLBRIGHT_DESC);
+ }
+ mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC);
+ }
+ else
+ {
+ if (mComboMaterial->getItemCount() != mComboMaterialItemCount)
+ {
+ mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC);
+ }
+
+ mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
+ }
+ }
+ else
+ {
+ mComboMaterial->setEnabled( FALSE );
+ }
+
// Physics properties
mSpinPhysicsGravity->set(objectp->getPhysicsGravity());
@@ -467,7 +537,6 @@ void LLPanelVolume::refresh()
getChildView("label physicsshapetype")->setVisible(enable_mesh);
getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh);
getChildView("Physics Gravity")->setVisible(enable_mesh);
- getChildView("Physics Material Override")->setVisible(enable_mesh);
getChildView("Physics Friction")->setVisible(enable_mesh);
getChildView("Physics Density")->setVisible(enable_mesh);
getChildView("Physics Restitution")->setVisible(enable_mesh);
@@ -522,6 +591,8 @@ void LLPanelVolume::clearCtrls()
mSpinPhysicsFriction->setEnabled(FALSE);
mSpinPhysicsDensity->setEnabled(FALSE);
mSpinPhysicsRestitution->setEnabled(FALSE);
+
+ mComboMaterial->setEnabled( FALSE );
}
//
@@ -674,6 +745,25 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data)
}
// static
+void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
+{
+ //LLPanelObject* self = (LLPanelObject*) userdata;
+ LLComboBox* box = (LLComboBox*) ctrl;
+
+ if (box)
+ {
+ // apply the currently selected material to the object
+ const std::string& material_name = box->getSimple();
+ std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
+ if (material_name != LEGACY_FULLBRIGHT_DESC)
+ {
+ U8 material_code = LLMaterialTable::basic.getMCode(material_name);
+ LLSelectMgr::getInstance()->selectionSetMaterial(material_code);
+ }
+ }
+}
+
+// static
void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
{
LLPanelVolume* self = (LLPanelVolume*) userdata;
diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h
index 776a2c1f4a..0ef47db0d9 100644
--- a/indra/newview/llpanelvolume.h
+++ b/indra/newview/llpanelvolume.h
@@ -63,8 +63,8 @@ public:
static void onCommitLight( LLUICtrl* ctrl, void* userdata);
static void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata);
static void onCommitFlexible( LLUICtrl* ctrl, void* userdata);
-
static void onCommitPhysicsParam( LLUICtrl* ctrl, void* userdata);
+ static void onCommitMaterial( LLUICtrl* ctrl, void* userdata);
void onLightCancelColor(const LLSD& data);
void onLightSelectColor(const LLSD& data);
@@ -104,6 +104,10 @@ protected:
LLSpinCtrl* mSpinForce[3];
*/
+ S32 mComboMaterialItemCount;
+ LLComboBox* mComboMaterial;
+
+
LLColor4 mLightSavedColor;
LLUUID mLightSavedTexture;
LLPointer<LLViewerObject> mObject;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 9b264b81c7..8fa4065fa6 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1997,7 +1997,7 @@ void LLSelectMgr::selectionSetPhysicsType(U8 type)
if (object->permModify())
{
object->setPhysicsShapeType(mType);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2016,7 +2016,7 @@ void LLSelectMgr::selectionSetFriction(F32 friction)
if (object->permModify())
{
object->setPhysicsFriction(mFriction);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2035,7 +2035,7 @@ void LLSelectMgr::selectionSetGravity(F32 gravity )
if (object->permModify())
{
object->setPhysicsGravity(mGravity);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2054,7 +2054,7 @@ void LLSelectMgr::selectionSetDensity(F32 density )
if (object->permModify())
{
object->setPhysicsDensity(mDensity);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2073,7 +2073,7 @@ void LLSelectMgr::selectionSetRestitution(F32 restitution)
if (object->permModify())
{
object->setPhysicsRestitution(mRestitution);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 6d493bfcd5..f5fee662e6 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5282,7 +5282,7 @@ bool LLViewerObject::specialHoverCursor() const
|| (mClickAction != 0);
}
-void LLViewerObject::updateFlags()
+void LLViewerObject::updateFlags(BOOL physics_changed)
{
LLViewerRegion* regionp = getRegion();
if(!regionp) return;
@@ -5295,12 +5295,15 @@ void LLViewerObject::updateFlags()
gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() );
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
gMessageSystem->addBOOL("CastsShadows", flagCastShadows() );
- gMessageSystem->nextBlock("ExtraPhysics");
- gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
- gMessageSystem->addF32("Density", getPhysicsDensity() );
- gMessageSystem->addF32("Friction", getPhysicsFriction() );
- gMessageSystem->addF32("Restitution", getPhysicsRestitution() );
- gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() );
+ if (physics_changed)
+ {
+ gMessageSystem->nextBlock("ExtraPhysics");
+ gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
+ gMessageSystem->addF32("Density", getPhysicsDensity() );
+ gMessageSystem->addF32("Friction", getPhysicsFriction() );
+ gMessageSystem->addF32("Restitution", getPhysicsRestitution() );
+ gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() );
+ }
gMessageSystem->sendReliable( regionp->getHost() );
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index e417343bec..21198f7dd1 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -488,7 +488,7 @@ public:
void setRegion(LLViewerRegion *regionp);
virtual void updateRegion(LLViewerRegion *regionp);
- void updateFlags();
+ void updateFlags(BOOL physics_changed = FALSE);
BOOL setFlags(U32 flag, BOOL state);
void setPhysicsShapeType(U8 type);
void setPhysicsGravity(F32 gravity);
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index d08c3e7078..dce55dae12 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -26,7 +26,7 @@
<text left="15" bottom="25" follows="top|left" height="15" name="name_label">
Name:
</text>
- <line_editor bottom_delta="20" follows="top|left|right" height="19"
+ <line_editor bottom_delta="20" follows="top|left|right" height="19" max_length_bytes="64"
name="description_form" prevalidate_callback="ascii" width="290" />
<text bottom_delta="20" left="15" follows="left|top" height="15" name="lod_label">
@@ -219,7 +219,7 @@
<text left="10" top_pad="35" follows="top|left" width="240" height="15">
Generate Normals
</text>
- <text left="35" top_pad="5" follows="top|left" width="100" height="15">
+ <text left="35" top_pad="5" follows="top|left" width="100" height="15" name="crease_label">
Crease Angle:
</text>
<spinner follows="top|left" left_pad="5" min_val="0" max_val="180" value="75" width="60" height="20" name="crease_angle"/>
diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
index 92d57b20be..47b2e5fd79 100644
--- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
@@ -572,9 +572,9 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true">
- <text top="25" left="30" text_color="White" font="SansSerifSmallBold" width="300" height="4">Performance</text>
+ <text top="15" left="20" text_color="White" font="SansSerifSmallBold" width="110" height="30" wrap="true" halign="center">Higher Performance</text>
<text top="45" left="10" halign="center" width="130" word_wrap="true" font="SansSerifSmall" height="80">Faster rendering but less detailed; lowers Resource (prim) cost.</text>
- <text top="25" left="390" text_color="White" font="SansSerifSmallBold" width="300" height="4">Accuracy</text>
+ <text top="15" left="372" text_color="White" font="SansSerifSmallBold" width="90" height="30" wrap="true" halign="center">Higher Accuracy</text>
<text top="45" left="360" halign="center" width="130" word_wrap="true" font="SansSerifSmall" height="80">More detailed model but slower; increases Resource (prim) cost.</text>
<slider
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 05d47506db..40bf7bfed7 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1608,41 +1608,6 @@ even though the user gets a free copy.
name="Sculpted"
value="Sculpted" />
</combo_box>
- <combo_box
- height="19"
- layout="topleft"
- name="material"
- top_pad="5"
- width="150">
- <combo_box.item
- label="Stone"
- name="Stone"
- value="Stone" />
- <combo_box.item
- label="Metal"
- name="Metal"
- value="Metal" />
- <combo_box.item
- label="Glass"
- name="Glass"
- value="Glass" />
- <combo_box.item
- label="Wood"
- name="Wood"
- value="Wood" />
- <combo_box.item
- label="Flesh"
- name="Flesh"
- value="Flesh" />
- <combo_box.item
- label="Plastic"
- name="Plastic"
- value="Plastic" />
- <combo_box.item
- label="Rubber"
- name="Rubber"
- value="Rubber" />
- </combo_box>
<text
type="string"
length="1"
@@ -2426,6 +2391,41 @@ even though the user gets a free copy.
name="Physics Shape Type Combo Ctrl"
tool_tip="Choose the physics shape type"
width="108"/>
+ <combo_box
+ height="19"
+ layout="topleft"
+ name="material"
+ top_pad="5"
+ width="150">
+ <combo_box.item
+ label="Stone"
+ name="Stone"
+ value="Stone" />
+ <combo_box.item
+ label="Metal"
+ name="Metal"
+ value="Metal" />
+ <combo_box.item
+ label="Glass"
+ name="Glass"
+ value="Glass" />
+ <combo_box.item
+ label="Wood"
+ name="Wood"
+ value="Wood" />
+ <combo_box.item
+ label="Flesh"
+ name="Flesh"
+ value="Flesh" />
+ <combo_box.item
+ label="Plastic"
+ name="Plastic"
+ value="Plastic" />
+ <combo_box.item
+ label="Rubber"
+ name="Rubber"
+ value="Rubber" />
+ </combo_box>
<spinner
follows="left|top"
@@ -2441,16 +2441,6 @@ even though the user gets a free copy.
top_pad="10"
width="132" />
- <check_box
- height="19"
- label="Override material"
- layout="topleft"
- left_delta="0"
- name="Physics Material Override"
- tool_tip="Override Material"
- top_pad="10"
- width="132" />
-
<spinner
follows="left|top"
height="19"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index 484af63097..b36b82ebd8 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -42,7 +42,7 @@
<menu_item_call.on_enable
function="File.EnableUpload" />
</menu_item_call>
- <menu_item_call
+ <menu_item_call
label="Model..."
layout="topleft"
name="Upload Model">
@@ -54,6 +54,18 @@
<menu_item_call.on_visible
function="File.VisibleUploadModel"/>
</menu_item_call>
+ <menu_item_call
+ label="Model Wizard..."
+ layout="topleft"
+ name="Upload Model Wizard">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="upload_model_wizard" />
+ <menu_item_call.on_enable
+ function="File.EnableUploadModel" />
+ <menu_item_call.on_visible
+ function="File.VisibleUploadModel"/>
+ </menu_item_call>
<menu_item_call
label="Bulk (L$[COST] per file)..."
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml
index e0d9f3f714..3f9195d092 100644
--- a/indra/newview/skins/default/xui/en/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_general.xml
@@ -134,6 +134,7 @@
top="190"
width="80" />
<check_box
+ visible="FALSE"
height="20"
label="Allow Mesh Objects"
layout="topleft"