diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 22d01c90e6..b5cc87f659 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23488,7 +23488,7 @@ Change of this parameter will affect the layout of buttons in notification toast InventoryAddAttachmentBehavior Comment - Defines behavior when hitting return on an inventory item + Defines behavior when hitting return on an inventory item (unused in favour of FSDoubleClickAddInventoryObjects) Persist 1 Type diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 4193a4edca..1641ec6b89 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1141,6 +1141,30 @@ Value + FSBuildPrefs_UseCustomScript + + Comment + Use custom script template when clicking New Script button + Persist + 1 + Type + Boolean + Value + 0 + + FSBuildPrefs_CustomScriptItem + + HideFromEditor + 1 + Comment + Script UUID to use as template for New Script button + Persist + 1 + Type + String + Value + + FSllOwnerSayToScriptDebugWindow Comment diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 39becffb47..14dbca2fb0 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -4106,6 +4106,7 @@ void FSPanelFace::onCancelSpecularTexture() // onClickBtnAddMedia() where needed, so the naming is probably just old cruft -Zi void FSPanelFace::onClickBtnEditMedia() { + LLFloaterMediaSettings::getInstance(); // make sure floater we are about to open exists before refreshMedia refreshMedia(); LLFloaterReg::showInstance("media_settings"); } @@ -4124,6 +4125,7 @@ void FSPanelFace::onClickBtnAddMedia() // check if multiple faces are selected if (LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected()) { + LLFloaterMediaSettings::getInstance(); // make sure floater we are about to open exists before refreshMedia refreshMedia(); LLNotificationsUtil::add("MultipleFacesSelected", LLSD(), LLSD(), boost::bind(&FSPanelFace::multipleFacesSelectedConfirm, this, _1, _2)); } diff --git a/indra/newview/fspanelprefs.cpp b/indra/newview/fspanelprefs.cpp index 8ddf3fe0e6..a27984ad5f 100644 --- a/indra/newview/fspanelprefs.cpp +++ b/indra/newview/fspanelprefs.cpp @@ -49,6 +49,7 @@ FSPanelPrefs::FSPanelPrefs() : LLPanelPreference() mCommitCallbackRegistrar.add("Perms.Trans", boost::bind(&FSPanelPrefs::onCommitTrans, this)); mEmbeddedItem = gSavedPerAccountSettings.getString("FSBuildPrefs_Item"); + mCustomScriptItem = gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem"); } bool FSPanelPrefs::postBuild() @@ -75,6 +76,9 @@ bool FSPanelPrefs::postBuild() mInvDropTarget = getChild("embed_item"); mInvDropTarget->setDADCallback(boost::bind(&FSPanelPrefs::onDADEmbeddedItem, this, _1)); + mCustomScriptDropTarget = getChild("custom_script"); + mCustomScriptDropTarget->setDADCallback(boost::bind(&FSPanelPrefs::onDADCustomScript, this, _1)); + return LLPanelPreference::postBuild(); } @@ -101,12 +105,35 @@ void FSPanelPrefs::onOpen(const LLSD& key) getChild("build_item_add_disp_rect_txt")->setTextArg("[ITEM]", getString("EmbeddedItemNotAvailable")); } } + + getChild("FSBuildPrefs_UseCustomScript")->setEnabled(true); + mCustomScriptItem = gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem"); + LLUUID script_id(mCustomScriptItem); + if (script_id.isNull()) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotSet")); + } + else + { + LLInventoryObject* script = gInventory.getObject(script_id); + if (script) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", script->getName()); + } + else + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotAvailable")); + } + } + getChild("reset_default_folders")->setEnabled(true); } else { getChild("FSBuildPrefs_EmbedItem")->setEnabled(false); getChild("build_item_add_disp_rect_txt")->setTextArg("[ITEM]", getString("EmbeddedItemNotLoggedIn")); + getChild("FSBuildPrefs_UseCustomScript")->setEnabled(false); + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", getString("EmbeddedItemNotLoggedIn")); getChild("reset_default_folders")->setEnabled(false); } } @@ -118,6 +145,7 @@ void FSPanelPrefs::apply() if (LLStartUp::getStartupState() == STATE_STARTED) { gSavedPerAccountSettings.setString("FSBuildPrefs_Item", mEmbeddedItem); + gSavedPerAccountSettings.setString("FSBuildPrefs_CustomScriptItem", mCustomScriptItem); } } @@ -277,6 +305,16 @@ void FSPanelPrefs::onDADEmbeddedItem(const LLUUID& item_id) } } +void FSPanelPrefs::onDADCustomScript(const LLUUID& item_id) +{ + LLInventoryObject* item = gInventory.getObject(item_id); + if (item && item->getType() == LLAssetType::AT_LSL_TEXT) + { + getChild("custom_script_disp_rect_txt")->setTextArg("[SCRIPT]", item->getName()); + mCustomScriptItem = item_id.asString(); + } +} + void FSPanelPrefs::onResetDefaultFolders() { gSavedPerAccountSettings.getControl("ModelUploadFolder")->resetToDefault(true); diff --git a/indra/newview/fspanelprefs.h b/indra/newview/fspanelprefs.h index e0f37d880a..a349314101 100644 --- a/indra/newview/fspanelprefs.h +++ b/indra/newview/fspanelprefs.h @@ -55,11 +55,14 @@ private: void onCommitTrans(); void onDADEmbeddedItem(const LLUUID& item_id); + void onDADCustomScript(const LLUUID& item_id); void onResetDefaultFolders(); FSEmbeddedItemDropTarget* mInvDropTarget; + FSEmbeddedItemDropTarget* mCustomScriptDropTarget; std::string mEmbeddedItem; + std::string mCustomScriptItem; }; #endif // FS_PANELPREFS_H diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0498a4b7dc..4745730fe0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5199,6 +5199,8 @@ bool LLAppViewer::initCache() LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; gSavedSettings.setString("CacheLocation", ""); gSavedSettings.setString("CacheLocationTopFolder", ""); + gSavedSettings.setString("NewCacheLocation", ""); + gSavedSettings.setString("NewCacheLocationTopFolder", ""); } // Sound cache diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index e85358f6cc..4d6c296166 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -938,7 +938,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } return; } } @@ -949,7 +952,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) pos -= camera.getOrigin(); mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } } } @@ -961,6 +967,11 @@ void LLDrawable::updateTexture() return; } + if (!mVObjp) + { + return; + } + if (getNumFaces() != mVObjp->getNumTEs()) { //drawable is transitioning its face count return; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index febb367d1b..4b6c2a9d50 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -133,7 +133,7 @@ public: void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; } void setWorldMatrix(const LLMatrix4& mat); - const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); } + const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; } LLFacePool* getPool() const { return mDrawPoolp; } U32 getPoolType() const { return mPoolType; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bdc89674a5..3572b6dcc0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7899,8 +7899,12 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) item = (LLViewerInventoryItem*)gInventory.getItem(object_id); if(item && gInventory.isObjectDescendentOf(object_id, gInventory.getRootFolderID())) { - static LLCachedControl replace_item(gSavedSettings, "InventoryAddAttachmentBehavior", false); - rez_attachment(item, NULL, ("attach" == action) ? replace_item() : true); // Replace if "Wear"ing. + // Firestorm's replace on double click + // static LLCachedControl replace_item(gSavedSettings, "InventoryAddAttachmentBehavior", false); + // rez_attachment(item, NULL, ("attach" == action) ? replace_item() : true); // Replace if "Wear"ing. + static LLCachedControl replace_item(gSavedSettings, "FSDoubleClickAddInventoryObjects", false); + rez_attachment(item, NULL, ("attach" == action) ? !replace_item : true); // Replace if "Wear"ing. + // } else if(item && item->isFinished()) { @@ -7943,11 +7947,13 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) void LLObjectBridge::openItem() { + static LLCachedControl replace_item(gSavedSettings, "FSDoubleClickAddInventoryObjects", false); // Double-click add/replace // object double-click action is to wear/unwear object performAction(getInventoryModel(), // Double-click add/replace //get_is_item_worn(mUUID) ? "detach" : "attach"); - get_is_item_worn(mUUID) ? "detach" : gSavedSettings.getBOOL("FSDoubleClickAddInventoryObjects") ? "wear_add" : "attach"); + get_is_item_worn(mUUID) ? "detach" : replace_item ? "wear_add" : "attach"); + // } std::string LLObjectBridge::getLabelSuffix() const @@ -9164,7 +9170,9 @@ void LLObjectBridgeAction::attachOrDetach() // Double-click add/replace option //static LLCachedControl inventory_linking(gSavedSettings, "InventoryAddAttachmentBehavior", false); //LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, inventory_linking()); // Don't replace if adding. - LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, !gSavedSettings.getBOOL("FSDoubleClickAddInventoryObjects")); // Don't replace if adding. + static LLCachedControl replace_item(gSavedSettings, "FSDoubleClickAddInventoryObjects", false); + LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, !replace_item); // Don't replace if adding. + // } } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 4b93d946ec..ca3b9a7ae4 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llmaniptranslate.cpp * @brief LLManipTranslate class implementation * @@ -716,24 +716,28 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // handle attachments in local space if (object->isAttachment() && object->mDrawable.notNull()) { - // calculate local version of relative move - LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation(); - objWorldRotation.transQuat(); - - LLVector3 old_position_local = object->getPosition(); - LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); - - //RN: I forget, but we need to do this because of snapping which doesn't often result - // in position changes even when the mouse moves - object->setPosition(new_position_local); - rebuild(object); - gAgentAvatarp->clampAttachmentPositions(); - new_position_local = object->getPosition(); - - if (selectNode->mIndividualSelection) + LLXform* object_xform_parent = object->mDrawable->mXform.getParent(); + if (object_xform_parent) { - // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_local - new_position_local, true); + // calculate local version of relative move + LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation(); + objWorldRotation.transQuat(); + + LLVector3 old_position_local = object->getPosition(); + LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); + + //RN: I forget, but we need to do this because of snapping which doesn't often result + // in position changes even when the mouse moves + object->setPosition(new_position_local); + rebuild(object); + gAgentAvatarp->clampAttachmentPositions(); + new_position_local = object->getPosition(); + + if (selectNode->mIndividualSelection) + { + // counter-translate child objects if we are moving the root as an individual + object->resetChildrenPosition(old_position_local - new_position_local, true); + } } } else diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 82ccca2600..227216705e 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -52,8 +52,10 @@ #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" +#include "lltooldraganddrop.h" // For custom script template #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewercontrol.h" // For custom script template #include "llviewerinventory.h" #include "llviewermenu.h" // Script reset in edit floater #include "llviewerobject.h" @@ -280,6 +282,20 @@ void LLPanelContents::onClickNewScript(void *userdata) } // [/RLVa:KB] + // FIRE-36059 Optional custom script template for New Script button + if (gSavedPerAccountSettings.getBOOL("FSBuildPrefs_UseCustomScript")) + { + if (LLUUID custom_script_id(gSavedPerAccountSettings.getString("FSBuildPrefs_CustomScriptItem")); custom_script_id.notNull()) + { + if (auto custom_script = gInventory.getItem(custom_script_id); custom_script && custom_script->getType() == LLAssetType::AT_LSL_TEXT) + { + LLToolDragAndDrop::dropScript(object, custom_script, true, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); + return; + } + } + } + // + LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 8001c4c6e0..86ffc84054 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -305,6 +305,14 @@ bool LLPanelWearing::postBuild() // Show avatar complexity in appearance floater mAvatarComplexityLabel = getChild("avatar_complexity_label"); + // FIRE-36089: Connect bottom gear menu button to the gear menu + LLMenuButton* gear_btn = findChild("options_gear_btn"); + if (gear_btn) + { + gear_btn->setMenu(mGearMenu->getMenu()); + } + // + return true; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 81a9138939..98b854dc51 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -7459,7 +7459,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender void LLStaticViewerObject::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 50d1d69576..17152b8e46 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1124,7 +1124,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->postCreateTexture(); imagep->mCreatePending = false; - mCreateTextureList.pop(); if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() && (imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL)) @@ -1136,6 +1135,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->scaleDown(); } + mCreateTextureList.pop(); + if (create_timer.getElapsedTimeF32() > max_time) { break; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index db37563e14..c133f1f5d2 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -781,7 +781,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group) void LLVOGrass::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d9791f58b3..e2a566e6e6 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3100,7 +3100,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - if (!drawablep || drawablep->isDead()) + if (!drawablep || drawablep->isDead() || !drawablep->getVObj()) { return; } @@ -3134,7 +3134,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) iter != mShiftList.end(); iter++) { LLDrawable *drawablep = *iter; - if (drawablep->isDead()) + if (drawablep->isDead() || !drawablep->getVObj()) { continue; } diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 07122d6243..9c87cd6a79 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -852,7 +852,7 @@ bevel_style="none" follows="all" label="Favorites" - help_topic="recent_inventory_tab" + help_topic="favorites_inventory_tab" layout="topleft" name="Favorites" show_item_link_overlays="true" diff --git a/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml index 7dc384fefa..c6d2cdde1c 100644 --- a/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/az/panel_preferences_firestorm.xml @@ -156,6 +156,34 @@ Məzmun: [ITEM] + + + Drop a script here. + + + Məzmun: [SCRIPT] + + + + + + + + + + + + Constrain rotations to multiples of + + + + degrees, when not using 'snap to grid' + + + + + objects + + + + + - - - - Script Editor Font: - - - - - - - - - - - - - - - - - - - - - - Preprocessor include path: - - - - - External Editor: - - - @@ -1465,169 +1526,10 @@ label="Build 2" name="BuildTab2"> - - - - - - - - Constrain rotations to multiples of - - - - degrees, when not using 'snap to grid' - - - - - objects - - - - - + + + + Script Editor Font: + + + + + + + + + + + + + + + + + + + + + + + + + Preprocessor include path: + + + + + External Editor: + + + + + All Items Recent Items Worn Items + Favorites A group member named [NAME] (online) diff --git a/indra/newview/skins/default/xui/es/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/es/panel_preferences_firestorm.xml index 1bb878354a..d14a0557db 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_firestorm.xml @@ -129,33 +129,41 @@ Actualmente establecido a: [ITEM] + + + Drop a script here. + + + Actualmente establecido a: [SCRIPT] + + + + + Punto de pivotaje - + + + + + + + - + Ruta include del preprocesador: