summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/cmake/Copy3rdPartyLibs.cmake3
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp36
-rwxr-xr-xindra/newview/llfloatermodelpreview.h10
-rwxr-xr-xindra/newview/llmeshrepository.cpp8
-rwxr-xr-xindra/newview/llpanelobject.cpp15
-rwxr-xr-xindra/newview/llvoavatar.cpp6
-rwxr-xr-xindra/newview/llvovolume.cpp3
-rwxr-xr-xindra/newview/viewer_manifest.py2
8 files changed, 58 insertions, 25 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 9900a8fb45..76cb0553f3 100755
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -169,7 +169,8 @@ elseif(DARWIN)
libaprutil-1.dylib
libexpat.0.5.0.dylib
libexpat.dylib
- libllqtwebkit.dylib
+ libGLOD.dylib
+ libllqtwebkit.dylib
libndofdev.dylib
libexception_handler.dylib
)
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 088c9e6546..1796f76f03 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1989,13 +1989,13 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
if (lod == 3 && !mGroup.empty())
{
- for (std::map<LLModel*, U32>::iterator iter = mGroup.begin(); iter != mGroup.end(); ++iter)
+ for (std::map<LLPointer<LLModel>, U32>::iterator iter = mGroup.begin(); iter != mGroup.end(); ++iter)
{
glodDeleteGroup(iter->second);
stop_gloderror();
}
- for (std::map<LLModel*, U32>::iterator iter = mObject.begin(); iter != mObject.end(); ++iter)
+ for (std::map<LLPointer<LLModel>, U32>::iterator iter = mObject.begin(); iter != mObject.end(); ++iter)
{
glodDeleteObject(iter->second);
stop_gloderror();
@@ -2055,6 +2055,11 @@ void LLModelPreview::loadModelCallback(S32 lod)
mScene[lod] = mModelLoader->mScene;
mVertexBuffer[lod].clear();
+ if (lod == LLModel::LOD_PHYSICS)
+ {
+ mPhysicsMesh.clear();
+ }
+
setPreviewLOD(lod);
@@ -2338,6 +2343,11 @@ void LLModelPreview::genLODs(S32 which_lod)
return;
}
+ if (which_lod == LLModel::LOD_PHYSICS)
+ { //clear physics mesh map
+ mPhysicsMesh.clear();
+ }
+
LLVertexBuffer::unbind();
stop_gloderror();
@@ -2365,6 +2375,14 @@ void LLModelPreview::genLODs(S32 which_lod)
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
+ if (mGroup[mBaseModel[0]] == 0)
+ { //clear LOD maps
+ mGroup.clear();
+ mObject.clear();
+ mPercentage.clear();
+ mPatch.clear();
+ }
+
for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
{ //build GLOD objects for each model in base model list
LLModel* mdl = *iter;
@@ -2899,16 +2917,6 @@ void LLModelPreview::genBuffers(S32 lod)
}
}
-
- if (lod == 4)
- {
- for (U32 i = 0; i < 4; i++)
- {
- LLSpinCtrl* lim = mFMP->getChild<LLSpinCtrl>(limit_name[i], TRUE);
-
- lim->setMaxValue(tri_count);
- }
- }
}
void LLModelPreview::update()
@@ -3118,7 +3126,7 @@ BOOL LLModelPreview::render()
{
LLMutexLock(decomp->mMutex);
- std::map<LLModel*, std::vector<LLPointer<LLVertexBuffer> > >::iterator iter =
+ std::map<LLPointer<LLModel>, std::vector<LLPointer<LLVertexBuffer> > >::iterator iter =
mPhysicsMesh.find(model);
if (iter != mPhysicsMesh.end())
{
@@ -3406,7 +3414,7 @@ void LLFloaterModelPreview::onDecompose(void* user_data)
void LLFloaterModelPreview::onModelDecompositionComplete(LLModel* model, std::vector<LLPointer<LLVertexBuffer> >& physics_mesh)
{
if (sInstance && sInstance->mModelPreview)
- {
+ {
sInstance->mModelPreview->mPhysicsMesh[model] = physics_mesh;
sInstance->mModelPreview->mDirty = true;
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 148687aecd..d8f06295ac 100755
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -168,12 +168,12 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
LLModelLoader::model_list mModel[LLModel::NUM_LODS];
LLModelLoader::model_list mBaseModel;
- std::map<LLModel*, U32> mGroup;
- std::map<LLModel*, U32> mObject;
- std::map<LLModel*, std::vector<U32> > mPatch;
+ std::map<LLPointer<LLModel>, U32> mGroup;
+ std::map<LLPointer<LLModel>, U32> mObject;
+ std::map<LLPointer<LLModel>, std::vector<U32> > mPatch;
+ std::map<LLPointer<LLModel>, F32> mPercentage;
- std::map<LLModel*, F32> mPercentage;
- std::map<LLModel*, std::vector<LLPointer<LLVertexBuffer> > > mPhysicsMesh;
+ std::map<LLPointer<LLModel>, std::vector<LLPointer<LLVertexBuffer> > > mPhysicsMesh;
LLMeshUploadThread::instance_list mUploadData;
std::set<LLPointer<LLViewerFetchedTexture> > mTextureSet;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index ecf75415ab..8b14af009c 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1257,6 +1257,12 @@ void LLMeshUploadThread::run()
// now upload the object asset
std::string url = mUploadObjectAssetCapability;
+
+ if (object_asset["objects"][0].has("permissions"))
+ { //copy permissions from first available object to be used for coalesced object
+ object_asset["permissions"] = object_asset["objects"][0]["permissions"];
+ }
+
LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder());
mFinished = true;
@@ -2400,6 +2406,8 @@ LLSD LLMeshUploadThread::createObject(LLModelInstance& instance)
object_params["permissions"] = ll_create_sd_from_permissions(perm);
+ object_params["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
+
return object_params;
}
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 6b687846ae..943637ea3e 100755
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1179,13 +1179,13 @@ void LLPanelObject::getState( )
if (mCtrlSculptMirror)
{
mCtrlSculptMirror->set(sculpt_mirror);
- mCtrlSculptMirror->setEnabled(editable);
+ mCtrlSculptMirror->setEnabled(editable && (sculpt_stitching != LL_SCULPT_TYPE_MESH));
}
if (mCtrlSculptInvert)
{
mCtrlSculptInvert->set(sculpt_invert);
- mCtrlSculptInvert->setEnabled(editable);
+ mCtrlSculptInvert->setEnabled(editable && (sculpt_stitching != LL_SCULPT_TYPE_MESH));
}
if (mLabelSculptType)
@@ -1856,6 +1856,17 @@ void LLPanelObject::sendSculpt()
if (mCtrlSculptType)
sculpt_type |= mCtrlSculptType->getCurrentIndex();
+ bool enabled = sculpt_type != LL_SCULPT_TYPE_MESH;
+
+ if (mCtrlSculptMirror)
+ {
+ mCtrlSculptMirror->setEnabled(enabled ? TRUE : FALSE);
+ }
+ if (mCtrlSculptInvert)
+ {
+ mCtrlSculptInvert->setEnabled(enabled ? TRUE : FALSE);
+ }
+
if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get()))
sculpt_type |= LL_SCULPT_FLAG_MIRROR;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a6b3c436f4..54400c184b 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6189,9 +6189,9 @@ void LLVOAvatar::updateMeshTextures()
// use the last-known good baked texture until it finish the first
// render of the new layerset.
- const BOOL layerset_invalid = !mBakedTextureDatas[i].mTexLayerSet
- || !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
- || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable();
+ const BOOL layerset_invalid = mBakedTextureDatas[i].mTexLayerSet
+ && ( !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
+ || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable() );
use_lkg_baked_layer[i] = (!is_layer_baked[i]
&& (mBakedTextureDatas[i].mLastTextureIndex != IMG_DEFAULT_AVATAR)
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4ef050e71f..d96b6eccb1 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1354,6 +1354,9 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
LLVector4a min,max;
+ min.clear();
+ max.clear();
+
BOOL rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED);
// bool rigged = false;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 8296c28e80..d6b865c249 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -653,6 +653,7 @@ class DarwinManifest(ViewerManifest):
"libaprutil-1.0.3.8.dylib",
"libexpat.0.5.0.dylib",
"libexception_handler.dylib",
+ "libGLOD.dylib",
):
self.path(os.path.join(libdir, libfile), libfile)
@@ -676,6 +677,7 @@ class DarwinManifest(ViewerManifest):
"libaprutil-1.0.3.8.dylib",
"libexpat.0.5.0.dylib",
"libexception_handler.dylib",
+ "libGLOD.dylib",
):
target_lib = os.path.join('../../..', libfile)
self.run_command("ln -sf %(target)r %(link)r" %