Merge remote-tracking branch 'fairydust/master'

This commit is contained in:
Inusaito Sayori
2014-04-15 19:57:31 -04:00
32 changed files with 270 additions and 1055 deletions

View File

@@ -60,7 +60,6 @@ set(llcommon_SOURCE_FILES
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
llindraconfigfile.cpp
llinitparam.cpp
llinstancetracker.cpp
llliveappconfig.cpp
@@ -186,7 +185,6 @@ set(llcommon_HEADER_FILES
llheartbeat.h
llhttpstatuscodes.h
llindexedqueue.h
llindraconfigfile.h
llinitparam.h
llinstancetracker.h
llkeythrottle.h

View File

@@ -1,119 +0,0 @@
/**
* @file llindraconfigfile.cpp
*
*
* This class is an LLLiveFile that has config info for indra
* Currently only whether it's blacklisted
*
* $LicenseInfo:firstyear=2007&license=viewergpl$
*
* Copyright (c) 2007-2009, Linden Research, Inc.
*
* 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 "llindraconfigfile.h"
#include "llfile.h"
#include "llsd.h"
#include "llsdserialize.h"
#include "llframetimer.h"
static std::string sConfigDir = "";
static const char indraConfigFileName[] = "indra.xml";
LLIndraConfigFile::LLIndraConfigFile()
: LLLiveFile(filename()),
mConfig(LLSD())
{
}
//static
void LLIndraConfigFile::initClass(const std::string& config_dir)
{
sConfigDir = config_dir;
llinfos << "LLIndraConfigFile::initClass config dir "
<< config_dir << "/" << indraConfigFileName << llendl;
}
LLSD LLIndraConfigFile::getConfig(const std::string& config_name)
{
if (sConfigDir.empty())
{
llerrs << "LLIndraConfigFile::initClass() not called" << llendl;
}
LLFrameTimer::updateFrameTime();
static LLIndraConfigFile the_file;
the_file.checkAndReload();
return the_file.mConfig[config_name];
}
std::string LLIndraConfigFile::filename()
{
std::ostringstream ostr;
ostr << sConfigDir
<< "/" << indraConfigFileName;
return ostr.str();
}
/* virtual */
bool LLIndraConfigFile::loadFile()
{
llinfos << "LLIndraConfigFile::loadFile: reading from "
<< filename() << llendl;
LLSD config;
{
llifstream file(filename());
if (file.is_open())
{
LLSDSerialize::fromXML(config, file);
}
if (config.isUndefined())
{
llinfos << "LLIndraConfigFile::loadFile: file missing, ill-formed,"
" or simply undefined; not changing the blacklist" << llendl;
return false;
}
}
if (config.isMap())
{
mConfig = config;
return true;
}
else
{
llwarns << "LLIndraConfigFile: " << indraConfigFileName << " expects a map; wrong format" << llendl;
return false;
}
}

View File

@@ -1,61 +0,0 @@
/**
* @file llindraconfigfile.h
* @brief manages configuration file for indra.xml
*
* $LicenseInfo:firstyear=2007&license=viewergpl$
*
* Copyright (c) 2007-2009, Linden Research, Inc.
*
* 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$
*/
#ifndef LL_LLINDRACONFIGFILE_H
#define LL_LLINDRACONFIGFILE_H
#include "linden_common.h"
#include <string>
#include "lllivefile.h"
#include "llsd.h"
// To use, call LLIndraConfigFile::initClass(config_dir);
// Then whenever getConfig is called, it will check and reload automatically
class LLIndraConfigFile : public LLLiveFile
{
public:
LLIndraConfigFile();
static void initClass(const std::string& config_dir);
static LLSD getConfig(const std::string& config_name);
private:
static std::string filename();
protected:
/* virtual */ bool loadFile();
LLSD mConfig;
};
#endif //LL_LLINDRACONFIGFILE_H

View File

@@ -965,7 +965,6 @@ P(newAgentInventoryVariablePriceResponder);
P(objectCostResponder);
P(objectLinksetsResponder);
P(physicsFlagsResponder);
P(placeAvatarTeleportResponder);
P(productInfoRequestResponder);
P(regionResponder);
P(remoteParcelRequestResponder);

View File

@@ -168,6 +168,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if ( !get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source) || !pos_source )
{
llwarns << "Could not find dom sources for basic geo data; invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
@@ -188,27 +189,78 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
LLVolumeFace::VertexMapData::PointMap point_map;
for (U32 i = 0; i < idx.getCount(); i += idx_stride)
U32 index_count = idx.getCount();
U32 vertex_count = pos_source ? v.getCount() : 0;
U32 tc_count = tc_source ? tc.getCount() : 0;
U32 norm_count = norm_source ? n.getCount() : 0;
for (U32 i = 0; i < index_count; i += idx_stride)
{
LLVolumeFace::VertexData cv;
if (pos_source)
{
// guard against model data specifiying out of range indices or verts
//
if (((i + pos_offset) > index_count)
|| ((idx[i+pos_offset]*3+2) > vertex_count))
{
llwarns << "Out of range index data; invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0],
v[idx[i+pos_offset]*3+1],
v[idx[i+pos_offset]*3+2]));
if (!cv.getPosition().isFinite3())
{
llwarns << "Nan positional data, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
if (tc_source)
{
// guard against model data specifiying out of range indices or tcs
//
if (((i + tc_offset) > index_count)
|| ((idx[i+tc_offset]*2+1) > tc_count))
{
llwarns << "Out of range TC indices." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
tc[idx[i+tc_offset]*2+1]);
if (!cv.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
if (norm_source)
{
// guard against model data specifiying out of range indices or norms
//
if (((i + norm_offset) > index_count)
|| ((idx[i+norm_offset]*3+2) > norm_count))
{
llwarns << "Found out of range norm indices, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
n[idx[i+norm_offset]*3+1],
n[idx[i+norm_offset]*3+2]));
if (!cv.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
BOOL found = FALSE;
@@ -263,7 +315,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
LLVolumeFace& new_face = *face_list.rbegin();
if (!norm_source)
{
//l_aligned_free_16(new_face.mNormals);
//ll_aligned_free_16(new_face.mNormals);
new_face.mNormals = NULL;
}
@@ -335,6 +387,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (!get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source))
{
llwarns << "Could not get DOM sources for basic geo data, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
@@ -366,6 +419,11 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
LLVolumeFace::VertexMapData::PointMap point_map;
U32 index_count = idx.getCount();
U32 vertex_count = pos_source ? v.getCount() : 0;
U32 tc_count = tc_source ? tc.getCount() : 0;
U32 norm_count = norm_source ? n.getCount() : 0;
U32 cur_idx = 0;
for (U32 i = 0; i < vcount.getCount(); ++i)
{ //for each polygon
@@ -378,22 +436,68 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (pos_source)
{
// guard against model data specifiying out of range indices or verts
//
if (((cur_idx + pos_offset) > index_count)
|| ((idx[cur_idx+pos_offset]*3+2) > vertex_count))
{
llwarns << "Out of range position indices, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0],
v[idx[cur_idx+pos_offset]*3+1],
v[idx[cur_idx+pos_offset]*3+2]);
if (!cv.getPosition().isFinite3())
{
llwarns << "Found NaN while loading positions from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
if (tc_source)
{
// guard against model data specifiying out of range indices or tcs
//
if (((cur_idx + tc_offset) > index_count)
|| ((idx[cur_idx+tc_offset]*2+1) > tc_count))
{
llwarns << "Out of range TC indices, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.mTexCoord.setVec(tc[idx[cur_idx+tc_offset]*2+0],
tc[idx[cur_idx+tc_offset]*2+1]);
if (!cv.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
if (norm_source)
{
// guard against model data specifiying out of range indices or norms
//
if (((cur_idx + norm_offset) > index_count)
|| ((idx[cur_idx+norm_offset]*3+2) > norm_count))
{
llwarns << "Out of range norm indices, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
n[idx[cur_idx+norm_offset]*3+1],
n[idx[cur_idx+norm_offset]*3+2]);
if (!cv.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
cur_idx += idx_stride;
@@ -560,6 +664,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domVertices* vertices = (domVertices*) elem.cast();
if (!vertices)
{
llwarns << "Could not find vertex source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
domInputLocal_Array& v_inp = vertices->getInput_array();
@@ -573,6 +678,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
v = &(src->getFloat_array()->getValue());
@@ -588,6 +694,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
n = &(src->getFloat_array()->getValue());
@@ -600,6 +707,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
t = &(src->getFloat_array()->getValue());
@@ -634,6 +742,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
vert.getPosition().set(v->get(v_idx),
v->get(v_idx+1),
v->get(v_idx+2));
if (!vert.getPosition().isFinite3())
{
llwarns << "Found NaN while loading position data from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
//bounds check n and t lookups because some FBX to DAE converters
@@ -646,6 +760,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
vert.getNormal().set(n->get(n_idx),
n->get(n_idx+1),
n->get(n_idx+2));
if (!vert.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
else
{
@@ -659,6 +779,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
vert.mTexCoord.setVec(t->get(t_idx),
t->get(t_idx+1));
if (!vert.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
}
else
{
@@ -1591,6 +1717,7 @@ LLSD LLModel::writeModel(
mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
mdl[model_names[idx]][i]["TexCoord0"] = tc;
}
mdl[model_names[idx]][i]["TriangleList"] = indices;
if (skinning)

View File

@@ -246,7 +246,6 @@ set(viewer_SOURCE_FILES
llfloaterpathfindingcharacters.cpp
llfloaterpathfindinglinksets.cpp
llfloaterpathfindingobjects.cpp
llfloaterpermissionsmgr.cpp
llfloaterperms.cpp
llfloaterpostcard.cpp
llfloaterpostprocess.cpp
@@ -768,7 +767,6 @@ set(viewer_HEADER_FILES
llfloaterpathfindingcharacters.h
llfloaterpathfindinglinksets.h
llfloaterpathfindingobjects.h
llfloaterpermissionsmgr.h
llfloaterperms.h
llfloaterpostcard.h
llfloaterpostprocess.h

View File

@@ -11145,22 +11145,6 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>PermissionsManagerRect</key>
<map>
<key>Comment</key>
<string>Rectangle for permissions manager window</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>85</integer>
<integer>300</integer>
<integer>0</integer>
</array>
</map>
<key>PickerContextOpacity</key>
<map>
<key>Comment</key>

View File

@@ -29,8 +29,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "llviewerprecompiledheaders.h"
#ifndef MS_CHATBARCMDLINE_H
#define MS_CHATBARCMDLINE_H
#include "llchatbar.h"
bool cmd_line_chat(std::string revised_text, EChatType type);
#endif

View File

@@ -22,6 +22,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SG_GENERICHANDLERS_H
#define SG_GENERICHANDLERS_H
class GenericHandlers
{
public:
@@ -29,3 +32,5 @@ public:
};
extern GenericHandlers *gGenericHandlers;
#endif // SG_GENERIC_HANDLERS

View File

@@ -31,6 +31,9 @@
* Modified, debugged, optimized and improved by Henri Beauchamp Feb 2010.
*/
#ifndef JC_FLOATERAREASEARCH_H
#define JC_FLOATERAREASEARCH_H
#include "llfloater.h"
#include "lluuid.h"
#include "llstring.h"
@@ -90,3 +93,5 @@ private:
std::string mFilterStrings[LIST_OBJECT_COUNT];
};
#endif

View File

@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LGG_DICDOWNLOAD_H
#define LGG_DICDOWNLOAD_H
class LggDicDownload
{
@@ -35,3 +37,4 @@ class LggDicDownload
static void show( BOOL showw , std::vector<std::string> shortNames, std::vector<std::string> longNames, void * data);
};
#endif

View File

@@ -50,7 +50,6 @@
#include "llviewerstats.h"
#include "llviewerregion.h"
#include "sgversion.h"
#include "llviewerbuild.h"
#include "lluictrlfactory.h"
#include "lluri.h"
#include "llweb.h"
@@ -141,7 +140,7 @@ LLFloaterAbout::LLFloaterAbout()
+ " (64 bit)"
#endif
+ llformat(" %d.%d.%d (%d) %s %s (%s)\n",
gVersionMajor, gVersionMinor, gVersionPatch, LL_VIEWER_BUILD,
gVersionMajor, gVersionMinor, gVersionPatch, gVersionBuild,
__DATE__, __TIME__,
gVersionChannel));
support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));

View File

@@ -10,6 +10,10 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef LL_LLFLOATERAVATARLIST_H
#define LL_LLFLOATERAVATARLIST_H
#include "llavatarname.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloater.h"
@@ -373,3 +377,5 @@ private:
*/
LLUUID mFocusedAvatar;
};
#endif

View File

@@ -1,3 +1,6 @@
#ifndef LL_LLFLOATERMESSAGELOG_H
#define LL_LLFLOATERMESSAGELOG_H
// <edit>
#include "llfloater.h"
#include "llmessagelog.h"
@@ -94,3 +97,5 @@ public:
static void onClickFilterMenu(void* user_data);
};
// </edit>
#endif

View File

@@ -241,6 +241,22 @@ bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a
bool validate_face(const LLVolumeFace& face)
{
for (S32 v = 0; v < face.mNumVertices; v++)
{
if(face.mPositions && !face.mPositions[v].isFinite3())
{
llwarns << "NaN position data in face found!" << llendl;
return false;
}
if(face.mNormals && !face.mNormals[v].isFinite3())
{
llwarns << "NaN normal data in face found!" << llendl;
return false;
}
}
for (S32 i = 0; i < face.mNumIndices; ++i)
{
if (face.mIndices[i] >= face.mNumVertices)
@@ -3807,15 +3823,30 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 triangle_count = 0;
for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
U32 instanced_triangle_count = 0;
//get the triangle count for the whole scene
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter)
{
LLModel* mdl = *iter;
for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
{
triangle_count += mdl->getVolumeFace(i).mNumIndices/3;
LLModel* mdl = instance->mModel;
if (mdl)
{
instanced_triangle_count += mdl->getNumTriangles();
}
}
}
//get the triangle count for the non-instanced set of models
for (U32 i = 0; i < mBaseModel.size(); ++i)
{
triangle_count += mBaseModel[i]->getNumTriangles();
}
//get ratio of uninstanced triangles to instanced triangles
F32 triangle_ratio = (F32) triangle_count / (F32) instanced_triangle_count;
U32 base_triangle_count = triangle_count;
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
@@ -3849,6 +3880,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
if (which_lod > -1 && which_lod < NUM_LOD)
{
limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
//convert from "scene wide" to "non-instanced" triangle limit
limit = (S32) ( (F32) limit*triangle_ratio );
}
}
else
@@ -3953,7 +3986,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 actual_verts = 0;
U32 submeshes = 0;
mRequestedTriangleCount[lod] = triangle_count;
mRequestedTriangleCount[lod] = (S32) ( (F32) triangle_count / triangle_ratio );
mRequestedErrorThreshold[lod] = lod_error_threshold;
glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode);
@@ -4135,28 +4168,36 @@ void LLModelPreview::updateStatusMessages()
//initialize total for this lod to 0
total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0;
for (U32 i = 0; i < mModel[lod].size(); ++i)
{ //for each model in the lod
S32 cur_tris = 0;
S32 cur_verts = 0;
S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces();
for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter)
{
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
{
LLModel* model = instance->mModel;
if (model)
{
//for each model in the lod
S32 cur_tris = 0;
S32 cur_verts = 0;
S32 cur_submeshes = model->getNumVolumeFaces();
for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total
const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j);
cur_tris += face.mNumIndices/3;
cur_verts += face.mNumVertices;
for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total
const LLVolumeFace& face = model->getVolumeFace(j);
cur_tris += face.mNumIndices/3;
cur_verts += face.mNumVertices;
}
//add this model to the lod total
total_tris[lod] += cur_tris;
total_verts[lod] += cur_verts;
total_submeshes[lod] += cur_submeshes;
//store this model's counts to asset data
tris[lod].push_back(cur_tris);
verts[lod].push_back(cur_verts);
submeshes[lod].push_back(cur_submeshes);
}
}
//add this model to the lod total
total_tris[lod] += cur_tris;
total_verts[lod] += cur_verts;
total_submeshes[lod] += cur_submeshes;
//store this model's counts to asset data
tris[lod].push_back(cur_tris);
verts[lod].push_back(cur_verts);
submeshes[lod].push_back(cur_submeshes);
}
}
@@ -4334,34 +4375,38 @@ void LLModelPreview::updateStatusMessages()
}
//add up physics triangles etc
S32 start = 0;
S32 end = mModel[LLModel::LOD_PHYSICS].size();
S32 phys_tris = 0;
S32 phys_hulls = 0;
S32 phys_points = 0;
for (S32 i = start; i < end; ++i)
{ //add up hulls and points and triangles for selected mesh(es)
LLModel* model = mModel[LLModel::LOD_PHYSICS][i];
S32 cur_submeshes = model->getNumVolumeFaces();
LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull;
if (!decomp.empty())
//get the triangle count for the whole scene
for (LLModelLoader::scene::iterator iter = mScene[LLModel::LOD_PHYSICS].begin(), endIter = mScene[LLModel::LOD_PHYSICS].end(); iter != endIter; ++iter)
{
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
{
phys_hulls += decomp.size();
for (U32 i = 0; i < decomp.size(); ++i)
LLModel* model = instance->mModel;
if (model)
{
phys_points += decomp[i].size();
}
}
else
{ //choose physics shape OR decomposition, can't use both
for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total
const LLVolumeFace& face = model->getVolumeFace(j);
phys_tris += face.mNumIndices/3;
S32 cur_submeshes = model->getNumVolumeFaces();
LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull;
if (!decomp.empty())
{
phys_hulls += decomp.size();
for (U32 i = 0; i < decomp.size(); ++i)
{
phys_points += decomp[i].size();
}
}
else
{ //choose physics shape OR decomposition, can't use both
for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total
const LLVolumeFace& face = model->getVolumeFace(j);
phys_tris += face.mNumIndices/3;
}
}
}
}
}
@@ -4523,7 +4568,7 @@ void LLModelPreview::updateLodControls(S32 lod)
if (!lod_combo) return;
S32 lod_mode = lod_combo->getCurrentIndex();
if (lod_mode == 0) // LoD from file
if (lod_mode == LOD_FROM_FILE) // LoD from file
{
fmp->mLODMode[lod] = 0;
for (U32 i = 0; i < num_file_controls; ++i)
@@ -4536,7 +4581,7 @@ void LLModelPreview::updateLodControls(S32 lod)
mFMP->childHide(lod_controls[i] + lod_name[lod]);
}
}
else if (lod_mode == 2) // use LoD above
else if (lod_mode == USE_LOD_ABOVE) // use LoD above
{
fmp->mLODMode[lod] = 2;
for (U32 i = 0; i < num_file_controls; ++i)

View File

@@ -298,6 +298,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
typedef boost::signals2::signal<void (void)> model_loaded_signal_t;
typedef boost::signals2::signal<void (bool)> model_updated_signal_t;
public:
typedef enum
{
LOD_FROM_FILE = 0,
GENERATE,
USE_LOD_ABOVE,
} eLoDMode;
public:
LLModelPreview(S32 width, S32 height, LLFloater* fmp);
virtual ~LLModelPreview();

View File

@@ -1,154 +0,0 @@
/**
* @file llfloaterpermissionsmgr.cpp
* @brief for user control of script permissions
*
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
* Copyright (c) 2003-2009, Linden Research, Inc.
*
* 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 "llviewerprecompiledheaders.h"
#include "llfloaterpermissionsmgr.h"
#include "llscrollcontainer.h"
#include "lltextbox.h"
#include "llbutton.h"
#include "llagent.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llstl.h"
// constants
const S32 MIN_PERM_MGR_WIDTH = 100;
const S32 MIN_PERM_MGR_HEIGHT = 100;
const S32 VPAD = 8;
const S32 HPAD = 8;
const S32 LINE = 16;
// statics
LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::sInstance = NULL;
LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::show()
{
if (!sInstance)
{
sInstance = new LLFloaterPermissionsMgr();
sInstance->open(); /* Flawfinder: ignore */
gFloaterView->adjustToFitScreen(sInstance, TRUE);
}
else
{
sInstance->open(); /* Flawfinder: ignore */
}
return sInstance;
}
void LLFloaterPermissionsMgr::processPermissionsList(LLMessageSystem* msg, void**)
{
}
LLFloaterPermissionsMgr::LLFloaterPermissionsMgr() :
LLFloater(std::string("floater_perm_mgr"), std::string("PermissionsManagerRect"), std::string("Permissions Manager"),
TRUE, MIN_PERM_MGR_WIDTH, MIN_PERM_MGR_HEIGHT)
{
S32 y = getRect().getHeight() - VPAD - LINE;
LLRect scrollable_container_rect(0, y, getRect().getWidth(), 0);
LLRect permissions_rect(0, 0, getRect().getWidth() - HPAD - HPAD, 0);
mPermissions = new LLPermissionsView(permissions_rect);
mScroller = new LLScrollContainer(
std::string("permissions container"),
scrollable_container_rect,
mPermissions
);
mScroller->setFollowsAll();
mScroller->setReserveScrollCorner(TRUE);
addChild(mScroller);
}
LLFloaterPermissionsMgr::~LLFloaterPermissionsMgr()
{
}
//
// LLPermissionsView
//
LLPermissionsView::LLPermissionsView(const LLRect &rect) : LLView(std::string("permissions_view"), rect, TRUE, FOLLOWS_NONE)
{
}
void LLPermissionsView::clearPermissionsData()
{
deleteAllChildren();
}
void LLPermissionsView::addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags)
{
// grow to make room for new element
reshape(getRect().getWidth(), getRect().getHeight() + LINE + VPAD + BTN_HEIGHT + VPAD);
S32 y = getRect().getHeight() - LINE - VPAD;
LLRect label_rect(HPAD, y + LINE, getRect().getWidth(), y);
LLTextBox* text = new LLTextBox(std::string("perm_label"), label_rect, object_name);
text->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
addChild(text);
y -= LINE + VPAD;
LLRect btn_rect(HPAD, y + BTN_HEIGHT, 120, y);
LLButton* button = new LLButton(std::string("Revoke permissions"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::revokePermissions, object_id, permissions_flags));
button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
addChild(button);
/*btn_rect.set(HPAD + 120 + HPAD, y + BTN_HEIGHT, HPAD + 120 + HPAD + 120, y);
button = new LLButton(std::string("Find in world"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::findObject, object_id, permissions_flags));
button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
addChild(button);*/
}
void LLPermissionsView::revokePermissions(const LLUUID& object_id, U32 permission_flags)
{
LLViewerObject* objectp = gObjectList.findObject(object_id);
if (objectp)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RevokePermissions);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ObjectID, object_id);
msg->addU32Fast(_PREHASH_ObjectPermissions, permission_flags);
msg->sendReliable(objectp->getRegion()->getHost());
}
}
/*void LLPermissionsView::findObject(const LLUUID& object_id, U32 permission_flags)
{
}*/

View File

@@ -1,82 +0,0 @@
/**
* @file llfloaterpermissionsmgr.h
* @brief for user control of script permissions
*
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
* Copyright (c) 2003-2009, Linden Research, Inc.
*
* 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$
*/
#ifndef LL_LLFLOATERPERMISSIONSMGR_H
#define LL_LLFLOATERPERMISSIONSMGR_H
#include "llfloater.h"
#include <vector>
class LLScrollContainer;
class LLPermissionsView;
class LLFloaterPermissionsMgr
: public LLFloater
{
public:
static LLFloaterPermissionsMgr* show();
// Message system callbacks
static void processPermissionsList(LLMessageSystem* msg, void**);
virtual void onClose(bool app_quitting) { setVisible(FALSE); }
private:
// Must construct by calling show().
LLFloaterPermissionsMgr();
virtual ~LLFloaterPermissionsMgr();
public:
LLPermissionsView* mPermissions;
protected:
LLScrollContainer* mScroller;
static LLFloaterPermissionsMgr* sInstance;
};
class LLPermissionsView : public LLView
{
public:
LLPermissionsView(const LLRect& rect);
virtual ~LLPermissionsView() {};
public:
void clearPermissionsData();
void addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags);
static void revokePermissions(const LLUUID& object_id, U32 permission_flags);
//static void findObject(const LLUUID& object_id, U32 permission_flags);
};
#endif

View File

@@ -1,332 +0,0 @@
/**
* @file llfloaterteleport.cpp
* @brief floater code for agentd teleports.
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
* Copyright (c) 2008, Linden Research, Inc.
*
* 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$
*/
//Teleport floater used for agent domain TP. URI text floater.
//Copyright International Business Machines Corporation 2008-9
//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution
//Agreement and licensed as above.
#include "llviewerprecompiledheaders.h" // must be first include
#include "llfloaterteleport.h"
#include "llagent.h" //for hack in teleport start
#include "llchat.h"
#include "llcombobox.h"
#include "llfloaterchat.h"
#include "llsdserialize.h"
#include "llsdutil.h"
#include "llsdutil_math.h"
#include "lluictrlfactory.h" // builds floaters from XML
#include "llurlhistory.h"
#include "lluserauth.h" // for saving placeavatarresponder result
#include "llviewercontrol.h" // for gSavedSettings
#include "llviewerdisplay.h" // for gTeleportDisplay
#include "llviewermessage.h" // for send_agent_movement_complete attempt
#include "llviewerregion.h"
#include "llviewerwindow.h" // for hack in teleport start
#include "llvoavatar.h"
#include "llworld.h"
#include "pipeline.h" // for gPipeline
class AIHTTPTimeoutPolicy;
extern AIHTTPTimeoutPolicy placeAvatarTeleportResponder_timeout;
// OGPX HTTP responder for PlaceAvatar cap used for Teleport
// very similar to the responder in Login, but not as many fields are returned in the TP version
// OGPX TODO: should this be combined with the Login responder for rez_avatar/place?
// OGPX TODO: mResult should not get replaced in result(), instead
// should replace individual LLSD fields in mResult.
class LLPlaceAvatarTeleportResponder : public LLHTTPClient::ResponderWithResult
{
public:
LLPlaceAvatarTeleportResponder()
{
}
~LLPlaceAvatarTeleportResponder()
{
}
/*virtual*/ void error(U32 statusNum, const std::string& reason)
{
LL_INFOS("OGPX") << "LLPlaceAvatarTeleportResponder error in TP "
<< statusNum << " " << reason << LL_ENDL;
LLSD args;
args["REASON"] = reason;
LLNotificationsUtil::add("CouldNotTeleportReason", args);
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
/*virtual*/ void result(const LLSD& content)
{
LLSD result;
result["agent_id"] = content["agent_id"]; // need this for send_complete_agent_movement
result["region_x"] = content["region_x"]; // need these for making the first region
result["region_y"] = content["region_y"];
result["login"] = "true"; // this gets checked in idle_startup()
result["session_id"] = content["session_id"];
result["secure_session_id"] = content["secure_session_id"];
result["circuit_code"] = content["circuit_code"];
result["sim_port"] = content["sim_port"];
result["sim_host"] = content["sim_host"];
result["look_at"] = content["look_at"];
// maintaining result seed_capability name for compatibility with legacy login
result["seed_capability"] = content["region_seed_capability"];
result["position"] = content["position"]; // save this for agentmovementcomplete type processing
// Even though we have the pretty print of the complete content returned, we still find it handy
// when scanning SecondLife.log to have these laid out in this way. So they are still here.
LL_DEBUGS("OGPX") << " Teleport placeAvatar responder " << LL_ENDL;
LL_DEBUGS("OGPX") << "agent_id: " << content["agent_id"] << LL_ENDL;
LL_DEBUGS("OGPX") << "region_x: " << content["region_x"] << LL_ENDL;
LL_DEBUGS("OGPX") << "session_id: " << content["session_id"] << LL_ENDL;
LL_DEBUGS("OGPX") << "sim_port: " << content["sim_port"] << LL_ENDL;
LL_DEBUGS("OGPX") << "sim_host: " << content["sim_host"] << LL_ENDL;
LL_DEBUGS("OGPX") << "look_at: " << content["look_at"] << LL_ENDL;
LL_DEBUGS("OGPX") << "position: " << content["position"] << LL_ENDL;
LL_DEBUGS("OGPX") << "seed_capability: " << content["region_seed_capability"] << LL_ENDL;
LL_INFOS("OGPX") << " All the LLSD PlaceAvatarTeleportResponder content: \n " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX
// check "connect" to make sure place_avatar fully successful
if (!content["connect"].asBoolean())
{
// place_avatar failed somewhere
LL_INFOS("OGPX") << "TP failed, connect false in TP PlaceAvatarResponder " << LL_ENDL;
LLSD args;
args["REASON"] = "Place Avatar Failed";
//gViewerWindow->alertXml("CouldNotTeleportReason", args);
LLNotificationsUtil::add("CouldNotTeleportReason",args);
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
return;
}
U64 region_handle;
region_handle = to_region_handle_global(content["region_x"].asInteger(), content["region_y"].asInteger());
LLHost sim_host;
U32 sim_port = strtoul(result["sim_port"].asString().c_str(), NULL, 10);
sim_host.setHostByName(result["sim_host"].asString().c_str());
sim_host.setPort(sim_port);
if (sim_host.isOk())
{
LLMessageSystem* msg = gMessageSystem;
gMessageSystem->enableCircuit(sim_host, TRUE);
msg->newMessageFast(_PREHASH_UseCircuitCode);
msg->nextBlockFast(_PREHASH_CircuitCode);
msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
msg->sendReliable(sim_host);
}
else
{
LL_INFOS("OGPX") << "TP failed, could not resolve hostname for UDP messages." << LL_ENDL;
LLSD args;
args["REASON"] = "Failed to resolve host.";
//gViewerWindow->alertXml("CouldNotTeleportReason", args);
LLNotificationsUtil::add("CouldNotTeleportReason", args);
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
return;
}
// Viewer trusts the simulator.
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
regionp->setSeedCapability(content["seed_capability"].asString().c_str());
// process_agent_movement_complete needs the region to still be the old region gAgent.setRegion(regionp);
// placing these in result so they can be set properly in LLUserAuth result
// ...they are only passed in on login, and not on TP
result["session_id"] = gAgent.getSessionID();
result["agent_id"] = gAgent.getID();
result["circuit_code"].asString() = gMessageSystem->mOurCircuitCode; // this is what startup sets, is this proper to do?
// grab the skeleton and root.
result["inventory-skeleton"] = LLUserAuth::getInstance()->mResult["inventory-skeleton"];
result["inventory-root"] = LLUserAuth::getInstance()->mResult["inventory-root"];
LL_DEBUGS("OGPX") << "session_id: " << result["session_id"] << LL_ENDL;
// results need to be stored so process_agent_movement_complete() can pull them
LLUserAuth::getInstance()->mAuthResponse = LLUserAuth::E_OK;
// OGPX TODO: This just reeks of causing problems, because we are using
// ... mResult to store things that we get from other caps....So slamming a
// ... completely new result in on teleport is going to cause issues.
// ... It makes changing the things we save in mResult error prone.
// ... Question is, how should we really be storing the seemingly random things
// ... that we get back from (now) various different caps that used to all come back
// ... in the result of XMLRPC authenticate?
LLUserAuth::getInstance()->mResult = result;
// ... new sim not sending me much without sending it CompleteAgentMovement msg.
//gAgent.setTeleportState( LLAgent::TELEPORT_MOVING ); // process_agent_mv_complete looks for TELEPORT_MOVING
LLVector3 position = ll_vector3_from_sd(result["position"]);
gAgent.setHomePosRegion(region_handle, position); // taken from teleport_finish (not sure regular code path gets this)
send_complete_agent_movement(sim_host);
// Turn off progress msg (also need to do this in all the possible failure places)
// I think we leave this, as the scene is still changing during the
// processing of agentmovementcomeplete message. TELEPORT_NONE resets it anyway
// gViewerWindow->setShowProgress(FALSE);
}
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return placeAvatarTeleportResponder_timeout; }
/*virtual*/ char const* getName(void) const { return "LLPlaceAvatarTeleportResponder"; }
};
// Statics
LLFloaterTeleport* LLFloaterTeleport::sInstance = NULL;
LLFloaterTeleport::LLFloaterTeleport()
: LLFloater("floater_teleport")
{
if(!sInstance)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_teleport.xml");
LLComboBox* regioncombo = getChild<LLComboBox>("teleport_edit");
regioncombo->setAllowTextEntry(TRUE, 256, FALSE); // URL bar needs to allow user text input
// iterate on uri list adding to combobox (couldn't figure out how to add them all in one call)
LLSD regionuri_history = LLURLHistory::getURLHistory("regionuri");
LLSD::array_iterator iter_history = regionuri_history.beginArray();
LLSD::array_iterator iter_end = regionuri_history.endArray();
for(; iter_history != iter_end; ++iter_history)
{
regioncombo->addSimpleElement((*iter_history).asString());
}
// select which is displayed if we have a current URL.
regioncombo->setSelectedByValue(LLSD(gSavedSettings.getString("CmdLineRegionURI")),TRUE);
// TODO : decide if 'enter' when selecting something from the combox box should *not* be sent
// to the floater (p.s. and figure out how to change it)
childSetAction("teleport_btn", onClickTeleport, this);
childSetAction("cancel_btn", onClickCancel, this);
setDefaultBtn("teleport_btn");
}
else
{
sInstance->show(NULL);
}
}
// static
void LLFloaterTeleport::show(void*)
{
if (!sInstance)
{
sInstance = new LLFloaterTeleport();
}
sInstance->open();
}
LLFloaterTeleport::~LLFloaterTeleport()
{
sInstance=NULL;
}
// static
void LLFloaterTeleport::onClickTeleport(void* userdata)
{
std::string placeAvatarCap = LLAppViewer::instance()->getPlaceAvatarCap();
LLSD args;
LLFloaterTeleport* self = (LLFloaterTeleport*)userdata;
std::string text = self->childGetText("teleport_edit");
if (text.find("://",0) == std::string::npos)
{
// if there is no uri, prepend it with http://
text = "http://"+text;
LL_DEBUGS("OGPX") << "Teleport URI was prepended, now " << text << LL_ENDL;
}
LL_DEBUGS("OGPX") << "onClickTeleport! from using place_avatar cap "<< placeAvatarCap << " contains "<< text << LL_ENDL;
LLStringUtil::trim(text); // trim extra spacing
gAgent.setTeleportSourceURL(gSavedSettings.getString("CmdLineRegionURI")); // grab src region name
gSavedSettings.setString("CmdLineRegionURI",text); // save the dst region
args["public_region_seed_capability"] = text;
args["position"] = ll_sd_from_vector3(LLVector3(128, 128, 50)); // default to middle of region above base terrain
LL_INFOS("OGPX") << " args to placeavatar cap " << placeAvatarCap << " on teleport: " << LLSDOStreamer<LLSDXMLFormatter>(args) << LL_ENDL;
LLHTTPClient::post(placeAvatarCap, args, new LLPlaceAvatarTeleportResponder());
gAgent.setTeleportMessage(
LLAgent::sTeleportProgressMessages["requesting"]);
gViewerWindow->setShowProgress(TRUE);
gAgent.teleportCore();
gAgent.setTeleportState( LLAgent::TELEPORT_PLACE_AVATAR ); // teleportcore() sets tp state to legacy path, so reset. ick!
gTeleportDisplayTimer.reset();
self->setVisible(FALSE);
if ( LLURLHistory::appendToURLCollection("regionuri",text))
{
// since URL history only populated on create of sInstance, add to combo list directly
LLComboBox* regioncombo = self->getChild<LLComboBox>("teleport_edit");
// BUG : this should add the new item to the combo box, but doesn't
regioncombo->addSimpleElement(text);
}
}
void LLFloaterTeleport::onClickCancel(void *userdata)
{
LLFloaterTeleport* self = (LLFloaterTeleport*)userdata;
LL_INFOS("OGPX") << "Teleport Cancel " << self->getName() << LL_ENDL;
self->setVisible(FALSE);
}

View File

@@ -1,65 +0,0 @@
/**
* @file llfloaterteleport.h
* @brief floater header for agentd teleports.
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
* Copyright (c) 2008, Linden Research, Inc.
*
* 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$
*/
// Teleport floater for agent domain TPs using URIs.
//Copyright International Business Machines Corporation 2008-9
//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution
//Agreement and licensed as above.
#ifndef LL_FLOATER_TELEPORT_H
#define LL_FLOATER_TELEPORT_H
#include "llfloater.h"
class LLFloaterTeleport : public LLFloater
{
public:
LLFloaterTeleport();
virtual ~LLFloaterTeleport();
// by convention, this shows the floater and does instance management
static void show(void*);
private:
// when a line editor loses keyboard focus, it is committed.
// commit callbacks are named onCommitWidgetName by convention.
static void onCommitTeleport(LLUICtrl* ctrl, void *userdata);
// by convention, button callbacks are named onClickButtonLabel
static void onClickTeleport(void* userdata);
static void onClickCancel(void *userdata);
// no pointers to widgets here - they are referenced by name
// assuming we just need one, which is typical
static LLFloaterTeleport* sInstance;
};
#endif

View File

@@ -2112,25 +2112,6 @@ bool LLInventoryModel::loadSkeleton(
return rv;
}
//OGPX crap. Since this function is actually functionally the same as its LLSD variant..
// just convert options_t to LLSD and route to the LLSD version. Yuck.
bool LLInventoryModel::loadSkeleton(
const LLInventoryModel::options_t& options,
const LLUUID& owner_id)
{
LLSD options_list;
for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
{
LLSD entry;
for(response_t::const_iterator it2 = it->begin(); it2 != it->end(); ++it2)
{
entry[it2->first]=it2->second;
}
options_list.append(entry);
}
return loadSkeleton(options_list,owner_id);
}
// This is a brute force method to rebuild the entire parent-child
// relations. The overall operation has O(NlogN) performance, which
// should be sufficient for our needs.

View File

@@ -409,14 +409,6 @@ public:
void addCategory(LLViewerInventoryCategory* category);
void addItem(LLViewerInventoryItem* item);
// methods to load up inventory skeleton & meat. These are used
// during authentication. return true if everything parsed.
typedef std::map<std::string, std::string> response_t;
typedef std::vector<response_t> options_t;
//OGPX really screwed with the login process. This is needed until it's all sorted out.
bool loadSkeleton(const options_t& options, const LLUUID& owner_id);
/** Mutators
** **
*******************************************************************************/

View File

@@ -62,7 +62,6 @@
#include "llui.h"
#include "lluiconstants.h"
#include "llurlhistory.h" // OGPX : regionuri text box has a history of region uris (if FN/LN are loaded at startup)
#include "llviewerbuild.h"
#include "llviewertexturelist.h"
#include "llviewermenu.h" // for handle_preferences()
#include "llviewernetwork.h"
@@ -254,7 +253,7 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect)
gVersionMajor,
gVersionMinor,
gVersionPatch,
LL_VIEWER_BUILD );
gVersionBuild );
LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
channel_text->setTextArg("[VERSION]", version);

