Merge branch 'master' of git://github.com/siana/SingularityViewer
This commit is contained in:
@@ -518,9 +518,16 @@ class WindowsSetup(PlatformSetup):
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
else:
|
||||
for version in 'vc80 vc90 vc100 vc71'.split():
|
||||
if self.find_visual_studio_express_single(version):
|
||||
self._generator = version
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
return self._generator
|
||||
|
||||
def _set_generator(self, gen):
|
||||
@@ -605,6 +612,28 @@ class WindowsSetup(PlatformSetup):
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def find_visual_studio_express_single(self, gen=None):
|
||||
if gen is None:
|
||||
gen = self._generator
|
||||
gen = gen.lower()
|
||||
try:
|
||||
import _winreg
|
||||
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
|
||||
self.gens[gen]['ver'])
|
||||
value_str = (r'ProductDir')
|
||||
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
|
||||
(key_str, value_str))
|
||||
print key_str
|
||||
|
||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
|
||||
key = _winreg.OpenKey(reg, key_str)
|
||||
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
|
||||
print 'Found: %s' % value
|
||||
return value
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def get_build_cmd(self):
|
||||
if self.incredibuild:
|
||||
@@ -617,13 +646,15 @@ class WindowsSetup(PlatformSetup):
|
||||
if environment == '':
|
||||
environment = self.find_visual_studio_express()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
environment = self.find_visual_studio_express_single()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
|
||||
# devenv.com is CLI friendly, devenv.exe... not so much.
|
||||
return ('"%sdevenv.com" %s.sln /build %s' %
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
//
|
||||
// Sorry the code is such a mess. JC
|
||||
|
||||
#include "llpreprocessor.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLV4MATH - GNUC
|
||||
|
||||
@@ -1085,8 +1085,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
||||
U8 packed_buffer[MAX_TE_BUFFER];
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
|
||||
|
||||
S32 last_face_index = getNumTEs() - 1;
|
||||
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
|
||||
|
||||
if (client_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97") shield = 0;
|
||||
|
||||
@@ -1380,7 +1379,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
||||
return retval;
|
||||
}
|
||||
|
||||
face_count = getNumTEs();
|
||||
face_count = llmin((U32) getNumTEs(), MAX_TES);
|
||||
U32 i;
|
||||
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);
|
||||
|
||||
@@ -70,7 +70,7 @@ hasGamma(false), hasLighting(false), calculatesAtmospherics(false)
|
||||
// LLGLSL Shader implementation
|
||||
//===============================
|
||||
LLGLSLShader::LLGLSLShader(S32 shader_class)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mShaderLevel(0), mShaderGroup(SG_DEFAULT)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
|
||||
{
|
||||
LLShaderMgr::getGlobalShaderList().push_back(this);
|
||||
}
|
||||
|
||||
@@ -238,9 +238,11 @@ public:
|
||||
class LLGLSSpecular
|
||||
{
|
||||
public:
|
||||
F32 mShininess;
|
||||
LLGLSSpecular(const LLColor4& color, F32 shininess)
|
||||
{
|
||||
if (shininess > 0.0f)
|
||||
mShininess = shininess;
|
||||
if (mShininess > 0.0f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color.mV);
|
||||
S32 shiny = (S32)(shininess*128.f);
|
||||
@@ -250,8 +252,11 @@ public:
|
||||
}
|
||||
~LLGLSSpecular()
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
if (mShininess > 0.f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -795,15 +795,21 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
if (mCurrColorMask[0] != writeColorR ||
|
||||
mCurrColorMask[1] != writeColorG ||
|
||||
mCurrColorMask[2] != writeColorB ||
|
||||
mCurrColorMask[3] != writeAlpha)
|
||||
{
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
mCurrColorMask[3] = writeAlpha;
|
||||
|
||||
glColorMask(writeColorR ? GL_TRUE : GL_FALSE,
|
||||
writeColorG ? GL_TRUE : GL_FALSE,
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLRender::setSceneBlendType(eBlendType type)
|
||||
@@ -841,15 +847,19 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
if (mCurrAlphaFunc != func ||
|
||||
mCurrAlphaFuncVal != value)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ include_directories(
|
||||
)
|
||||
|
||||
set(viewer_SOURCE_FILES
|
||||
llviewerobjectbackup.cpp
|
||||
slfloatermediafilter.cpp
|
||||
floaterlocalassetbrowse.cpp
|
||||
aoremotectrl.cpp
|
||||
@@ -74,7 +75,6 @@ set(viewer_SOURCE_FILES
|
||||
ascentfloatercontactgroups.cpp
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
ascentuploadbrowser.cpp
|
||||
dhparam.cpp
|
||||
dsaparam.cpp
|
||||
emerald.cpp
|
||||
@@ -184,7 +184,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloatereditui.cpp
|
||||
llfloaterenvsettings.cpp
|
||||
llfloaterevent.cpp
|
||||
llfloaterexport.cpp
|
||||
llfloaterexploreanimations.cpp
|
||||
llfloaterexploresounds.cpp
|
||||
llfloaterfriends.cpp
|
||||
@@ -201,7 +200,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterhtmlsimple.cpp
|
||||
llfloaterhud.cpp
|
||||
llfloaterimagepreview.cpp
|
||||
llfloaterimport.cpp
|
||||
llfloaterinspect.cpp
|
||||
llfloaterjoystick.cpp
|
||||
llfloaterlagmeter.cpp
|
||||
@@ -269,7 +267,6 @@ set(viewer_SOURCE_FILES
|
||||
llhudtext.cpp
|
||||
llhudview.cpp
|
||||
llimpanel.cpp
|
||||
llimportobject.cpp
|
||||
llimview.cpp
|
||||
llinventoryactions.cpp
|
||||
llinventorybackup.cpp
|
||||
@@ -537,6 +534,7 @@ set(viewer_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
ViewerInstall.cmake
|
||||
|
||||
llviewerobjectbackup.h
|
||||
slfloatermediafilter.h
|
||||
floaterlocalassetbrowse.h
|
||||
aoremotectrl.h
|
||||
@@ -547,7 +545,6 @@ set(viewer_HEADER_FILES
|
||||
ascentfloatercontactgroups.h
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
ascentuploadbrowser.h
|
||||
emerald.h
|
||||
emeraldboobutils.h
|
||||
dofloaterhex.h
|
||||
@@ -656,7 +653,6 @@ set(viewer_HEADER_FILES
|
||||
llfloaterdirectory.h
|
||||
llfloatereditui.h
|
||||
llfloaterenvsettings.h
|
||||
llfloaterexport.h
|
||||
llfloaterexploreanimations.h
|
||||
llfloaterexploresounds.h
|
||||
llfloaterevent.h
|
||||
@@ -674,7 +670,6 @@ set(viewer_HEADER_FILES
|
||||
llfloaterhtmlsimple.h
|
||||
llfloaterhud.h
|
||||
llfloaterimagepreview.h
|
||||
llfloaterimport.h
|
||||
llfloaterinspect.h
|
||||
llfloaterjoystick.h
|
||||
llfloaterlagmeter.h
|
||||
@@ -741,7 +736,6 @@ set(viewer_HEADER_FILES
|
||||
llhudtext.h
|
||||
llhudview.h
|
||||
llimpanel.h
|
||||
llimportobject.h
|
||||
llimview.h
|
||||
llinventorybackup.h
|
||||
llinventorybridge.h
|
||||
@@ -1305,7 +1299,10 @@ add_executable(${VIEWER_BINARY_NAME}
|
||||
MACOSX_BUNDLE
|
||||
${viewer_SOURCE_FILES}
|
||||
)
|
||||
check_message_template(${VIEWER_BINARY_NAME})
|
||||
|
||||
if (!DISABLE_TEMPLATE_CHECK)
|
||||
check_message_template(${VIEWER_BINARY_NAME})
|
||||
endif (!DISABLE_TEMPLATE_CHECK)
|
||||
|
||||
if (LLKDU_LIBRARY)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
|
||||
|
||||
@@ -9,6 +9,22 @@
|
||||
<string>settings_rlv.xml</string>
|
||||
</array>
|
||||
|
||||
<key>FloaterObjectBackuptRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for the object backup floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>MediaEnableFilter</key>
|
||||
<map>
|
||||
|
||||
@@ -1,366 +0,0 @@
|
||||
/**
|
||||
* @file ascentuploadbrowser.h
|
||||
* @Author Duncan Garrett (Hg Beeks)
|
||||
* Meant as a replacement to using a system file browser for uploads.
|
||||
*
|
||||
* Created August 27 2010
|
||||
*
|
||||
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* k ilu bye
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "ascentuploadbrowser.h"
|
||||
|
||||
//UI Elements
|
||||
#include "llbutton.h" //Buttons
|
||||
#include "llcombobox.h" //Combo dropdowns
|
||||
#include "llscrolllistctrl.h" //List box for filenames
|
||||
#include "lluictrlfactory.h" //Loads the XUI
|
||||
|
||||
// project includes
|
||||
#include "llresmgr.h"
|
||||
#include "llsdserialize.h" //XML Parsing - Probably not needed
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLSD ASFloaterUploadBrowser::mUploaderSettings;
|
||||
ASFloaterUploadBrowser* ASFloaterUploadBrowser::sInstance = NULL;
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class ASFloaterUploadBrowser
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Default constructor
|
||||
ASFloaterUploadBrowser::ASFloaterUploadBrowser()
|
||||
: LLFloater(std::string("floater_upload_browser"),
|
||||
std::string("FloaterUploadRect"),
|
||||
LLStringUtil::null)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
|
||||
|
||||
mUploaderSettings.clear();
|
||||
mUploaderSettings = gSavedSettings.getLLSD("AscentUploadSettings");
|
||||
|
||||
mPathName = mUploaderSettings["ActivePath"].asString();
|
||||
if (mPathName == "None")
|
||||
mPathName = gDirUtilp->getExecutableDir();
|
||||
mFilterType = "None";
|
||||
|
||||
|
||||
//File list ------------------------------------------------------
|
||||
mFileList = getChild<LLScrollListCtrl>("file_list");
|
||||
childSetCommitCallback("file_list", onClickFile, this);
|
||||
childSetDoubleClickCallback("file_list", onDoubleClick);
|
||||
|
||||
//Above File List ------------------------------------------------
|
||||
|
||||
mBookmarkCombo = getChild<LLComboBox>("bookmark_combo");
|
||||
S32 index;
|
||||
for (index = 0; index < mUploaderSettings["Bookmarks"].size(); index++)
|
||||
{
|
||||
std::string bookmark = mUploaderSettings["Bookmarks"][index].asString();
|
||||
if (bookmark != "")
|
||||
mBookmarkCombo->add(bookmark, ADD_BOTTOM);
|
||||
}
|
||||
|
||||
mDriveCombo = getChild<LLComboBox>("drive_combo");
|
||||
childSetCommitCallback("drive_combo", onChangeDrives, this);
|
||||
//This is so unbelievably shitty I can't handle it -HgB
|
||||
std::string drive_letters[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; //Oh my god it's somehow worse now -HgB
|
||||
|
||||
mDriveCombo->removeall();
|
||||
for (index = 0; index < 26; index++)
|
||||
{
|
||||
std::string dir = drive_letters[index] + ":";
|
||||
S32 file_count = gDirUtilp->countFilesInDir(dir + gDirUtilp->getDirDelimiter(), "*.*");
|
||||
if(file_count)
|
||||
{
|
||||
mDriveCombo->add(dir, ADD_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
childSetAction("directory_button", onClickFilepathGoto, this);
|
||||
childSetCommitCallback("dir_path", onDirCommit, (void*)this);
|
||||
//Below File List ------------------------------------------------
|
||||
childSetCommitCallback("file_filter_combo", onUpdateFilter, this);
|
||||
|
||||
|
||||
refresh();
|
||||
mFileList->sortByColumn(std::string("file_name"), TRUE);
|
||||
mFileList->sortByColumn(std::string("file_type"), TRUE);
|
||||
childHide("multiple_uploads_label");
|
||||
childHide("bad_image_text");
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
ASFloaterUploadBrowser::~ASFloaterUploadBrowser()
|
||||
{
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onDirCommit(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
if (panelp)
|
||||
{
|
||||
panelp->onClickFilepathGoto(data);
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::updateBrowser(void* data, std::string new_path)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
if ((new_path != panelp->mPathName)||(new_path == ""))
|
||||
{
|
||||
panelp->mPathName = new_path;
|
||||
panelp->refresh();
|
||||
panelp->mFileList->selectFirstItem();
|
||||
panelp->childSetValue("asset_name", "");
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void ASFloaterUploadBrowser::onClickFilepathGoto(void* data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
std::string new_path = panelp->childGetValue("dir_path");
|
||||
panelp->updateBrowser(data, new_path);
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
panelp->refreshUploadOptions();
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onChangeDrives(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
if (panelp->mDriveCombo->getSelectedValue().asString() != panelp->mFilterType)
|
||||
{
|
||||
panelp->updateBrowser(user_data, panelp->mDriveCombo->getSelectedValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onUpdateFilter(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
LLComboBox* combo = panelp->getChild<LLComboBox>("file_filter_combo");
|
||||
if (combo->getSelectedValue().asString() != panelp->mFilterType)
|
||||
{
|
||||
panelp->mFilterType = "";
|
||||
panelp->mFilterType = combo->getSelectedValue().asString();
|
||||
panelp->updateBrowser(user_data, "");
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::refreshUploadOptions()
|
||||
{
|
||||
if (!mFileList->isEmpty())
|
||||
{
|
||||
if(!mFileList->getSelectedIDs().count())
|
||||
{
|
||||
llinfos << "No selection, clearing field." << llendl;
|
||||
childSetValue("asset_name", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
|
||||
{
|
||||
std::string name;
|
||||
bool show_tex = false;
|
||||
bool show_snd = false;
|
||||
bool show_anm = false;
|
||||
bool show_multiple = false;
|
||||
if (mFileList->getAllSelected().size() > 1)
|
||||
{
|
||||
|
||||
llinfos << "Selected multiple files." << llendl;
|
||||
name = "(Multiple)";
|
||||
show_multiple = true;
|
||||
/*LLButton* expand_button = getChild<LLButton>("expand_collapse_btn");
|
||||
expand_button->setLabelArg("[COST]", std::string(mFileList->getAllSelected().size() * 10));*/
|
||||
childSetValue("multiple_uploads_label", "Multiple files selected. Total cost is: " + llformat("%d", mFileList->getAllSelected().size() * 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
int type = mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger();
|
||||
llinfos << "Selected a file, type" << type << llendl;
|
||||
if (type == FILE_TEXTURE)
|
||||
{
|
||||
show_tex = true;
|
||||
}
|
||||
else if (type == FILE_SOUND)
|
||||
{
|
||||
show_snd = true;
|
||||
}
|
||||
else if (type == FILE_ANIMATION)
|
||||
{
|
||||
show_anm = true;
|
||||
}
|
||||
name = mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
|
||||
}
|
||||
childSetVisible("texture_preview_label", (show_tex && !show_multiple));
|
||||
childSetVisible("texture_preview_combo", (show_tex && !show_multiple));
|
||||
childSetVisible("multiple_uploads_label", show_multiple);
|
||||
childSetValue("asset_name", name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onDoubleClick(void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
panelp->handleDoubleClick();
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::handleDoubleClick()
|
||||
{
|
||||
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_PARENT)
|
||||
{
|
||||
S32 dirLimiterIndex = mPathName.find_last_of(gDirUtilp->getDirDelimiter());
|
||||
mPathName = mPathName.substr(0, dirLimiterIndex);
|
||||
refresh();
|
||||
mFileList->selectFirstItem();
|
||||
}
|
||||
else if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER)
|
||||
{
|
||||
//Make sure that it's an actual folder so you don't get stuck - Specifically meant for files with no extension. -HgB
|
||||
std::string new_path = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
S32 file_count = gDirUtilp->countFilesInDir(new_path, "*.*");
|
||||
if(!file_count)
|
||||
return;
|
||||
mPathName = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
refresh();
|
||||
mFileList->selectFirstItem();
|
||||
|
||||
}
|
||||
childSetValue("asset_name", "");
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::refresh()
|
||||
{
|
||||
std::string filename;
|
||||
std::string fullPath = mPathName + gDirUtilp->getDirDelimiter();
|
||||
mFileList->deselectAllItems();
|
||||
mFileList->deleteAllItems();
|
||||
childSetValue("dir_path", gDirUtilp->getDirName(fullPath));
|
||||
mUploaderSettings["ActivePath"] = mPathName;
|
||||
gSavedSettings.setLLSD("AscentUploadSettings", mUploaderSettings);
|
||||
gDirUtilp->getNextFileInDir(gDirUtilp->getChatLogsDir(),"*", filename, false); //Clears the last file
|
||||
bool found = true;
|
||||
S32 file_count = 0;
|
||||
while(found)
|
||||
{
|
||||
found = gDirUtilp->getNextFileInDir(fullPath, "*.*", filename, false);
|
||||
if(found)
|
||||
{
|
||||
S32 periodIndex = filename.find_last_of(".");
|
||||
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
|
||||
std::string extensionL = utf8str_tolower(extension);
|
||||
LLSD element;
|
||||
element["path"] = mPathName + filename;
|
||||
|
||||
LLSD& filename_column = element["columns"][LIST_FILE_NAME];
|
||||
filename_column["column"] = "file_name";
|
||||
filename_column["font"] = "SANSSERIF";
|
||||
filename_column["font-style"] = "NORMAL";
|
||||
|
||||
LLSD& filetype_column = element["columns"][LIST_FILE_TYPE];
|
||||
filetype_column["column"] = "file_type";
|
||||
filetype_column["type"] = "number";
|
||||
|
||||
LLSD& assettype_column = element["columns"][LIST_ASSET_TYPE];
|
||||
assettype_column["column"] = "asset_type";
|
||||
assettype_column["type"] = "number";
|
||||
|
||||
LLSD& invtype_column = element["columns"][LIST_INVENTORY_TYPE];
|
||||
invtype_column["column"] = "icon_inventory_type";
|
||||
invtype_column["type"] = "icon";
|
||||
invtype_column["value"] = "inv_folder_trash.tga";
|
||||
|
||||
|
||||
if (((extensionL == "jpeg")||(extensionL == "jpg")||(extensionL == "tga")
|
||||
||(extensionL == "png")||(extensionL == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_texture.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_TEXTURE;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
|
||||
}
|
||||
else if ((extensionL == "wav")&&((mFilterType == "None")||(mFilterType == "Sound")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_sound.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_SOUND;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if (((extensionL == "bvh")||(extensionL == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_animation.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_ANIMATION;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if ((extension == filename.substr(0, filename.length() - 1))&&(filename != "."))
|
||||
{
|
||||
std::string test_path = mPathName + gDirUtilp->getDirDelimiter() + filename + gDirUtilp->getDirDelimiter();
|
||||
S32 file_count = gDirUtilp->countFilesInDir(test_path, "*.*");
|
||||
if(file_count)
|
||||
{
|
||||
invtype_column["value"] = "inv_folder_plain_closed.tga";
|
||||
filename_column["value"] = filename;
|
||||
filetype_column["value"] = FOLDER;
|
||||
assettype_column["value"] = LIST_TYPE_FOLDER;
|
||||
}
|
||||
}
|
||||
else if (filename == "..")
|
||||
{
|
||||
invtype_column["value"] = "inv_folder_plain_open.tga";
|
||||
filename_column["value"] = filename;
|
||||
filetype_column["value"] = FOLDER;
|
||||
assettype_column["value"] = LIST_TYPE_PARENT;
|
||||
}
|
||||
if (invtype_column["value"].asString() != "inv_folder_trash.tga")
|
||||
{
|
||||
mFileList->addElement(element, ADD_BOTTOM);
|
||||
if (assettype_column["value"].asInteger() == LIST_TYPE_FILE)
|
||||
{
|
||||
file_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string result;
|
||||
LLResMgr::getInstance()->getIntegerString(result, file_count);
|
||||
if (result == "")
|
||||
result = "0";
|
||||
childSetTextArg("result_label", "[COUNT]", result);
|
||||
|
||||
mFileList->sortItems();
|
||||
llinfos << "Total files loaded: " << result << "." << llendl;
|
||||
}
|
||||
|
||||
// static
|
||||
void ASFloaterUploadBrowser::show(void*)
|
||||
{
|
||||
if (!sInstance)
|
||||
{
|
||||
sInstance = new ASFloaterUploadBrowser();
|
||||
}
|
||||
|
||||
sInstance->open(); /*Flawfinder: ignore*/
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* @file ascentuploadbrowser.h
|
||||
* @Author Duncan Garrett
|
||||
* Meant as a replacement to using Windows' file browser for uploads.
|
||||
*
|
||||
* Created August 27 2010
|
||||
*
|
||||
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* k ilu bye
|
||||
*/
|
||||
|
||||
#ifndef ASCENT_UPLOAD_BROWSER
|
||||
#define ASCENT_UPLOAD_BROWSER
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llcombobox.h"
|
||||
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class ASFloaterUploadBrowser : public LLFloater
|
||||
{
|
||||
public:
|
||||
using LLFloater::handleDoubleClick;
|
||||
|
||||
ASFloaterUploadBrowser();
|
||||
virtual ~ASFloaterUploadBrowser();
|
||||
//File list
|
||||
static void onClickFile(LLUICtrl* ctrl, void* user_data);
|
||||
static void onUpdateFilter(LLUICtrl* ctrl, void* user_data);
|
||||
static void onDoubleClick(void* user_data);
|
||||
static void onDirCommit (LLUICtrl* ctrl, void* data);
|
||||
static void onChangeDrives(LLUICtrl* ctrl, void* user_data);
|
||||
static void onClickFilepathGoto(void* data);
|
||||
|
||||
void updateBrowser(void* data, std::string new_path);
|
||||
void refresh();
|
||||
void refreshUploadOptions();
|
||||
void handleDoubleClick();
|
||||
static void show(void*);
|
||||
|
||||
std::vector<LLSD> datas;
|
||||
|
||||
private:
|
||||
static LLSD mUploaderSettings;
|
||||
static ASFloaterUploadBrowser* sInstance;
|
||||
enum FILE_COLUMN_ORDER
|
||||
{
|
||||
LIST_FILE_TYPE,
|
||||
LIST_ASSET_TYPE,
|
||||
LIST_INVENTORY_TYPE,
|
||||
LIST_FILE_NAME,
|
||||
LIST_DATA
|
||||
};
|
||||
enum FILE_TYPE_ORDER
|
||||
{
|
||||
LIST_TYPE_PARENT,
|
||||
LIST_TYPE_FOLDER,
|
||||
LIST_TYPE_FILE
|
||||
};
|
||||
enum FILE_TYPE
|
||||
{
|
||||
FOLDER,
|
||||
FILE_TEXTURE,
|
||||
FILE_SOUND,
|
||||
FILE_ANIMATION
|
||||
};
|
||||
LLScrollListCtrl* mFileList;
|
||||
LLComboBox* mDriveCombo;
|
||||
LLComboBox* mBookmarkCombo;
|
||||
|
||||
std::string mPathName;
|
||||
std::string mFilterType;
|
||||
};
|
||||
|
||||
|
||||
#endif // ASCENT_UPLOAD_BROWSER
|
||||
@@ -302,6 +302,8 @@ NVIDIA GeForce 6700 .*NVIDIA.*GeForce 67.* 2 1
|
||||
NVIDIA GeForce 6800 .*NVIDIA.*GeForce 68.* 2 1
|
||||
NVIDIA GeForce 7000M .*NVIDIA.*GeForce 7000M.* 0 1
|
||||
NVIDIA GeForce 7100M .*NVIDIA.*GeForce 7100M.* 0 1
|
||||
NVIDIA GeForce 7000 .*NVIDIA.*GeForce 70.* 0 1
|
||||
NVIDIA GeForce 7100 .*NVIDIA.*GeForce 71.* 0 1
|
||||
NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1
|
||||
NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1
|
||||
NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1
|
||||
@@ -389,8 +391,39 @@ NVIDIA MCP78 .*NVIDIA.*MCP78.* 1 1
|
||||
NVIDIA Quadro2 .*Quadro2.* 0 1
|
||||
NVIDIA Quadro4 .*Quadro4.* 0 1
|
||||
NVIDIA Quadro DCC .*Quadro DCC.* 0 1
|
||||
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 3 1
|
||||
NVIDIA Quadro FX 1400 .*Quadro.*FX.*1400.* 1 1
|
||||
NVIDIA Quadro FX 1500 .*Quadro.*FX.*1500.* 1 1
|
||||
NVIDIA Quadro FX 1700 .*Quadro.*FX.*1700.* 2 1
|
||||
NVIDIA Quadro FX 1800 .*Quadro.*FX.*1800.* 2 1
|
||||
NVIDIA Quadro FX 3400 .*Quadro.*FX.*3400.* 1 1
|
||||
NVIDIA Quadro FX 3450 .*Quadro.*FX.*3450.* 1 1
|
||||
NVIDIA Quadro FX 3500 .*Quadro.*FX.*3500.* 1 1
|
||||
NVIDIA Quadro FX 3700 .*Quadro.*FX.*3700.* 2 1
|
||||
NVIDIA Quadro FX 3800 .*Quadro.*FX.*3800.* 2 1
|
||||
NVIDIA Quadro FX 370 .*Quadro.*FX.*370.* 2 1
|
||||
NVIDIA Quadro FX 380 .*Quadro.*FX.*380.* 2 1
|
||||
NVIDIA Quadro FX 4000 .*Quadro.*FX.*4000.* 1 1
|
||||
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 1 1
|
||||
NVIDIA Quadro FX 4600 .*Quadro.*FX.*4600.* 2 1
|
||||
NVIDIA Quadro FX 4700 .*Quadro.*FX.*4700.* 2 1
|
||||
NVIDIA Quadro FX 4800 .*Quadro.*FX.*4800.* 2 1
|
||||
NVIDIA Quadro FX 470 .*Quadro.*FX.*470.* 2 1
|
||||
NVIDIA Quadro FX 5500 .*Quadro.*FX.*5500.* 1 1
|
||||
NVIDIA Quadro FX 5600 .*Quadro.*FX.*5600.* 2 1
|
||||
NVIDIA Quadro FX 5700 .*Quadro.*FX.*5700.* 2 1
|
||||
NVIDIA Quadro FX 5800 .*Quadro.*FX.*5800.* 2 1
|
||||
NVIDIA Quadro FX 540 .*Quadro.*FX.*540.* 1 1
|
||||
NVIDIA Quadro FX 550 .*Quadro.*FX.*550.* 1 1
|
||||
NVIDIA Quadro FX 560 .*Quadro.*FX.*560.* 1 1
|
||||
NVIDIA Quadro FX 570 .*Quadro.*FX.*570.* 2 1
|
||||
NVIDIA Quadro FX 580 .*Quadro.*FX.*580.* 2 1
|
||||
NVIDIA Quadro FX .*Quadro FX.* 1 1
|
||||
NVIDIA Quadro VX 200 .*Quadro VX.*200.* 2 1
|
||||
NVIDIA Quadro 2000 .*Quadro.*2000.* 2 1
|
||||
NVIDIA Quadro 4000 .*Quadro.*4000.* 2 1
|
||||
NVIDIA Quadro 5000 .*Quadro.*5000.* 2 1
|
||||
NVIDIA Quadro 6000 .*Quadro.*6000.* 2 1
|
||||
NVIDIA Quadro 600 .*Quadro.*600.* 2 1
|
||||
NVIDIA Quadro NVS .*Quadro NVS.* 0 1
|
||||
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
|
||||
NVIDIA PCI .*NVIDIA.*/PCI/SSE2 0 0
|
||||
|
||||
@@ -450,8 +450,6 @@ static void settings_to_globals()
|
||||
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
|
||||
LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale");
|
||||
LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips");
|
||||
|
||||
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
|
||||
}
|
||||
|
||||
static void settings_modify()
|
||||
@@ -738,6 +736,9 @@ bool LLAppViewer::init()
|
||||
gGLActive = TRUE;
|
||||
initWindow();
|
||||
|
||||
// initWindow also initializes the Feature List, so now we can initialize this global.
|
||||
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
|
||||
|
||||
// call all self-registered classes
|
||||
LLInitClassList::instance().fireCallbacks();
|
||||
|
||||
|
||||
@@ -596,23 +596,26 @@ void LLFace::printDebugInfo() const
|
||||
llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl;
|
||||
llinfos << llendl;
|
||||
|
||||
poolp->printDebugInfo();
|
||||
|
||||
S32 pool_references = 0;
|
||||
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
|
||||
iter != poolp->mReferences.end(); iter++)
|
||||
if (poolp)
|
||||
{
|
||||
LLFace *facep = *iter;
|
||||
if (facep == this)
|
||||
poolp->printDebugInfo();
|
||||
|
||||
S32 pool_references = 0;
|
||||
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
|
||||
iter != poolp->mReferences.end(); iter++)
|
||||
{
|
||||
llinfos << "Pool reference: " << pool_references << llendl;
|
||||
pool_references++;
|
||||
LLFace *facep = *iter;
|
||||
if (facep == this)
|
||||
{
|
||||
llinfos << "Pool reference: " << pool_references << llendl;
|
||||
pool_references++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pool_references != 1)
|
||||
{
|
||||
llinfos << "Incorrect number of pool references!" << llendl;
|
||||
if (pool_references != 1)
|
||||
{
|
||||
llinfos << "Incorrect number of pool references!" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -581,10 +581,26 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart )
|
||||
item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem(mType);
|
||||
U32 perm_mask = 0x0;
|
||||
BOOL is_complete = FALSE;
|
||||
bool can_export = false;
|
||||
bool can_import = false;
|
||||
if(item)
|
||||
{
|
||||
perm_mask = item->getPermissions().getMaskOwner();
|
||||
is_complete = item->isComplete();
|
||||
|
||||
if (subpart <= 18) // body parts only
|
||||
{
|
||||
can_import = true;
|
||||
|
||||
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;
|
||||
@@ -608,7 +624,8 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart )
|
||||
}
|
||||
gFloaterCustomize->generateVisualParamHints(NULL, sorted_params);
|
||||
gFloaterCustomize->updateScrollingPanelUI();
|
||||
|
||||
gFloaterCustomize->childSetEnabled("Export", can_export);
|
||||
gFloaterCustomize->childSetEnabled("Import", can_import);
|
||||
|
||||
// Update the camera
|
||||
gMorphView->setCameraTargetJoint( gAgent.getAvatarObject()->getJoint( part->mTargetJoint ) );
|
||||
@@ -1700,17 +1717,11 @@ BOOL LLFloaterCustomize::postBuild()
|
||||
childSetAction("Make Outfit", LLFloaterCustomize::onBtnMakeOutfit, (void*)this);
|
||||
childSetAction("Ok", LLFloaterCustomize::onBtnOk, (void*)this);
|
||||
childSetAction("Cancel", LLFloater::onClickClose, (void*)this);
|
||||
// OGPX : if using agent domain, disable saving appearance until inventory and assets is working
|
||||
// since it doesn't work in OGP right now, disable it, since enabling it hits an error case.
|
||||
// OGPX TODO: test with it enabled with Agent Domain that manages Inventory and Assets
|
||||
// This was originally added as part of OGP9 svn branch because the viewer deeply deeply
|
||||
// assumes that there *will* be an inventory there. If you never get an inventory,
|
||||
// Make Outfit breaks badly.
|
||||
//if (!gSavedSettings.getString("CmdLineRegionURI").empty())
|
||||
//{
|
||||
// childSetEnabled("Make Outfit", FALSE);
|
||||
//}
|
||||
|
||||
// reX
|
||||
childSetAction("Import", LLFloaterCustomize::onBtnImport, (void*)this);
|
||||
childSetAction("Export", LLFloaterCustomize::onBtnExport, (void*)this);
|
||||
|
||||
// Wearable panels
|
||||
initWearablePanels();
|
||||
|
||||
@@ -1779,6 +1790,128 @@ void LLFloaterCustomize::setCurrentWearableType( EWearableType type )
|
||||
}
|
||||
}
|
||||
|
||||
// reX: new function
|
||||
void LLFloaterCustomize::onBtnImport( void* userdata )
|
||||
{
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if( !file_picker.getOpenFile( LLFilePicker::FFLOAD_XML ) )
|
||||
{
|
||||
// User canceled import.
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string filename = file_picker.getFirstFile();
|
||||
|
||||
FILE* fp = LLFile::fopen(filename, "rb");
|
||||
|
||||
//char text_buffer[2048]; /* Flawfinder: ignore */
|
||||
S32 c;
|
||||
S32 typ;
|
||||
S32 count;
|
||||
S32 param_id=0;
|
||||
F32 param_weight=0;
|
||||
S32 fields_read;
|
||||
|
||||
for( S32 i=0; i < WT_COUNT; i++ )
|
||||
{
|
||||
fields_read = fscanf( fp, "type %d\n", &typ);
|
||||
if( fields_read != 1 )
|
||||
{
|
||||
llwarns << "Bad asset type: early end of file" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
fields_read = fscanf( fp, "parameters %d\n", &count);
|
||||
if( fields_read != 1 )
|
||||
{
|
||||
llwarns << "Bad parameters : early end of file" << llendl;
|
||||
return;
|
||||
}
|
||||
for(c=0;c<count;c++)
|
||||
{
|
||||
fields_read = fscanf( fp, "%d %f\n", ¶m_id, ¶m_weight );
|
||||
if( fields_read != 2 )
|
||||
{
|
||||
llwarns << "Bad parameters list: early end of file" << llendl;
|
||||
return;
|
||||
}
|
||||
gAgent.getAvatarObject()->setVisualParamWeight( param_id, param_weight, TRUE);
|
||||
gAgent.getAvatarObject()->updateVisualParams();
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
// reX: new function
|
||||
void LLFloaterCustomize::onBtnExport( void* userdata )
|
||||
{
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_XML ) )
|
||||
{
|
||||
// User canceled export.
|
||||
return;
|
||||
}
|
||||
|
||||
LLViewerInventoryItem* item;
|
||||
BOOL is_modifiable;
|
||||
|
||||
const std::string filename = file_picker.getFirstFile();
|
||||
|
||||
FILE* fp = LLFile::fopen(filename, "wb");
|
||||
|
||||
for( S32 i=0; i < WT_COUNT; i++ )
|
||||
{
|
||||
is_modifiable = FALSE;
|
||||
LLWearable* old_wearable = gAgent.getWearable((EWearableType)i);
|
||||
if( old_wearable )
|
||||
{
|
||||
item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem((EWearableType)i);
|
||||
if(item)
|
||||
{
|
||||
const LLPermissions& perm = item->getPermissions();
|
||||
is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
|
||||
}
|
||||
}
|
||||
if (is_modifiable)
|
||||
{
|
||||
old_wearable->FileExportParams(fp);
|
||||
}
|
||||
if (!is_modifiable)
|
||||
{
|
||||
fprintf( fp, "type %d\n",i);
|
||||
fprintf( fp, "parameters 0\n");
|
||||
}
|
||||
}
|
||||
|
||||
for( S32 i=0; i < WT_COUNT; i++ )
|
||||
{
|
||||
is_modifiable = FALSE;
|
||||
LLWearable* old_wearable = gAgent.getWearable((EWearableType)i);
|
||||
if( old_wearable )
|
||||
{
|
||||
item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem((EWearableType)i);
|
||||
if(item)
|
||||
{
|
||||
const LLPermissions& perm = item->getPermissions();
|
||||
is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
|
||||
}
|
||||
}
|
||||
if (is_modifiable)
|
||||
{
|
||||
old_wearable->FileExportTextures(fp);
|
||||
}
|
||||
if (!is_modifiable)
|
||||
{
|
||||
fprintf( fp, "type %d\n",i);
|
||||
fprintf( fp, "textures 0\n");
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterCustomize::onBtnOk( void* userdata )
|
||||
{
|
||||
|
||||
@@ -109,6 +109,8 @@ public:
|
||||
static void onBtnOk( void* userdata );
|
||||
static void onBtnMakeOutfit( void* userdata );
|
||||
static void onMakeOutfitCommit( LLMakeOutfitDialog* dialog, void* userdata );
|
||||
static void onBtnImport( void* userdata );
|
||||
static void onBtnExport( void* userdata );
|
||||
|
||||
static void onTabChanged( void* userdata, bool from_click );
|
||||
static void onTabPrecommit( void* userdata, bool from_click );
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
|
||||
static const size_t num_collision_sounds = 28;
|
||||
static const size_t num_collision_sounds = 29;
|
||||
const LLUUID collision_sounds[num_collision_sounds] =
|
||||
{
|
||||
LLUUID("dce5fdd4-afe4-4ea1-822f-dd52cac46b08"),
|
||||
@@ -42,7 +42,8 @@ const LLUUID collision_sounds[num_collision_sounds] =
|
||||
LLUUID("be582e5d-b123-41a2-a150-454c39e961c8"),
|
||||
LLUUID("c70141d4-ba06-41ea-bcbc-35ea81cb8335"),
|
||||
LLUUID("7d1826f4-24c4-4aac-8c2e-eff45df37783"),
|
||||
LLUUID("063c97d3-033a-4e9b-98d8-05c8074922cb")
|
||||
LLUUID("063c97d3-033a-4e9b-98d8-05c8074922cb"),
|
||||
LLUUID("e8af4a28-aa83-4310-a7c4-c047e15ea0df") //Step sound
|
||||
};
|
||||
|
||||
LLFloaterExploreSounds* LLFloaterExploreSounds::sInstance;
|
||||
|
||||
@@ -1,906 +0,0 @@
|
||||
// <edit>
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloaterexport.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llchat.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfilepicker.h"
|
||||
#include "llagent.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvoavatardefines.h"
|
||||
#include "llimportobject.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "lltexturecache.h"
|
||||
#include "llimage.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llimagej2c.h"
|
||||
|
||||
std::vector<LLFloaterExport*> LLFloaterExport::instances;
|
||||
|
||||
class CacheReadResponder : public LLTextureCache::ReadResponder
|
||||
{
|
||||
public:
|
||||
CacheReadResponder(const LLUUID& id, const std::string& filename)
|
||||
: mID(id)
|
||||
{
|
||||
mFormattedImage = new LLImageJ2C;
|
||||
setImage(mFormattedImage);
|
||||
mFilename = filename;
|
||||
}
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
|
||||
{
|
||||
if(imageformat==IMG_CODEC_TGA && mFormattedImage->getCodec()==IMG_CODEC_J2C)
|
||||
{
|
||||
llwarns<<"Bleh its a tga not saving"<<llendl;
|
||||
mFormattedImage=NULL;
|
||||
mImageSize=0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFormattedImage.notNull())
|
||||
{
|
||||
llassert_always(mFormattedImage->getCodec() == imageformat);
|
||||
mFormattedImage->appendData(data, datasize);
|
||||
}
|
||||
else
|
||||
{
|
||||
mFormattedImage = LLImageFormatted::createFromType(imageformat);
|
||||
mFormattedImage->setData(data,datasize);
|
||||
}
|
||||
mImageSize = imagesize;
|
||||
mImageLocal = imagelocal;
|
||||
}
|
||||
|
||||
virtual void completed(bool success)
|
||||
{
|
||||
if(success && (mFormattedImage.notNull()) && mImageSize>0)
|
||||
{
|
||||
|
||||
llinfos << "SUCCESS getting texture "<<mID<< llendl;
|
||||
|
||||
llinfos << "Saving to "<< mFilename<<llendl;
|
||||
|
||||
if(!mFormattedImage->save(mFilename))
|
||||
{
|
||||
llinfos << "FAIL saving texture "<<mID<< llendl;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!success)
|
||||
llwarns << "FAIL NOT SUCCESSFUL getting texture "<<mID<< llendl;
|
||||
if(mFormattedImage.isNull())
|
||||
llwarns << "FAIL image is NULL "<<mID<< llendl;
|
||||
}
|
||||
}
|
||||
private:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
LLUUID mID;
|
||||
std::string mFilename;
|
||||
};
|
||||
|
||||
|
||||
LLExportable::LLExportable(LLViewerObject* object, std::string name, std::map<U32,std::string>& primNameMap)
|
||||
: mObject(object),
|
||||
mType(EXPORTABLE_OBJECT),
|
||||
mPrimNameMap(&primNameMap)
|
||||
{
|
||||
}
|
||||
|
||||
LLExportable::LLExportable(LLVOAvatar* avatar, EWearableType type, std::map<U32,std::string>& primNameMap)
|
||||
: mAvatar(avatar),
|
||||
mType(EXPORTABLE_WEARABLE),
|
||||
mWearableType(type),
|
||||
mPrimNameMap(&primNameMap)
|
||||
{
|
||||
}
|
||||
|
||||
LLSD LLExportable::asLLSD()
|
||||
{
|
||||
if(mType == EXPORTABLE_OBJECT)
|
||||
{
|
||||
std::list<LLViewerObject*> prims;
|
||||
|
||||
prims.push_back(mObject);
|
||||
|
||||
LLViewerObject::child_list_t child_list = mObject->getChildren();
|
||||
for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i)
|
||||
{
|
||||
LLViewerObject* child = *i;
|
||||
if(child->getPCode() < LL_PCODE_APP)
|
||||
{
|
||||
prims.push_back(child);
|
||||
}
|
||||
}
|
||||
|
||||
LLSD llsd;
|
||||
|
||||
std::list<LLViewerObject*>::iterator prim_iter = prims.begin();
|
||||
std::list<LLViewerObject*>::iterator prims_end = prims.end();
|
||||
for( ; prim_iter != prims_end; ++prim_iter)
|
||||
{
|
||||
LLViewerObject* object = (*prim_iter);
|
||||
|
||||
LLSD prim_llsd;
|
||||
|
||||
prim_llsd["type"] = "prim";
|
||||
|
||||
if (!object->isRoot())
|
||||
{
|
||||
if(!object->getSubParent()->isAvatar())
|
||||
{
|
||||
// Parent id
|
||||
prim_llsd["parent"] = llformat("%d", object->getSubParent()->getLocalID());
|
||||
}
|
||||
}
|
||||
if(object->getSubParent())
|
||||
{
|
||||
if(object->getSubParent()->isAvatar())
|
||||
{
|
||||
// attachment-specific
|
||||
U8 state = object->getState();
|
||||
S32 attachpt = ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4)));
|
||||
prim_llsd["attach"] = attachpt;
|
||||
}
|
||||
}
|
||||
|
||||
// Transforms
|
||||
prim_llsd["position"] = object->getPosition().getValue();
|
||||
prim_llsd["scale"] = object->getScale().getValue();
|
||||
prim_llsd["rotation"] = ll_sd_from_quaternion(object->getRotation());
|
||||
|
||||
// Flags
|
||||
prim_llsd["shadows"] = object->flagCastShadows();
|
||||
prim_llsd["phantom"] = object->flagPhantom();
|
||||
prim_llsd["physical"] = (BOOL)(object->mFlags & FLAGS_USE_PHYSICS);
|
||||
|
||||
// Volume params
|
||||
LLVolumeParams params = object->getVolume()->getParams();
|
||||
prim_llsd["volume"] = params.asLLSD();
|
||||
|
||||
// Extra params
|
||||
if (object->isFlexible())
|
||||
{
|
||||
// Flexible
|
||||
LLFlexibleObjectData* flex = (LLFlexibleObjectData*)object->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
|
||||
prim_llsd["flexible"] = flex->asLLSD();
|
||||
}
|
||||
if (object->getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT))
|
||||
{
|
||||
// Light
|
||||
LLLightParams* light = (LLLightParams*)object->getParameterEntry(LLNetworkData::PARAMS_LIGHT);
|
||||
prim_llsd["light"] = light->asLLSD();
|
||||
}
|
||||
if (object->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT))
|
||||
{
|
||||
// Sculpt
|
||||
LLSculptParams* sculpt = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
|
||||
prim_llsd["sculpt"] = sculpt->asLLSD();
|
||||
}
|
||||
|
||||
// Textures
|
||||
LLSD te_llsd;
|
||||
U8 te_count = object->getNumTEs();
|
||||
for (U8 i = 0; i < te_count; i++)
|
||||
{
|
||||
te_llsd.append(object->getTE(i)->asLLSD());
|
||||
}
|
||||
prim_llsd["textures"] = te_llsd;
|
||||
|
||||
std::map<U32,std::string>::iterator pos = (*mPrimNameMap).find(object->getLocalID());
|
||||
if(pos != (*mPrimNameMap).end())
|
||||
prim_llsd["name"] = (*mPrimNameMap)[object->getLocalID()];
|
||||
|
||||
llsd[llformat("%d", object->getLocalID())] = prim_llsd;
|
||||
}
|
||||
|
||||
return llsd;
|
||||
}
|
||||
else if(mType == EXPORTABLE_WEARABLE)
|
||||
{
|
||||
LLSD llsd; // pointless map with single key/value
|
||||
|
||||
LLSD item_sd; // map for wearable
|
||||
|
||||
item_sd["type"] = "wearable";
|
||||
|
||||
S32 type_s32 = (S32)mWearableType;
|
||||
std::string wearable_name = LLWearable::typeToTypeName( mWearableType );
|
||||
|
||||
item_sd["name"] = mAvatar->getFullname() + " " + wearable_name;
|
||||
item_sd["wearabletype"] = type_s32;
|
||||
|
||||
LLSD param_map;
|
||||
|
||||
for( LLVisualParam* param = mAvatar->getFirstVisualParam(); param; param = mAvatar->getNextVisualParam() )
|
||||
{
|
||||
LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
|
||||
if( (viewer_param->getWearableType() == type_s32) &&
|
||||
(viewer_param->isTweakable()) )
|
||||
{
|
||||
param_map[llformat("%d", viewer_param->getID())] = viewer_param->getWeight();
|
||||
}
|
||||
}
|
||||
|
||||
item_sd["params"] = param_map;
|
||||
|
||||
LLSD textures_map;
|
||||
|
||||
for( S32 te = 0; te < LLVOAvatarDefines::TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( (LLVOAvatarDefines::ETextureIndex)te ) == mWearableType )
|
||||
{
|
||||
LLViewerImage* te_image = mAvatar->getTEImage( te );
|
||||
if( te_image )
|
||||
{
|
||||
textures_map[llformat("%d", te)] = te_image->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item_sd["textures"] = textures_map;
|
||||
|
||||
// Generate a unique ID for it...
|
||||
LLUUID myid;
|
||||
myid.generate();
|
||||
|
||||
llsd[myid.asString()] = item_sd;
|
||||
|
||||
return llsd;
|
||||
}
|
||||
return LLSD();
|
||||
}
|
||||
|
||||
|
||||
|
||||
LLFloaterExport::LLFloaterExport()
|
||||
: LLFloater()
|
||||
{
|
||||
mSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_export.xml");
|
||||
LLFloaterExport::instances.push_back(this);
|
||||
}
|
||||
|
||||
|
||||
LLFloaterExport::~LLFloaterExport()
|
||||
{
|
||||
std::vector<LLFloaterExport*>::iterator pos = std::find(LLFloaterExport::instances.begin(), LLFloaterExport::instances.end(), this);
|
||||
if(pos != LLFloaterExport::instances.end())
|
||||
{
|
||||
LLFloaterExport::instances.erase(pos);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterExport::postBuild(void)
|
||||
{
|
||||
if(!mSelection) return TRUE;
|
||||
if(mSelection->getRootObjectCount() < 1) return TRUE;
|
||||
|
||||
// New stuff: Populate prim name map
|
||||
|
||||
for (LLObjectSelection::valid_iterator iter = mSelection->valid_begin();
|
||||
iter != mSelection->valid_end(); iter++)
|
||||
{
|
||||
LLSelectNode* nodep = *iter;
|
||||
LLViewerObject* objectp = nodep->getObject();
|
||||
U32 localid = objectp->getLocalID();
|
||||
std::string name = nodep->mName;
|
||||
mPrimNameMap[localid] = name;
|
||||
}
|
||||
|
||||
// Older stuff
|
||||
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("export_list");
|
||||
|
||||
std::map<LLViewerObject*, bool> avatars;
|
||||
|
||||
for (LLObjectSelection::valid_root_iterator iter = mSelection->valid_root_begin();
|
||||
iter != mSelection->valid_root_end(); iter++)
|
||||
{
|
||||
LLSelectNode* nodep = *iter;
|
||||
LLViewerObject* objectp = nodep->getObject();
|
||||
std::string objectp_id = llformat("%d", objectp->getLocalID());
|
||||
|
||||
if(list->getItemIndex(objectp->getID()) == -1)
|
||||
{
|
||||
bool is_attachment = false;
|
||||
bool is_root = true;
|
||||
LLViewerObject* parentp = objectp->getSubParent();
|
||||
if(parentp)
|
||||
{
|
||||
if(!parentp->isAvatar())
|
||||
{
|
||||
// parent is a prim I guess
|
||||
is_root = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// parent is an avatar
|
||||
is_attachment = true;
|
||||
if(!avatars[parentp]) avatars[parentp] = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_prim = true;
|
||||
if(objectp->getPCode() >= LL_PCODE_APP)
|
||||
{
|
||||
is_prim = false;
|
||||
}
|
||||
|
||||
bool is_avatar = objectp->isAvatar();
|
||||
|
||||
|
||||
if(is_root && is_prim)
|
||||
{
|
||||
LLSD element;
|
||||
element["id"] = objectp->getID();
|
||||
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = true;
|
||||
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_object.tga";
|
||||
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
if(is_attachment)
|
||||
name_column["value"] = nodep->mName + " (worn on " + utf8str_tolower(objectp->getAttachmentPointName()) + ")";
|
||||
else
|
||||
name_column["value"] = nodep->mName;
|
||||
|
||||
LLSD& avatarid_column = element["columns"][LIST_AVATARID];
|
||||
avatarid_column["column"] = "avatarid";
|
||||
if(is_attachment)
|
||||
avatarid_column["value"] = parentp->getID();
|
||||
else
|
||||
avatarid_column["value"] = LLUUID::null;
|
||||
|
||||
LLExportable* exportable = new LLExportable(objectp, nodep->mName, mPrimNameMap);
|
||||
mExportables[objectp->getID()] = exportable->asLLSD();
|
||||
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
|
||||
addToPrimList(objectp);
|
||||
}
|
||||
else if(is_avatar)
|
||||
{
|
||||
if(!avatars[objectp])
|
||||
{
|
||||
avatars[objectp] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
std::map<LLViewerObject*, bool>::iterator avatar_iter = avatars.begin();
|
||||
std::map<LLViewerObject*, bool>::iterator avatars_end = avatars.end();
|
||||
for( ; avatar_iter != avatars_end; avatar_iter++)
|
||||
{
|
||||
LLViewerObject* avatar = (*avatar_iter).first;
|
||||
addAvatarStuff((LLVOAvatar*)avatar);
|
||||
}
|
||||
|
||||
updateNamesProgress();
|
||||
|
||||
childSetAction("select_all_btn", onClickSelectAll, this);
|
||||
childSetAction("select_objects_btn", onClickSelectObjects, this);
|
||||
childSetAction("select_wearables_btn", onClickSelectWearables, this);
|
||||
|
||||
childSetAction("save_as_btn", onClickSaveAs, this);
|
||||
childSetAction("make_copy_btn", onClickMakeCopy, this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterExport::addAvatarStuff(LLVOAvatar* avatarp)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("export_list");
|
||||
for( S32 type = WT_SHAPE; type < WT_COUNT; type++ )
|
||||
{
|
||||
// guess whether this wearable actually exists
|
||||
// by checking whether it has any textures that aren't default
|
||||
bool exists = false;
|
||||
if(type == WT_SHAPE)
|
||||
{
|
||||
exists = true;
|
||||
}
|
||||
else if (type == WT_ALPHA || type == WT_TATTOO) //alpha layers and tattos are unsupported for now
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( S32 te = 0; te < LLVOAvatarDefines::TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( (S32)LLVOAvatar::getTEWearableType( (LLVOAvatarDefines::ETextureIndex)te ) == type )
|
||||
{
|
||||
LLViewerImage* te_image = avatarp->getTEImage( te );
|
||||
if( te_image->getID() != IMG_DEFAULT_AVATAR)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(exists)
|
||||
{
|
||||
std::string wearable_name = LLWearable::typeToTypeName( (EWearableType)type );
|
||||
std::string name = avatarp->getFullname() + " " + wearable_name;
|
||||
LLUUID myid;
|
||||
myid.generate();
|
||||
|
||||
LLSD element;
|
||||
element["id"] = myid;
|
||||
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = false;
|
||||
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_" + wearable_name + ".tga";
|
||||
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
name_column["value"] = name;
|
||||
|
||||
LLSD& avatarid_column = element["columns"][LIST_AVATARID];
|
||||
avatarid_column["column"] = "avatarid";
|
||||
avatarid_column["value"] = avatarp->getID();
|
||||
|
||||
LLExportable* exportable = new LLExportable(avatarp, (EWearableType)type, mPrimNameMap);
|
||||
mExportables[myid] = exportable->asLLSD();
|
||||
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
// Add attachments
|
||||
LLViewerObject::child_list_t child_list = avatarp->getChildren();
|
||||
for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i)
|
||||
{
|
||||
LLViewerObject* childp = *i;
|
||||
if(list->getItemIndex(childp->getID()) == -1)
|
||||
{
|
||||
LLSD element;
|
||||
element["id"] = childp->getID();
|
||||
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = false;
|
||||
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_object.tga";
|
||||
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
name_column["value"] = "Object (worn on " + utf8str_tolower(childp->getAttachmentPointName()) + ")";
|
||||
|
||||
LLSD& avatarid_column = element["columns"][LIST_AVATARID];
|
||||
avatarid_column["column"] = "avatarid";
|
||||
avatarid_column["value"] = avatarp->getID();
|
||||
|
||||
LLExportable* exportable = new LLExportable(childp, "Object", mPrimNameMap);
|
||||
mExportables[childp->getID()] = exportable->asLLSD();
|
||||
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
|
||||
addToPrimList(childp);
|
||||
//LLSelectMgr::getInstance()->selectObjectAndFamily(childp, false);
|
||||
//LLSelectMgr::getInstance()->deselectObjectAndFamily(childp, true, true);
|
||||
|
||||
LLViewerObject::child_list_t select_list = childp->getChildren();
|
||||
LLViewerObject::child_list_t::iterator select_iter;
|
||||
int block_counter;
|
||||
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectSelect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, childp->getLocalID());
|
||||
block_counter = 0;
|
||||
for (select_iter = select_list.begin(); select_iter != select_list.end(); ++select_iter)
|
||||
{
|
||||
block_counter++;
|
||||
if(block_counter >= 254)
|
||||
{
|
||||
// start a new message
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectSelect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, (*select_iter)->getLocalID());
|
||||
}
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectDeselect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, childp->getLocalID());
|
||||
block_counter = 0;
|
||||
for (select_iter = select_list.begin(); select_iter != select_list.end(); ++select_iter)
|
||||
{
|
||||
block_counter++;
|
||||
if(block_counter >= 254)
|
||||
{
|
||||
// start a new message
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectDeselect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, (*select_iter)->getLocalID());
|
||||
}
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterExport::onClickSelectAll(void* user_data)
|
||||
{
|
||||
LLFloaterExport* floater = (LLFloaterExport*)user_data;
|
||||
LLScrollListCtrl* list = floater->getChild<LLScrollListCtrl>("export_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
LLScrollListItem* item = (*item_iter);
|
||||
item->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterExport::onClickSelectObjects(void* user_data)
|
||||
{
|
||||
LLFloaterExport* floater = (LLFloaterExport*)user_data;
|
||||
LLScrollListCtrl* list = floater->getChild<LLScrollListCtrl>("export_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = false;
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() == "inv_item_object.tga")
|
||||
{
|
||||
new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(item_iter = items.begin(); item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() == "inv_item_object.tga")
|
||||
{
|
||||
LLScrollListItem* item = (*item_iter);
|
||||
item->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterExport::onClickSelectWearables(void* user_data)
|
||||
{
|
||||
LLFloaterExport* floater = (LLFloaterExport*)user_data;
|
||||
LLScrollListCtrl* list = floater->getChild<LLScrollListCtrl>("export_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = false;
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() != "inv_item_object.tga")
|
||||
{
|
||||
new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(item_iter = items.begin(); item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() != "inv_item_object.tga")
|
||||
{
|
||||
LLScrollListItem* item = (*item_iter);
|
||||
item->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLSD LLFloaterExport::getLLSD()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("export_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
LLSD sd;
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
LLScrollListItem* item = (*item_iter);
|
||||
if(item->getColumn(LIST_CHECKED)->getValue())
|
||||
{
|
||||
LLSD item_sd = mExportables[item->getUUID()];
|
||||
LLSD::map_iterator map_iter = item_sd.beginMap();
|
||||
LLSD::map_iterator map_end = item_sd.endMap();
|
||||
for( ; map_iter != map_end; ++map_iter)
|
||||
{
|
||||
std::string key((*map_iter).first);
|
||||
LLSD data = (*map_iter).second;
|
||||
// copy it...
|
||||
sd[key] = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return sd;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterExport::onClickSaveAs(void* user_data)
|
||||
{
|
||||
LLFloaterExport* floater = (LLFloaterExport*)user_data;
|
||||
LLSD sd = floater->getLLSD();
|
||||
|
||||
if(sd.size())
|
||||
{
|
||||
std::string default_filename = "untitled";
|
||||
|
||||
// count the number of selected items
|
||||
LLScrollListCtrl* list = floater->getChild<LLScrollListCtrl>("export_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
int item_count = 0;
|
||||
LLUUID avatarid = (*(items.begin()))->getColumn(LIST_AVATARID)->getValue().asUUID();
|
||||
bool all_same_avatarid = true;
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
LLScrollListItem* item = (*item_iter);
|
||||
if(item->getColumn(LIST_CHECKED)->getValue())
|
||||
{
|
||||
item_count++;
|
||||
if(item->getColumn(LIST_AVATARID)->getValue().asUUID() != avatarid)
|
||||
{
|
||||
all_same_avatarid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(item_count == 1)
|
||||
{
|
||||
// Exporting one item? Use its name for the filename.
|
||||
// But make sure it's a root!
|
||||
LLSD target = (*(sd.beginMap())).second;
|
||||
if(target.has("parent"))
|
||||
{
|
||||
std::string parentid = target["parent"].asString();
|
||||
target = sd[parentid];
|
||||
}
|
||||
if(target.has("name"))
|
||||
{
|
||||
if(target["name"].asString().length() > 0)
|
||||
{
|
||||
default_filename = target["name"].asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Multiple items?
|
||||
// If they're all part of the same avatar, use the avatar's name as filename.
|
||||
if(all_same_avatarid)
|
||||
{
|
||||
std::string fullname;
|
||||
if(gCacheName->getFullName(avatarid, fullname))
|
||||
{
|
||||
default_filename = fullname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if(file_picker.getSaveFile( LLFilePicker::FFSAVE_XML, LLDir::getScrubbedFileName(default_filename + ".xml")))
|
||||
{
|
||||
std::string file_name = file_picker.getFirstFile();
|
||||
std::string path = file_name.substr(0,file_name.find_last_of(".")) + "_assets";
|
||||
BOOL download_texture = floater->childGetValue("download_textures");
|
||||
if(download_texture)
|
||||
{
|
||||
if(!LLFile::isdir(path))
|
||||
{
|
||||
LLFile::mkdir(path);
|
||||
}else
|
||||
{
|
||||
U32 response = OSMessageBox("Directory "+path+" already exists, would you like to continue and override files?", "Directory Already Exists", OSMB_YESNO);
|
||||
if(response)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
path.append(gDirUtilp->getDirDelimiter()); //lets add the Delimiter now
|
||||
}
|
||||
// set correct names within llsd and download textures
|
||||
LLSD::map_iterator map_iter = sd.beginMap();
|
||||
LLSD::map_iterator map_end = sd.endMap();
|
||||
std::list<LLUUID> textures;
|
||||
|
||||
for( ; map_iter != map_end; ++map_iter)
|
||||
{
|
||||
std::istringstream keystr((*map_iter).first);
|
||||
U32 key;
|
||||
keystr >> key;
|
||||
LLSD item = (*map_iter).second;
|
||||
if(item["type"].asString() == "prim")
|
||||
{
|
||||
std::string name = floater->mPrimNameMap[key];
|
||||
item["name"] = name;
|
||||
// I don't understand C++ :(
|
||||
sd[(*map_iter).first] = item;
|
||||
|
||||
if(download_texture)
|
||||
{
|
||||
//textures
|
||||
LLSD::array_iterator tex_iter = item["textures"].beginArray();
|
||||
for( ; tex_iter != item["textures"].endArray(); ++tex_iter)
|
||||
{
|
||||
textures.push_back((*tex_iter)["imageid"].asUUID());
|
||||
}
|
||||
if(item.has("sculpt"))
|
||||
{
|
||||
textures.push_back(item["sculpt"]["texture"].asUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(download_texture && item["type"].asString() == "wearable")
|
||||
{
|
||||
LLSD::map_iterator tex_iter = item["textures"].beginMap();
|
||||
for( ; tex_iter != item["textures"].endMap(); ++tex_iter)
|
||||
{
|
||||
textures.push_back((*tex_iter).second.asUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(download_texture)
|
||||
{
|
||||
textures.unique();
|
||||
while(!textures.empty())
|
||||
{
|
||||
llinfos << "Requesting texture " << textures.front().asString() << llendl;
|
||||
LLViewerImage* img = gImageList.getImage(textures.front(), MIPMAP_TRUE, FALSE);
|
||||
img->setBoostLevel(LLViewerImageBoostLevel::BOOST_MAX_LEVEL);
|
||||
|
||||
CacheReadResponder* responder = new CacheReadResponder(textures.front(), std::string(path + textures.front().asString() + ".j2c"));
|
||||
LLAppViewer::getTextureCache()->readFromCache(textures.front(),LLWorkerThread::PRIORITY_HIGH,0,999999,responder);
|
||||
textures.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
llofstream export_file(file_name);
|
||||
LLSDSerialize::toPrettyXML(sd, export_file);
|
||||
export_file.close();
|
||||
|
||||
std::string msg = "Saved ";
|
||||
msg.append(file_name);
|
||||
if(download_texture) msg.append(" (Content might take some time to download)");
|
||||
LLChat chat(msg);
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string msg = "No exportable items selected";
|
||||
LLChat chat(msg);
|
||||
LLFloaterChat::addChat(chat);
|
||||
return;
|
||||
}
|
||||
|
||||
floater->close();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterExport::onClickMakeCopy(void* user_data)
|
||||
{
|
||||
LLFloaterExport* floater = (LLFloaterExport*)user_data;
|
||||
LLSD sd = floater->getLLSD();
|
||||
|
||||
if(sd.size())
|
||||
{
|
||||
LLXmlImport::import(new LLXmlImportOptions(sd));
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string msg = "No copyable items selected";
|
||||
LLChat chat(msg);
|
||||
LLFloaterChat::addChat(chat);
|
||||
return;
|
||||
}
|
||||
|
||||
// I guess close the floater because only one import is allowed at once anyway
|
||||
floater->close();
|
||||
}
|
||||
|
||||
void LLFloaterExport::addToPrimList(LLViewerObject* object)
|
||||
{
|
||||
mPrimList.push_back(object->getLocalID());
|
||||
LLViewerObject::child_list_t child_list = object->getChildren();
|
||||
for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i)
|
||||
{
|
||||
LLViewerObject* child = *i;
|
||||
if(child->getPCode() < LL_PCODE_APP)
|
||||
{
|
||||
mPrimList.push_back(child->getLocalID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterExport::updateNamesProgress()
|
||||
{
|
||||
childSetText("names_progress_text", llformat("Names retrieved: %d of %d", mPrimNameMap.size(), mPrimList.size()));
|
||||
}
|
||||
|
||||
void LLFloaterExport::receivePrimName(LLViewerObject* object, std::string name)
|
||||
{
|
||||
LLUUID fullid = object->getID();
|
||||
U32 localid = object->getLocalID();
|
||||
if(std::find(mPrimList.begin(), mPrimList.end(), localid) != mPrimList.end())
|
||||
{
|
||||
mPrimNameMap[localid] = name;
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("export_list");
|
||||
S32 item_index = list->getItemIndex(fullid);
|
||||
if(item_index != -1)
|
||||
{
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator end = items.end();
|
||||
for( ; iter != end; ++iter)
|
||||
{
|
||||
if((*iter)->getUUID() == fullid)
|
||||
{
|
||||
(*iter)->getColumn(LIST_NAME)->setValue(name + " (worn on " + utf8str_tolower(object->getAttachmentPointName()) + ")");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
updateNamesProgress();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterExport::receiveObjectProperties(LLUUID fullid, std::string name, std::string desc)
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(fullid);
|
||||
std::vector<LLFloaterExport*>::iterator iter = LLFloaterExport::instances.begin();
|
||||
std::vector<LLFloaterExport*>::iterator end = LLFloaterExport::instances.end();
|
||||
for( ; iter != end; ++iter)
|
||||
{
|
||||
(*iter)->receivePrimName(object, name);
|
||||
}
|
||||
}
|
||||
|
||||
// </edit>
|
||||
@@ -1,114 +0,0 @@
|
||||
// <edit>
|
||||
#ifndef LL_LLFLOATEREXPORT_H
|
||||
#define LL_LLFLOATEREXPORT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvoavatardefines.h"
|
||||
|
||||
//class LLExportObject
|
||||
//{
|
||||
//public:
|
||||
// LLExportObject(LLViewerObject* object);
|
||||
// //LLExportObject(LLViewerObject* object, std::string name);
|
||||
//
|
||||
// LLSD asLLSD();
|
||||
//
|
||||
// LLViewerObject* mObject;
|
||||
//};
|
||||
//
|
||||
//class LLExportWearable
|
||||
//{
|
||||
//public:
|
||||
// LLExportWearable(LLVOAvatar* avatar, EWearableType type);
|
||||
//
|
||||
// LLSD asLLSD();
|
||||
// std::string getIcon();
|
||||
//
|
||||
// LLVOAvatar* mAvatar;
|
||||
// EWearableType mType;
|
||||
// std::string mName;
|
||||
//};
|
||||
//
|
||||
//
|
||||
//class LLExportBakedWearable // not used
|
||||
//{
|
||||
//public:
|
||||
// LLExportBakedWearable(LLVOAvatar* avatar, EWearableType type);
|
||||
//
|
||||
// LLSD asLLSD();
|
||||
// std::string getIcon();
|
||||
//
|
||||
// LLVOAvatar* mAvatar;
|
||||
// EWearableType mType;
|
||||
// std::string mName;
|
||||
//};
|
||||
|
||||
|
||||
|
||||
class LLExportable
|
||||
{
|
||||
enum EXPORTABLE_TYPE
|
||||
{
|
||||
EXPORTABLE_OBJECT,
|
||||
EXPORTABLE_WEARABLE
|
||||
};
|
||||
|
||||
public:
|
||||
LLExportable(LLViewerObject* object, std::string name, std::map<U32,std::string>& primNameMap);
|
||||
LLExportable(LLVOAvatar* avatar, EWearableType type, std::map<U32,std::string>& primNameMap);
|
||||
|
||||
LLSD asLLSD();
|
||||
|
||||
EXPORTABLE_TYPE mType;
|
||||
EWearableType mWearableType;
|
||||
LLViewerObject* mObject;
|
||||
LLVOAvatar* mAvatar;
|
||||
std::map<U32,std::string>* mPrimNameMap;
|
||||
};
|
||||
|
||||
|
||||
class LLFloaterExport
|
||||
: public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterExport();
|
||||
BOOL postBuild(void);
|
||||
void addAvatarStuff(LLVOAvatar* avatarp);
|
||||
void updateNamesProgress();
|
||||
void receivePrimName(LLViewerObject* object, std::string name);
|
||||
|
||||
LLSD getLLSD();
|
||||
|
||||
std::vector<U32> mPrimList;
|
||||
std::map<U32, std::string> mPrimNameMap;
|
||||
|
||||
static std::vector<LLFloaterExport*> instances; // for callback-type use
|
||||
|
||||
static void receiveObjectProperties(LLUUID fullid, std::string name, std::string desc);
|
||||
|
||||
static void onClickSelectAll(void* user_data);
|
||||
static void onClickSelectObjects(void* user_data);
|
||||
static void onClickSelectWearables(void* user_data);
|
||||
static void onClickSaveAs(void* user_data);
|
||||
static void onClickMakeCopy(void* user_data);
|
||||
|
||||
private:
|
||||
virtual ~LLFloaterExport();
|
||||
void addToPrimList(LLViewerObject* object);
|
||||
|
||||
enum LIST_COLUMN_ORDER
|
||||
{
|
||||
LIST_CHECKED,
|
||||
LIST_TYPE,
|
||||
LIST_NAME,
|
||||
LIST_AVATARID
|
||||
};
|
||||
|
||||
LLObjectSelectionHandle mSelection;
|
||||
std::map<LLUUID, LLSD> mExportables;
|
||||
};
|
||||
|
||||
#endif
|
||||
// </edit>
|
||||
@@ -1,363 +0,0 @@
|
||||
// <edit>
|
||||
/**
|
||||
* @file llfloaterimport.cpp
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llimportobject.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llagent.h"
|
||||
#include "llchat.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloater.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llfloaterimport.h"
|
||||
#include "llimportobject.h"
|
||||
|
||||
LLFloaterImportProgress* LLFloaterImportProgress::sInstance;
|
||||
|
||||
LLFloaterXmlImportOptions::LLFloaterXmlImportOptions(LLXmlImportOptions* default_options)
|
||||
: mDefaultOptions(default_options)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_import_options.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterXmlImportOptions::postBuild()
|
||||
{
|
||||
center();
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("import_list");
|
||||
// Add all wearables to list and keep an id:ptr map
|
||||
std::vector<LLImportWearable*>::iterator wearable_end = mDefaultOptions->mWearables.end();
|
||||
for(std::vector<LLImportWearable*>::iterator iter = mDefaultOptions->mWearables.begin();
|
||||
iter != wearable_end; ++iter)
|
||||
{
|
||||
LLImportWearable* wearablep = (*iter);
|
||||
LLUUID id; id.generate();
|
||||
mImportWearableMap[id] = wearablep;
|
||||
LLSD element;
|
||||
element["id"] = id;
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = true;
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_" + LLWearable::typeToTypeName((EWearableType)(wearablep->mType)) + ".tga";
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
name_column["value"] = wearablep->mName;
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
}
|
||||
// Add all root objects to list and keep an id:ptr map
|
||||
std::vector<LLImportObject*>::iterator object_end = mDefaultOptions->mRootObjects.end();
|
||||
for(std::vector<LLImportObject*>::iterator iter = mDefaultOptions->mRootObjects.begin();
|
||||
iter != object_end; ++iter)
|
||||
{
|
||||
LLImportObject* objectp = (*iter);
|
||||
LLUUID id; id.generate();
|
||||
mImportObjectMap[id] = objectp;
|
||||
LLSD element;
|
||||
element["id"] = id;
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = true;
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_object.tga";
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
name_column["value"] = objectp->mPrimName;
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
}
|
||||
// Callbacks
|
||||
childSetAction("select_all_btn", onClickSelectAll, this);
|
||||
childSetAction("select_objects_btn", onClickSelectObjects, this);
|
||||
childSetAction("select_wearables_btn", onClickSelectWearables, this);
|
||||
childSetAction("ok_btn", onClickOK, this);
|
||||
childSetAction("cancel_btn", onClickCancel, this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterXmlImportOptions::onClickSelectAll(void* user_data)
|
||||
{
|
||||
LLFloaterXmlImportOptions* floaterp = (LLFloaterXmlImportOptions*)user_data;
|
||||
LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("import_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
(*item_iter)->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterXmlImportOptions::onClickSelectObjects(void* user_data)
|
||||
{
|
||||
LLFloaterXmlImportOptions* floaterp = (LLFloaterXmlImportOptions*)user_data;
|
||||
LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("import_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = false;
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() == "inv_item_object.tga")
|
||||
{
|
||||
new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(item_iter = items.begin(); item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() == "inv_item_object.tga")
|
||||
(*item_iter)->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterXmlImportOptions::onClickSelectWearables(void* user_data)
|
||||
{
|
||||
LLFloaterXmlImportOptions* floaterp = (LLFloaterXmlImportOptions*)user_data;
|
||||
LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("import_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
|
||||
std::vector<LLScrollListItem*>::iterator items_end = items.end();
|
||||
bool new_value = false;
|
||||
for( ; item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() != "inv_item_object.tga")
|
||||
{
|
||||
new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(item_iter = items.begin(); item_iter != items_end; ++item_iter)
|
||||
{
|
||||
if(((*item_iter)->getColumn(LIST_TYPE)->getValue()).asString() != "inv_item_object.tga")
|
||||
(*item_iter)->getColumn(LIST_CHECKED)->setValue(new_value);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterXmlImportOptions::onClickOK(void* user_data)
|
||||
{
|
||||
LLFloaterXmlImportOptions* floaterp = (LLFloaterXmlImportOptions*)user_data;
|
||||
LLXmlImportOptions* opt = new LLXmlImportOptions(floaterp->mDefaultOptions);
|
||||
opt->clear();
|
||||
opt->mReplaceTexture = floaterp->childGetValue("upload_textures");
|
||||
LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("import_list");
|
||||
std::vector<LLScrollListItem*> items = list->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator item_end = items.end();
|
||||
std::vector<LLImportObject*>::iterator child_end = floaterp->mDefaultOptions->mChildObjects.end();
|
||||
std::list<LLUUID> textures;
|
||||
for(std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != item_end; ++iter)
|
||||
{
|
||||
if((*iter)->getColumn(LIST_CHECKED)->getValue())
|
||||
{ // checked
|
||||
LLUUID id = (*iter)->getUUID();
|
||||
if(floaterp->mImportWearableMap.find(id) != floaterp->mImportWearableMap.end())
|
||||
{
|
||||
opt->mWearables.push_back(floaterp->mImportWearableMap[id]);
|
||||
if(opt->mReplaceTexture)
|
||||
std::copy(floaterp->mImportWearableMap[id]->mTextures.begin(),floaterp->mImportWearableMap[id]->mTextures.end(),back_inserter(textures));
|
||||
}
|
||||
else // object
|
||||
{
|
||||
LLImportObject* objectp = floaterp->mImportObjectMap[id];
|
||||
|
||||
if(opt->mReplaceTexture)
|
||||
std::copy(objectp->mTextures.begin(),objectp->mTextures.end(),back_inserter(textures));
|
||||
|
||||
opt->mRootObjects.push_back(objectp);
|
||||
// Add child objects
|
||||
for(std::vector<LLImportObject*>::iterator child_iter = floaterp->mDefaultOptions->mChildObjects.begin();
|
||||
child_iter != child_end; ++child_iter)
|
||||
{
|
||||
if((*child_iter)->mParentId == objectp->mId)
|
||||
{
|
||||
if(opt->mReplaceTexture)
|
||||
std::copy((*child_iter)->mTextures.begin(),(*child_iter)->mTextures.end(),back_inserter(textures));
|
||||
opt->mChildObjects.push_back((*child_iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(opt->mReplaceTexture)
|
||||
{
|
||||
textures.unique();
|
||||
if(!opt->mAssetDir.empty() && LLFile::isdir(opt->mAssetDir))
|
||||
{
|
||||
opt->mAssetDir.append(gDirUtilp->getDirDelimiter()); //lets add the Delimiter now
|
||||
for(std::list<LLUUID>::iterator itr = textures.begin(); itr != textures.end(); ++itr)
|
||||
{
|
||||
std::string filename = opt->mAssetDir + (*itr).asString() + ".j2c";
|
||||
//llinfos << "Looking texture at " << filename << llendl;
|
||||
if(LLFile::isfile(filename))
|
||||
{
|
||||
//llinfos << "Found texture at " << filename << llendl;
|
||||
LLImportAssetData* data = new LLImportAssetData(filename,(*itr),LLAssetType::AT_TEXTURE);
|
||||
|
||||
opt->mAssets.push_back(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
opt->mKeepPosition = floaterp->childGetValue("keep_position_check");
|
||||
LLXmlImport::import(opt);
|
||||
floaterp->close();
|
||||
}
|
||||
|
||||
void LLFloaterXmlImportOptions::onClickCancel(void* user_data)
|
||||
{
|
||||
LLFloaterXmlImportOptions* floaterp = (LLFloaterXmlImportOptions*)user_data;
|
||||
floaterp->close();
|
||||
}
|
||||
|
||||
LLFloaterImportProgress::LLFloaterImportProgress()
|
||||
: LLFloater("ImportProgress", LLRect(0, 130, 400, 0), "Import progress")
|
||||
{
|
||||
LLLineEditor* line;
|
||||
LLViewBorder* border;
|
||||
|
||||
line = new LLLineEditor(
|
||||
std::string("Uploaded"),
|
||||
LLRect(4, 105, 396, 85),
|
||||
std::string("Uploaded Assets"));
|
||||
line->setEnabled(FALSE);
|
||||
addChild(line);
|
||||
|
||||
border = new LLViewBorder(
|
||||
"UploadedBorder",
|
||||
LLRect(4, 104, 395, 85));
|
||||
addChild(border);
|
||||
|
||||
line = new LLLineEditor(
|
||||
std::string("Created"),
|
||||
LLRect(4, 80, 396, 60),
|
||||
std::string("Created prims"));
|
||||
line->setEnabled(FALSE);
|
||||
addChild(line);
|
||||
|
||||
border = new LLViewBorder(
|
||||
"CreatedBorder",
|
||||
LLRect(4, 79, 395, 60));
|
||||
addChild(border);
|
||||
|
||||
line = new LLLineEditor(
|
||||
std::string("Edited"),
|
||||
LLRect(4, 55, 396, 35),
|
||||
std::string("Edited prims"));
|
||||
line->setEnabled(FALSE);
|
||||
addChild(line);
|
||||
|
||||
border = new LLViewBorder(
|
||||
"EditedBorder",
|
||||
LLRect(4, 54, 395, 35));
|
||||
addChild(border);
|
||||
|
||||
LLButton* button = new LLButton(
|
||||
"CancelButton",
|
||||
LLRect(300, 28, 394, 8));
|
||||
button->setLabel(std::string("Cancel"));
|
||||
button->setEnabled(TRUE);
|
||||
addChild(button);
|
||||
childSetAction("CancelButton", LLXmlImport::Cancel, this);
|
||||
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
LLFloaterImportProgress::~LLFloaterImportProgress()
|
||||
{
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
void LLFloaterImportProgress::close(bool app_quitting)
|
||||
{
|
||||
LLXmlImport::sImportInProgress = false;
|
||||
LLFloater::close(app_quitting);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterImportProgress::show()
|
||||
{
|
||||
if(!sInstance)
|
||||
sInstance = new LLFloaterImportProgress();
|
||||
sInstance->open();
|
||||
sInstance->center();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterImportProgress::update()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
LLFloaterImportProgress* floater = sInstance;
|
||||
|
||||
int upload_goal = (int)LLXmlImport::sTotalAssets;
|
||||
int upload_done = LLXmlImport::sUploadedAssets;
|
||||
F32 upload_width = F32(390.f / F32(upload_goal));
|
||||
upload_width *= F32(upload_done);
|
||||
bool upload_finished = upload_done >= upload_goal;
|
||||
|
||||
int create_goal = (int)LLXmlImport::sPrims.size();
|
||||
int create_done = create_goal - LLXmlImport::sPrimsNeeded;
|
||||
F32 create_width = F32(390.f / F32(create_goal));
|
||||
create_width *= F32(create_done);
|
||||
bool create_finished = create_done >= create_goal;
|
||||
|
||||
int edit_goal = create_goal;
|
||||
int edit_done = LLXmlImport::sPrimIndex;
|
||||
F32 edit_width = F32(390.f / F32(edit_goal));
|
||||
edit_width *= edit_done;
|
||||
bool edit_finished = edit_done >= edit_goal;
|
||||
|
||||
int attach_goal = (int)LLXmlImport::sId2attachpt.size();
|
||||
int attach_done = LLXmlImport::sAttachmentsDone;
|
||||
F32 attach_width = F32(390.f / F32(attach_goal));
|
||||
attach_width *= F32(attach_done);
|
||||
bool attach_finished = attach_done >= attach_goal;
|
||||
|
||||
bool all_finished = upload_finished && create_finished && edit_finished && attach_finished;
|
||||
|
||||
std::string title;
|
||||
title.assign(all_finished ? "Imported " : "Importing ");
|
||||
title.append(LLXmlImport::sXmlImportOptions->mName);
|
||||
if(!all_finished) title.append("...");
|
||||
floater->setTitle(title);
|
||||
|
||||
std::string uploaded_text = llformat("Uploaded %d/%d assets", S32(upload_done), S32(upload_goal));
|
||||
std::string created_text = llformat("Created %d/%d prims", S32(create_done), S32(create_goal));
|
||||
std::string edited_text = llformat("Finished %d/%d prims", edit_done, edit_goal);
|
||||
|
||||
LLLineEditor* text = floater->getChild<LLLineEditor>("Uploaded");
|
||||
text->setText(uploaded_text);
|
||||
|
||||
text = floater->getChild<LLLineEditor>("Created");
|
||||
text->setText(created_text);
|
||||
|
||||
text = floater->getChild<LLLineEditor>("Edited");
|
||||
text->setText(edited_text);
|
||||
|
||||
LLViewBorder* border = floater->getChild<LLViewBorder>("UploadedBorder");
|
||||
border->setRect(LLRect(4, 104, 4 + upload_width, 85));
|
||||
|
||||
border = floater->getChild<LLViewBorder>("CreatedBorder");
|
||||
border->setRect(LLRect(4, 79, 4 + create_width, 60));
|
||||
|
||||
border = floater->getChild<LLViewBorder>("EditedBorder");
|
||||
border->setRect(LLRect(4, 54, 4 + edit_width, 35));
|
||||
|
||||
LLButton* button = floater->getChild<LLButton>("CancelButton");
|
||||
button->setEnabled(!all_finished);
|
||||
}
|
||||
}
|
||||
|
||||
// </edit>
|
||||
@@ -1,51 +0,0 @@
|
||||
// <edit>
|
||||
/**
|
||||
* @file llfloaterimport.h
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERIMPORT_H
|
||||
#define LL_LLFLOATERIMPORT_H
|
||||
|
||||
#include "llviewerobject.h"
|
||||
#include "llfloater.h"
|
||||
#include "llimportobject.h"
|
||||
|
||||
|
||||
class LLFloaterImportProgress
|
||||
: public LLFloater
|
||||
{
|
||||
public:
|
||||
void close(bool app_quitting);
|
||||
static LLFloaterImportProgress* sInstance;
|
||||
static void show();
|
||||
static void update();
|
||||
private:
|
||||
LLFloaterImportProgress();
|
||||
virtual ~LLFloaterImportProgress();
|
||||
};
|
||||
|
||||
|
||||
class LLFloaterXmlImportOptions : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterXmlImportOptions(LLXmlImportOptions* default_options);
|
||||
BOOL postBuild();
|
||||
LLXmlImportOptions* mDefaultOptions;
|
||||
std::map<LLUUID, LLImportWearable*> mImportWearableMap;
|
||||
std::map<LLUUID, LLImportObject*> mImportObjectMap;
|
||||
private:
|
||||
enum LIST_COLUMN_ORDER
|
||||
{
|
||||
LIST_CHECKED,
|
||||
LIST_TYPE,
|
||||
LIST_NAME,
|
||||
};
|
||||
static void onClickSelectAll(void* user_data);
|
||||
static void onClickSelectObjects(void* user_data);
|
||||
static void onClickSelectWearables(void* user_data);
|
||||
static void onClickOK(void* user_data);
|
||||
static void onClickCancel(void* user_data);
|
||||
};
|
||||
|
||||
#endif
|
||||
// </edit>
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "llgl.h"
|
||||
#include "llagent.h"
|
||||
#include "llrendersphere.h"
|
||||
#include "llimagegl.h"
|
||||
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "lldrawable.h"
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llinterp.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
const F32 LL_HUD_DUR_SHORT = 1.f;
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "llgl.h"
|
||||
#include "llglheaders.h"
|
||||
#include "llhudrender.h"
|
||||
#include "llimagegl.h"
|
||||
#include "llrendersphere.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "llhudeffecttrail.h"
|
||||
|
||||
#include "llviewercontrol.h"
|
||||
#include "llimagegl.h"
|
||||
#include "message.h"
|
||||
|
||||
#include "llagent.h"
|
||||
|
||||
@@ -809,13 +809,14 @@ void LLHUDText::updateVisibility()
|
||||
return;
|
||||
}
|
||||
|
||||
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + mSourceObject->getVObjRadius())
|
||||
F32 object_radius = llmin(mSourceObject->getVObjRadius(), 26.f); //~15x15x15 prim : sqrt((15^2) * 3) = 25.9807621. getVObjRadius is diam.
|
||||
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + object_radius)
|
||||
{
|
||||
mPositionAgent = LLViewerCamera::getInstance()->getOrigin() + vec_from_camera * ((LLViewerCamera::getInstance()->getNear() + 0.1f) / (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis()));
|
||||
}
|
||||
else
|
||||
{
|
||||
mPositionAgent -= dir_from_camera * mSourceObject->getVObjRadius();
|
||||
mPositionAgent -= dir_from_camera * object_radius;
|
||||
}
|
||||
|
||||
mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,120 +0,0 @@
|
||||
// <edit>
|
||||
/**
|
||||
* @file llimportobject.h
|
||||
*/
|
||||
|
||||
#ifndef LL_LLIMPORTOBJECT_H
|
||||
#define LL_LLIMPORTOBJECT_H
|
||||
|
||||
#include "llviewerobject.h"
|
||||
#include "llfloater.h"
|
||||
#include "llvoavatardefines.h"
|
||||
|
||||
class LLImportAssetData
|
||||
{
|
||||
public:
|
||||
LLImportAssetData(std::string infilename,LLUUID inassetid,LLAssetType::EType intype);
|
||||
U32 localid;
|
||||
LLAssetType::EType type;
|
||||
LLInventoryType::EType inv_type;
|
||||
EWearableType wear_type;
|
||||
LLTransactionID tid;
|
||||
LLUUID assetid;
|
||||
LLUUID folderid;
|
||||
LLUUID oldassetid;
|
||||
std::string name;
|
||||
std::string description;
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
class LLImportWearable
|
||||
{
|
||||
public:
|
||||
std::string mName;
|
||||
int mType;
|
||||
std::string mData;
|
||||
LLSD mOrginalLLSD;
|
||||
LLImportWearable(LLSD sd);
|
||||
std::list<LLUUID> mTextures;
|
||||
void replaceTextures(std::map<LLUUID,LLUUID> textures_replace);
|
||||
};
|
||||
|
||||
class LLImportObject : public LLViewerObject
|
||||
{
|
||||
public:
|
||||
//LLImportObject(std::string id, std::string parentId);
|
||||
LLImportObject(std::string id, LLSD prim);
|
||||
std::string mId;
|
||||
std::string mParentId;
|
||||
std::string mPrimName;
|
||||
bool importIsAttachment;
|
||||
U32 importAttachPoint;
|
||||
LLVector3 importAttachPos;
|
||||
LLQuaternion importAttachRot;
|
||||
std::list<LLUUID> mTextures;
|
||||
};
|
||||
|
||||
class LLXmlImportOptions
|
||||
{
|
||||
friend bool operator==(const LLXmlImportOptions &a, const LLXmlImportOptions &b);
|
||||
friend bool operator!=(const LLXmlImportOptions &a, const LLXmlImportOptions &b);
|
||||
public:
|
||||
LLXmlImportOptions(LLXmlImportOptions* options);
|
||||
LLXmlImportOptions(std::string filename);
|
||||
LLXmlImportOptions(LLSD llsd);
|
||||
virtual ~LLXmlImportOptions();
|
||||
void clear();
|
||||
void init(LLSD llsd);
|
||||
std::string mName;
|
||||
//LLSD mLLSD;
|
||||
std::string mAssetDir;
|
||||
std::vector<LLImportAssetData*> mAssets;
|
||||
std::vector<LLImportObject*> mRootObjects;
|
||||
std::vector<LLImportObject*> mChildObjects;
|
||||
std::vector<LLImportWearable*> mWearables;
|
||||
BOOL mKeepPosition;
|
||||
LLViewerObject* mSupplier;
|
||||
BOOL mReplaceTexture;
|
||||
protected:
|
||||
LLUUID mID;
|
||||
};
|
||||
|
||||
|
||||
class LLXmlImport
|
||||
{
|
||||
public:
|
||||
static void import(LLXmlImportOptions* import_options);
|
||||
static void onNewPrim(LLViewerObject* object);
|
||||
static void onNewItem(LLViewerInventoryItem* item);
|
||||
static void onNewAttachment(LLViewerObject* object);
|
||||
static void Cancel(void* user_data);
|
||||
static void rez_supply();
|
||||
static void finish_init();
|
||||
static void finish_link();
|
||||
|
||||
static bool sImportInProgress;
|
||||
static bool sImportHasAttachments;
|
||||
static LLUUID sFolderID;
|
||||
static LLViewerObject* sSupplyParams;
|
||||
static int sPrimsNeeded;
|
||||
static std::vector<LLImportObject*> sPrims; // all prims being imported
|
||||
static std::map<U8, bool> sPt2watch; // attach points that need watching
|
||||
static std::map<std::string, U8> sId2attachpt; // attach points of all attachables
|
||||
static std::map<U8, LLVector3> sPt2attachpos; // positions of all attachables
|
||||
static std::map<U8, LLQuaternion> sPt2attachrot; // rotations of all attachables
|
||||
static std::map<U32, std::queue<U32> > sLinkSets;//Linksets to link.
|
||||
static int sPrimIndex;
|
||||
static int sAttachmentsDone;
|
||||
static std::map<std::string, U32> sId2localid;
|
||||
static std::map<U32, LLVector3> sRootpositions;
|
||||
static std::map<U32, LLQuaternion> sRootrotations;
|
||||
static LLXmlImportOptions* sXmlImportOptions;
|
||||
|
||||
static int sTotalAssets;
|
||||
static int sUploadedAssets;
|
||||
static std::map<LLUUID,LLUUID> sTextureReplace;
|
||||
};
|
||||
|
||||
#endif
|
||||
// </edit>
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
#include "llappviewer.h" // System Folders
|
||||
#include "llfloateranimpreview.h" // for reuploads
|
||||
#include "llfloaterimagepreview.h" // for reuploads
|
||||
#include "llimportobject.h" // for disabling options during import
|
||||
//#include "llcheats.h"
|
||||
#include "dofloaterhex.h"
|
||||
#include "hgfloatertexteditor.h"
|
||||
@@ -2397,17 +2396,10 @@ void LLFolderBridge::folderOptionsMenu()
|
||||
// Only enable add/replace outfit for non-default folders.
|
||||
if (!is_default_folder)
|
||||
{
|
||||
// <edit> don't allow attaching stuff during attachment import
|
||||
if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments))
|
||||
{
|
||||
// </edit>
|
||||
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
mItems.push_back(std::string("Add To Outfit"));
|
||||
mItems.push_back(std::string("Wear Items"));
|
||||
mItems.push_back(std::string("Replace Outfit"));
|
||||
// <edit>
|
||||
}
|
||||
// </edit>
|
||||
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
mItems.push_back(std::string("Add To Outfit"));
|
||||
mItems.push_back(std::string("Wear Items"));
|
||||
mItems.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
mItems.push_back(std::string("Take Off Items"));
|
||||
}
|
||||
@@ -4172,10 +4164,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
}
|
||||
else
|
||||
// </edit>
|
||||
// <edit> don't allow attaching objects while importing attachments
|
||||
//if( !isInTrash() )
|
||||
if( !isInTrash() && !(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments))
|
||||
// </edit>
|
||||
if( !isInTrash() )
|
||||
{
|
||||
items.push_back(std::string("Attach Separator"));
|
||||
items.push_back(std::string("Object Wear"));
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "llvoavatar.h"
|
||||
#include "llsdutil.h"
|
||||
// <edit>
|
||||
#include "llimportobject.h"
|
||||
#include "llappviewer.h" // gLostItemsRoot
|
||||
// </edit>
|
||||
#include <deque>
|
||||
@@ -1977,10 +1976,6 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
|
||||
if(item)
|
||||
{
|
||||
mItemMap[item->getUUID()] = item;
|
||||
// <edit>
|
||||
if(LLXmlImport::sImportInProgress)
|
||||
LLXmlImport::onNewItem(item);
|
||||
// </edit>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,6 @@
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// <edit>
|
||||
#include "llfloaterexport.h"
|
||||
// </edit>
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
||||
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
|
||||
@@ -4400,10 +4396,6 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
}
|
||||
}
|
||||
|
||||
// <edit> Send to export floaters
|
||||
LLFloaterExport::receiveObjectProperties(id, name, desc);
|
||||
// </edit>
|
||||
|
||||
// Iterate through nodes at end, since it can be on both the regular AND hover list
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
@@ -4537,7 +4529,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
|
||||
if(sObjectPropertiesFamilyRequests.count(id) != 0 )
|
||||
{
|
||||
// Send to export floaters
|
||||
LLFloaterExport::receiveObjectProperties(id, name, desc);
|
||||
//LLFloaterExport::receiveObjectProperties(id, name, desc);
|
||||
// We got the reply, so remove the object from the list of pending requests
|
||||
sObjectPropertiesFamilyRequests.erase(id);
|
||||
}
|
||||
|
||||
@@ -116,78 +116,6 @@ void validate_drawable(LLDrawable* drawablep)
|
||||
#define validate_drawable(x)
|
||||
#endif
|
||||
|
||||
class LLOctreeStateCheck : public LLOctreeTraveler<LLDrawable>
|
||||
{
|
||||
public:
|
||||
U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
LLOctreeStateCheck()
|
||||
{
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void traverse(const LLSpatialGroup::OctreeNode* node)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
|
||||
|
||||
node->accept(this);
|
||||
|
||||
|
||||
U32 temp[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
temp[i] = mInheritedMask[i];
|
||||
mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED;
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < node->getChildCount(); i++)
|
||||
{
|
||||
traverse(node->getChild(i));
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void visit(const LLOctreeNode<LLDrawable>* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i]))
|
||||
{
|
||||
llerrs << "Spatial group failed inherited mask test." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
if (group->isState(LLSpatialGroup::DIRTY))
|
||||
{
|
||||
assert_parent_state(group, LLSpatialGroup::DIRTY);
|
||||
}
|
||||
}
|
||||
|
||||
void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state)
|
||||
{
|
||||
LLSpatialGroup* parent = group->getParent();
|
||||
while (parent)
|
||||
{
|
||||
if (!parent->isState(state))
|
||||
{
|
||||
llerrs << "Spatial group failed parent state check." << llendl;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad)
|
||||
{
|
||||
@@ -2957,6 +2885,16 @@ public:
|
||||
renderBoundingBox(drawable);
|
||||
}
|
||||
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BUILD_QUEUE))
|
||||
{
|
||||
if (drawable->isState(LLDrawable::IN_REBUILD_Q2))
|
||||
{
|
||||
gGL.color4f(0.6f, 0.6f, 0.1f, 1.f);
|
||||
const LLVector3* ext = drawable->getSpatialExtents();
|
||||
drawBoxOutline((ext[0]+ext[1])*0.5f, (ext[1]-ext[0])*0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawable->getVOVolume() && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
|
||||
{
|
||||
renderTexturePriority(drawable);
|
||||
@@ -2976,6 +2914,10 @@ public:
|
||||
{
|
||||
renderRaycast(drawable);
|
||||
}
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_UPDATE_TYPE))
|
||||
{
|
||||
renderUpdateType(drawable);
|
||||
}
|
||||
|
||||
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(drawable->getVObj().get());
|
||||
|
||||
@@ -3055,19 +2997,94 @@ void LLSpatialPartition::renderIntersectingBBoxes(LLCamera* camera)
|
||||
pusher.traverse(mOctree);
|
||||
}
|
||||
|
||||
class LLOctreeStateCheck : public LLOctreeTraveler<LLDrawable>
|
||||
{
|
||||
public:
|
||||
U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
LLOctreeStateCheck()
|
||||
{
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void traverse(const LLSpatialGroup::OctreeNode* node)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
|
||||
|
||||
node->accept(this);
|
||||
|
||||
|
||||
U32 temp[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
temp[i] = mInheritedMask[i];
|
||||
mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED;
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < node->getChildCount(); i++)
|
||||
{
|
||||
traverse(node->getChild(i));
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void visit(const LLOctreeNode<LLDrawable>* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i]))
|
||||
{
|
||||
llerrs << "Spatial group failed inherited mask test." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
if (group->isState(LLSpatialGroup::DIRTY))
|
||||
{
|
||||
assert_parent_state(group, LLSpatialGroup::DIRTY);
|
||||
}
|
||||
}
|
||||
|
||||
void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state)
|
||||
{
|
||||
LLSpatialGroup* parent = group->getParent();
|
||||
while (parent)
|
||||
{
|
||||
if (!parent->isState(state))
|
||||
{
|
||||
llerrs << "Spatial group failed parent state check." << llendl;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void LLSpatialPartition::renderDebug()
|
||||
{
|
||||
if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE |
|
||||
LLPipeline::RENDER_DEBUG_OCCLUSION |
|
||||
LLPipeline::RENDER_DEBUG_LIGHTS |
|
||||
LLPipeline::RENDER_DEBUG_BATCH_SIZE |
|
||||
LLPipeline::RENDER_DEBUG_UPDATE_TYPE |
|
||||
LLPipeline::RENDER_DEBUG_BBOXES |
|
||||
LLPipeline::RENDER_DEBUG_POINTS |
|
||||
LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY |
|
||||
LLPipeline::RENDER_DEBUG_TEXTURE_ANIM |
|
||||
LLPipeline::RENDER_DEBUG_RAYCAST |
|
||||
LLPipeline::RENDER_DEBUG_AVATAR_VOLUME |
|
||||
LLPipeline::RENDER_DEBUG_AGENT_TARGET))
|
||||
LLPipeline::RENDER_DEBUG_AGENT_TARGET |
|
||||
LLPipeline::RENDER_DEBUG_BUILD_QUEUE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
|
||||
BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane
|
||||
U32 mBufferUsage;
|
||||
BOOL mRenderByGroup;
|
||||
const BOOL mRenderByGroup;
|
||||
U32 mLODSeed;
|
||||
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
|
||||
U32 mVertexDataMask;
|
||||
|
||||
@@ -119,7 +119,6 @@ void render_hud_attachments();
|
||||
void render_ui_3d();
|
||||
void render_ui_2d();
|
||||
void render_disconnected_background();
|
||||
void render_hud_elements();
|
||||
|
||||
void display_startup()
|
||||
{
|
||||
@@ -681,9 +680,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
||||
LLGLState::checkTextureChannels();
|
||||
LLGLState::checkClientArrays();
|
||||
|
||||
BOOL to_texture = !for_snapshot &&
|
||||
gPipeline.canUseVertexShaders() &&
|
||||
LLPipeline::sRenderGlow;
|
||||
BOOL to_texture = gPipeline.canUseVertexShaders() && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderGlow && !gSnapshot));
|
||||
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@
|
||||
#include "llsdutil.h"
|
||||
// <edit>
|
||||
#include "lllocalinventory.h"
|
||||
#include "llfloaterimport.h"
|
||||
#include "llfloaterexport.h"
|
||||
#include "llfloaterexploreanimations.h"
|
||||
#include "llfloaterexploresounds.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
@@ -113,7 +111,6 @@
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterdaycycle.h"
|
||||
//#include "llfloaterdickdongs.h" No need for the custom floater right now, I think. -HgB
|
||||
#include "ascentuploadbrowser.h" //New customer floater attempts
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatereditui.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
@@ -253,6 +250,7 @@
|
||||
#include "llavatarnamecache.h"
|
||||
#include "floaterao.h"
|
||||
#include "slfloatermediafilter.h"
|
||||
#include "llviewerobjectbackup.h"
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
@@ -578,14 +576,6 @@ void handle_grab_texture(void*);
|
||||
BOOL enable_grab_texture(void*);
|
||||
void handle_dump_region_object_cache(void*);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL menu_ui_enabled(void *user_data);
|
||||
BOOL menu_check_control( void* user_data);
|
||||
void menu_toggle_variable( void* user_data );
|
||||
@@ -1478,7 +1468,13 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
||||
sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_SCULPTED));
|
||||
|
||||
sub_menu->append(new LLMenuItemCheckGL("Build Queue", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_BUILD_QUEUE));
|
||||
sub_menu->append(new LLMenuItemCheckGL("Update Types", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_UPDATE_TYPE));
|
||||
|
||||
sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test));
|
||||
|
||||
sub_menu = new LLMenuGL("Render Tests");
|
||||
@@ -2532,64 +2528,6 @@ class LLObjectCopyUUID : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectEnableImport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
bool new_value = (object != NULL);
|
||||
if(object)
|
||||
{
|
||||
if(!object->permCopy())
|
||||
new_value = false;
|
||||
else if(!object->permModify())
|
||||
new_value = false;
|
||||
else if(!object->permMove())
|
||||
new_value = false;
|
||||
else if(object->numChildren() != 0)
|
||||
new_value = false;
|
||||
else if(object->getParent())
|
||||
new_value = false;
|
||||
}
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectImport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
bool new_value = (object != NULL);
|
||||
if(object)
|
||||
{
|
||||
if(!object->permCopy())
|
||||
new_value = false;
|
||||
else if(!object->permModify())
|
||||
new_value = false;
|
||||
else if(!object->permMove())
|
||||
new_value = false;
|
||||
else if(object->numChildren() != 0)
|
||||
new_value = false;
|
||||
else if(object->getParent())
|
||||
new_value = false;
|
||||
}
|
||||
if(new_value == false) return true;
|
||||
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (!picker.getOpenFile(LLFilePicker::FFLOAD_XML))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
std::string file_name = picker.getFirstFile();
|
||||
LLXmlImportOptions* options = new LLXmlImportOptions(file_name);
|
||||
options->mSupplier = object;
|
||||
new LLFloaterXmlImportOptions(options);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectData : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -2858,6 +2796,90 @@ class LLGoToObject : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Object backup
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class LLObjectEnableExport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
bool new_value = (object != NULL);
|
||||
if (new_value)
|
||||
{
|
||||
struct ff : public LLSelectedNodeFunctor
|
||||
{
|
||||
ff(const LLSD& data) : LLSelectedNodeFunctor(), userdata(data)
|
||||
{
|
||||
}
|
||||
const LLSD& userdata;
|
||||
virtual bool apply(LLSelectNode* node)
|
||||
{
|
||||
// Note: the actual permission checking algorithm depends on the grid TOS and must be
|
||||
// performed for each prim and texture. This is done later in llviewerobjectbackup.cpp.
|
||||
// This means that even if the item is enabled in the menu, the export may fail should
|
||||
// the permissions not be met for each exported asset. The permissions check below
|
||||
// therefore only corresponds to the minimal permissions requirement common to all grids.
|
||||
LLPermissions *item_permissions = node->mPermissions;
|
||||
return (gAgent.getID() == item_permissions->getOwner() &&
|
||||
(gAgent.getID() == item_permissions->getCreator() ||
|
||||
(item_permissions->getMaskOwner() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED));
|
||||
}
|
||||
};
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectExport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
if (!object) return true;
|
||||
|
||||
LLVOAvatar* avatar = find_avatar_from_object(object);
|
||||
|
||||
if (!avatar)
|
||||
{
|
||||
LLObjectBackup::getInstance()->exportObject();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectEnableImport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(TRUE);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectImport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLObjectBackup::getInstance()->importObject(FALSE);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectImportUpload : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLObjectBackup::getInstance()->importObject(TRUE);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Parcel freeze, eject, etc.
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -6591,10 +6613,6 @@ class LLShowFloater : public view_listener_t
|
||||
{
|
||||
LLFloaterPerms::toggleInstance(LLSD());
|
||||
}
|
||||
else if (floater_name == "ascentuploadbrowser")
|
||||
{
|
||||
ASFloaterUploadBrowser::show(NULL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -7414,10 +7432,6 @@ class LLObjectEnableWear : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool is_wearable = object_selected_and_point_valid(NULL);
|
||||
// <edit> Don't allow attaching objects while importing attachments
|
||||
if(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)
|
||||
is_wearable = false;
|
||||
// </edit>
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -10317,22 +10331,6 @@ void initialize_menus()
|
||||
addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
|
||||
addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// World menu
|
||||
addMenu(new LLWorldChat(), "World.Chat");
|
||||
addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
|
||||
@@ -10446,7 +10444,6 @@ void initialize_menus()
|
||||
addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
|
||||
addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
|
||||
// <edit>
|
||||
addMenu(new LLObjectImport(), "Object.Import");
|
||||
addMenu(new LLObjectMeasure(), "Object.Measure");
|
||||
addMenu(new LLObjectData(), "Object.Data");
|
||||
addMenu(new LLScriptCount(), "Object.ScriptCount");
|
||||
@@ -10461,6 +10458,10 @@ void initialize_menus()
|
||||
addMenu(new LLObjectInspect(), "Object.Inspect");
|
||||
// <dogmode> Visual mute, originally by Phox.
|
||||
addMenu(new LLObjectDerender(), "Object.DERENDER");
|
||||
addMenu(new LLObjectExport(), "Object.Export");
|
||||
addMenu(new LLObjectImport(), "Object.Import");
|
||||
addMenu(new LLObjectImportUpload(), "Object.ImportUpload");
|
||||
|
||||
|
||||
addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
|
||||
addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
|
||||
@@ -10469,11 +10470,10 @@ void initialize_menus()
|
||||
addMenu(new LLObjectEnableWear(), "Object.EnableWear");
|
||||
addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
|
||||
addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
|
||||
// <edit>
|
||||
addMenu(new LLObjectEnableImport(), "Object.EnableImport");
|
||||
// </edit>
|
||||
addMenu(new LLObjectEnableMute(), "Object.EnableMute");
|
||||
addMenu(new LLObjectEnableBuy(), "Object.EnableBuy");
|
||||
addMenu(new LLObjectEnableExport(), "Object.EnableExport");
|
||||
addMenu(new LLObjectEnableImport(), "Object.EnableImport");
|
||||
|
||||
/*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch");
|
||||
addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch");
|
||||
|
||||
@@ -65,8 +65,6 @@
|
||||
#include "lluploaddialog.h"
|
||||
// <edit>
|
||||
#include "llselectmgr.h"
|
||||
#include "llfloaterimport.h"
|
||||
#include "llfloaterexport.h"
|
||||
#include "llassettype.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llbvhloader.h"
|
||||
@@ -432,35 +430,6 @@ class LLFileUploadBulk : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
// <edit>
|
||||
class LLFileImportXML : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (!picker.getOpenFile(LLFilePicker::FFLOAD_XML))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
std::string file_name = picker.getFirstFile();
|
||||
new LLFloaterXmlImportOptions(new LLXmlImportOptions(file_name));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLFileEnableImportXML : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool new_value = !LLXmlImport::sImportInProgress;
|
||||
|
||||
// horrendously opaque, this code
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
// </edit>
|
||||
|
||||
void upload_error(const std::string& error_message, const std::string& label, const std::string& filename, const LLSD& args)
|
||||
{
|
||||
llwarns << error_message << llendl;
|
||||
@@ -533,20 +502,8 @@ class LLFileSaveTexture : public view_listener_t
|
||||
LLFloater* top = gFloaterView->getFrontmost();
|
||||
if (top)
|
||||
{
|
||||
// <edit>
|
||||
if(top->canSaveAs())
|
||||
{
|
||||
// </edit>
|
||||
top->saveAs();
|
||||
// <edit>
|
||||
return true;
|
||||
}
|
||||
// </edit>
|
||||
top->saveAs();
|
||||
}
|
||||
// <edit>
|
||||
top = new LLFloaterExport();
|
||||
top->center();
|
||||
// </edit>
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1348,10 +1305,6 @@ void init_menu_file()
|
||||
(new LLFileUploadSound())->registerListener(gMenuHolder, "File.UploadSound");
|
||||
(new LLFileUploadAnim())->registerListener(gMenuHolder, "File.UploadAnim");
|
||||
(new LLFileUploadBulk())->registerListener(gMenuHolder, "File.UploadBulk");
|
||||
// <edit>
|
||||
(new LLFileImportXML())->registerListener(gMenuHolder, "File.ImportXML");
|
||||
(new LLFileEnableImportXML())->registerListener(gMenuHolder, "File.EnableImportXML");
|
||||
// </edit>
|
||||
(new LLFileCloseWindow())->registerListener(gMenuHolder, "File.CloseWindow");
|
||||
(new LLFileCloseAllWindows())->registerListener(gMenuHolder, "File.CloseAllWindows");
|
||||
(new LLFileEnableCloseWindow())->registerListener(gMenuHolder, "File.EnableCloseWindow");
|
||||
|
||||
1197
indra/newview/llviewerobjectbackup.cpp
Executable file
1197
indra/newview/llviewerobjectbackup.cpp
Executable file
File diff suppressed because it is too large
Load Diff
176
indra/newview/llviewerobjectbackup.h
Executable file
176
indra/newview/llviewerobjectbackup.h
Executable file
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* @file llviewerobjectbackup.h
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerinventory.h"
|
||||
|
||||
enum export_states {
|
||||
EXPORT_INIT,
|
||||
EXPORT_STRUCTURE,
|
||||
EXPORT_TEXTURES,
|
||||
EXPORT_LLSD,
|
||||
EXPORT_DONE,
|
||||
EXPORT_FAILED
|
||||
};
|
||||
|
||||
class LLObjectBackup : public LLFloater
|
||||
{
|
||||
public:
|
||||
virtual ~LLObjectBackup();
|
||||
|
||||
// Floater stuff
|
||||
virtual void show(bool exporting);
|
||||
virtual void draw();
|
||||
virtual void onClose(bool app_quitting);
|
||||
|
||||
// Static accessor
|
||||
static LLObjectBackup* getInstance();
|
||||
|
||||
// Export idle callback
|
||||
static void exportWorker(void *userdata);
|
||||
|
||||
// Import entry point
|
||||
void importObject(bool upload=FALSE);
|
||||
|
||||
// Export entry point
|
||||
void exportObject();
|
||||
|
||||
// Update map from texture worker
|
||||
void updateMap(LLUUID uploaded_asset);
|
||||
|
||||
// Move to next texture upload
|
||||
void uploadNextAsset();
|
||||
|
||||
// Folder public geter
|
||||
std::string getfolder() { return mFolder; };
|
||||
|
||||
// Prim updated callback
|
||||
void primUpdate(LLViewerObject* object);
|
||||
|
||||
// New prim call back
|
||||
bool newPrim(LLViewerObject* pobject);
|
||||
|
||||
static const U32 TEXTURE_OK = 0x00;
|
||||
static const U32 TEXTURE_BAD_PERM = 0x01;
|
||||
static const U32 TEXTURE_MISSING = 0x02;
|
||||
static const U32 TEXTURE_BAD_ENCODING = 0x04;
|
||||
static const U32 TEXTURE_IS_NULL = 0x08;
|
||||
static const U32 TEXTURE_SAVED_FAILED = 0x10;
|
||||
|
||||
// Is ready for next texture?
|
||||
bool mNextTextureReady;
|
||||
|
||||
// Export state machine
|
||||
enum export_states mExportState;
|
||||
|
||||
// Export result flags for textures.
|
||||
U32 mNonExportedTextures;
|
||||
|
||||
private:
|
||||
// Static singleton stuff
|
||||
LLObjectBackup();
|
||||
static LLObjectBackup* sInstance;
|
||||
|
||||
// Update the floater with status numbers
|
||||
void updateImportNumbers();
|
||||
void updateExportNumbers();
|
||||
|
||||
// Permissions stuff.
|
||||
bool validatePerms(const LLPermissions* item_permissions);
|
||||
LLUUID validateTextureID(LLUUID asset_id);
|
||||
|
||||
// Convert a selection list of objects to LLSD
|
||||
LLSD primsToLLSD(LLViewerObject::child_list_t child_list);
|
||||
|
||||
// Start the import process
|
||||
void importFirstObject();
|
||||
|
||||
// Move to the next import group
|
||||
void importNextObject();
|
||||
|
||||
// Export the next texture in list
|
||||
void exportNextTexture();
|
||||
|
||||
// Apply LLSD to object
|
||||
void xmlToPrim(LLSD prim_llsd, LLViewerObject* pobject);
|
||||
|
||||
// Rez a prim at a given position (note not agent offset X/Y screen for raycast)
|
||||
void rezAgentOffset(LLVector3 offset);
|
||||
|
||||
// Get an offset from the agent based on rotation and current pos
|
||||
LLVector3 offsetAgent(LLVector3 offset);
|
||||
|
||||
// Are we active flag
|
||||
bool mRunning;
|
||||
|
||||
// File and folder name control
|
||||
std::string mFileName;
|
||||
std::string mFolder;
|
||||
|
||||
// True if we need to rebase the assets
|
||||
bool mRetexture;
|
||||
|
||||
// Counts of import and export objects and prims
|
||||
U32 mObjects;
|
||||
U32 mCurObject;
|
||||
U32 mPrims;
|
||||
U32 mCurPrim;
|
||||
|
||||
// No prims rezed
|
||||
U32 mRezCount;
|
||||
|
||||
// Rebase map
|
||||
std::map<LLUUID,LLUUID> mAssetMap;
|
||||
|
||||
// Export texture list
|
||||
std::list<LLUUID> mTexturesList;
|
||||
|
||||
// Import object tracking
|
||||
std::vector<LLViewerObject*> mToSelect;
|
||||
std::vector<LLViewerObject*>::iterator mProcessIter;
|
||||
|
||||
// Working LLSD holders
|
||||
LLUUID mCurrentAsset;
|
||||
LLSD mLLSD;
|
||||
LLSD mThisGroup;
|
||||
LLUUID mExpectingUpdate;
|
||||
|
||||
// Working llsd itterators for objects and linksets
|
||||
LLSD::map_const_iterator mPrimImportIter;
|
||||
LLSD::array_const_iterator mGroupPrimImportIter;
|
||||
|
||||
// Root pos and rotation and central root pos for link set
|
||||
LLVector3 mRootPos;
|
||||
LLQuaternion mRootRot;
|
||||
LLVector3 mRootRootPos;
|
||||
LLVector3 mGroupOffset;
|
||||
|
||||
// Agent inital pos and rot when starting import
|
||||
LLVector3 mAgentPos;
|
||||
LLQuaternion mAgentRot;
|
||||
};
|
||||
@@ -75,9 +75,7 @@
|
||||
|
||||
#include "llappviewer.h"
|
||||
|
||||
// <edit>
|
||||
#include "llimportobject.h"
|
||||
// </edit>
|
||||
#include "llviewerobjectbackup.h"
|
||||
|
||||
extern F32 gMinObjectDistance;
|
||||
extern BOOL gAnimateTextures;
|
||||
@@ -251,6 +249,11 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
|
||||
{
|
||||
gPipeline.addObject(objectp);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLObjectBackup::getInstance()->primUpdate(objectp);
|
||||
}
|
||||
|
||||
|
||||
// Also sets the approx. pixel area
|
||||
objectp->setPixelAreaAndAngle(gAgent);
|
||||
@@ -276,6 +279,8 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
|
||||
objectp->mCreateSelected = false;
|
||||
gViewerWindow->getWindow()->decBusyCount();
|
||||
gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );
|
||||
|
||||
LLObjectBackup::getInstance()->newPrim(objectp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,28 +553,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
|
||||
}
|
||||
processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated);
|
||||
}
|
||||
// <edit>
|
||||
if(justCreated && LLXmlImport::sImportInProgress)
|
||||
{
|
||||
if(objectp)
|
||||
{
|
||||
LLViewerObject* parent = (LLViewerObject*)objectp->getParent();
|
||||
if(parent)
|
||||
{
|
||||
if(parent->getID() == gAgent.getID())
|
||||
{
|
||||
LLXmlImport::onNewAttachment(objectp);
|
||||
}
|
||||
}
|
||||
else if( objectp->permYouOwner()
|
||||
&& (objectp->getPCode() == LLXmlImport::sSupplyParams->getPCode())
|
||||
&& (objectp->getScale() == LLXmlImport::sSupplyParams->getScale()))
|
||||
{
|
||||
LLXmlImport::onNewPrim(objectp);
|
||||
}
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
|
||||
objectp->setLastUpdateType(update_type);
|
||||
objectp->setLastUpdateCached(cached);
|
||||
|
||||
@@ -5882,8 +5882,8 @@ std::string LLVOAvatar::getIdleTime()
|
||||
// animations.
|
||||
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
|
||||
{
|
||||
LLCachedControl<bool> use_new_walk_run("UseNewWalkRun",true);
|
||||
LLCachedControl<bool> use_cross_walk_run("UseCrossWalkRun",false);
|
||||
static const LLCachedControl<bool> use_new_walk_run("UseNewWalkRun",true);
|
||||
static const LLCachedControl<bool> use_cross_walk_run("UseCrossWalkRun",false);
|
||||
LLUUID result = id;
|
||||
|
||||
// start special case female walk for female avatars
|
||||
|
||||
@@ -337,11 +337,6 @@ void LLVOVolume::animateTextures()
|
||||
te->getScale(&scale_s, &scale_t);
|
||||
}
|
||||
|
||||
LLVector3 scale(scale_s, scale_t, 1.f);
|
||||
LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f);
|
||||
LLQuaternion quat;
|
||||
quat.setQuat(rot, 0, 0, -1.f);
|
||||
|
||||
if (!facep->mTextureMatrix)
|
||||
{
|
||||
facep->mTextureMatrix = new LLMatrix4();
|
||||
@@ -349,7 +344,16 @@ void LLVOVolume::animateTextures()
|
||||
|
||||
LLMatrix4& tex_mat = *facep->mTextureMatrix;
|
||||
tex_mat.setIdentity();
|
||||
tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
|
||||
LLVector3 trans ;
|
||||
{
|
||||
trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
|
||||
tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
|
||||
}
|
||||
|
||||
LLVector3 scale(scale_s, scale_t, 1.f);
|
||||
LLQuaternion quat;
|
||||
quat.setQuat(rot, 0, 0, -1.f);
|
||||
|
||||
tex_mat.rotate(quat);
|
||||
|
||||
LLMatrix4 mat;
|
||||
@@ -892,9 +896,7 @@ BOOL LLVOVolume::calcLOD()
|
||||
if (distance < rampDist)
|
||||
{
|
||||
// Boost LOD when you're REALLY close
|
||||
distance *= 1.0f/rampDist;
|
||||
distance *= distance;
|
||||
distance *= rampDist;
|
||||
distance *= distance/rampDist;
|
||||
}
|
||||
|
||||
// DON'T Compensate for field of view changing on FOV zoom.
|
||||
@@ -2228,7 +2230,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||
|
||||
U8 glow = 0;
|
||||
|
||||
if (type == LLRenderPass::PASS_GLOW)
|
||||
if (type == LLRenderPass::PASS_GLOW || type==LLRenderPass::PASS_ALPHA) //Alpha pass now handles glow internally
|
||||
{
|
||||
glow = (U8) (facep->getTextureEntry()->getGlow() * 255);
|
||||
}
|
||||
@@ -2766,7 +2768,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
||||
// can we safely treat this as an alpha mask?
|
||||
if (facep->canRenderAsMask())
|
||||
{
|
||||
if (te->getFullbright())
|
||||
const LLDrawable* drawablep = facep->getDrawable();
|
||||
const LLVOVolume* vobj = drawablep ? drawablep->getVOVolume() : NULL;
|
||||
if (te->getFullbright() || (vobj && vobj->isHUDAttachment()))
|
||||
{
|
||||
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
|
||||
}
|
||||
@@ -2862,7 +2866,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
||||
}
|
||||
}
|
||||
|
||||
if (LLPipeline::sRenderGlow && te->getGlow() > 0.f)
|
||||
if (!is_alpha && LLPipeline::sRenderGlow && te->getGlow() > 0.f)
|
||||
{
|
||||
registerFace(group, facep, LLRenderPass::PASS_GLOW);
|
||||
}
|
||||
|
||||
@@ -194,6 +194,50 @@ std::string terse_F32_to_string( F32 f )
|
||||
return r;
|
||||
}
|
||||
|
||||
// reX: new function
|
||||
BOOL LLWearable::FileExportParams( FILE* file )
|
||||
{
|
||||
// wearable type
|
||||
S32 type = (S32)mType;
|
||||
fprintf( file, "type %d\n", type );
|
||||
|
||||
// parameters
|
||||
S32 num_parameters = mVisualParamMap.size();
|
||||
fprintf( file, "parameters %d\n", num_parameters );
|
||||
|
||||
for (param_map_t::iterator iter = mVisualParamMap.begin();
|
||||
iter != mVisualParamMap.end(); ++iter)
|
||||
{
|
||||
S32 param_id = iter->first;
|
||||
F32 param_weight = iter->second;
|
||||
fprintf( file, "%d %s\n", param_id, terse_F32_to_string(param_weight).c_str() );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// reX: new function
|
||||
BOOL LLWearable::FileExportTextures( FILE* file )
|
||||
{
|
||||
// wearable type
|
||||
S32 type = (S32)mType;
|
||||
fprintf( file, "type %d\n", type );
|
||||
|
||||
// texture entries
|
||||
S32 num_textures = mTEMap.size();
|
||||
fprintf( file, "textures %d\n", num_textures );
|
||||
|
||||
for (te_map_t::iterator iter = mTEMap.begin();
|
||||
iter != mTEMap.end(); ++iter)
|
||||
{
|
||||
S32 te = iter->first;
|
||||
LLUUID& image_id = iter->second;
|
||||
fprintf( file, "%d %s\n", te, image_id.asString().c_str() );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLWearable::exportFile( LLFILE* file )
|
||||
{
|
||||
// header and version
|
||||
|
||||
@@ -81,6 +81,9 @@ public:
|
||||
|
||||
BOOL exportFile(LLFILE* file);
|
||||
BOOL importFile(LLFILE* file);
|
||||
BOOL FileExportParams(FILE* file);
|
||||
BOOL FileExportTextures(FILE* file);
|
||||
|
||||
|
||||
EWearableType getType() const { return mType; }
|
||||
void setType( EWearableType type ) { mType = type; }
|
||||
|
||||
@@ -146,6 +146,7 @@ const LLMatrix4* gGLLastMatrix = NULL;
|
||||
std::string gPoolNames[] =
|
||||
{
|
||||
// Correspond to LLDrawpool enum render type
|
||||
"NONE",
|
||||
"POOL_SIMPLE",
|
||||
"POOL_TERRAIN",
|
||||
"POOL_BUMP",
|
||||
@@ -380,6 +381,7 @@ void LLPipeline::init()
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
|
||||
stop_glerror();
|
||||
setLightingDetail(-1);
|
||||
}
|
||||
|
||||
LLPipeline::~LLPipeline()
|
||||
@@ -452,8 +454,6 @@ void LLPipeline::cleanup()
|
||||
|
||||
releaseGLBuffers();
|
||||
|
||||
mBloomImagep = NULL;
|
||||
mBloomImage2p = NULL;
|
||||
mFaceSelectImagep = NULL;
|
||||
|
||||
mMovedBridge.clear();
|
||||
@@ -558,13 +558,12 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
|
||||
//static
|
||||
void LLPipeline::updateRenderDeferred()
|
||||
{
|
||||
BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") &&
|
||||
sRenderDeferred = (gSavedSettings.getBOOL("RenderDeferred") &&
|
||||
LLRenderTarget::sUseFBO &&
|
||||
gSavedSettings.getBOOL("VertexShaderEnable") &&
|
||||
gSavedSettings.getBOOL("RenderAvatarVP") &&
|
||||
gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
|
||||
|
||||
sRenderDeferred = deferred;
|
||||
gSavedSettings.getBOOL("WindLightUseAtmosShaders") &&
|
||||
!gUseWireframe);
|
||||
}
|
||||
|
||||
void LLPipeline::releaseGLBuffers()
|
||||
@@ -1398,6 +1397,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
|
||||
gGLLastMatrix = NULL;
|
||||
glLoadMatrixd(gGLLastModelView);
|
||||
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
LLGLDisable test(GL_ALPHA_TEST);
|
||||
@@ -1475,10 +1475,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
|
||||
{
|
||||
mScreen.flush();
|
||||
}
|
||||
/*else if (LLPipeline::sUseOcclusion > 1)
|
||||
else if (LLPipeline::sUseOcclusion > 1)
|
||||
{
|
||||
glFlush();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)
|
||||
@@ -2372,6 +2372,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
|
||||
assertInitialized();
|
||||
|
||||
llpushcallstacks ;
|
||||
//rebuild drawable geometry
|
||||
for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
|
||||
{
|
||||
@@ -2382,7 +2383,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
group->rebuildGeom();
|
||||
}
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
//rebuild groups
|
||||
sCull->assertDrawMapsEmpty();
|
||||
|
||||
@@ -2400,10 +2401,10 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
}
|
||||
LLSpatialGroup::sNoDelete = TRUE;*/
|
||||
|
||||
|
||||
rebuildPriorityGroups();
|
||||
|
||||
|
||||
|
||||
llpushcallstacks ;
|
||||
|
||||
const S32 bin_count = 1024*8;
|
||||
|
||||
static LLCullResult::drawinfo_list_t alpha_bins[bin_count];
|
||||
@@ -2504,7 +2505,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
|
||||
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
|
||||
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
if (beacon_always_on && !sShadowRender)
|
||||
@@ -2553,7 +2554,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
forAllVisibleDrawables(renderSoundHighlights);
|
||||
}
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
// If managing your telehub, draw beacons at telehub and currently selected spawnpoint.
|
||||
if (LLFloaterTelehub::renderBeacons())
|
||||
{
|
||||
@@ -2583,6 +2584,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
}
|
||||
|
||||
//LLSpatialGroup::sNoDelete = FALSE;
|
||||
llpushcallstacks ;
|
||||
}
|
||||
|
||||
|
||||
@@ -2615,7 +2617,12 @@ void render_hud_elements()
|
||||
|
||||
// Render debugging beacons.
|
||||
//gObjectList.renderObjectBeacons();
|
||||
//LLHUDObject::renderAll();
|
||||
|
||||
//TO-DO:
|
||||
//V2 moved this line from LLPipeline::renderGeom
|
||||
//Uncomment once multisample z-buffer issues are figured out on ati cards.
|
||||
// LLHUDObject::renderAll();
|
||||
|
||||
//gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else if (gForceRenderLandFence)
|
||||
@@ -2938,6 +2945,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
//TO-DO:
|
||||
//V2 moved this line to LLPipeline::render_hud_elements
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
@@ -3167,26 +3177,32 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
||||
gGLLastMatrix = NULL;
|
||||
glLoadMatrixd(gGLModelView);
|
||||
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
//TO-DO:
|
||||
//V2 moved block to LLPipeline::renderDeferredLighting
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure particle effects disappear
|
||||
LLHUDObject::renderAllForTimer();
|
||||
}
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure particle effects disappear
|
||||
LLHUDObject::renderAllForTimer();
|
||||
}
|
||||
}
|
||||
//END
|
||||
|
||||
if (occlude)
|
||||
{
|
||||
occlude = FALSE;
|
||||
@@ -3282,6 +3298,9 @@ void LLPipeline::renderDebug()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
if(!mRenderDebugMask)
|
||||
return;
|
||||
|
||||
assertInitialized();
|
||||
|
||||
gGL.color4f(1,1,1,1);
|
||||
@@ -3446,6 +3465,55 @@ void LLPipeline::renderDebug()
|
||||
}
|
||||
}
|
||||
|
||||
if (mRenderDebugMask & LLPipeline::RENDER_DEBUG_BUILD_QUEUE)
|
||||
{
|
||||
U32 count = 0;
|
||||
U32 size = mBuildQ2.size();
|
||||
LLColor4 col;
|
||||
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get());
|
||||
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LLSpatialBridge* bridge = group->mSpatialPartition->asBridge();
|
||||
|
||||
if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bridge)
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
|
||||
}
|
||||
|
||||
F32 alpha = (F32) (size-count)/size;
|
||||
|
||||
|
||||
LLVector2 c(1.f-alpha, alpha);
|
||||
c.normVec();
|
||||
|
||||
|
||||
++count;
|
||||
col.set(c.mV[0], c.mV[1], 0, alpha*0.5f+0.1f);
|
||||
group->drawObjectBox(col);
|
||||
|
||||
if (bridge)
|
||||
{
|
||||
gGL.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gGL.flush();
|
||||
}
|
||||
|
||||
@@ -4257,32 +4325,28 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
LLVector4 light_pos_gl(light_pos, 1.0f);
|
||||
|
||||
F32 light_radius = llmax(light->getLightRadius(), 0.001f);
|
||||
F32 atten, quad;
|
||||
|
||||
#if 0 //1.9.1
|
||||
if (pool->getVertexShaderLevel() > 0)
|
||||
{
|
||||
atten = light_radius;
|
||||
quad = llmax(light->getLightFalloff(), 0.0001f);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
F32 x = (3.f * (1.f + light->getLightFalloff()));
|
||||
atten = x / (light_radius); // % of brightness at radius
|
||||
quad = 0.0f;
|
||||
}
|
||||
F32 x = (3.f * (1.f + light->getLightFalloff())); // why this magic? probably trying to match a historic behavior.
|
||||
float linatten = x / (light_radius); // % of brightness at radius
|
||||
|
||||
mHWLightColors[cur_light] = light_color;
|
||||
S32 gllight = GL_LIGHT0+cur_light;
|
||||
glLightfv(gllight, GL_POSITION, light_pos_gl.mV);
|
||||
glLightfv(gllight, GL_DIFFUSE, light_color.mV);
|
||||
glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV);
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, atten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad);
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, linatten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f);
|
||||
//Point lights
|
||||
{
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
|
||||
// we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight
|
||||
const float specular[] = {0.f, 0.f, 0.f, 1.f};
|
||||
glLightfv(gllight, GL_SPECULAR, specular);
|
||||
//llinfos << "boring light" << llendl;
|
||||
}
|
||||
cur_light++;
|
||||
if (cur_light >= 8)
|
||||
{
|
||||
@@ -4299,7 +4363,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
}
|
||||
|
||||
if (gAgent.getAvatarObject() &&
|
||||
if (isAgentAvatarValid() &&
|
||||
gAgent.getAvatarObject()->mSpecialRenderMode == 3)
|
||||
{
|
||||
LLColor4 light_color = LLColor4::white;
|
||||
@@ -4309,13 +4373,10 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
LLVector4 light_pos_gl(light_pos, 1.0f);
|
||||
|
||||
F32 light_radius = 16.f;
|
||||
F32 atten, quad;
|
||||
|
||||
{
|
||||
F32 x = 3.f;
|
||||
atten = x / (light_radius); // % of brightness at radius
|
||||
quad = 0.0f;
|
||||
}
|
||||
float linatten = x / (light_radius); // % of brightness at radius
|
||||
|
||||
mHWLightColors[2] = light_color;
|
||||
S32 gllight = GL_LIGHT2;
|
||||
glLightfv(gllight, GL_POSITION, light_pos_gl.mV);
|
||||
@@ -4323,8 +4384,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV);
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, atten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, linatten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
}
|
||||
@@ -4341,6 +4402,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
void LLPipeline::enableLights(U32 mask)
|
||||
{
|
||||
assertInitialized();
|
||||
|
||||
if (mLightingDetail == 0)
|
||||
{
|
||||
mask &= 0xf003; // sun and backlight only (and fullbright bit)
|
||||
@@ -5528,6 +5590,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
|
||||
gGL.getTexUnit(0)->activate();
|
||||
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
|
||||
|
||||
//TO-DO:
|
||||
//V2 requires this for hover text and such since they have been pulled out of geom render.
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
/*if (LLRenderTarget::sUseFBO)
|
||||
{ //copy depth buffer from mScreen to framebuffer
|
||||
LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(),
|
||||
0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
@@ -5836,6 +5906,9 @@ void LLPipeline::renderDeferredLighting()
|
||||
|
||||
{
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
//TO-DO:
|
||||
//V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
stop_glerror();
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
|
||||
@@ -5852,6 +5925,9 @@ void LLPipeline::renderDeferredLighting()
|
||||
|
||||
{
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
//TO-DO:
|
||||
//V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
stop_glerror();
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
@@ -6088,6 +6164,26 @@ void LLPipeline::renderDeferredLighting()
|
||||
popRenderTypeMask();
|
||||
}
|
||||
|
||||
//TO-DO:
|
||||
//V2 moved block from LLPipeline::renderGeomPostDeferred
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
/*{
|
||||
//render highlights, etc.
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
}*/
|
||||
|
||||
mScreen.flush();
|
||||
|
||||
}
|
||||
@@ -6251,48 +6347,47 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
|
||||
gPipeline.pushRenderTypeMask();
|
||||
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
|
||||
LLPipeline::RENDER_TYPE_VOIDWATER,
|
||||
LLPipeline::RENDER_TYPE_GROUND,
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS,
|
||||
LLPipeline::RENDER_TYPE_WL_CLOUDS,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderWaterReflections"))
|
||||
{ //mask out selected geometry based on reflection detail
|
||||
S32 detail = gSavedSettings.getS32("RenderReflectionDetail");
|
||||
if (detail > 0)
|
||||
//if (detail > 0)
|
||||
{ //mask out selected geometry based on reflection detail
|
||||
{
|
||||
if (detail < 4)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
|
||||
gPipeline.pushRenderTypeMask();
|
||||
if (detail < 3)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
|
||||
if (detail < 2)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
||||
if (detail < 1)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
|
||||
LLPipeline::RENDER_TYPE_VOIDWATER,
|
||||
LLPipeline::RENDER_TYPE_GROUND,
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS,
|
||||
LLPipeline::RENDER_TYPE_WL_CLOUDS,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
static LLCachedControl<bool> skip_distortion_updates("SkipReflectOcclusionUpdates",false);
|
||||
LLPipeline::sSkipUpdate = skip_distortion_updates;
|
||||
LLGLUserClipPlane clip_plane(plane, mat, projection);
|
||||
LLGLDisable cull(GL_CULL_FACE);
|
||||
updateCull(camera, ref_result, 1);
|
||||
stateSort(camera, ref_result);
|
||||
gPipeline.grabReferences(ref_result);
|
||||
renderGeom(camera);
|
||||
LLPipeline::sSkipUpdate = FALSE;
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
gPipeline.grabReferences(ref_result);
|
||||
LLGLUserClipPlane clip_plane(plane, mat, projection);
|
||||
renderGeom(camera);
|
||||
LLPipeline::sSkipUpdate = FALSE;
|
||||
}
|
||||
}
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
glCullFace(GL_BACK);
|
||||
glPopMatrix();
|
||||
|
||||
@@ -397,7 +397,9 @@ public:
|
||||
RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000,
|
||||
RENDER_DEBUG_SCULPTED = 0x0080000,
|
||||
RENDER_DEBUG_AVATAR_VOLUME = 0x0100000,
|
||||
RENDER_DEBUG_AGENT_TARGET = 0x0200000,
|
||||
RENDER_DEBUG_BUILD_QUEUE = 0x0200000,
|
||||
RENDER_DEBUG_AGENT_TARGET = 0x0400000,
|
||||
RENDER_DEBUG_UPDATE_TYPE = 0x0800000,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -602,8 +604,6 @@ protected:
|
||||
std::vector<LLFace*> mSelectedFaces;
|
||||
|
||||
LLPointer<LLViewerImage> mFaceSelectImagep;
|
||||
LLPointer<LLViewerImage> mBloomImagep;
|
||||
LLPointer<LLViewerImage> mBloomImage2p;
|
||||
|
||||
U32 mLightMask;
|
||||
U32 mLightMovingMask;
|
||||
@@ -620,6 +620,7 @@ public:
|
||||
};
|
||||
|
||||
void render_bbox(const LLVector3 &min, const LLVector3 &max);
|
||||
void render_hud_elements();
|
||||
|
||||
extern LLPipeline gPipeline;
|
||||
extern BOOL gRenderForSelect;
|
||||
|
||||
@@ -1,63 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="false" height="950" name="avatar_texture_debug"
|
||||
title="Avatar Textures" width="960">
|
||||
<text bottom="-40" height="16" left="10" name="label" width="80">
|
||||
Baked Textures
|
||||
</text>
|
||||
<text bottom="-40" height="16" left="150" name="composite_label" width="120">
|
||||
Composite Textures
|
||||
</text>
|
||||
|
||||
<floater
|
||||
can_close="true"
|
||||
can_drag_on_left="false"
|
||||
can_minimize="true"
|
||||
can_resize="false"
|
||||
height="570"
|
||||
width="600"
|
||||
name="avatar_texture_debug"
|
||||
title="Avatar Textures"
|
||||
rect_control="FloaterAvatarTextRect"
|
||||
>
|
||||
<button bottom="-45" left="-160" font="SansSerif" halign="center" height="20" label="Dump IDs to Console"
|
||||
label_selected="Dump" mouse_opaque="true" name="Dump" scale_image="TRUE" width="150" />
|
||||
|
||||
<texture_picker bottom="-130" height="111" label="Hair Baked" left="4" name="hair-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Hair" left_delta="99" name="hair" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Eyes Baked" left_delta="99" name="eyes-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Eyes" left_delta="99" name="iris" width="96" />
|
||||
|
||||
<texture_picker bottom_delta="-145" height="143" label="Hair" left="10" name="hair-baked"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Hair" left_delta="135" name="hair"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="-110" height="111" label="Head Baked" left="4" name="head-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Makeup" left_delta="99" name="head bodypaint" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Head Tattoo" left_delta="99" name="head_tattoo" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Upper Tattoo" left_delta="99" name="upper_tattoo" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Lower Tattoo" left_delta="99" name="lower_tattoo" width="96" />
|
||||
|
||||
<texture_picker bottom_delta="-150" height="143" label="Head" left="10" name="head-baked"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Makeup" left_delta="135"
|
||||
name="head bodypaint" width="128" />
|
||||
<texture_picker bottom_delta="-110" height="111" label="Upper Baked" left="4" name="upper-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Upper Skin" left_delta="99" name="upper bodypaint" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Undershirt" left_delta="99" name="undershirt" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Shirt" left_delta="99" name="shirt" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Upper Jacket" left_delta="99" name="upper jacket" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Gloves" left_delta="99" name="gloves" width="96" />
|
||||
|
||||
<texture_picker bottom_delta="-150" height="143" label="Eyes" left="10" name="eyes-baked"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Eye" left_delta="135" name="iris"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="-110" height="111" label="Lower Baked" left="4" name="lower-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Lower Skin" left_delta="99" name="lower bodypaint" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Underpants" left_delta="99" name="underpants" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Pants" left_delta="99" name="pants" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Lower Jacket" left_delta="99" name="lower jacket" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Socks" left_delta="99" name="socks" width="96" />
|
||||
|
||||
<texture_picker bottom_delta="-150" height="143" label="Upper Body" left="10"
|
||||
name="upper-baked" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Upper Body Tattoo" left_delta="135"
|
||||
name="upper bodypaint" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Undershirt" left_delta="135"
|
||||
name="undershirt" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Gloves" left_delta="135" name="gloves"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Shirt" left_delta="135" name="shirt"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Upper Jacket" left_delta="135"
|
||||
name="upper jacket" width="128" />
|
||||
<texture_picker bottom_delta="-110" height="111" label="Skirt Baked" left="4" name="skirt-baked" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Skirt" left_delta="99" name="skirt" width="96" />
|
||||
<texture_picker bottom_delta="0" height="111" label="Shoes" left_delta="99" name="shoes" width="96" />
|
||||
|
||||
<texture_picker bottom_delta="-150" height="143" label="Lower Body" left="10"
|
||||
name="lower-baked" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Lower Body Tattoo" left_delta="135"
|
||||
name="lower bodypaint" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Underpants" left_delta="135"
|
||||
name="underpants" width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Socks" left_delta="135" name="socks"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Shoes" left_delta="135" name="shoes"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Pants" left_delta="135" name="pants"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Jacket" left_delta="135" name="lower jacket"
|
||||
width="128" />
|
||||
|
||||
<texture_picker bottom_delta="-150" height="143" label="Skirt" left="10" name="skirt-baked"
|
||||
width="128" />
|
||||
<texture_picker bottom_delta="0" height="143" label="Skirt" left_delta="135"
|
||||
name="skirt" width="128" />
|
||||
</floater>
|
||||
|
||||
@@ -1319,6 +1319,12 @@ scratch and wear it.
|
||||
left="8" mouse_opaque="true" name="HeightTextI" v_pad="0" width="140">
|
||||
(imperial)
|
||||
</text>
|
||||
<button name="Import" label="Import"
|
||||
bottom="-486" left="10" height="20" width="70"
|
||||
follows="left|bottom" font="SansSerif" halign="center" />
|
||||
<button name="Export" label="Export"
|
||||
bottom="-506" left="10" height="20" width="70"
|
||||
follows="left|bottom" font="SansSerif" halign="center" />
|
||||
<button bottom="-536" follows="right|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Cancel" label_selected="Cancel" mouse_opaque="true"
|
||||
name="Cancel" right="-10" scale_image="true" width="100" />
|
||||
@@ -1327,6 +1333,6 @@ scratch and wear it.
|
||||
name="Ok" right="-116" scale_image="true" width="100" />
|
||||
<button bottom="-536" follows="left|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Make Outfit..." label_selected="Make Outfit..."
|
||||
mouse_opaque="true" name="Make Outfit" left="100" scale_image="true"
|
||||
mouse_opaque="true" name="Make Outfit" left="10" scale_image="true"
|
||||
width="100" />
|
||||
</floater>
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="true" height="400" width="310" min_width="310" min_height="200"
|
||||
name="floater_export" title="Export...">
|
||||
<scroll_list bottom="76" can_resize="true" column_padding="0" draw_heading="false"
|
||||
follows="left|top|bottom|right" left="10" multi_select="true"
|
||||
name="export_list" right="-10" search_column="2" top="-25">
|
||||
<column name="checked" width="20" />
|
||||
<column name="type" width="20" />
|
||||
<column dynamicwidth="true" label="Name" name="name" />
|
||||
<column name="avatarid" visible="false" />
|
||||
</scroll_list>
|
||||
<text bottom="50" left="10" width="100" height="20">Select/Deselect:</text>
|
||||
<button bottom="52" follows="bottom|left" height="20" label="All"
|
||||
left="110" name="select_all_btn" width="40" />
|
||||
<button bottom="52" follows="bottom|left" height="20" label="Objects"
|
||||
left_delta="42" name="select_objects_btn" width="64" />
|
||||
<button bottom="52" follows="bottom|left" height="20" label="Wearables"
|
||||
left_delta="66" name="select_wearables_btn" width="80" />
|
||||
|
||||
<text bottom="25" left="10" width="250" height="20" name="names_progress_text"></text>
|
||||
<check_box bottom="28" left="186" width="250" height="20" name="download_textures" label="Download Textures" initial_value="false"/>
|
||||
|
||||
<button bottom="8" follows="bottom|left" height="20" label="Make Copy"
|
||||
left="158" width="142" name="make_copy_btn" />
|
||||
</floater>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="false"
|
||||
can_resize="false" height="440" name="Import" title="" width="680">
|
||||
<text height="15" left="10" name="name_label" top="10">
|
||||
Name:
|
||||
</text>
|
||||
<line_editor height="19" max_length="254" name="name_form" width="280" />
|
||||
<text height="15" name="description_label">
|
||||
Description:
|
||||
</text>
|
||||
<line_editor height="19" max_length="254" name="description_form" width="280" />
|
||||
<text height="15" name="preview_label">
|
||||
Files to upload:
|
||||
</text>
|
||||
<scroll_list draw_border="true" height="280" left="10" multi_select="true"
|
||||
name="upload_list" top="-30" width="400" />
|
||||
<button bottom="10" height="20" label="Cancel" left="182" name="cancel_btn" width="64" />
|
||||
<button bottom="10" height="20" label="Upload ([ULOADFEE])" left="31" name="ok_btn"
|
||||
width="110" />
|
||||
<text bottom="356" height="15" left="420" name="preview_label2">
|
||||
Image Preview:
|
||||
</text>
|
||||
<icon height="256" left="420" name="dummy_preview" width="256" />
|
||||
</floater>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="true" height="400" width="310" min_width="310" min_height="200"
|
||||
name="floater_import" title="Import Options">
|
||||
<scroll_list bottom="76" can_resize="true" column_padding="0" draw_heading="false"
|
||||
follows="left|top|bottom|right" left="10" multi_select="true"
|
||||
name="import_list" right="-10" search_column="2" top="-25">
|
||||
<column name="checked" width="20" />
|
||||
<column name="type" width="20" />
|
||||
<column dynamicwidth="true" label="Name" name="name" />
|
||||
</scroll_list>
|
||||
<text bottom="50" left="10" width="100" height="20">Select/Deselect:</text>
|
||||
<button bottom="52" follows="bottom|left" height="20" label="All"
|
||||
left="110" name="select_all_btn" width="40" />
|
||||
<button bottom="52" follows="bottom|left" height="20" label="Objects"
|
||||
left_delta="42" name="select_objects_btn" width="64" />
|
||||
<button bottom="52" follows="bottom|left" height="20" label="Wearables"
|
||||
left_delta="66" name="select_wearables_btn" width="80" />
|
||||
|
||||
<check_box bottom="28" left="10" width="250" height="20" name="keep_position_check" label="Use previous region position" initial_value="false"/>
|
||||
<check_box bottom="28" left="186" width="250" height="20" name="upload_textures" label="Upload Textures" initial_value="false"/>
|
||||
|
||||
<button bottom="8" follows="bottom|left" height="20" label="OK"
|
||||
left="10" width="142" name="ok_btn" />
|
||||
<button bottom="8" follows="bottom|left" height="20" label="Cancel"
|
||||
left="158" width="142" name="cancel_btn" />
|
||||
</floater>
|
||||
@@ -1,146 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
width="650" height="400" min_width="600" min_height="400" max_width="600"
|
||||
name="browser" title="Upload Browser" control_name="UploadBrowserFloater">
|
||||
<combo_box allow_text_entry="false" bottom="-42" follows="left|top" height="18" left="10" max_chars="20"
|
||||
mouse_opaque="true" enabled="true" width="108" name="bookmark_combo" tool_tip="Jump to a common folder">
|
||||
<combo_item name="None" enabled="false" value="None">
|
||||
Bookmarked:
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<button bottom_delta="0" follows="top|left" height="18" label="+"
|
||||
left_delta="112" name="add_bookmark_button" tool_tip="Add current folder to Bookmarks"
|
||||
width="20" />
|
||||
<button bottom_delta="0" follows="top|left" height="18" label="-"
|
||||
left_delta="22" name="remove_bookmark_button" tool_tip="Remove selected folder from Bookmarks"
|
||||
width="20" />
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-37" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="213"
|
||||
mouse_opaque="true" name="drive_label" v_pad="0" width="128">
|
||||
Drive:
|
||||
</text>
|
||||
<combo_box allow_text_entry="false" bottom_delta="-5" follows="left|top" height="18" left_delta="35" max_chars="20"
|
||||
mouse_opaque="true" enabled="true" width="40" name="drive_combo" tool_tip="Switch to another drive">
|
||||
<combo_item name="None" enabled="false" value="None">
|
||||
All
|
||||
</combo_item>
|
||||
<combo_item name="None" enabled="false" value="None">
|
||||
Of
|
||||
</combo_item>
|
||||
<combo_item name="None" enabled="false" value="None">
|
||||
Them
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<line_editor bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||
width="255" name="dir_path" left="10" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||
<button bottom_delta="-1" follows="top|left" height="18" label=">" left_delta="257"
|
||||
name="directory_button" tool_tip="Go to this filepath" width="20" />
|
||||
<scroll_list bottom="25" can_resize="true" column_padding="0" draw_heading="true"
|
||||
follows="left|top|bottom" left="7" multi_select="true"
|
||||
name="file_list" width="280" search_column="1"
|
||||
tool_tip="Hold shift or control while clicking to select multiple files"
|
||||
top="-68">
|
||||
<column name="file_type" width="0" />
|
||||
<column name="asset_type" width="0" />
|
||||
<column image="ff_edit_mine_button.tga" name="icon_inventory_type"
|
||||
tool_tip="Inventory Type" width="20" />
|
||||
<column dynamicwidth="true" label="Filename" name="file_name" tool_tip="Filename" />
|
||||
</scroll_list>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="9" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
|
||||
mouse_opaque="true" name="filter_label" v_pad="0" width="128">
|
||||
Filter:
|
||||
</text>
|
||||
<combo_box allow_text_entry="false" bottom_delta="-4" follows="left|bottom" height="18" left_delta="30" max_chars="20"
|
||||
mouse_opaque="true" enabled="true" width="108" name="file_filter_combo" tool_tip="Limit results to a specific type">
|
||||
<combo_item name="None" value="None">
|
||||
None
|
||||
</combo_item>
|
||||
<combo_item name="Animation" value="Animation" tool_tip="BVH">
|
||||
Animation
|
||||
</combo_item>
|
||||
<combo_item name="Sound" value="Sound" tool_tip="WAV">
|
||||
Sound
|
||||
</combo_item>
|
||||
<combo_item name="Texture" value="Texture" tool_tip="BMP, JPG, PNG, TGA">
|
||||
Texture
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="5" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||
font="SansSerifSmall" h_pad="0" halign="right" height="12" left="155"
|
||||
mouse_opaque="true" name="result_label" v_pad="0" width="128">
|
||||
Files: [COUNT]
|
||||
</text>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||
Name:
|
||||
</text>
|
||||
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||
width="214" name="asset_name" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||
Description:
|
||||
</text>
|
||||
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||
width="214" name="asset_desc" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||
<text bottom_delta="-20" follows="top|left" height="12" name="multiple_uploads_label" left="302">
|
||||
Multiple files selected. Total cost is:
|
||||
</text>
|
||||
<text bottom_delta="0" follows="top|left" height="12" name="texture_preview_label" left="302">
|
||||
Preview image as:
|
||||
</text>
|
||||
<combo_box bottom_delta="-5" follows="left|top" height="18" label="Texture Preview"
|
||||
left_delta="120" name="texture_preview_combo" width="164">
|
||||
<combo_item name="Image">
|
||||
Image
|
||||
</combo_item>
|
||||
<combo_item name="Hair">
|
||||
Hair
|
||||
</combo_item>
|
||||
<combo_item name="FemaleHead">
|
||||
Female Head
|
||||
</combo_item>
|
||||
<combo_item name="FemaleUpperBody">
|
||||
Female Upper Body
|
||||
</combo_item>
|
||||
<combo_item name="FemaleLowerBody">
|
||||
Female Lower Body
|
||||
</combo_item>
|
||||
<combo_item name="MaleHead">
|
||||
Male Head
|
||||
</combo_item>
|
||||
<combo_item name="MaleUpperBody">
|
||||
Male Upper Body
|
||||
</combo_item>
|
||||
<combo_item name="MaleLowerBody">
|
||||
Male Lower Body
|
||||
</combo_item>
|
||||
<combo_item name="Skirt">
|
||||
Skirt
|
||||
</combo_item>
|
||||
<combo_item name="SculptedPrim">
|
||||
Sculpted Prim
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<text bottom="250" follows="top|left" left="302" name="bad_image_text">
|
||||
Unable to read image.
|
||||
|
||||
Try saving image as 24 bit Targa (.tga).
|
||||
</text>
|
||||
<slider bottom_delta="0" can_edit_text="false" enabled="false" width="185" height="16" mouse_opaque="true"
|
||||
decimal_digits="0" increment="1" initial_val="16" left="30" min_val="1.0" max_val="16.0" visible="false"
|
||||
name="timeline" show_text="false" value="1" control_name="AnimationTimelineScrubber"/>
|
||||
<button bottom="9" follows="bottom|left" height="22" label="Upload ([UPLOADFEE])"
|
||||
left="325" name="upload_button" width="120" />
|
||||
<button bottom_delta="0" follows="bottom|left" height="22" label="Temp Upload"
|
||||
left_delta="125" name="upload_button" tool_tip="Uploads a temporary version of the texture. It's free, but has a limited lifespan and area it can be used."
|
||||
width="120" />
|
||||
</tab_container>
|
||||
</floater>
|
||||
@@ -69,6 +69,10 @@
|
||||
<on_click function="Tools.SelectedScriptAction" userdata="reset" />
|
||||
<on_enable function="EditableSelected" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="false" hidden="false" label="Export" mouse_opaque="true" name="Export">
|
||||
<on_click function="Object.Export" />
|
||||
<on_enable function="Object.EnableExport" />
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
|
||||
<on_click function="Object.Mute" />
|
||||
@@ -81,6 +85,11 @@
|
||||
<menu_item_call enabled="true" label="Derender" mouse_opaque="true" name="Derender">
|
||||
<on_click function="Object.DERENDER" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="false" label="Report..." mouse_opaque="true"
|
||||
name="Report Abuse...">
|
||||
<on_click function="Object.ReportAbuse" />
|
||||
<on_enable function="Object.EnableReportAbuse" />
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="false" label="Buy..." mouse_opaque="true" name="Buy...">
|
||||
<on_click function="Object.Buy" />
|
||||
|
||||
@@ -24,17 +24,14 @@
|
||||
mouse_opaque="true" enabled="true" >
|
||||
<on_click function="File.UploadBulk" userdata="" />
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom="-86" enabled="true" height="19"
|
||||
label="Import XML..." left="0" mouse_opaque="true"
|
||||
name="Import XML" width="243">
|
||||
<on_click function="File.ImportXML" userdata="" />
|
||||
<on_enable function ="File.EnableImportXML" userdata="" />
|
||||
<menu_item_call enabled="false" hidden="false" label="Import XML" mouse_opaque="true" name="Import">
|
||||
<on_click function="Object.Import" />
|
||||
<on_enable function="Object.EnableImport" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="false" hidden="false" label="Import with Textures" mouse_opaque="true" name="Import">
|
||||
<on_click function="Object.ImportUpload" />
|
||||
<on_enable function="Object.EnableImport" />
|
||||
</menu_item_call>
|
||||
<!--<menu_item_check bottom="-384" enabled="true" height="19" label="Upload Browser" left="0"
|
||||
mouse_opaque="true" name="ascentuploadbrowser" width="211">
|
||||
<on_click function="ShowFloater" userdata="ascentuploadbrowser" />
|
||||
<on_check function="FloaterVisible" userdata="ascentuploadbrowser" />
|
||||
</menu_item_check>-->
|
||||
<menu_item_separator enabled="true" label="-----------" mouse_opaque="true" name="separator" />
|
||||
<menu_item_call enabled="true" label="Set Default Permissions..."
|
||||
mouse_opaque="true" name="perm prefs" >
|
||||
|
||||
@@ -5236,6 +5236,27 @@ Cannot retrieve grid info from server.
|
||||
Builds with extended hollow or extended hole size do not render properly on other viewers. Please keep this option checked, if you want your builds looking properly in other viewers.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ExportFailed"
|
||||
type="alertmodal">
|
||||
Bad permissions for the exported object. Export aborted.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ExportPartial"
|
||||
type="alertmodal">
|
||||
Object exported. Some textures could not be saved due to: [REASON]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="ExportSuccessful"
|
||||
type="notifytip">
|
||||
Export successful.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="SystemMessageTip"
|
||||
|
||||
@@ -80,23 +80,23 @@ Hover your mouse over the options for more help.
|
||||
<column label="Title" name="title" relwidth="0.30" />
|
||||
<column label="Last Login" name="online" relwidth="0.25" />
|
||||
</name_list>
|
||||
<text bottom_delta="-18" font="SansSerif" name="text_group_preferences">
|
||||
<text bottom_delta="-10" font="SansSerif" name="text_group_preferences">
|
||||
Group Preferences
|
||||
</text>
|
||||
<panel background_opaque="true" background_visible="false" bevel_style="in"
|
||||
border="true"
|
||||
bottom_delta="-104" follows="left|top" height="96" left_delta="0"
|
||||
bottom_delta="-94" follows="left|top" height="86" left_delta="0"
|
||||
mouse_opaque="true" name="preferences_container" width="404">
|
||||
<check_box bottom="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom="-17" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="true" label="Show in search" left="4" mouse_opaque="true"
|
||||
name="show_in_group_list" radio_style="false"
|
||||
tool_tip="Let people see this group in search results." width="95" />
|
||||
<check_box bottom_delta="-18" follows="right|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="right|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Open enrollment" left="4" mouse_opaque="true"
|
||||
name="open_enrollement" radio_style="false"
|
||||
tool_tip="Sets whether this group allows new members to join without being invited."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Enrollment fee: [CURRENCY]" left_delta="16"
|
||||
max_length="5" mouse_opaque="true" name="check_enrollment_fee"
|
||||
radio_style="false"
|
||||
@@ -109,7 +109,10 @@ Hover your mouse over the options for more help.
|
||||
mouse_opaque="true" name="spin_enrollment_fee" right_delta="170"
|
||||
tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."
|
||||
v_pad="0" width="65" />
|
||||
<combo_box allow_text_entry="false" bottom_delta="-30" follows="left|top" height="20" left="6"
|
||||
<text bottom_delta="-12" left="4" font="SansSerifSmall" name="content_rating">
|
||||
Content Rating
|
||||
</text>
|
||||
<combo_box allow_text_entry="false" bottom_delta="-25" follows="left|top" height="20" left="6"
|
||||
max_chars="20" mouse_opaque="true" name="group_mature_check"
|
||||
tool_tip="Sets whether your group information is considered mature."
|
||||
width="130">
|
||||
@@ -124,29 +127,27 @@ Hover your mouse over the options for more help.
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
|
||||
<panel background_opaque="false" border="false" bottom="-31" height="32" left="225"
|
||||
name="title_container" width="160">
|
||||
<text bottom="17" font="SansSerifSmall" left="0" name="active_title_label">
|
||||
My Active Title
|
||||
</text>
|
||||
<combo_box length="150" bottom_delta="-22" follows="left|top" height="16" left="0" name="active_title"
|
||||
tool_tip="Sets the title that appears in your avatar's name tag when this group is active." />
|
||||
</panel>
|
||||
<check_box bottom_delta="-25" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Receive group notices" left_delta="0"
|
||||
<check_box bottom="-17" left="225" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Receive group notices"
|
||||
mouse_opaque="true" name="receive_notices" radio_style="false"
|
||||
tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Join group chat" left_delta="0"
|
||||
mouse_opaque="true" name="receive_chat" radio_style="false"
|
||||
tool_tip="Sets whether you want to participate in group chat. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Join group chat" left_delta="0"
|
||||
mouse_opaque="true" name="receive_chat" radio_style="false"
|
||||
tool_tip="Sets whether you want to participate in group chat. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="List group in my profile" left_delta="0"
|
||||
mouse_opaque="true" name="list_groups_in_profile" radio_style="false"
|
||||
tool_tip="Sets whether you want to list this group in your Profile"
|
||||
width="95" />
|
||||
<text bottom_delta="-10" font="SansSerifSmall" left_delta="0" name="active_title_label">
|
||||
My Active Title
|
||||
</text>
|
||||
<combo_box length="120" width="175" bottom_delta="-25" follows="left|top" height="20" left_delta="0" name="active_title"
|
||||
tool_tip="Sets the title that appears in your avatar's name tag when this group is active." />
|
||||
</panel>
|
||||
</panel>
|
||||
<string name="incomplete_member_data_str">
|
||||
Retrieving member data
|
||||
|
||||
Reference in New Issue
Block a user