From 8d8860d5b2b15c72655ddd2b3f99ccb809171425 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 19 Oct 2010 14:16:00 -0500 Subject: Make preview render match what will be uploaded (exposes transform changes between LODs) --- indra/newview/llfloatermodelpreview.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d067970806..bdccb09d88 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3398,23 +3398,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) -- cgit v1.2.3 From 9db8e12f3381cdf928b422e7c6e9b400cb155d52 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 19 Oct 2010 14:16:24 -0500 Subject: CTS-283 Fix for objects being locked when imported. --- indra/newview/llmeshrepository.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 28db665ff9..08740a4e12 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2937,13 +2937,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); -- cgit v1.2.3