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:

./indra/newview/daeexport.cpp
./indra/newview/llagent.h
./indra/newview/llpaneleditwearable.cpp
./indra/newview/llpreviewanim.cpp
./indra/newview/llpreviewsound.cpp
./indra/newview/llpreviewtexture.cpp
./indra/newview/lltexturectrl.cpp
./indra/newview/llviewercontrol.h
./indra/newview/llviewermenu.cpp
./indra/newview/llviewerobject.cpp
./indra/newview/llviewerobjectbackup.cpp
./indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
./indra/newview/statemachine/aifilepicker.cpp
./indra/newview/statemachine/aifilepicker.h
./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 897e175d3c9be3ea25acbf5c7b4a53dc53e31453.
  • Please see the compiling instructions on how to checkout the source, revert to the SHA and then compile the viewer.

Code

copybot.patch
From 5c54eb0e0816e3716f00dcf5dcf59e72da8aeaac Mon Sep 17 00:00:00 2001
From: Wizardry and Steamworks <office@grimore.org>
Date: Fri, 23 Oct 2015 15:20:46 +0000
Subject: [PATCH] Singularity copybot patch
 
---
 indra/newview/daeexport.cpp                        | 54 +----------------
 indra/newview/llagent.h                            |  1 +
 indra/newview/llpaneleditwearable.cpp              | 25 ++------
 indra/newview/llpreviewanim.cpp                    |  3 +
 indra/newview/llpreviewsound.cpp                   |  3 +
 indra/newview/llpreviewtexture.cpp                 |  3 +
 indra/newview/lltexturectrl.cpp                    | 65 ++++-----------------
 indra/newview/llviewercontrol.h                    |  2 +-
 indra/newview/llviewermenu.cpp                     | 30 +++-------
 indra/newview/llviewerobject.cpp                   | 18 ++----
 indra/newview/llviewerobjectbackup.cpp             | 68 +---------------------
 .../default/xui/en-us/menu_pie_attachment.xml      |  4 ++
 indra/newview/statemachine/aifilepicker.cpp        |  3 +
 indra/newview/statemachine/aifilepicker.h          |  1 +
 indra/plugins/filepicker/llfilepicker.cpp          | 10 ++--
 15 files changed, 60 insertions(+), 230 deletions(-)
 
diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp
index 7169725..ea2aac2 100644
--- a/indra/newview/daeexport.cpp
+++ b/indra/newview/daeexport.cpp
@@ -92,61 +92,13 @@ namespace DAEExportUtil
 
 	static bool canExportTexture(const LLUUID& id, std::string* name = NULL)
 	{
-		// Find inventory items with asset id of the sculpt map
-		LLViewerInventoryCategory::cat_array_t cats;
-		LLViewerInventoryItem::item_array_t items;
-		LLAssetIDMatches asset_id_matches(id);
-		gInventory.collectDescendentsIf(LLUUID::null,
-			cats,
-			items,
-			LLInventoryModel::INCLUDE_TRASH,
-			asset_id_matches);
-
-		// See if any of the inventory items matching this texture id are exportable
-		ExportPolicy policy = LFSimFeatureHandler::instance().exportPolicy();
-		for (size_t i = 0; i < items.size(); i++)
-		{
-			const LLPermissions item_permissions = items[i]->getPermissions();
-			if (item_permissions.allowExportBy(gAgentID, policy))
-			{
-				if (name != NULL)
-				{
-					(*name) = items[i]->getName();
-				}
-				return true;
-			}
-		}
-
-		if (name != NULL)
-		{
-			(*name) = id.getString();
-		}
-
-		return (policy & ep_full_perm) == ep_full_perm;
+		(*name) = id.getString();
+		return true;
 	}
 
 	static bool canExportNode(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;
-		}
-
-		// Additionally chack if this is a sculpt
-		LLViewerObject* obj = node->getObject();
-		if (obj->isSculpted() && !obj->isMesh())
-		{
-			LLSculptParams *sculpt_params = (LLSculptParams *)obj->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
-			LLUUID sculpt_id = sculpt_params->getSculptTexture();
-			return canExportTexture(sculpt_id);
-		}
-		else // not sculpt, we already checked generic permissions
-		{
-			return true;
-		}
+		return true;
 	}
 }
 
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index cb332a4..42c0d28 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -30,6 +30,7 @@
  * $/LicenseInfo$
  */
 
