Table of Contents

About

This is the "copybot" patch for the Singularity viewer from the master git branch (figures, the developers finally got their code compiling again, after a few months of code that would not compile - whatever happened to the rule on committing stuff that compiles). The patch should apply cleanly against the master branch. The following files are patched:

M       indra/llcommon/llstring.h
M       indra/newview/awavefront.cpp
M       indra/newview/daeexport.cpp
M       indra/newview/llagent.h
M       indra/newview/llfloaterexploreanimations.cpp
M       indra/newview/llpaneleditwearable.cpp
M       indra/newview/llpreviewanim.cpp
M       indra/newview/llpreviewsound.cpp
M       indra/newview/llpreviewtexture.cpp
M       indra/newview/lltexturectrl.cpp
M       indra/newview/llviewercontrol.h
M       indra/newview/llviewermenu.cpp
M       indra/newview/llviewerobject.cpp
M       indra/newview/llviewerobjectbackup.cpp
M       indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
M       indra/newview/statemachine/aifilepicker.cpp
M       indra/newview/statemachine/aifilepicker.h
M       indra/plugins/filepicker/llfilepicker.cpp

All the other features from the former patches are included however, compared to the other patches, the new patch adds support for exporting mesh, in the DAE format to local hard-drive. This means that you can cleanly export mesh, along with textures, but due to the limitations of DAE the resulting file will not contain any rig information. You will be able to export wearables that are rigged to your avatar but they will not fit right and most likely, you will have to pick-up a few lessons on rigging mesh. Otherwise, the patch will allow you to export any objects that are in-world, buildings, apparel, and generally anything that does not need rigging.

Commit

  • The patch was applied against Singularity git master commit SHA ca7ea4a541c2903bffc337a0ff499ebeaa0db6e0.
  • Please see the compiling instructions on how to checkout the source, revert to the SHA and then compile the viewer.

Code

copybot.patch
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 0b7d67232..35ab6f66a 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -31,7 +31,7 @@
 #include <string>
 
 #if __cplusplus < 201606
-#include <absl/strings/string_view.h>
+#include "absl/strings/string_view.h"
 namespace std {
     typedef absl::string_view string_view;
 }
