Merge remote-tracking branch 'aleric/master'

This commit is contained in:
Latif Khalifa
2013-04-28 23:35:30 +02:00
32 changed files with 2076 additions and 1835 deletions

View File

@@ -185,6 +185,7 @@ set(viewer_SOURCE_FILES
llfloaterbuycontents.cpp
llfloaterbuycurrency.cpp
llfloaterbuyland.cpp
llfloaterbvhpreview.cpp
llfloatercamera.cpp
llfloaterchat.cpp
llfloaterchatterbox.cpp
@@ -688,6 +689,7 @@ set(viewer_HEADER_FILES
llfloaterbuycontents.h
llfloaterbuycurrency.h
llfloaterbuyland.h
llfloaterbvhpreview.h
llfloatercamera.h
llfloaterchat.h
llfloaterchatterbox.h

View File

@@ -1,15 +1,48 @@
<llsd>
<map>
<map>
<key>CrashSubmitBehavior</key>
<map>
<key>Comment</key>
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
<key>Persist</key>
<integer>2</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>2</integer>
</map>
<map>
<key>Comment</key>
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
<key>Persist</key>
<integer>2</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>2</integer>
</map>
<key>CurlMaxTotalConcurrentConnections</key>
<map>
<key>Comment</key>
<string>Maximum total number of simultaneous curl connections</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>64</integer>
</map>
<key>CurlConcurrentConnectionsPerService</key>
<map>
<key>Comment</key>
<string>Maximum number of simultaneous curl connections per host:port service</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>16</integer>
</map>
<key>NoVerifySSLCert</key>
<map>
<key>Comment</key>
<string>Do not verify SSL certificates.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@@ -1895,9 +1895,7 @@ bool LLAppViewer::initThreads()
// State machine thread.
startEngineThread();
AICurlInterface::startCurlThread(gSavedSettings.getU32("CurlMaxTotalConcurrentConnections"),
gSavedSettings.getU32("CurlConcurrentConnectionsPerService"),
gSavedSettings.getBOOL("NoVerifySSLCert"));
AICurlInterface::startCurlThread(&gSavedSettings);
LLImage::initClass();

File diff suppressed because it is too large Load Diff

View File

@@ -2,9 +2,7 @@
* @file llfloateranimpreview.h
* @brief LLFloaterAnimPreview class definition
*
* $LicenseInfo:firstyear=2004&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2012, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -34,112 +32,11 @@
#define LL_LLFLOATERANIMPREVIEW_H
#include "llfloaternamedesc.h"
#include "lldynamictexture.h"
#include "llcharacter.h"
#include "llquaternion.h"
class LLVOAvatar;
class LLViewerJointMesh;
class LLPreviewAnimation : public LLViewerDynamicTexture
{
protected:
virtual ~LLPreviewAnimation();
public:
LLPreviewAnimation(S32 width, S32 height);
/*virtual*/ S8 getType() const ;
BOOL render();
void requestUpdate();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_delta);
void setZoom(F32 zoom_amt);
void pan(F32 right, F32 up);
virtual BOOL needsUpdate() { return mNeedsUpdate; }
LLVOAvatar* getDummyAvatar() { return mDummyAvatar; }
protected:
BOOL mNeedsUpdate;
F32 mCameraDistance;
F32 mCameraYaw;
F32 mCameraPitch;
F32 mCameraZoom;
LLVector3 mCameraOffset;
LLVector3 mCameraRelPos;
LLPointer<LLVOAvatar> mDummyAvatar;
};
class LLFloaterAnimPreview : public LLFloaterNameDesc
{
public:
//<edit>
LLFloaterAnimPreview(const std::string& filename, void* item = NULL);
//<edit>
virtual ~LLFloaterAnimPreview();
BOOL postBuild();
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleMouseUp(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
void onMouseCaptureLost();
void refresh();
static void onBtnPlay(void*);
static void onBtnStop(void*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
static void onSliderMove(LLUICtrl*, void*);
static void onCommitBaseAnim(LLUICtrl*, void*);
static void onCommitLoop(LLUICtrl*, void*);
static void onCommitLoopIn(LLUICtrl*, void*);
static void onCommitLoopOut(LLUICtrl*, void*);
static BOOL validateLoopIn(LLUICtrl*, void*);
static BOOL validateLoopOut(LLUICtrl*, void*);
static void onCommitName(LLUICtrl*, void*);
static void onCommitHandPose(LLUICtrl*, void*);
static void onCommitEmote(LLUICtrl*, void*);
static void onCommitPriority(LLUICtrl*, void*);
static void onCommitEaseIn(LLUICtrl*, void*);
static void onCommitEaseOut(LLUICtrl*, void*);
static BOOL validateEaseIn(LLUICtrl*, void*);
static BOOL validateEaseOut(LLUICtrl*, void*);
static void onBtnOK(void*);
static void onSaveComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data,
S32 status, LLExtStat ext_status);
private:
void setAnimCallbacks() ;
protected:
void draw();
void resetMotion();
LLPointer< LLPreviewAnimation> mAnimPreview;
S32 mLastMouseX;
S32 mLastMouseY;
LLButton* mPlayButton;
LLButton* mStopButton;
LLRect mPreviewRect;
LLRectf mPreviewImageRect;
LLAssetID mMotionID;
LLTransactionID mTransactionID;
BOOL mEnabled;
BOOL mInWorld;
LLAnimPauseRequest mPauseRequest;
std::map<std::string, LLUUID> mIDList;
static S32 sUploadAmount;
//<edit>
void* mItem;
//</edit>
class LLFloaterAnimPreview : public LLFloaterNameDesc {
public:
LLFloaterAnimPreview(LLSD const& filename);
virtual BOOL postBuild(void);
};
#endif // LL_LLFLOATERANIMPREVIEW_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,145 @@
/**
* @file llfloaterbvhpreview.h
* @brief LLFloaterBvhPreview class definition
*
* $LicenseInfo:firstyear=2004&license=viewergpl$
*
* Copyright (c) 2004-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_LLFLOATERBVHPREVIEW_H
#define LL_LLFLOATERBVHPREVIEW_H
#include "llfloaternamedesc.h"
#include "lldynamictexture.h"
#include "llcharacter.h"
#include "llquaternion.h"
class LLVOAvatar;
class LLViewerJointMesh;
class LLPreviewAnimation : public LLViewerDynamicTexture
{
protected:
virtual ~LLPreviewAnimation();
public:
LLPreviewAnimation(S32 width, S32 height);
/*virtual*/ S8 getType() const ;
BOOL render();
void requestUpdate();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_delta);
void setZoom(F32 zoom_amt);
void pan(F32 right, F32 up);
virtual BOOL needsUpdate() { return mNeedsUpdate; }
LLVOAvatar* getDummyAvatar() { return mDummyAvatar; }
protected:
BOOL mNeedsUpdate;
F32 mCameraDistance;
F32 mCameraYaw;
F32 mCameraPitch;
F32 mCameraZoom;
LLVector3 mCameraOffset;
LLVector3 mCameraRelPos;
LLPointer<LLVOAvatar> mDummyAvatar;
};
class LLFloaterBvhPreview : public LLFloaterNameDesc
{
public:
//<edit>
LLFloaterBvhPreview(const std::string& filename, void* item = NULL);
//<edit>
virtual ~LLFloaterBvhPreview();
BOOL postBuild();
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleMouseUp(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
void onMouseCaptureLost();
void refresh();
static void onBtnPlay(void*);
static void onBtnStop(void*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
static void onSliderMove(LLUICtrl*, void*);
static void onCommitBaseAnim(LLUICtrl*, void*);
static void onCommitLoop(LLUICtrl*, void*);
static void onCommitLoopIn(LLUICtrl*, void*);
static void onCommitLoopOut(LLUICtrl*, void*);
static BOOL validateLoopIn(LLUICtrl*, void*);
static BOOL validateLoopOut(LLUICtrl*, void*);
static void onCommitName(LLUICtrl*, void*);
static void onCommitHandPose(LLUICtrl*, void*);
static void onCommitEmote(LLUICtrl*, void*);
static void onCommitPriority(LLUICtrl*, void*);
static void onCommitEaseIn(LLUICtrl*, void*);
static void onCommitEaseOut(LLUICtrl*, void*);
static BOOL validateEaseIn(LLUICtrl*, void*);
static BOOL validateEaseOut(LLUICtrl*, void*);
static void onBtnOK(void*);
static void onSaveComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data,
S32 status, LLExtStat ext_status);
private:
void setAnimCallbacks() ;
protected:
void draw();
void resetMotion();
LLPointer< LLPreviewAnimation> mAnimPreview;
S32 mLastMouseX;
S32 mLastMouseY;
LLButton* mPlayButton;
LLButton* mStopButton;
LLRect mPreviewRect;
LLRectf mPreviewImageRect;
LLAssetID mMotionID;
LLTransactionID mTransactionID;
BOOL mEnabled;
BOOL mInWorld;
LLAnimPauseRequest mPauseRequest;
std::map<std::string, LLUUID> mIDList;
static S32 sUploadAmount;
//<edit>
void* mItem;
//</edit>
};
#endif // LL_LLFLOATERBVHPREVIEW_H

View File

@@ -4,7 +4,7 @@
#include "llfloaterexploreanimations.h"
#include "lluictrlfactory.h"
#include "llscrolllistctrl.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llvoavatar.h"
#include "lllocalinventory.h"
#include "llviewercamera.h"

View File

@@ -3,7 +3,7 @@
#define LL_LLFLOATEREXPLOREANIMATIONS_H
#include "llfloater.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llviewerwindow.h" // gViewerWindow
class LLAnimHistoryItem

View File

@@ -254,7 +254,7 @@ private:
LLUUID mID;
LLHost mHost;
std::string mUrl;
AIPerServiceRequestQueuePtr mPerServicePtr; // Pointer to the AIPerServiceRequestQueue corresponding to the host of mUrl.
AIPerServicePtr mPerServicePtr; // Pointer to the AIPerService corresponding to the host of mUrl.
U8 mType;
F32 mImagePriority;
U32 mWorkPriority;
@@ -800,11 +800,11 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
if (!mCanUseNET)
{
// Probably a file://, but well; in that case servicename will be empty.
std::string servicename = AIPerServiceRequestQueue::extract_canonical_servicename(mUrl);
std::string servicename = AIPerService::extract_canonical_servicename(mUrl);
if (!servicename.empty())
{
// Make sure mPerServicePtr is up to date with mUrl.
mPerServicePtr = AIPerServiceRequestQueue::instance(servicename);
mPerServicePtr = AIPerService::instance(servicename);
}
}
@@ -1163,7 +1163,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mUrl = http_url + "/?texture_id=" + mID.asString().c_str();
mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id.
mPerServicePtr = AIPerServiceRequestQueue::instance(AIPerServiceRequestQueue::extract_canonical_servicename(http_url));
mPerServicePtr = AIPerService::instance(AIPerService::extract_canonical_servicename(http_url));
}
else
{
@@ -1274,7 +1274,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// Let AICurl decide if we can process more HTTP requests at the moment or not.
static const LLCachedControl<F32> throttle_bandwidth("HTTPThrottleBandwidth", 2000);
bool const no_bandwidth_throttling = gHippoGridManager->getConnectedGrid()->isAvination();
if (!AIPerServiceRequestQueue::wantsMoreHTTPRequestsFor(mPerServicePtr, throttle_bandwidth, no_bandwidth_throttling))
if (!AIPerService::wantsMoreHTTPRequestsFor(mPerServicePtr, throttle_bandwidth, no_bandwidth_throttling))
{
return false ; //wait.
}

View File

@@ -63,7 +63,7 @@
#include "llfirstuse.h"
#include "llfloaterabout.h"
#include "llfloateractivespeakers.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llfloateravatarinfo.h"
#include "llfloateravatarlist.h"
#include "llfloateravatartextures.h"

View File

@@ -38,6 +38,7 @@
#include "llagentcamera.h"
#include "statemachine/aifilepicker.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llfloaterimagepreview.h"
#include "llfloatermodelpreview.h"
#include "llfloaternamedesc.h"
@@ -348,8 +349,17 @@ class LLFileUploadAnim : public view_listener_t, public AIFileUpload
// Inherited from AIFileUpload.
/*virtual*/ void handle_event(std::string const& filename)
{
LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename);
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_animation_preview.xml");
int len = filename.size();
if (len >= 5 && filename.substr(len - 5, 5) == ".anim")
{
LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename);
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_animation_anim_preview.xml");
floaterp->childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%s%d", gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(), LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
}
else
{
LLUICtrlFactory::getInstance()->buildFloater(new LLFloaterBvhPreview(filename), "floater_animation_bvh_preview.xml");
}
}
};
@@ -871,8 +881,8 @@ void upload_new_resource(const std::string& src_filename, std::string name,
}
else if (exten == "bvh")
{
error_message = llformat("We do not currently support bulk upload of animation files\n");
upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args);
error_message = llformat("We do not currently support bulk upload of BVH animation files\n");
upload_error(error_message, "DoNotSupportBulkBVHAnimationUpload", filename, args);
return;
}
// <edit>

