Table of Contents

Shortnote

Avination Viewer is the viewer used by yet-another-world, claiming that "Avination leads the way in content protection. We act where others just talk.". Nevertheless, the sources include the HACKED_GODMODE flags just like any other Hippo viewer and contains the exact same flaws that Linden has.

The differential patch achieves the same as we did with singularity.

Applying the Patch

cat modified_avination.patch | patch -p1 --dry-run
patching file indra/newview/llagent.h
patching file indra/newview/llfloatercustomize.cpp
patching file indra/newview/lltexturectrl.cpp
patching file indra/newview/llviewercontrol.h
patching file indra/newview/llviewermenu.cpp
patching file indra/newview/llviewermenufile.cpp
patching file indra/newview/llviewerobject.cpp
patching file indra/newview/llviewerobjectbackup.cpp
patching file indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
patching file indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
patching file indra/newview/statemachine/aifilepicker.cpp
patching file indra/newview/statemachine/aifilepicker.h
patching file indra/plugins/filepicker/llfilepicker.cpp

Code

modified_avination.patch
--- 0.3.2.2.original/indra/newview/llagent.h	2012-03-15 23:30:24.000000000 +0200
+++ 0.3.2.2/indra/newview/llagent.h	2012-11-05 05:17:38.000000000 +0200
@@ -29,7 +29,8 @@
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
-
+ 
+#define TOGGLE_HACKED_GODLIKE_VIEWER 1
 #ifndef LL_LLAGENT_H
 #define LL_LLAGENT_H
 
--- 0.3.2.2.original/indra/newview/llfloatercustomize.cpp	2012-03-15 23:30:27.000000000 +0200
+++ 0.3.2.2/indra/newview/llfloatercustomize.cpp	2012-11-05 05:22:33.000000000 +0200
@@ -603,18 +603,18 @@
 			{
 				can_import = true;
 
-				if (is_complete && 
+/*				if (is_complete && 
 					gAgent.getID() == item->getPermissions().getOwner() &&
 					gAgent.getID() == item->getPermissions().getCreator() &&
 					(PERM_ITEM_UNRESTRICTED &
 					perm_mask) == PERM_ITEM_UNRESTRICTED)
-				{
+				{*/
 					can_export = true;
-				}
+//				}
 			}
 		}
 		setUIPermissions(perm_mask, is_complete);
-		BOOL editable = ((perm_mask & PERM_MODIFY) && is_complete) ? TRUE : FALSE;
+		BOOL editable = (/*(perm_mask & PERM_MODIFY) &&*/ is_complete) ? TRUE : FALSE;
 
 		for(LLViewerVisualParam* param = (LLViewerVisualParam *)avatar->getFirstVisualParam(); 
 			param; 
@@ -868,8 +868,8 @@
 		texture_ctrl->setDefaultImageAssetID(default_image_id);
 		texture_ctrl->setAllowNoTexture( allow_no_texture );
 		// Don't allow (no copy) or (no transfer) textures to be selected.
-		texture_ctrl->setImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
-		texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
+		//texture_ctrl->setImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
+		//texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER);
 	}
 	mTextureList[name] = te;
 	LLVOAvatar* avatar = gAgentAvatarp;
@@ -960,16 +960,16 @@
 	LLWearable* wearable = gAgentWearables.getWearable( mType );
 	BOOL has_wearable = (wearable != NULL );
 	BOOL is_dirty = isDirty();
-	BOOL is_modifiable = FALSE;
-	BOOL is_copyable = FALSE;
+	BOOL is_modifiable = TRUE;//FALSE;
+	BOOL is_copyable = TRUE;//FALSE;
 	BOOL is_complete = FALSE;
 	LLViewerInventoryItem* item;
 	item = (LLViewerInventoryItem*)gAgentWearables.getWearableInventoryItem(mType);
 	if(item)
 	{
 		const LLPermissions& perm = item->getPermissions();
-		is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
-		is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID());
+		//is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
+		//is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID());
 		is_complete = item->isComplete();
 	}
 
@@ -1941,8 +1941,8 @@
 			item = (LLViewerInventoryItem*)gAgentWearables.getWearableInventoryItem((LLWearableType::EType)i);
 			if(item)
 			{
-				const LLPermissions& perm = item->getPermissions();
-				is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
+				//const LLPermissions& perm = item->getPermissions();
+				is_modifiable = true; //perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
 			}
 		}
 		if (is_modifiable)