+#define TOGGLE_HACKED_GODLIKE_VIEWER 1
 #ifndef LL_LLAGENT_H
 #define LL_LLAGENT_H
 
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 8aaaa78..40aa6fc 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -544,9 +544,6 @@ static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const L
 		texture_ctrl->setCommitCallback(boost::bind(&LLPanelEditWearable::onTexturePickerCommit, self, _1));
 		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);
 	}
 }
 
@@ -805,15 +802,12 @@ void LLPanelEditWearable::draw()
 	BOOL has_wearable = (wearable != NULL );
 	BOOL has_any_wearable = has_wearable || gAgentWearables.getWearableCount(mType);
 	BOOL is_dirty = isDirty();
-	BOOL is_modifiable = FALSE;
-	BOOL is_copyable = FALSE;
+	BOOL is_modifiable = TRUE;
+	BOOL is_copyable = TRUE;
 	BOOL is_complete = FALSE;
 	LLInventoryItem* item = NULL;
 	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());
 		is_complete = ((LLViewerInventoryItem*)item)->isComplete();
 	}
 
@@ -1312,8 +1306,8 @@ 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;
+	BOOL is_copyable = TRUE;
+	BOOL is_modifiable = TRUE;
 
 	mSave->setEnabled(is_modifiable && is_complete);
 	mSaveAs->setEnabled(is_copyable && is_complete);
@@ -1414,13 +1408,7 @@ bool LLPanelEditWearable::updatePermissions()
 		{
 			can_import = true;
 
-			// 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())))
-			{
-				can_export = true;
-			}
+			can_export = true;
 		}
 	}
 	setUIPermissions(perm_mask, is_complete);
@@ -1449,10 +1437,9 @@ void LLPanelEditWearable::updateScrollingPanelUI()
 	LLViewerInventoryItem* item = gInventory.getItem(wearable->getItemID());
 	if (item)
 	{
-		U32 perm_mask = item->getPermissions().getMaskOwner();
 		BOOL is_complete = item->isComplete();
 		LLScrollingPanelParam::sUpdateDelayFrames = 0;
-		mCustomizeFloater->getScrollingPanelList()->updatePanels((perm_mask & PERM_MODIFY) && is_complete);
+		mCustomizeFloater->getScrollingPanelList()->updatePanels(is_complete);
 	}
 }
 
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 4bbc1e6..d4ad0f0 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -340,6 +340,9 @@ void LLPreviewAnim::copyAnimID(void *userdata)
 // virtual
 BOOL LLPreviewAnim::canSaveAs() const
 {
+# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+	return gAgent.isGodlike();
+# endif
 	return mIsCopyable;
 }
 
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index b3a129e..4da2fa4 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -296,6 +296,9 @@ void LLPreviewSound::copyUUID( void *userdata )
 // virtual
 BOOL LLPreviewSound::canSaveAs() const
 {
+# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+        return gAgent.isGodlike();
+# endif        
 	return mIsCopyable;
 }
 
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 1427f0d..2b29af6 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -373,6 +373,9 @@ void LLPreviewTexture::draw()
 // virtual
 BOOL LLPreviewTexture::canSaveAs() const
 {
+# 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 7dfc7f6..ae1ed08 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -295,13 +295,6 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 		}
 		else
 		{
-			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);
 		}
 	}