View File

@@ -54,7 +54,7 @@
#include "llagentcamera.h"
#include "llcallingcard.h"
#include "llfirstuse.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llfloaterbump.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
@@ -6550,7 +6550,7 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL;
LLFloaterImagePreview::setUploadAmount(upload_cost);
LLFloaterAnimPreview::setUploadAmount(upload_cost);
LLFloaterBvhPreview::setUploadAmount(upload_cost);
std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee();
gMenuHolder->childSetLabelArg("Upload Image", "[UPLOADFEE]", fee);

View File

@@ -56,7 +56,7 @@
#include "llappviewer.h"
#include "llassetuploadresponders.h"
#include "statemachine/aifilepicker.h"
#include "llfloateranimpreview.h"
#include "llfloaterbvhpreview.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterimagepreview.h"
#include "llfloaternamedesc.h"

View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
height="190"
layout="topleft"
name="Anim Preview"
help_topic="animation_anim_preview"
title="ANIMATION.ANIM"
width="300">
<text
type="string"
length="1"
follows="left|top"
height="15"
layout="topleft"
left="10"
mouse_opaque="false"
name="name_label"
top="20"
width="275">
Name:
</text>
<line_editor
border_style="line"
border_thickness="1"
follows="left|top|right"
height="19"
layout="topleft"
left_delta="0"
max_length_bytes="63"
name="name_form"
top_pad="0"
width="280" />
<text
type="string"
length="1"
follows="left|top"
height="15"
layout="topleft"
left_delta="0"
mouse_opaque="false"
name="description_label"
top_pad="10"
width="270">
Description:
</text>
<line_editor
border_style="line"
border_thickness="1"
follows="left|top|right"
height="19"
layout="topleft"
left_delta="0"
max_length_bytes="127"
name="description_form"
top_pad="0"
width="280" />
<button
follows="left|bottom"
height="22"
label="Upload ([AMOUNT])"
layout="topleft"
left="45"
name="ok_btn"
top_pad="60"
width="150" />
<button
follows="right|bottom"
height="22"
label="Cancel"
label_selected="Cancel"
layout="topleft"
name="cancel_btn"
left_pad="5"
width="90" />
</floater>