@@ -1965,8 +1965,8 @@
 			item = (LLViewerInventoryItem*)gAgentWearables.getWearableInventoryItem((LLWearableType::EType)i);
 			if(item)
 			{
-				const LLPermissions& perm = item->getPermissions();
-				is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
+				//const LLPermissions& perm = item->getPermissions();
+				is_modifiable = true;//perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
 			}
 		}
 		if (is_modifiable)
@@ -2701,7 +2701,7 @@
 	if( panel )
 	{
 		panel->setWearable(wearable, perm_mask, is_complete);
-		updateScrollingPanelList((perm_mask & PERM_MODIFY) ? is_complete : FALSE);
+		updateScrollingPanelList(/*(perm_mask & PERM_MODIFY) ?*/ is_complete /*: FALSE*/);
 	}
 }
 
@@ -2837,7 +2837,7 @@
 			{
 				panel->setUIPermissions(perm_mask, is_complete);
 			}
-			BOOL is_vis = panel && item && is_complete && (perm_mask & PERM_MODIFY);
+			BOOL is_vis = panel && item && is_complete /*&& (perm_mask & PERM_MODIFY)*/;
 			childSetVisible("panel_container", is_vis);
 		}
 	}
--- 0.3.2.2.original/indra/newview/lltexturectrl.cpp	2012-03-15 23:30:35.000000000 +0200
+++ 0.3.2.2/indra/newview/lltexturectrl.cpp	2012-11-05 05:28:20.000000000 +0200
@@ -349,12 +349,12 @@
 		{
 
 			LLInventoryItem* itemp = gInventory.getItem(image_id);
-			if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+/*			if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
 			{
 				// no copy texture
 				childSetValue("apply_immediate_check", FALSE);
 				mNoCopyTextureSelected = TRUE;
-			}
+			}*/
 			mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
 		}
 	}
@@ -422,7 +422,7 @@
 	{
 		LLInventoryItem *item = (LLInventoryItem *)cargo_data;
 
-		BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
+/*		BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
 		BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
 		BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
 															gAgent.getID());
@@ -436,7 +436,7 @@
 		PermissionMask filter_perm_mask = mImmediateFilterPermMask;
 		if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask )
 
-		{
+		{*/
 			if (drop)
 			{
 				setImageID( item->getAssetUUID() );
@@ -444,11 +444,11 @@
 			}
 
 			*accept = ACCEPT_YES_SINGLE;
-		}
+/*		}
 		else
 		{
 			*accept = ACCEPT_NO;
-		}
+		}*/
 	}
 	else
 	{
@@ -519,9 +519,9 @@
 	/**
 	LLInventoryItem* itemp = gInventory.getItem(mImageAssetID);
 
-	if (itemp && (itemp->getPermissions().getMaskOwner() & PERM_ALL))
+	if (itemp && (itemp->getPermissions().getMaskOwner() & PERM_ALL))*/
 		childSetValue("texture_uuid", mImageAssetID);
-	else
+/*	else
 		childSetValue("texture_uuid", LLUUID::null.asString());
 	**/
 	if (!mLabel.empty())
@@ -925,16 +925,16 @@
 		if (itemp)
 		{
 			// <dogmode>
-			if (itemp->getPermissions().getMaskOwner() & PERM_ALL)
+			//if (itemp->getPermissions().getMaskOwner() & PERM_ALL)
 				self->childSetValue("texture_uuid", self->mImageAssetID);
-			else
-				self->childSetValue("texture_uuid", LLUUID::null.asString());
+			//else
+			//	self->childSetValue("texture_uuid", LLUUID::null.asString());
 			// </dogmode>
 
-			if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
+/*			if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
 			{
 				self->mNoCopyTextureSelected = TRUE;
-			}
+			}*/
 			self->mImageAssetID = itemp->getAssetUUID();
 			self->mIsDirty = TRUE;
 			if (user_action)
@@ -1030,15 +1030,15 @@
 
 		LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
 
-		if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+/*		if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
 		{
 			// no copy texture
 			self->mNoCopyTextureSelected = TRUE;
 		}
 		else 
-		{
+		{*/
 			self->childSetValue("texture_uuid", inventory_item_id.asString());
-		}
+//		}
 
 		self->commitIfImmediateSet();
 	}
--- 0.3.2.2.original/indra/newview/llviewercontrol.h	2012-03-15 23:30:36.000000000 +0200
+++ 0.3.2.2/indra/newview/llviewercontrol.h	2012-11-05 05:29:01.000000000 +0200
@@ -41,7 +41,7 @@
 
 // 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