@@ -370,36 +363,15 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
 	if ((cargo_type == DAD_TEXTURE) || is_mesh)
 	{
 		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;
 
-		//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
+		if(drop)
 		{
-			*accept = ACCEPT_NO;
+			setCanApply(true, true);
+			setImageID( item->getAssetUUID() );
+			commitIfImmediateSet();
 		}
+		
+		*accept = ACCEPT_YES_SINGLE;
 	}
 	else
 	{
@@ -467,14 +439,9 @@ BOOL LLFloaterTexturePicker::postBuild()
 	LLFloater::postBuild();
 
 	// <dogmode>
-	/**
 	LLInventoryItem* itemp = gInventory.getItem(mImageAssetID);
+	childSetValue("texture_uuid", mImageAssetID);
 
-	if (itemp && (itemp->getPermissions().getMaskOwner() & PERM_ALL))
-		childSetValue("texture_uuid", mImageAssetID);
-	else
-		childSetValue("texture_uuid", LLUUID::null.asString());
-	**/
 	if (!mLabel.empty())
 	{
 		std::string pick = getString("pick title");
@@ -987,12 +954,8 @@ 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>
+			
+			childSetValue("texture_uuid", mImageAssetID);
 
 			if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
 			{
@@ -1105,15 +1068,7 @@ 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 
-		{
-			childSetValue("texture_uuid", inventory_item_id.asString());
-		}
+		childSetValue("texture_uuid", inventory_item_id.asString());
 
 		commitIfImmediateSet();
 	}
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index d8bdf36..9abed00 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -41,7 +41,7 @@ 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 
+#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 c9c223a..7cbd356 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -881,14 +881,11 @@ void init_client_menu(LLMenuGL* menu)
 
 // <dogmode> 
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid())
-	{
 		menu->addChild(new LLMenuItemCheckGL("Hacked Godmode",
 										   &handle_toggle_hacked_godmode,
 										   NULL,
 										   &check_toggle_hacked_godmode,
 										   (void*)"HackedGodmode"));
-	}
 #endif
 // </dogmode>
 	menu->addChild(new LLMenuItemCallGL("Clear Group Cache", 
@@ -2861,18 +2858,7 @@ class LLObjectEnableExport : public view_listener_t
 {
 	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
 	{
-		ExportPolicy export_policy = LFSimFeatureHandler::instance().exportPolicy();
-		bool can_export_any = false;
-		LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
-		for (LLObjectSelection::iterator node = selection->begin(); node != selection->end(); ++node)
-		{
-			if ((*node)->mPermissions->allowExportBy(gAgent.getID(), export_policy))
-			{
-				can_export_any = true;
-				break;
-			}
-		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(can_export_any);
+		gMenuHolder->findControl(userdata["control"].asString())->setValue(true);
 		return true;
 	}
 };
@@ -4825,8 +4811,7 @@ BOOL enable_take()
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid() 
-            && gAgent.isGodlike())
+		if (gAgent.isGodlike())
 		{
 			return TRUE;
 		}
@@ -5501,8 +5486,7 @@ bool enable_object_delete()
 	TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	(!LLViewerLogin::getInstance()->isInProductionGrid()
-     && gAgent.isGodlike()) ||
+	(gAgent.isGodlike()) ||
 # endif
 		LLSelectMgr::getInstance()->canDoDelete();
 #endif
@@ -7466,8 +7450,7 @@ bool enable_object_take_copy()
 			all_valid = true;
 #ifndef HACKED_GODLIKE_VIEWER
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-			if (LLViewerLogin::getInstance()->isInProductionGrid()
-                || !gAgent.isGodlike())
+			if (!gAgent.isGodlike())
 # endif
 			{
 				struct f : public LLSelectedObjectFunctor
@@ -7592,8 +7575,7 @@ BOOL enable_save_into_inventory(void*)
 	return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid()
-        && gAgent.isGodlike())
+	if (gAgent.isGodlike())
 	{
 		return TRUE;
 	}
@@ -9392,6 +9374,7 @@ void initialize_menus()
 	addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
 	addMenu(new LLAvatarCopyUUID(), "Avatar.CopyUUID");
 	addMenu(new LLAvatarClientUUID(), "Avatar.ClientID");
+        addMenu(new LLObjectExport(), "Avatar.Export");
 
 	// Object pie menu
 	addMenu(new LLObjectOpen(), "Object.Open");
@@ -9450,6 +9433,7 @@ void initialize_menus()
 
 	addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
 	addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
+	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 0f4f433..f8749f9 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5320,8 +5320,7 @@ BOOL LLViewerObject::permYouOwner() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 		{
 			return TRUE;
 		}
@@ -5357,8 +5356,7 @@ BOOL LLViewerObject::permOwnerModify() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 	{
 			return TRUE;
 	}
@@ -5381,8 +5379,7 @@ BOOL LLViewerObject::permModify() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 	{
 			return TRUE;
 	}
@@ -5405,8 +5402,7 @@ BOOL LLViewerObject::permCopy() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 		{
 			return TRUE;
 		}
@@ -5429,8 +5425,7 @@ BOOL LLViewerObject::permMove() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 		{
 			return TRUE;
 		}
@@ -5453,8 +5448,7 @@ BOOL LLViewerObject::permTransfer() const
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (gAgent.getGodLevel() >= GOD_MAINTENANCE)
 		{
 			return TRUE;
 		}
diff --git a/indra/newview/llviewerobjectbackup.cpp b/indra/newview/llviewerobjectbackup.cpp
index 9b0f97d..17a3020 100644
--- a/indra/newview/llviewerobjectbackup.cpp
+++ b/indra/newview/llviewerobjectbackup.cpp
@@ -410,21 +410,18 @@ void LLObjectBackup::exportObject_continued(AIFilePicker* filepicker)
 //static
 void LLObjectBackup::setDefaultTextures()
 {
-	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)
 {
-	return item_permissions->allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy());
+                return true;
 }
 
 // So far, only Second Life forces TPVs to verify the creator for textures...
@@ -440,76 +437,17 @@ bool LLObjectBackup::validatePerms(const LLPermissions* item_permissions)
 //static
 bool LLObjectBackup::validateTexturePerms(const LLUUID& asset_id)
 {
-	if (LFSimFeatureHandler::instance().exportPolicy() == ep_full_perm)
-	{
-		// If we are not in Second Life and we don't have export-permission
-		// support, don't bother and unconditionally accept the texture export
-		// (legacy behaviour).
-		return true;
-	}
-
-	if (asset_id == LL_TEXTURE_PLYWOOD ||
-		asset_id == LL_TEXTURE_BLANK ||
-		asset_id == LL_TEXTURE_INVISIBLE ||
-		asset_id == LL_TEXTURE_TRANSPARENT ||
-		asset_id == LL_TEXTURE_MEDIA)
-	{
-		// Allow to export a few default SL textures.
-		return true;
-	}
-
-	LLViewerInventoryCategory::cat_array_t cats;
-	LLViewerInventoryItem::item_array_t items;
-	LLAssetIDMatches asset_id_matches(asset_id);
-	gInventory.collectDescendentsIf(LLUUID::null, cats, items,
-							LLInventoryModel::INCLUDE_TRASH,
-							asset_id_matches);
-	S32 count = items.size();
-	if (count > 0)
-	{
-		for (S32 i = 0; i < count; ++i)
-		{
-			const LLPermissions item_permissions = items[i]->getPermissions();
-			if (validatePerms(&item_permissions))
-			{
-				return true;
-			}
-		}
-	}
-
-	return false;
+	return true;
 }
 
 LLUUID LLObjectBackup::validateTextureID(const LLUUID& asset_id)
 {
-	if (mBadPermsTexturesList.count(asset_id))
-	{
-		// We already checked it and know it's bad...
-		return LL_TEXTURE_PLYWOOD;
-	}
-	else if (asset_id.isNull() || validateTexturePerms(asset_id))
-	{
-		return asset_id;
-	}
-	else
-	{
-		mBadPermsTexturesList.insert(asset_id);	// Cache bad texture ID
-		mNonExportedTextures |= TEXTURE_BAD_PERM;
-		LL_WARNS() << "Bad permissions for texture ID: " << asset_id
-				<< " - Texture will not be exported." << LL_ENDL;
-		return LL_TEXTURE_PLYWOOD;
-	}
+        return asset_id;
 }
 
 //static
 bool LLObjectBackup::validateNode(LLSelectNode* node)
 {
-	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.
 	LLViewerObject* obj = node->getObject();
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 5c4b948..19dc9ba 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,10 @@
 			<on_click function="Object.DERENDER" />
 			<on_enable function="Object.EnableDerender" />
 		</menu_item_call>
+    <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 9d18eca..308fdcc 100644
--- a/indra/newview/statemachine/aifilepicker.cpp
+++ b/indra/newview/statemachine/aifilepicker.cpp
@@ -160,6 +160,9 @@ void AIFilePicker::open(ELoadFilter filter, std::string const& default_path, std
 	  case FFLOAD_ANIM:
 		  mFilter = "anim";
 		  break;
+	  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 08e218f..97fec6e 100644
--- a/indra/newview/statemachine/aifilepicker.h
+++ b/indra/newview/statemachine/aifilepicker.h
@@ -43,6 +43,7 @@ enum ELoadFilter
 	FFLOAD_WAV,
 	FFLOAD_IMAGE,
 	FFLOAD_ANIM,
+	FFLOAD_ANIMATN,
 	FFLOAD_XML,
 	FFLOAD_SLOBJECT,
 	FFLOAD_RAW,
diff --git a/indra/plugins/filepicker/llfilepicker.cpp b/indra/plugins/filepicker/llfilepicker.cpp
index 3d6803a..b2fc53f 100644
--- a/indra/plugins/filepicker/llfilepicker.cpp
+++ b/indra/plugins/filepicker/llfilepicker.cpp
@@ -49,7 +49,7 @@ 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"
+#define ANIM_FILTER L"Animations (*.bvh; *.anim; *.animatn)\0*.bvh\0;*.anim\0;*.animatn\0"
 #define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0"
 #ifdef _CORY_TESTING
 #define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0"
@@ -785,9 +785,11 @@ 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))
+							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;
 							}
-- 
2.0.1

secondlife/modified_viewers/singularity/master.txt · Last modified: 2017/02/22 18:23 (external edit)

Access website using Tor


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