diff options
author | Dave Parks <davep@lindenlab.com> | 2010-10-19 14:16:57 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-10-19 14:16:57 -0500 |
commit | 0682e10532e058462d2bb1d5379c55d0e4d757e9 (patch) | |
tree | bb4903c3ea087c7d2dd00eed666024302927cb0c | |
parent | 256c6e6a252feaa7ae50f81778aab1e0246a526a (diff) | |
parent | 9db8e12f3381cdf928b422e7c6e9b400cb155d52 (diff) |
merge
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 9 |
2 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 1e87e84eb2..73707ad2f1 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3402,23 +3402,31 @@ BOOL LLModelPreview::render() if (!avatar_preview) { - for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter) + //for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter) + for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) { + LLModelInstance& instance = *iter; + gGL.pushMatrix(); - LLMatrix4 mat = iter->first; + LLMatrix4 mat = instance.mTransform; glMultMatrixf((GLfloat*) mat.mMatrix); - for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_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; + //LLModelInstance& instance = *model_iter; + LLModel* model = instance.mLOD[mPreviewLOD]; - if (instance.mTransform != mat) + if (!model) { - llerrs << "WTF?" << llendl; + continue; } + //if (instance.mTransform != mat) + //{ + // llerrs << "WTF?" << llendl; + //} + if (render_mesh) { for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 5e95376830..72019d8de8 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2954,13 +2954,12 @@ LLSD LLMeshUploadThread::createObject(LLModelInstance& instance) perm.setOwnerAndGroup(gAgent.getID(), gAgent.getID(), LLUUID::null, false); perm.setCreator(gAgent.getID()); - perm.initMasks(PERM_ITEM_UNRESTRICTED, //base - PERM_ITEM_UNRESTRICTED, //owner + perm.initMasks(PERM_ITEM_UNRESTRICTED | PERM_MOVE, //base + PERM_ITEM_UNRESTRICTED | PERM_MOVE, //owner LLFloaterPerms::getEveryonePerms(), LLFloaterPerms::getGroupPerms(), - LLFloaterPerms::getNextOwnerPerms()); - - + LLFloaterPerms::getNextOwnerPerms()); + object_params["permissions"] = ll_create_sd_from_permissions(perm); object_params["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); |