--- 0.3.2.2.original/indra/newview/llviewermenu.cpp	2012-03-15 23:30:37.000000000 +0200
+++ 0.3.2.2/indra/newview/llviewermenu.cpp	2012-11-05 06:21:43.000000000 +0200
@@ -995,14 +995,14 @@
 
 // <dogmode> 
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid())
-	{
+//	if (!LLViewerLogin::getInstance()->isInProductionGrid())
+//	{
 		menu->append(new LLMenuItemCheckGL("Hacked Godmode",
 										   &handle_toggle_hacked_godmode,
 										   NULL,
 										   &check_toggle_hacked_godmode,
 										   (void*)"HackedGodmode"));
-	}
+//	}
 #endif
 // </dogmode>
 	menu->append(new LLMenuItemCallGL("Clear Group Cache", 
@@ -2784,7 +2784,7 @@
 	{
 		LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		bool new_value = (object != NULL);
-		if (new_value)
+/*		if (new_value)
 		{
 			struct ff : public LLSelectedNodeFunctor
 			{
@@ -2807,7 +2807,7 @@
 			};
 			ff * the_ff = new ff(userdata);
 			new_value = LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff, false);
-		}
+		}*/
 		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
 		return true;
 	}
@@ -4902,8 +4902,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid() 
-            && gAgent.isGodlike())
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid() 
+            &&*/ gAgent.isGodlike())
 		{
 			return TRUE;
 		}
@@ -5534,8 +5534,8 @@
 			TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-			(!LLViewerLogin::getInstance()->isInProductionGrid()
-             && gAgent.isGodlike()) ||
+			(/*!LLViewerLogin::getInstance()->isInProductionGrid()
+             &&*/ gAgent.isGodlike()) ||
 # endif
 			LLSelectMgr::getInstance()->canDoDelete();
 #endif
@@ -7813,8 +7813,8 @@
 			all_valid = true;
 #ifndef HACKED_GODLIKE_VIEWER
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-			if (LLViewerLogin::getInstance()->isInProductionGrid()
-                || !gAgent.isGodlike())
+			if (/*LLViewerLogin::getInstance()->isInProductionGrid()
+                ||*/ !gAgent.isGodlike())
 # endif
 			{
 				struct f : public LLSelectedObjectFunctor
@@ -7941,8 +7941,8 @@
 	return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid()
-        && gAgent.isGodlike())
+	if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+        &&*/ gAgent.isGodlike())
 	{
 		return TRUE;
 	}
@@ -9716,7 +9716,8 @@
 	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");
 	addMenu(new LLObjectBuild(), "Object.Build");
@@ -9771,6 +9772,7 @@
 
 	addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
 	addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
+	addMenu(new LLObjectEnableExport(), "Attachment.EnableExport");
 
 	// Land pie menu
 	addMenu(new LLLandBuild(), "Land.Build");
--- 0.3.2.2.original/indra/newview/llviewermenufile.cpp	2012-03-15 23:30:37.000000000 +0200
+++ 0.3.2.2/indra/newview/llviewermenufile.cpp	2012-11-05 05:31:44.000000000 +0200
@@ -889,7 +889,7 @@
 	{
 		// Unknown extension
 		// *TODO: Translate?
-		error_message = llformat("Unknown file extension .%s\nExpected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh", exten.c_str());
+		error_message = llformat("Unknown file extension .%s\nExpected .wav, .tga, .bmp, .jpg, .jpeg, .bvh or .animatn", exten.c_str());
 		error = TRUE;;
 	}
 
--- 0.3.2.2.original/indra/newview/llviewerobject.cpp	2012-03-15 23:30:38.000000000 +0200
+++ 0.3.2.2/indra/newview/llviewerobject.cpp	2012-11-05 05:32:50.000000000 +0200
@@ -5118,8 +5118,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 		{
 			return TRUE;
 		}
@@ -5155,8 +5155,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 	{
 			return TRUE;
 	}
@@ -5179,8 +5179,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 	{
 			return TRUE;
 	}
@@ -5203,8 +5203,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 		{
 			return TRUE;
 		}
@@ -5227,8 +5227,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 		{
 			return TRUE;
 		}
