diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2b37927565..e621237473 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -222,6 +222,11 @@ set(viewer_SOURCE_FILES # [Legacy Bake] llagentwearablesfetch.cpp + # local mesh + vjlocalmesh.cpp + vjfloaterlocalmesh.cpp + vjlocalmeshimportdae.cpp + llaccountingcostmanager.cpp llaisapi.cpp llagent.cpp @@ -996,6 +1001,11 @@ set(viewer_HEADER_FILES # [Legacy Bake] llagentwearablesfetch.h + # local mesh + vjlocalmesh.h + vjfloaterlocalmesh.h + vjlocalmeshimportdae.h + llaccountingcostmanager.h llaisapi.h llagent.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 64e837f4e6..e3ead578ed 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26247,5 +26247,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value -4 + FSLocalMeshScaleAlwaysMeters + + Comment + Ignore the units specified by the Collada file. Useful when importing from tools such as Maya + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 9b19dd48a7..355d387e26 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -221,6 +221,9 @@ #include "NACLfloaterexploresounds.h" #include "particleeditor.h" #include "quickprefs.h" +#include "vjfloaterlocalmesh.h" // local mesh + + // handle secondlife:///app/openfloater/{NAME} URLs class LLFloaterOpenHandler : public LLCommandHandler { @@ -521,6 +524,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("script_recover", "floater_script_recover.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("sound_explorer", "floater_NACL_explore_sounds.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast( &LLFloaterReg::build< FSFloaterVRAMUsage >) ); + LLFloaterReg::add("local_mesh_floater", "floater_vj_local_mesh.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // local mesh LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f80a65ca86..3fc26e14b2 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2449,6 +2449,24 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const return num_refs; } +std::vector LLViewerObjectList::findMeshObjectsBySculptID(LLUUID target_sculpt_id) +{ + std::vector result; + // getting IDs rather than object/vovobject pointers here because + // of the extra safety if later calling them through findObject + + for (auto current_object : mObjects) + { + if ((current_object->isMesh()) && + (current_object->getVolume()) && + (current_object->getVolume()->getParams().getSculptID() == target_sculpt_id)) + { + result.push_back(current_object->getID()); + } + } + + return result; +} void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 7429497363..3f78670bcf 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -159,6 +159,7 @@ public: void cleanupReferences(LLViewerObject *objectp); S32 findReferences(LLDrawable *drawablep) const; // Find references to drawable in all objects, and return value. + std::vector findMeshObjectsBySculptID(LLUUID target_sculpt_id); S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); } S32 getOrphanCount() const { return mNumOrphans; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 50a44d13d3..a74521db49 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -252,6 +252,8 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mMDCImplCount = 0; mLastRiggingInfoLOD = -1; mResetDebugText = false; + mIsLocalMesh = false; + mIsLocalMeshUsingScale = false; } LLVOVolume::~LLVOVolume() @@ -345,6 +347,14 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, bool enfore_strict_object_check = LLGridManager::instance().isInSecondLife() && fsEnforceStrictObjectCheck; // + // local mesh begin + // rationale: we don't want server updates for a local object, cause the server tends to override things. + if (mIsLocalMesh) + { + return 0; + } + // local mesh end + LLColor4U color; const S32 teDirtyBits = (TEM_CHANGE_TEXTURE|TEM_CHANGE_COLOR|TEM_CHANGE_MEDIA); const bool previously_volume_changed = mVolumeChanged; diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 593057adbc..d1a4c69b6a 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -316,6 +316,8 @@ public: //virtual void updateRiggingInfo(); S32 mLastRiggingInfoLOD; + bool mIsLocalMesh; + bool mIsLocalMeshUsingScale; // Functions that deal with media, or media navigation diff --git a/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml new file mode 100644 index 0000000000..7cfdeaef85 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + LOD Suffixes: + + + Current + SL Standard + Games Engine Standard + LOD Names + + + Lowest: + + + + Low: + + + + Medium: + + + + High: + + + + Physics: + + + + +