Merge remote-tracking branch 'siana/master'
This commit is contained in:
@@ -7,26 +7,13 @@ if(INSTALL_PROPRIETARY)
|
||||
use_prebuilt_binary(fmod)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
find_library(FMOD_LIBRARY_RELEASE
|
||||
find_library(FMOD_LIBRARY
|
||||
NAMES fmod fmodvc fmod-3.75
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
)
|
||||
|
||||
find_library(FMOD_LIBRARY_DEBUG
|
||||
NAMES fmod fmodvc fmod-3.75
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
)
|
||||
|
||||
if (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG)
|
||||
set(FMOD_LIBRARY
|
||||
debug ${FMOD_LIBRARY_DEBUG}
|
||||
optimized ${FMOD_LIBRARY_RELEASE})
|
||||
elseif (FMOD_LIBRARY_RELEASE)
|
||||
set(FMOD_LIBRARY ${FMOD_LIBRARY_RELEASE})
|
||||
endif (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG)
|
||||
|
||||
if (NOT FMOD_LIBRARY)
|
||||
set(FMOD_SDK_DIR CACHE PATH "Path to the FMOD SDK.")
|
||||
if (FMOD_SDK_DIR)
|
||||
|
||||
@@ -7,26 +7,13 @@ if(INSTALL_PROPRIETARY)
|
||||
use_prebuilt_binary(fmodex)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
find_library(FMODEX_LIBRARY_RELEASE
|
||||
find_library(FMODEX_LIBRARY
|
||||
NAMES fmodex fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
)
|
||||
|
||||
find_library(FMODEX_LIBRARY_DEBUG
|
||||
NAMES fmodex fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
)
|
||||
|
||||
if (FMODEX_LIBRARY_RELEASE AND FMODEX_LIBRARY_DEBUG)
|
||||
set(FMODEX_LIBRARY
|
||||
debug ${FMODEX_LIBRARY_DEBUG}
|
||||
optimized ${FMODEX_LIBRARY_RELEASE})
|
||||
elseif (FMODEX_LIBRARY_RELEASE)
|
||||
set(FMODEX_LIBRARY ${FMODEX_LIBRARY_RELEASE})
|
||||
endif (FMODEX_LIBRARY_RELEASE AND FMODEX_LIBRARY_DEBUG)
|
||||
|
||||
if (NOT FMODEX_LIBRARY)
|
||||
set(FMODEX_SDK_DIR CACHE PATH "Path to the FMOD Ex SDK.")
|
||||
if (FMODEX_SDK_DIR)
|
||||
|
||||
@@ -1353,12 +1353,16 @@ if (FMOD OR FMODEX)
|
||||
if (NOT WINDOWS)
|
||||
set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
|
||||
add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES})
|
||||
if(FMODEX)
|
||||
set(fmodwrapper_needed_LIBRARIES ${FMODEX_LIBRARY})
|
||||
endif(FMODEX)
|
||||
if(FMOD)
|
||||
set(fmodwrapper_needed_LIBRARIES "${fmodwrapper_needed_LIBRARIES} ${FMOD_LIBRARY}")
|
||||
endif(FMOD)
|
||||
if(FMOD AND FMODEX)
|
||||
set(fmodwrapper_needed_LIBRARIES "${FMODEX_LIBRARY} ${FMOD_LIBRARY}")
|
||||
else(FMOD AND FMODEX)
|
||||
if(FMODEX)
|
||||
set(fmodwrapper_needed_LIBRARIES ${FMODEX_LIBRARY})
|
||||
endif(FMODEX)
|
||||
if(FMOD)
|
||||
set(fmodwrapper_needed_LIBRARIES "${FMOD_LIBRARY}")
|
||||
endif(FMOD)
|
||||
endif(FMOD AND FMODEX)
|
||||
if (DARWIN)
|
||||
list(APPEND fmodwrapper_needed_LIBRARIES ${CARBON_LIBRARY})
|
||||
set_target_properties(
|
||||
|
||||
@@ -11,12 +11,14 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "lldate.h"
|
||||
#include "llagent.h"
|
||||
|
||||
LLFloaterBlacklist* LLFloaterBlacklist::sInstance;
|
||||
|
||||
std::vector<LLUUID> LLFloaterBlacklist::blacklist_textures;
|
||||
std::vector<LLUUID> LLFloaterBlacklist::blacklist_objects;
|
||||
|
||||
std::map<LLUUID,LLSD> LLFloaterBlacklist::blacklist_entries;
|
||||
|
||||
@@ -49,11 +51,13 @@ BOOL LLFloaterBlacklist::postBuild()
|
||||
childSetAction("remove_btn", onClickRemove, this);
|
||||
childSetAction("save_btn", onClickSave, this);
|
||||
childSetAction("load_btn", onClickLoad, this);
|
||||
childSetAction("rerender_btn", onClickRerender, this);
|
||||
childSetVisible("copy_uuid_btn",false);
|
||||
LLComboBox* box = getChild<LLComboBox>("asset_combo");
|
||||
box->add("Texture",LLSD(0));
|
||||
box->add("Sound",LLSD(1));
|
||||
box->add("Animation",LLSD(20));
|
||||
box->add("Object",LLSD(6));
|
||||
refresh();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -64,6 +68,7 @@ void LLFloaterBlacklist::refresh()
|
||||
list->clearRows();
|
||||
for(std::map<LLUUID,LLSD>::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter)
|
||||
{
|
||||
if(iter->first.isNull()) continue;
|
||||
LLSD element;
|
||||
std::string agent;
|
||||
gCacheName->getFullName(LLUUID(iter->second["entry_agent"].asString()), agent);
|
||||
@@ -121,10 +126,14 @@ void LLFloaterBlacklist::addEntry(LLUUID key, LLSD data)
|
||||
{
|
||||
if(key.notNull())
|
||||
{
|
||||
if(!data.has("entry_type"))
|
||||
if(!data.has("entry_type"))
|
||||
{
|
||||
LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry type, specify LLAssetType::Etype" << LL_ENDL;
|
||||
}
|
||||
else if(!data.has("entry_name"))
|
||||
{
|
||||
LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry name, specify the name that should appear in the listing for this entry." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!data.has("entry_date"))
|
||||
@@ -137,20 +146,22 @@ void LLFloaterBlacklist::addEntry(LLUUID key, LLSD data)
|
||||
}
|
||||
if(data["entry_type"].asString() == "1")
|
||||
{
|
||||
//remove sounds
|
||||
LLUUID sound_id=LLUUID(key);
|
||||
gVFS->removeFile(sound_id,LLAssetType::AT_SOUND);
|
||||
std::string wav_path= gDirUtilp->getExpandedFilename(LL_PATH_CACHE,sound_id.asString()) + ".dsf";
|
||||
if(LLAPRFile::isExist(wav_path, LL_APR_RPB))
|
||||
LLAPRFile::remove(wav_path);
|
||||
gAudiop->removeAudioData(sound_id);
|
||||
//remove sounds
|
||||
LLUUID sound_id=LLUUID(key);
|
||||
gVFS->removeFile(sound_id,LLAssetType::AT_SOUND);
|
||||
std::string wav_path= gDirUtilp->getExpandedFilename(LL_PATH_CACHE,sound_id.asString()) + ".dsf";
|
||||
if(LLAPRFile::isExist(wav_path, LL_APR_RPB))
|
||||
LLAPRFile::remove(wav_path);
|
||||
gAudiop->removeAudioData(sound_id);
|
||||
}
|
||||
blacklist_entries.insert(std::pair<LLUUID,LLSD>(key,data));
|
||||
updateBlacklists();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("FloaterBlacklistAdd") << "addEntry called with a null entry key, please specify LLUUID of asset." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -173,19 +184,19 @@ void LLFloaterBlacklist::onClickRemove(void* user_data)
|
||||
LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("file_list");
|
||||
if(list->getFirstSelected())
|
||||
{
|
||||
LLScrollListItem* item = list->getFirstSelected();
|
||||
LLUUID selected_id(item->getColumn(0)->getValue().asUUID());
|
||||
if(selected_id.isNull()) return;
|
||||
list->deleteSingleItem(list->getFirstSelectedIndex());
|
||||
blacklist_entries.erase(selected_id);
|
||||
updateBlacklists();
|
||||
|
||||
LLScrollListItem* item = list->getFirstSelected();
|
||||
LLUUID selected_id = item->getColumn(0)->getValue().asUUID();
|
||||
if(selected_id.isNull()) return;
|
||||
list->deleteSingleItem(list->getFirstSelectedIndex());
|
||||
blacklist_entries.erase(selected_id);
|
||||
updateBlacklists();
|
||||
|
||||
}
|
||||
}
|
||||
// static
|
||||
void LLFloaterBlacklist::loadFromSave()
|
||||
{
|
||||
std::string file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "floater_blist_settings.xml");
|
||||
std::string file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "blacklist_sg1.xml");
|
||||
llifstream xml_file(file_name);
|
||||
if(!xml_file.is_open()) return;
|
||||
LLSD data;
|
||||
@@ -206,6 +217,7 @@ void LLFloaterBlacklist::updateBlacklists()
|
||||
if(gAssetStorage)
|
||||
{
|
||||
blacklist_textures.clear();
|
||||
blacklist_objects.clear();
|
||||
gAssetStorage->mBlackListedAsset.clear();
|
||||
for(std::map<LLUUID,LLSD>::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter)
|
||||
{
|
||||
@@ -217,6 +229,12 @@ void LLFloaterBlacklist::updateBlacklists()
|
||||
{
|
||||
gAssetStorage->mBlackListedAsset.push_back(LLUUID(iter->first));
|
||||
}
|
||||
|
||||
if(blacklist_entries[iter->first]["entry_type"].asString() == "6")
|
||||
{
|
||||
blacklist_objects.push_back(LLUUID(iter->first));
|
||||
}
|
||||
|
||||
}
|
||||
saveToDisk();
|
||||
LLFloaterBlacklist* instance = LLFloaterBlacklist::getInstance();
|
||||
@@ -228,7 +246,7 @@ void LLFloaterBlacklist::updateBlacklists()
|
||||
//static
|
||||
void LLFloaterBlacklist::saveToDisk()
|
||||
{
|
||||
std::string file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "floater_blist_settings.xml");
|
||||
std::string file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "blacklist_sg1.xml");
|
||||
llofstream export_file(file_name);
|
||||
LLSD data;
|
||||
for(std::map<LLUUID,LLSD>::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter)
|
||||
@@ -259,7 +277,7 @@ void LLFloaterBlacklist::onClickSave_continued(AIFilePicker* filepicker)
|
||||
{
|
||||
data[iter->first.asString()] = iter->second;
|
||||
}
|
||||
LLSDSerialize::toPrettyXML(data, export_file);
|
||||
LLSDSerialize::toPrettyXML(data, export_file);
|
||||
export_file.close();
|
||||
}
|
||||
}
|
||||
@@ -291,4 +309,25 @@ void LLFloaterBlacklist::onClickLoad_continued(AIFilePicker* filepicker)
|
||||
xml_file.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterBlacklist::onClickRerender(void* user_data)
|
||||
{
|
||||
std::map<LLUUID,LLSD> blacklist_new;
|
||||
for(std::map<LLUUID,LLSD>::iterator itr = blacklist_entries.begin(); itr != blacklist_entries.end(); ++itr)
|
||||
{
|
||||
if(blacklist_entries[itr->first]["entry_type"].asString() == "6") continue;
|
||||
blacklist_new[itr->first] = blacklist_entries[itr->first];
|
||||
blacklist_new[itr->second] = blacklist_entries[itr->second];
|
||||
}
|
||||
blacklist_entries = blacklist_new;
|
||||
saveToDisk();
|
||||
LLFloaterBlacklist* instance = LLFloaterBlacklist::getInstance();
|
||||
if(instance)
|
||||
{
|
||||
instance->refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// </edit>
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
|
||||
static std::map<LLUUID,LLSD> blacklist_entries;
|
||||
static std::vector<LLUUID> blacklist_textures;
|
||||
static std::vector<LLUUID> blacklist_objects;
|
||||
|
||||
static void loadFromSave();
|
||||
|
||||
@@ -48,6 +49,7 @@ private:
|
||||
static void onClickSave_continued(AIFilePicker* filepicker);
|
||||
static void onClickLoad(void* user_data);
|
||||
static void onClickLoad_continued(AIFilePicker* filepicker);
|
||||
static void onClickRerender(void* user_data);
|
||||
static void onClickCopyUUID(void* user_data);
|
||||
static void onClickRemove(void* user_data);
|
||||
|
||||
|
||||
@@ -2265,25 +2265,78 @@ class LLObjectDerender : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLViewerObject* slct = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
|
||||
LLViewerObject* slct = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
if(!slct)return true;
|
||||
|
||||
LLUUID id = slct->getID();
|
||||
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
|
||||
LLUUID root_key;
|
||||
LLSelectNode* node = selection->getFirstRootNode();
|
||||
if(node)root_key = node->getObject()->getID();
|
||||
if(root_key.notNull())
|
||||
//delivers null in linked parts if used as getFirstRootNode()
|
||||
LLSelectNode* node = selection->getFirstRootNode(NULL,TRUE);
|
||||
|
||||
/*this works for derendering entire object if child is selected
|
||||
|
||||
LLSelectNode* node = selection->getFirstNode();
|
||||
//Delivers node even when linked parts, but only first node
|
||||
|
||||
LLViewerObject* obj = node->getObject();
|
||||
LLViewerObject* parent = (LLViewerObject*)obj->getParent();*/
|
||||
|
||||
|
||||
if(node)
|
||||
{
|
||||
id = root_key;
|
||||
//LLSelectMgr::getInstance()->removeObjectFromSelections(root_key);
|
||||
root_key = node->getObject()->getID();
|
||||
llinfos << "Derender node has key " << root_key << llendl;
|
||||
}
|
||||
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
|
||||
|
||||
// ...don't kill the avatar
|
||||
//if (!(id == gAgentID))
|
||||
// <dogmode> Kill 'em all
|
||||
if (true)
|
||||
else
|
||||
{
|
||||
llinfos << "Derender node is null " << llendl;
|
||||
}
|
||||
|
||||
LLViewerRegion* cur_region = gAgent.getRegion();
|
||||
std::string entry_name;
|
||||
if(slct->isAvatar()){
|
||||
LLNameValue* firstname = slct->getNVPair("FirstName");
|
||||
LLNameValue* lastname = slct->getNVPair("LastName");
|
||||
entry_name = llformat("Derendered: (AV) %s %s",firstname->getString(),lastname->getString());
|
||||
}
|
||||
else{
|
||||
if(root_key.isNull())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
id = root_key;
|
||||
if(!node->mName.empty())
|
||||
{
|
||||
if(cur_region)
|
||||
entry_name = llformat("Derendered: %s in region %s",node->mName.c_str(),cur_region->getName().c_str());
|
||||
else
|
||||
entry_name = llformat("Derendered: %s",node->mName.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(cur_region)
|
||||
entry_name = llformat("Derendered: (unkown object) in region %s",cur_region->getName().c_str());
|
||||
else
|
||||
entry_name = "Derendered: (unkown object)";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
LLSD indata;
|
||||
indata["entry_type"] = 6; //AT_TEXTURE
|
||||
indata["entry_name"] = entry_name;
|
||||
indata["entry_agent"] = gAgent.getID();
|
||||
|
||||
|
||||
// ...don't kill the avatar
|
||||
if (!(id == gAgentID))
|
||||
{
|
||||
LLFloaterBlacklist::addEntry(id,indata);
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
LLViewerObject *objectp = gObjectList.findObject(id);
|
||||
if (objectp)
|
||||
{
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
#include "object_flags.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
|
||||
#include "llviewerobjectbackup.h"
|
||||
|
||||
@@ -528,6 +529,15 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if(std::find(LLFloaterBlacklist::blacklist_objects.begin(),
|
||||
LLFloaterBlacklist::blacklist_objects.end(),fullid) != LLFloaterBlacklist::blacklist_objects.end())
|
||||
{
|
||||
llinfos << "Blacklisted object asset " << fullid.asString() << " blocked." << llendl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
|
||||
if (!objectp)
|
||||
{
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
<scroll_list top="-100" bottom="35" can_resize="true" column_padding="0" draw_heading="true"
|
||||
follows="left|top|bottom|right" left="10" multi_select="true" name="file_list" right="-10" search_column="0">
|
||||
<column dynamicwidth="false" name="asset_id" label="Asset ID" width ="00" />
|
||||
<column dynamicwidth="true" name="entry_name" label="Name" />
|
||||
<column dynamicwidth="true" name="entry_name" label="Name" />
|
||||
<column dynamicwidth="false" name="entry_type" label="Type" width="110" />
|
||||
<column dynamicwidth="false" name="entry_agent" label="Blacklisted by" width="170" />
|
||||
<column dynamicwidth="false" name="entry_date" label="Date" width="130"/>
|
||||
<!--column dynamicwidth="false" name="asset_id" label="Asset-ID" width="130"/-->
|
||||
</scroll_list>
|
||||
<button name="save_btn" follows="left|bottom" width="75" bottom_delta="-23" left="10" height="20" label="Save XML"/>
|
||||
<button name="load_btn" follows="left|bottom" width="75" bottom_delta="0" left_delta="75" height="20" label="Load XML"/>
|
||||
<button name="clear_btn" follows="left|bottom" width="75" bottom_delta="0" left_delta="75" height="20" label="Clear"/>
|
||||
<!--button name="rerender_btn" follows="right|bottom" width="150" bottom_delta="0" left_delta="400" height="20" label="Rerender all Objects"/-->
|
||||
<button name="copy_uuid_btn" follows="left|bottom" width="75" bottom_delta="0" left_delta="75" height="20" label="Copy UUID"/>
|
||||
</floater>
|
||||
|
||||
Reference in New Issue
Block a user