diff --git a/indra/newview/awavefront.cpp b/indra/newview/awavefront.cpp
index 5e94a43e4..6495d3227 100644
--- a/indra/newview/awavefront.cpp
+++ b/indra/newview/awavefront.cpp
@@ -227,18 +227,22 @@ namespace
 	// Identical to the one in daeexport.cpp.
 	bool can_export_node(LLSelectNode* node)
 	{
-		LLPermissions* perms = node->mPermissions;	// Is perms ever NULL?
-		// This tests the PERM_EXPORT bit too, which is not really necessary (just checking if it's set
-		// on the root prim would suffice), but also isn't hurting.
-		if (!(perms && perms->allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy())))
-		{
-			return false;
-		}
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//LLPermissions* perms = node->mPermissions;	// Is perms ever NULL?
+		//// This tests the PERM_EXPORT bit too, which is not really necessary (just checking if it's set
+		//// on the root prim would suffice), but also isn't hurting.
+		//if (!(perms && perms->allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy())))
+		//{
+		//	return false;
+		//}
 
 		// Additionally chack if this is a sculpt
 		LLViewerObject* obj = node->getObject();
 		if (obj->isSculpted() && !obj->isMesh())
 		{
+			// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+			return true;
+			
 			const LLSculptParams *sculpt_params = obj->getSculptParams();
 			LLUUID sculpt_id = sculpt_params->getSculptTexture();
 
diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp
index 9f7ad6d7f..f380ff76d 100644
--- a/indra/newview/daeexport.cpp
+++ b/indra/newview/daeexport.cpp
@@ -95,6 +95,10 @@ namespace DAEExportUtil
 
 	static bool canExportTexture(const LLUUID& id, std::string* name = NULL)
 	{
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		(*name) = id.getString();
+		return true;
+		
 		// Find inventory items with asset id of the sculpt map
 		LLViewerInventoryCategory::cat_array_t cats;
 		LLViewerInventoryItem::item_array_t items;
@@ -124,6 +128,9 @@ namespace DAEExportUtil
 
 	static bool canExportNode(LLSelectNode* node)
 	{
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		return true;
+		
 		LLPermissions* perms = node->mPermissions;	// Is perms ever NULL?
 		// This tests the PERM_EXPORT bit too, which is not really necessary (just checking if it's set
 		// on the root prim would suffice), but also isn't hurting.
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 6fd97b679..651fb3667 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -30,6 +30,8 @@
  * $/LicenseInfo$
  */
 
+// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+#define TOGGLE_HACKED_GODLIKE_VIEWER 1
 #ifndef LL_LLAGENT_H
 #define LL_LLAGENT_H
 
diff --git a/indra/newview/llfloaterexploreanimations.cpp b/indra/newview/llfloaterexploreanimations.cpp
index 6bfa4f52f..1392e4ec7 100644
--- a/indra/newview/llfloaterexploreanimations.cpp
+++ b/indra/newview/llfloaterexploreanimations.cpp
@@ -135,9 +135,10 @@ void LLFloaterExploreAnimations::draw()
 void LLFloaterExploreAnimations::processAnim(LLUUID avatarid, LLUUID assetid, bool playing)
 {
 	std::string asset_str = assetid.asString();
-	if(asset_str.find("17132261-c061") != std::string::npos) return; // dog1
-	else if(asset_str.find("fea558cb-8b9b") != std::string::npos) return; // dog2
-	else if(asset_str.find("50cb5750-0743") != std::string::npos) return; // dog3
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	//if(asset_str.find("17132261-c061") != std::string::npos) return; // dog1
+	//else if(asset_str.find("fea558cb-8b9b") != std::string::npos) return; // dog2
+	//else if(asset_str.find("50cb5750-0743") != std::string::npos) return; // dog3
 
 	std::list<LLAnimHistoryItem>& history = animHistory[avatarid];
 	std::list<LLAnimHistoryItem>::iterator end = history.end();
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index e179b971e..2c8588ff0 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -557,8 +557,9 @@ static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const L
 		texture_ctrl->setDefaultImageAssetID(entry->mDefaultImageId);
 		texture_ctrl->setAllowNoTexture(entry->mAllowNoTexture);
 		// Don't allow (no copy) or (notransfer) textures to be selected.
-		texture_ctrl->setImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
-		texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//texture_ctrl->setImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
+		//texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
 	}
 }
 
@@ -837,15 +838,17 @@ void LLPanelEditWearable::draw()
 	LLViewerWearable* wearable = getWearable();
 	BOOL has_wearable = wearable != nullptr;
 	BOOL is_dirty = isDirty();
-	BOOL is_modifiable = FALSE;
-	BOOL is_copyable = FALSE;
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	BOOL is_modifiable = TRUE;
+	BOOL is_copyable = TRUE;
 	BOOL is_complete = FALSE;
 	LLInventoryItem* item = nullptr;
 	if (wearable && (item = gInventory.getItem(wearable->getItemID())))
 	{
-		const LLPermissions& perm = item->getPermissions();
-		is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
-		is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID());
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//const LLPermissions& perm = item->getPermissions();
+		//is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
+		//is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID());
 		is_complete = ((LLViewerInventoryItem*)item)->isComplete();
 	}
 
@@ -1361,8 +1364,11 @@ void LLPanelEditWearable::showDefaultSubpart()
 
 void LLPanelEditWearable::setUIPermissions(U32 perm_mask, BOOL is_complete)
 {
-	BOOL is_copyable = (perm_mask & PERM_COPY) ? TRUE : FALSE;
-	BOOL is_modifiable = (perm_mask & PERM_MODIFY) ? TRUE : FALSE;
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	//BOOL is_copyable = (perm_mask & PERM_COPY) ? TRUE : FALSE;
+	//BOOL is_modifiable = (perm_mask & PERM_MODIFY) ? TRUE : FALSE;
+	BOOL is_copyable = TRUE;
+	BOOL is_modifiable = TRUE;
 
 	mSave->setEnabled(is_modifiable && is_complete);
 	mSaveAs->setEnabled(is_copyable && is_complete);
@@ -1465,8 +1471,13 @@ bool LLPanelEditWearable::updatePermissions()
 
 			// Exporting (of slider values) is allowed when the wearable is full perm, and owned by and created by the user.
 			// Of course, only modifiable is enough for the user to write down the values and enter them else where... but why make it easy for them to break the ToS.
-			if (is_complete &&
-				(item->getPermissions().allowExportBy(gAgent.getID(), LFSimFeatureHandler::instance().exportPolicy())))
+			// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+			//if (is_complete &&
+			//	(item->getPermissions().allowExportBy(gAgent.getID(), LFSimFeatureHandler::instance().exportPolicy())))
+			//{
+			//	can_export = true;
+			//}
+			if (is_complete)
 			{
 				can_export = true;
 			}
@@ -1498,7 +1509,9 @@ void LLPanelEditWearable::updateScrollingPanelUI()
 		const auto& group_id(gAgent.getGroupID());
 		is_modifiable = perm.allowModifyBy(gAgentID, group_id);
 		is_copyable = perm.allowCopyBy(gAgentID, group_id);
-		mCustomizeFloater->getScrollingPanelList()->updatePanels(is_modifiable && is_complete);
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//mCustomizeFloater->getScrollingPanelList()->updatePanels(is_modifiable && is_complete);
+		mCustomizeFloater->getScrollingPanelList()->updatePanels(is_complete);
 	}
 
 	// Update some UI here instead of the draw call
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 4bbc1e656..9ff3ae04a 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -340,6 +340,10 @@ void LLPreviewAnim::copyAnimID(void *userdata)
 // virtual
 BOOL LLPreviewAnim::canSaveAs() const
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+	return gAgent.isGodlike();
+# endif
 	return mIsCopyable;
 }
 
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index b3a129e6b..1bb78e5c9 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -296,6 +296,10 @@ void LLPreviewSound::copyUUID( void *userdata )
 // virtual
 BOOL LLPreviewSound::canSaveAs() const
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+    return gAgent.isGodlike();
+# endif  
 	return mIsCopyable;
 }
 
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index ac2da0781..6a406d401 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -367,6 +367,10 @@ void LLPreviewTexture::draw()
 // virtual
 BOOL LLPreviewTexture::canSaveAs() const
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+    return gAgent.isGodlike() && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
+#endif
 	return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
 }
 
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 192f2bc9f..6e1c20c4c 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -313,13 +313,14 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 			else
 			{
 				tab = "server_tab";
-				LLInventoryItem* itemp = gInventory.getItem(image_id);
-				if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
-				{
-					// no copy texture
-					getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
-					mNoCopyTextureSelected = TRUE;
-				}
+				// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+				//LLInventoryItem* itemp = gInventory.getItem(image_id);
+				//if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+				//{
+				//	// no copy texture
+				//	getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
+				//	mNoCopyTextureSelected = TRUE;
+				//}
 				mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
 			}
 		}