View File

@@ -106,39 +106,6 @@ LLSD LLURLHistory::getURLHistory(const std::string& collection)
return LLSD();
}
// OGPX : static function that appends unique values to existing collection.
// returns true if appended, else false.
BOOL LLURLHistory::appendToURLCollection(const std::string& collection, const std::string& url)
{
if (!url.empty())
{
BOOL found_current_url = FALSE;
// make room for the new url if needed
// always append to the end and remove from the front so you have the most recent.
if (sHistorySD[collection].size() >= MAX_URL_COUNT)
{
sHistorySD[collection].erase(0);
}
LLSD::array_iterator iter_history = sHistorySD[collection].beginArray();
LLSD::array_iterator iter_end = sHistorySD[collection].endArray();
for (; iter_history != iter_end; ++iter_history)
{
if ((*iter_history).asString() == url)
{
found_current_url = TRUE;
}
}
if (!found_current_url )
{
sHistorySD[collection].append(LLSD(url));
LLURLHistory::limitSize(collection);
//llinfos << " appending XX" << url << "XX urlcollection: " << LLSDOStreamer<LLSDXMLFormatter>(sHistorySD) << llendl;
return TRUE; // value was unique, needed to be inserted
}
}
return FALSE; // value was empty or already in the collection
}
// static
void LLURLHistory::addURL(const std::string& collection, const std::string& url)
{

View File

@@ -49,9 +49,6 @@ public:
static LLSD getURLHistory(const std::string& collection);
static void addURL(const std::string& collection, const std::string& url);
// OGPX appends url to a collection if it doesn't already exist in the collection.
// this is used in the collection of region URIs that are saved per region
static BOOL appendToURLCollection(const std::string& collection, const std::string& url);
static void removeURL(const std::string& collection, const std::string& url);
static void clear(const std::string& collection);

View File

@@ -40,7 +40,6 @@
#include "lldir.h"
#include "sgversion.h"
#include "llappviewer.h"
#include "llviewerbuild.h"
#include "llviewercontrol.h"
#include "llxmlrpcresponder.h"
#include "llsdutil.h"

View File

@@ -1,37 +0,0 @@
/**
* @file llviewerbuild.h
* @brief Sets viewer build number
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* 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 "sgversion.h"
// Set the build number in indra/llcommon/llversionviewer.h!
const S32 LL_VIEWER_BUILD = gVersionBuild;

View File

@@ -27,6 +27,9 @@
* $/LicenseInfo$
*/
#ifndef LL_LLVIEWEROBJECTBACKUP_H
#define LL_LLVIEWEROBJECTBACKUP_H
#include "llviewerinventory.h"
enum export_states {
@@ -179,3 +182,4 @@ private:
LLQuaternion mAgentRot;
};
#endif

View File

@@ -33,7 +33,6 @@
#ifndef LL_LLWLHANDLERS_H
#define LL_LLWLHANDLERS_H
#include "llviewerprecompiledheaders.h"
#include "llhttpclient.h"
class AIHTTPTimeoutPolicy;

View File

@@ -1,3 +1,6 @@
#ifndef SH_SHFLOATERMEDIATICKER_H
#define SH_SHFLOATERMEDIATICKER_H
#include "llfloater.h"
class LLIconCtrl;
@@ -56,3 +59,4 @@ private:
BOOL handle_ticker_enabled(void *);
void handle_ticker_toggle(void *);
#endif

View File

@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--agentd teleport floater-->
<floater
name="teleport_floater"
title="Teleport"
can_resize="true"
can_minimize="true"
can_close="true"
can_drag_on_left="false"
width="300"
height="150"
min_width="80"
min_height="150"
>
<text name="teleport_text"
font="SansSerifSmall"
left="10"
bottom_delta="-40"
width="260"
height="16"
follows="left|top"
> Public Region Seed: </text>
<combo_box allow_text_entry="true"
name="teleport_edit"
width="250"
height="20"
left="10"
bottom_delta="-30"
follows="left|top"
hidden="false"
mouse_opaque="true"
max_length="420"
font="SansSerif"
bevel_style="in"
border_style="line"
border_thickness="1"
select_all_on_focus_received="true"
/>
<button
name="teleport_btn"
label="Teleport"
font="SansSerifSmall"
left="10"
bottom_delta="-25"
width="100"
height="20"
follows="top|left"
/>
<button bottom_delta="0" follows="bottom|right" height="20" label="Cancel" right="224"
name="cancel_btn" width="90" />
</floater>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--agentd teleport floater-->
<floater name="teleport_floater" title="Teleportar" >
<text name="teleport_text"> Semillas Región Pública: </text>
<combo_box name="teleport_edit"/>
<button name="teleport_btn" label="Teleportar"/>
<button label="Cancelar" name="cancel_btn"/>
</floater>