@@ -5251,8 +5251,8 @@
 		return TRUE;
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-		if (!LLViewerLogin::getInstance()->isInProductionGrid()
-            && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
+		if (/*!LLViewerLogin::getInstance()->isInProductionGrid()
+            &&*/ (gAgent.getGodLevel() >= GOD_MAINTENANCE))
 		{
 			return TRUE;
 		}
--- 0.3.2.2.original/indra/newview/llviewerobjectbackup.cpp	2012-03-15 23:30:38.000000000 +0200
+++ 0.3.2.2/indra/newview/llviewerobjectbackup.cpp	2012-11-05 06:20:34.000000000 +0200
@@ -95,8 +95,8 @@
 
 void setDefaultTextures()
 {
-	if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
-	{
+//	if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
+//	{
 		// When not in SL (no texture perm check needed), we can get these
 		// defaults from the user settings...
 		LL_TEXTURE_PLYWOOD = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
@@ -107,7 +107,7 @@
 			// AllowInvisibleTextureInPicker patch)
 			LL_TEXTURE_INVISIBLE = LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"));
 		}
-	}
+//	}
 }
 
 class importResponder: public LLNewAgentInventoryResponder
@@ -396,6 +396,7 @@
 
 bool LLObjectBackup::validatePerms(const LLPermissions *item_permissions)
 {
+  return true;
 	if (gHippoGridManager->getConnectedGrid()->isSecondLife())
 	{
 		// In Second Life, you must be the creator to be permitted to export the asset.
@@ -421,6 +422,7 @@
 // the textures in the Library), whoever is the actual creator... Go figure !
 LLUUID LLObjectBackup::validateTextureID(LLUUID asset_id)
 {
+  return asset_id;
 	if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
 	{
 		// If we are not in Second Life, don't bother.
--- 0.3.2.2.original/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml	2012-03-15 23:30:48.000000000 +0200
+++ 0.3.2.2/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml	2012-11-05 05:36:01.000000000 +0200
@@ -31,6 +31,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_enable function="Object.EnableExport" />
+	  </menu_item_call>
 	</pie_menu>
 	<menu_item_call enabled="true" label="Appearance..." name="Appearance...">
 		<on_click function="ShowFloater" userdata="appearance" />
--- 0.3.2.2.original/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml	2012-03-15 23:30:48.000000000 +0200
+++ 0.3.2.2/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml	2012-11-05 05:35:40.000000000 +0200
@@ -46,6 +46,10 @@
 			<menu_item_call enabled="true" label="Derender" mouse_opaque="true" name="Derender">
 				<on_click function="Object.DERENDER" />
 			</menu_item_call>
+      <menu_item_call enabled="true" label="Export" mouse_opaque="true" name="Object Export">
+			  <on_click function="Object.Export" />
+			  <on_enable function="Object.EnableExport" />
+			</menu_item_call>
 		</pie_menu>
 		<menu_item_call enabled="false" label="Eject..." mouse_opaque="true" name="Eject...">
 			<on_click function="Avatar.Eject" />
--- 0.3.2.2.original/indra/newview/statemachine/aifilepicker.cpp	2012-03-15 23:31:01.000000000 +0200
+++ 0.3.2.2/indra/newview/statemachine/aifilepicker.cpp	2012-11-05 05:36:30.000000000 +0200
@@ -147,6 +147,9 @@
 	  case FFLOAD_ANIM:
 		  mFilter = "anim";
 		  break;
+    case FFLOAD_ANIMATN:
+      mFilter = "animatn";
+      break;
 #ifdef _CORY_TESTING
 	  case FFLOAD_GEOMETRY:
 		  mFilter = "geometry";
--- 0.3.2.2.original/indra/newview/statemachine/aifilepicker.h	2012-03-15 23:31:01.000000000 +0200
+++ 0.3.2.2/indra/newview/statemachine/aifilepicker.h	2012-11-05 05:36:44.000000000 +0200
@@ -43,6 +43,7 @@
 	FFLOAD_WAV,
 	FFLOAD_IMAGE,
 	FFLOAD_ANIM,
+	FFLOAD_ANIMATN,
 	FFLOAD_XML,
 	FFLOAD_SLOBJECT,
 	FFLOAD_RAW,
--- 0.3.2.2.original/indra/plugins/filepicker/llfilepicker.cpp	2012-03-15 23:31:02.000000000 +0200
+++ 0.3.2.2/indra/plugins/filepicker/llfilepicker.cpp	2012-11-05 05:38:49.000000000 +0200
@@ -752,9 +752,11 @@
 						}
 						else if (filter == FFLOAD_ANIM)
 						{
-							if (fileInfo.filetype != 'BVH ' && 
-								(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), 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;
 							}