@@ -391,35 +392,44 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
 	{
 		LLInventoryItem *item = (LLInventoryItem *)cargo_data;
 
-		BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
-		BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
-		BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
-															gAgent.getID());
-
-		PermissionMask item_perm_mask = 0;
-		if (copy) item_perm_mask |= PERM_COPY;
-		if (mod)  item_perm_mask |= PERM_MODIFY;
-		if (xfer) item_perm_mask |= PERM_TRANSFER;
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
+		//BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
+		//BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+		//													gAgent.getID());
+        //
+		//PermissionMask item_perm_mask = 0;
+		//if (copy) item_perm_mask |= PERM_COPY;
+		//if (mod)  item_perm_mask |= PERM_MODIFY;
+		//if (xfer) item_perm_mask |= PERM_TRANSFER;
+		//
+		////PermissionMask filter_perm_mask = getFilterPermMask();  Commented out due to no-copy texture loss.
+		//PermissionMask filter_perm_mask = mDnDFilterPermMask;
+		//if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask )
+		//{
+		//	if (drop)
+		//	{
+		//		// <FS:Ansariel> FIRE-8298: Apply now checkbox has no effect
+		//		setCanApply(true, true);
+		//		// </FS:Ansariel>
+		//		setImageID( item->getAssetUUID() );
+		//		commitIfImmediateSet();
+		//	}
+        //
+		//	*accept = ACCEPT_YES_SINGLE;
+		//}
+		//else
+		//{
+		//	*accept = ACCEPT_NO;
+		//}
+		if(drop)
+ 		{
+			setCanApply(true, true);
+			setImageID( item->getAssetUUID() );
+			commitIfImmediateSet();
+ 		}
 