View File

@@ -1735,9 +1735,9 @@ Unable to create output file: [FILE]
<notification
icon="alertmodal.tga"
name="DoNotSupportBulkAnimationUpload"
name="DoNotSupportBulkBVHAnimationUpload"
type="alertmodal">
We do not currently support bulk upload of animation files.
We do not currently support bulk upload of BVH animation files.
</notification>
<notification

View File

@@ -968,8 +968,8 @@ Podría ser [VALIDS]
No se ha podido crear el archivo de salida: [FILE]
</notification>
<notification name="DoNotSupportBulkAnimationUpload">
Actualmente, no ofrecemos la posibilidad de subida masiva de archivos de animación.
<notification name="DoNotSupportBulkBVHAnimationUpload">
Actualmente, no ofrecemos la posibilidad de subida masiva de archivos de BVH animación.
</notification>
<notification name="CannotUploadReason">

View File

@@ -696,8 +696,8 @@ Assurez-vous que le fichier a l&apos;extension correcte.
<notification name="UnableToCreateOutputFile">
Impossible de créer le fichier de sortie : [FILE]
</notification>
<notification name="DoNotSupportBulkAnimationUpload">
Nous ne prenons pas en charge le chargement de lots de fichiers d&apos;animation. (Chaque animation ayant ses propres réglages)
<notification name="DoNotSupportBulkBVHAnimationUpload">
Nous ne prenons pas en charge le chargement de lots de fichiers d&apos;BVH animation. (Chaque animation ayant ses propres réglages)
</notification>
<notification name="CannotUploadReason">
Impossible de charger [FILE] suite au problème suivant : [REASON]

View File

@@ -773,8 +773,8 @@ Esperada [VALIDS]
Incapaz de criar arquivo de saída: [FILE]
</notification>
<notification name="DoNotSupportBulkAnimationUpload">
Atualmente, não suportamos o envio de arquivos de animação em massa.
<notification name="DoNotSupportBulkBVHAnimationUpload">
Atualmente, não suportamos o envio de arquivos de BVH animação em massa.
</notification>
<notification name="CannotUploadReason">