-		//PermissionMask filter_perm_mask = getFilterPermMask();  Commented out due to no-copy texture loss.
-		PermissionMask filter_perm_mask = mDnDFilterPermMask;
-		if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask )
-		{
-			if (drop)
-			{
-				// <FS:Ansariel> FIRE-8298: Apply now checkbox has no effect
-				setCanApply(true, true);
-				// </FS:Ansariel>
-				setImageID( item->getAssetUUID() );
-				commitIfImmediateSet();
-			}
-
-			*accept = ACCEPT_YES_SINGLE;
-		}
-		else
-		{
-			*accept = ACCEPT_NO;
-		}
+		*accept = ACCEPT_YES_SINGLE;
 	}
 	else
 	{
@@ -495,6 +505,11 @@ BOOL LLFloaterTexturePicker::postBuild()
 	else
 		childSetValue("texture_uuid", LLUUID::null.asString());
 	**/
+
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	LLInventoryItem* itemp = gInventory.getItem(mImageAssetID);
+	childSetValue("texture_uuid", mImageAssetID);
+	
 	if (!mLabel.empty())
 	{
 		std::string pick = getString("pick title");
@@ -1018,17 +1033,21 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
 			{
 				mTextureSelectedCallback(itemp);
 			}
-			// <dogmode>
-			if (itemp->getPermissions().getMaskOwner() & PERM_ALL)
-				childSetValue("texture_uuid", mImageAssetID);
-			else
-				childSetValue("texture_uuid", LLUUID::null.asString());
-			// </dogmode>
 
-			if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
-			{
-				mNoCopyTextureSelected = TRUE;
-			}
+			// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+			//// <dogmode>
+			//if (itemp->getPermissions().getMaskOwner() & PERM_ALL)
+			//	childSetValue("texture_uuid", mImageAssetID);
+			//else
+			//	childSetValue("texture_uuid", LLUUID::null.asString());
+			//// </dogmode>
+			childSetValue("texture_uuid", mImageAssetID);
+
+			// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+			//if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
+			//{
+			//	mNoCopyTextureSelected = TRUE;
+			//}
 			// <FS:Ansariel> FIRE-8298: Apply now checkbox has no effect
 			setCanApply(true, true);
 			// </FS:Ansariel>
@@ -1127,15 +1146,16 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
 		mNoCopyTextureSelected = FALSE;
 		LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
 
-		if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
-		{
-			// no copy texture
-			mNoCopyTextureSelected = TRUE;
-		}
-		else 
-		{
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		//if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+		//{
+		//	// no copy texture
+		//	mNoCopyTextureSelected = TRUE;
+		//}
+		//else 
+		//{
 			childSetValue("texture_uuid", inventory_item_id.asString());
-		}
+		//}
 
 		commitIfImmediateSet();
 	}
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index 203c5cfb3..bc764578e 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -41,7 +41,9 @@ class LLUICtrl;
 
 // Enabled this definition to compile a 'hacked' viewer that
 // allows a hacked godmode to be toggled on and off.
-#define TOGGLE_HACKED_GODLIKE_VIEWER 
+// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+//#define TOGGLE_HACKED_GODLIKE_VIEWER
+#define TOGGLE_HACKED_GODLIKE_VIEWER 1
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
 extern BOOL gHackGodmode;
 #endif
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c28ef2fcc..c2e1980ff 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -911,14 +911,15 @@ void init_client_menu(LLMenuGL* menu)
 
 // <dogmode> 
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid())
-	{
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	//if (!LLViewerLogin::getInstance()->isInProductionGrid())
+	//{
 		menu->addChild(new LLMenuItemCheckGL("Hacked Godmode",
 										   &handle_toggle_hacked_godmode,
 										   nullptr,
 										   &check_toggle_hacked_godmode,
 										   (void*)"HackedGodmode"));
-	}
+	//}
 #endif
 // </dogmode>
 	menu->addChild(new LLMenuItemCallGL("Clear Group Cache", 
@@ -2925,6 +2926,10 @@ class LLObjectEnableExport final : public view_listener_t
 {
 	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
 	{
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		gMenuHolder->findControl(userdata["control"].asString())->setValue(true);
+		return true;
+		
 		ExportPolicy export_policy = LFSimFeatureHandler::instance().exportPolicy();
 		bool can_export_any = false;
 		LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
@@ -4900,11 +4905,16 @@ BOOL enable_take()
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid() 
-            && gAgent.isGodlike())
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
+		//if (!LLViewerLogin::getInstance()->isInProductionGrid() 
+        //    && gAgent.isGodlike())
+		//{
+		//	return TRUE;
+		//}
 # endif
 		if(!object->isPermanentEnforced() &&
 			((node->mPermissions->allowTransferTo(gAgent.getID())
@@ -7698,11 +7708,16 @@ bool enable_save_into_inventory()
 	return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid()
-        && gAgent.isGodlike())
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	if (gAgent.isGodlike())
 	{
 		return TRUE;
 	}
+	//if (!LLViewerLogin::getInstance()->isInProductionGrid()
+    //    && gAgent.isGodlike())
+	//{
+	//	return TRUE;
+	//}
 # endif
 	// check all pre-req's for save into inventory.
 	if(last_node && last_node->mValid && !last_node->mItemID.isNull()
@@ -10207,6 +10222,8 @@ void initialize_menus()
 	addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
 	addMenu(new LLAvatarCopyUUID(), "Avatar.CopyUUID");
 	addMenu(new LLAvatarClientUUID(), "Avatar.ClientID");
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	addMenu(new LLObjectExport(), "Avatar.Export");
 
 	// Object pie menu
 	addMenu(new LLObjectOpen(), "Object.Open");
@@ -10266,6 +10283,8 @@ void initialize_menus()
 
 	addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
 	addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	addMenu(new LLObjectEnableExport(), "Attachment.EnableExport");
 
 	// Land pie menu
 	addMenu(new LLLandBuild(), "Land.Build");
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8deaa7829..ba6c21985 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6131,11 +6131,16 @@ BOOL LLViewerObject::permYouOwner() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
+		//if (!LLViewerLogin::getInstance()->isInProductionGrid()
+		//	&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		//{
+		//	return TRUE;
+		//}
 # endif
 		return flagObjectYouOwner();
 #endif
@@ -6168,11 +6173,16 @@ BOOL LLViewerObject::permOwnerModify() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	if (gAgent.isGodlike())
 	{
-			return TRUE;
+		return TRUE;
 	}
+	//	if (!LLViewerLogin::getInstance()->isInProductionGrid()
+	//		&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+	//{
+	//		return TRUE;
+	//}
 # endif
 		return flagObjectOwnerModify();
 #endif
@@ -6192,11 +6202,16 @@ BOOL LLViewerObject::permModify() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	if (gAgent.isGodlike())
 	{
-			return TRUE;
+		return TRUE;
 	}
+	//	if (!LLViewerLogin::getInstance()->isInProductionGrid()
+	//		&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+	//{
+	//		return TRUE;
+	//}
 # endif
 		return flagObjectModify();
 #endif
@@ -6216,11 +6231,16 @@ BOOL LLViewerObject::permCopy() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
+		///if (!LLViewerLogin::getInstance()->isInProductionGrid()
+		//	&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		//{
+		//	return TRUE;
+		//}
 # endif
 		return flagObjectCopy();
 #endif
@@ -6240,11 +6260,16 @@ BOOL LLViewerObject::permMove() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
+		//if (!LLViewerLogin::getInstance()->isInProductionGrid()
+		//	&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		//{
+		//	return TRUE;
+		//}
 # endif
 		return flagObjectMove();
 #endif
@@ -6264,11 +6289,16 @@ BOOL LLViewerObject::permTransfer() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-			&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
+		//if (!LLViewerLogin::getInstance()->isInProductionGrid()
+		//	&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		//{
+		//	return TRUE;
+		//}
 # endif
 		return flagObjectTransfer();
 #endif
diff --git a/indra/newview/llviewerobjectbackup.cpp b/indra/newview/llviewerobjectbackup.cpp
index c520909e9..95caa2c11 100644
--- a/indra/newview/llviewerobjectbackup.cpp
+++ b/indra/newview/llviewerobjectbackup.cpp
@@ -409,20 +409,24 @@ void LLObjectBackup::exportObject_continued(AIFilePicker* filepicker)
 //static
 void LLObjectBackup::setDefaultTextures()
 {
-	if (LFSimFeatureHandler::instance().exportPolicy() == ep_full_perm)
-	{
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	//if (LFSimFeatureHandler::instance().exportPolicy() == ep_full_perm)
+	//{
 		// When not in SL and not in an OpenSIM grid with export permission
 		// support (i.e. when no texture permission check is needed), we can
 		// get these defaults from the user settings...
 		LL_TEXTURE_PLYWOOD = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
 		LL_TEXTURE_BLANK = LLUUID(gSavedSettings.getString("UIImgWhiteUUID"));
 		LL_TEXTURE_INVISIBLE = LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"));
-	}
+	//}
 }
 
 //static
 bool LLObjectBackup::validatePerms(const LLPermissions* item_permissions)
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	return true;
+	
 	return item_permissions->allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy());
 }
 
@@ -439,6 +443,9 @@ bool LLObjectBackup::validatePerms(const LLPermissions* item_permissions)
 //static
 bool LLObjectBackup::validateTexturePerms(const LLUUID& asset_id)
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	return true;
+	
 	if (LFSimFeatureHandler::instance().exportPolicy() == ep_full_perm)
 	{
 		// If we are not in Second Life and we don't have export-permission
@@ -481,6 +488,9 @@ bool LLObjectBackup::validateTexturePerms(const LLUUID& asset_id)
 
 LLUUID LLObjectBackup::validateTextureID(const LLUUID& asset_id)
 {
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	return asset_id;
+	
 	if (mBadPermsTexturesList.count(asset_id))
 	{
 		// We already checked it and know it's bad...
@@ -503,11 +513,12 @@ LLUUID LLObjectBackup::validateTextureID(const LLUUID& asset_id)
 //static
 bool LLObjectBackup::validateNode(LLSelectNode* node)
 {
-	LLPermissions* perms = node->mPermissions;
-	if (!perms || !validatePerms(perms))
-	{
-		return false;
-	}
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	//LLPermissions* perms = node->mPermissions;
+	//if (!perms || !validatePerms(perms))
+	//{
+	//	return false;
+	//}
 
 	// Additionally check if this is a sculpt or a mesh object and if yes, if
 	// we have export permission on the sclupt texture or the mesh object.
diff --git a/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml b/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
index ba3fb2105..fe5455d68 100644
--- a/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
+++ b/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
@@ -65,6 +65,11 @@
 			<on_click function="Object.DERENDER" />
 			<on_enable function="Object.EnableDerender" />
 		</menu_item_call>
+    <!-- [WaS] https://grimore.org/secondlife/modified_viewers/singularity -->
+    <menu_item_call enabled="true" label="Export" mouse_opaque="true" name="Object Export">
+	    <on_click function="Object.Export" />
+	    <on_click function="Object.Export" />
+    </menu_item_call>
     <menu_item_call enabled="true" label="Reload" mouse_opaque="true" name="Reload Textures">
       <on_click function="Object.ReloadTextures" />
     </menu_item_call>
diff --git a/indra/newview/statemachine/aifilepicker.cpp b/indra/newview/statemachine/aifilepicker.cpp
index 0eff19599..89549aabd 100644
--- a/indra/newview/statemachine/aifilepicker.cpp
+++ b/indra/newview/statemachine/aifilepicker.cpp
@@ -162,6 +162,10 @@ void AIFilePicker::open(ELoadFilter filter, std::string const& default_path, std
 	  case FFLOAD_ANIM:
 		  mFilter = "anim";
 		  break;
+	  // [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+      case FFLOAD_ANIMATN:
+	  	  mFilter = "animatn";
+	  	  break;
 #ifdef _CORY_TESTING
 	  case FFLOAD_GEOMETRY:
 		  mFilter = "geometry";
diff --git a/indra/newview/statemachine/aifilepicker.h b/indra/newview/statemachine/aifilepicker.h
index 402b26c25..60e041dd8 100644
--- a/indra/newview/statemachine/aifilepicker.h
+++ b/indra/newview/statemachine/aifilepicker.h
@@ -43,6 +43,8 @@ enum ELoadFilter
 	FFLOAD_WAV,
 	FFLOAD_IMAGE,
 	FFLOAD_ANIM,
+	// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+	FFLOAD_ANIMATN,
 	FFLOAD_XML,
 	FFLOAD_SLOBJECT,
 	FFLOAD_RAW,
diff --git a/indra/plugins/filepicker/llfilepicker.cpp b/indra/plugins/filepicker/llfilepicker.cpp
index 31c71f629..a00585ae6 100644
--- a/indra/plugins/filepicker/llfilepicker.cpp
+++ b/indra/plugins/filepicker/llfilepicker.cpp
@@ -64,7 +64,9 @@ LLFilePicker LLFilePicker::sInstance;
 #define AO_FILTER L"Animation Override (*.ao)\0*.ao\0"
 #define BLACKLIST_FILTER L"Asset Blacklist (*.blacklist)\0*.blacklist\0"
 // </edit>
-#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0"
+// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+//#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0"
+#define ANIM_FILTER L"Animations (*.bvh; *.anim; *.animatn)\0*.bvh;*.anim;*.animatn\0"
 #define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0"
 #ifdef _CORY_TESTING
 #define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0"
@@ -800,12 +802,21 @@ Boolean LLFilePickerBase::navOpenFilterProc(AEDesc *theItem, void *info, void *c
 						}
 						else if (filter == FFLOAD_ANIM)
 						{
-							if (fileInfo.filetype != 'BVH ' &&  fileInfo.filetype != 'ANIM' &&
-								(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) &&
-								 CFStringCompare(fileInfo.extension, CFSTR("anim"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
-							{
-								result = false;
-							}
+							// [WaS] https://grimore.org/secondlife/modified_viewers/singularity
+							if (fileInfo.filetype != 'BVH ' && fileInfo.filetype != 'ANIM ' && fileInfo.filetype != 'ANIMATN ' &&
+								(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo &&
+								CFStringCompare(fileInfo.extension, CFSTR("anim"), kCFCompareCaseInsensitive) != kCFCompareEqualTo &&
+								CFStringCompare(fileInfo.extension, CFSTR("animatn"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
+							)
+ 							{
+ 								result = false;
+ 							}
+							//if (fileInfo.filetype != 'BVH ' &&  fileInfo.filetype != 'ANIM' &&
+							//	(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) &&
+							//	 CFStringCompare(fileInfo.extension, CFSTR("anim"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
+							//{
+							//	result = false;
+							//}
 						}
 						else if (filter == FFLOAD_COLLADA)
 						{

secondlife/modified_viewers/singularity/master.txt ยท Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.