# Conflicts:
#	indra/llcommon/llmemory.cpp
#	indra/newview/llpanelsnapshot.cpp
#	indra/newview/llsnapshotlivepreview.cpp
#	indra/newview/rlvinventory.cpp
master
Ansariel 2024-07-18 18:50:09 +02:00
commit e5ee898ce5
27 changed files with 414 additions and 42 deletions

4
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,4 @@
## Firestorm Pull Request Checklist
Thank you for contributing to the Phoenix Firestorm Project.
We will endeavour to review you changes and accept/reject/request changes as soon as possible.
Please read and follow the [Firestorm Pull Request Guidelines](https://github.com/firestormviewer/phoenix-firestorm/blob/master/FS_PR_GUIDELINES.md) to reduce the likelihood that we need to ask for "Bureaucratic" changes to make the code comply with our workflows.

63
FS_PR_GUIDELINES.md Normal file
View File

@ -0,0 +1,63 @@
# Firestorm Pull Request Guidelines
Thank you for submitting code to Firestorm; we will review it and merge or provide feedback in due course.
We have written this guide to help you contribute code that meets our needs. It will hopefully reduce the number of iterations required before we can merge the code.
1. **Descriptive Title**:
   - Use a clear and descriptive title for the PR.
1. **Related Issues**:
   - Reference any related issues or pull requests by including the JIRA number and description in the commit message header (e.g., `[FIRE-12345] When I click, my head falls off` or `[FIRE-12345] prevent click detaching head`).
1. **Description**:
   - Provide a detailed description of the changes. Explain why the changes are necessary and what problem they solve. If a JIRA is associated with the change, there is no need to duplicate that, but we would appreciate a summary and explanation of the fix.
1. **Comment tags (important)**:
   - We use comments to preserve the original upstream (LL) code when making modifications; this allows the person merging future code updates to see both the original code from LL and any new updates and then use those to determine whether the FS-specific changes need to be updated and reviewed.
If you are modifying LL code, we need the LL code preserved in a comment.
For example:
```c++
    int buggy_code = TRUE;
    LL_WARN() << "This code is buggy" << LL_ENDL;
```
Would become:
```c++
    // <FS> [FIRE-999] Fix the buggy code
    // int buggy_code = TRUE;
    // LL_WARN() << "This code is buggy" << LL_ENDL;
    bool fixed_code = true;
    LL_DEBUG() << "I fixed this" << LL_ENDL;
    // </FS>
```
Note: You can tag them with your initials, e.g. `<FS:YI>` or a short unique tag (shorter is better)
If you add new code, the same rules apply, but there is nothing to comment out.
This is done so that when LL updates the original code, we can see what the original code was doing, what their changes do, and how that relates to the changes that we applied on top.
A single line change can use the shorthand `<FS:YI/>`:
```c++
    bool break_stuff=true;
```
Could be fixed as follows:
```c++
    bool break_stuff=false; // <FS:Beq/> [FIRE-23456] don't break stuff.
```
The Comment tags are only required when changing code maintained upstream. If the code you are changing is in an FS-created file, RLV code, OpenSim-only code, etc., then we do not need the comments.
If the code you are changing is already inside an `//<FS>` comment block, then there is no need to add a new block, but do try to make sure that any comments align with the updates you make.
5. **Testing**:
   - Include details on how the changes should be tested. Describe the testing environment and any steps needed to verify the changes.
1. **Documentation**:
   - If the change includes a new feature, it would be beneficial to suggest how we should update the FS Wiki pages to help users understand the feature
Thank you for your contribution!

View File

@ -23,4 +23,4 @@ Build instructions for each operating system can be found using the links below
## Contribute
Help make Firestorm better! You can get involved with improvements by filing bugs and suggesting enhancements via [JIRA](https://jira.firestormviewer.org) or creating pull requests.
Help make Firestorm better! You can get involved with improvements by filing bugs and suggesting enhancements via [JIRA](https://jira.firestormviewer.org) or [creating pull requests](FS_PR_GUIDELINES.md).

View File

@ -129,7 +129,7 @@ void LLMemory::updateMemoryInfo()
{
// Our Windows definition of PagefileUsage is documented by Microsoft as "the total amount of
// memory that the memory manager has committed for a running process", which is rss.
sAllocatedPageSizeInKB = U32Bytes(info.resident_size);
sAllocatedPageSizeInKB = U64Bytes(info.resident_size);
// Activity Monitor => Inspect Process => Real Memory Size appears to report resident_size
// Activity monitor => main window memory column appears to report phys_footprint, which spot checks as at least 30% less.
@ -139,7 +139,7 @@ void LLMemory::updateMemoryInfo()
// reported for the app by the Memory Monitor in Instruments.' It is still about 8% bigger than phys_footprint.
//
// (On Windows, we use WorkingSetSize.)
sAllocatedMemInKB = U32Bytes(info.resident_size - info.reusable);
sAllocatedMemInKB = U64Bytes(info.resident_size - info.reusable);
}
else
{

View File

@ -1072,6 +1072,19 @@
<real>0.0</real>
</array>
</map>
<!-- <FS:Chanayane> Camera roll (from Alchemy) -->
<key>ALStoredCameraRoll</key>
<map>
<key>Comment</key>
<string>Stored camera roll in camera tools</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<!-- </FS:Chanayane> -->
<key>FSStoredCameraFocusObjectId</key>
<map>
<key>Comment</key>

View File

@ -267,6 +267,25 @@ S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const
return getTextureUploadCost();
}
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
S32 LLAgentBenefits::getTextureUploadCost(S32 w, S32 h) const
{
if (w > 0 && h > 0)
{
S32 area = w * h;
if (area >= MIN_2K_TEXTURE_AREA)
{
return get2KTextureUploadCost(area);
}
else
{
return getTextureUploadCost();
}
}
return getTextureUploadCost();
}
// </FS:Chanayane>
S32 LLAgentBenefits::get2KTextureUploadCost(S32 area) const
{
if (m_2k_texture_upload_cost.empty())

View File

@ -54,6 +54,9 @@ public:
S32 getTextureUploadCost() const;
S32 getTextureUploadCost(const LLViewerTexture* tex) const;
S32 getTextureUploadCost(const LLImageBase* tex) const;
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
S32 getTextureUploadCost(S32 w, S32 h) const;
// </FS:Chanayane>
S32 get2KTextureUploadCost(S32 area) const;
bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const;

View File

@ -189,7 +189,10 @@ LLAgentCamera::LLAgentCamera() :
mPanRightKey(0.f),
mPanInKey(0.f),
mPanOutKey(0.f),
// <FS:Chanayane> Camera roll (from Alchemy)
mRollLeftKey(0.f),
mRollRightKey(0.f),
// </FS:Chanayane>
mPointAtObject(NULL)
{
mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
@ -200,6 +203,9 @@ LLAgentCamera::LLAgentCamera() :
resetPanDiff();
resetOrbitDiff();
// <FS:Chanayane> Camera roll (from Alchemy)
resetCameraRoll();
// </FS:Chanayane>
}
// Requires gSavedSettings to be initialized.
@ -381,6 +387,9 @@ void LLAgentCamera::resetView(bool reset_camera, bool change_camera, bool moveme
setFocusOnAvatar(true, ANIMATE);
mCameraFOVZoomFactor = 0.f;
// <FS:Chanayane> Camera roll (from Alchemy)
resetCameraRoll();
// </FS:Chanayane>
}
resetPanDiff();
resetOrbitDiff();
@ -937,6 +946,20 @@ void LLAgentCamera::cameraOrbitOver(const F32 angle)
}
}
// <FS:Chanayane> Camera roll (from Alchemy)
//-----------------------------------------------------------------------------
// cameraRollOver()
//-----------------------------------------------------------------------------
void LLAgentCamera::cameraRollOver(const F32 angle)
{
mRollAngle += fmodf(angle, F_TWO_PI);
}
void LLAgentCamera::resetCameraRoll()
{
mRollAngle = 0.f;
}
// </FS:Chanayane>
void LLAgentCamera::resetCameraOrbit()
{
LLVector3 camera_offset_unit(mCameraFocusOffsetTarget);
@ -950,6 +973,9 @@ void LLAgentCamera::resetCameraOrbit()
cameraZoomIn(1.f);
resetOrbitDiff();
// <FS:Chanayane> Camera roll (from Alchemy)
resetCameraRoll();
// </FS:Chanayane>
}
void LLAgentCamera::resetOrbitDiff()
@ -1356,6 +1382,9 @@ void LLAgentCamera::updateCamera()
const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second
const F32 ORBIT_AROUND_RATE = 90.f * DEG_TO_RAD; // radians per second
const F32 PAN_RATE = 5.f; // meters per second
// <FS:Chanayane> Camera roll (from Alchemy)
const F32 ROLL_RATE = 45.f * DEG_TO_RAD; // radians per second
// </FS:Chanayane>
if (gAgentCamera.getOrbitUpKey() || gAgentCamera.getOrbitDownKey())
{
@ -1397,6 +1426,14 @@ void LLAgentCamera::updateCamera()
cameraPanUp(input_rate * PAN_RATE / gFPSClamped );
}
// <FS:Chanayane> Camera roll (from Alchemy)
if (getRollLeftKey() || getRollRightKey())
{
F32 input_rate = getRollRightKey() - getRollLeftKey();
cameraRollOver(input_rate * ROLL_RATE / gFPSClamped);
}
// </FS:Chanayane>
// Clear camera keyboard keys.
gAgentCamera.clearOrbitKeys();
gAgentCamera.clearPanKeys();
@ -1641,7 +1678,20 @@ void LLAgentCamera::updateCamera()
torso_joint->setScale(torso_scale);
chest_joint->setScale(chest_scale);
}
// <FS:Chanayane> Camera roll (from Alchemy)
// We have do this at the very end to make sure it takes all previous calculations into
// account and then applies our roll on top of it, besides it wouldn't even work otherwise.
LLQuaternion rot_quat = LLViewerCamera::getInstance()->getQuaternion();
LLMatrix3 rot_mat(mRollAngle, 0.f, 0.f);
rot_quat = LLQuaternion(rot_mat)*rot_quat;
LLMatrix3 mat(rot_quat);
LLViewerCamera::getInstance()->mXAxis = LLVector3(mat.mMatrix[0]);
LLViewerCamera::getInstance()->mYAxis = LLVector3(mat.mMatrix[1]);
LLViewerCamera::getInstance()->mZAxis = LLVector3(mat.mMatrix[2]);
}
// </FS:Chanayane>
void LLAgentCamera::updateLastCamera()
{
@ -2756,6 +2806,9 @@ void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
resetPanDiff();
resetOrbitDiff();
// <FS:Chanayane> Camera roll (from Alchemy)
resetCameraRoll();
// </FS:Chanayane>
gSavedSettings.setU32("CameraPresetType", mCameraPreset);
}
@ -3260,6 +3313,10 @@ void LLAgentCamera::clearOrbitKeys()
mOrbitDownKey = 0.f;
mOrbitInKey = 0.f;
mOrbitOutKey = 0.f;
// <FS:Chanayane> Camera roll (from Alchemy)
mRollLeftKey = 0.f;
mRollRightKey = 0.f;
// </FS:Chanayane>
}
void LLAgentCamera::clearPanKeys()
@ -3290,6 +3347,9 @@ void LLAgentCamera::storeCameraPosition()
// flycam mode and not repositioned after
LLVector3d forward = LLVector3d(1.0, 0.0, 0.0) * LLViewerCamera::getInstance()->getQuaternion() + getCameraPositionGlobal();
gSavedPerAccountSettings.setVector3d("FSStoredCameraFocus", forward);
// <FS:Chanayane> Camera roll (from Alchemy)
gSavedPerAccountSettings.setF32("ALStoredCameraRoll", mRollAngle);
// </FS:Chanayane>
LLUUID stored_camera_focus_object_id = LLUUID::null;
if (mFocusObject)
@ -3303,6 +3363,9 @@ void LLAgentCamera::loadCameraPosition()
{
LLVector3d stored_camera_pos = gSavedPerAccountSettings.getVector3d("FSStoredCameraPos");
LLVector3d stored_camera_focus = gSavedPerAccountSettings.getVector3d("FSStoredCameraFocus");
// <FS:Chanayane> Camera roll (from Alchemy)
F32 stored_camera_roll = gSavedPerAccountSettings.getF32("ALStoredCameraRoll");
// </FS:Chanayane>
LLUUID stored_camera_focus_object_id = LLUUID(gSavedPerAccountSettings.getString("FSStoredCameraFocusObjectId"));
F32 renderFarClip = gSavedSettings.getF32("RenderFarClip");
@ -3331,6 +3394,9 @@ void LLAgentCamera::loadCameraPosition()
unlockView();
setCameraPosAndFocusGlobal(stored_camera_pos, stored_camera_focus, stored_camera_focus_object_id);
// <FS:Chanayane> Camera roll (from Alchemy)
mRollAngle = stored_camera_roll;
// </FS:Chanayane>
}
// </FS:Ansariel> FIRE-7758: Save/load camera position feature

View File

@ -300,8 +300,14 @@ public:
void cameraOrbitAround(const F32 radians); // Rotate camera CCW radians about build focus point
void cameraOrbitOver(const F32 radians); // Rotate camera forward radians over build focus point
void cameraOrbitIn(const F32 meters); // Move camera in toward build focus point
// <FS:Chanayane> Camera roll (from Alchemy)
void cameraRollOver(const F32 radians); // Roll the camera
// </FS:Chanayane>
void resetCameraOrbit();
void resetOrbitDiff();
// <FS:Chanayane> Camera roll (from Alchemy)
void resetCameraRoll();
// </FS:Chanayane>
//--------------------------------------------------------------------
// Zoom
//--------------------------------------------------------------------
@ -409,6 +415,10 @@ public:
F32 getOrbitDownKey() const { return mOrbitDownKey; }
F32 getOrbitInKey() const { return mOrbitInKey; }
F32 getOrbitOutKey() const { return mOrbitOutKey; }
// <FS:Chanayane> Camera roll (from Alchemy)
F32 getRollLeftKey() const { return mRollLeftKey; }
F32 getRollRightKey() const { return mRollRightKey; }
// </FS:Chanayane>
void setOrbitLeftKey(F32 mag) { mOrbitLeftKey = mag; }
void setOrbitRightKey(F32 mag) { mOrbitRightKey = mag; }
@ -416,6 +426,10 @@ public:
void setOrbitDownKey(F32 mag) { mOrbitDownKey = mag; }
void setOrbitInKey(F32 mag) { mOrbitInKey = mag; }
void setOrbitOutKey(F32 mag) { mOrbitOutKey = mag; }
// <FS:Chanayane> Camera roll (from Alchemy)
void setRollLeftKey(F32 mag) { mRollLeftKey = mag; }
void setRollRightKey(F32 mag) { mRollRightKey = mag; }
// </FS:Chanayane>
void clearOrbitKeys();
private:
@ -429,6 +443,12 @@ private:
F32 mOrbitAroundRadians;
F32 mOrbitOverAngle;
// <FS:Chanayane> Camera roll (from Alchemy)
F32 mRollLeftKey;
F32 mRollRightKey;
F32 mRollAngle = 0.f;
// </FS:Chanayane>
//--------------------------------------------------------------------
// Pan
//--------------------------------------------------------------------

View File

@ -984,6 +984,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
id = result["linked_id"];
}
break;
case COPYINVENTORY: // <FS:Ansariel> Bring this back from Kitty's patch
case CREATEINVENTORY:
// CREATEINVENTORY can have multiple callbacks
if (result.has("_created_categories"))
@ -1009,6 +1010,25 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
}
}
break;
// <FS:Zi> FIRE-34169 - Fix #RLV ~Subfolder creation
case UPDATECATEGORY:
if (result.has("_updated_categories"))
{
LLSD& items = result["_updated_categories"];
LLSD::array_const_iterator item_iter;
for (item_iter = items.beginArray(); item_iter != items.endArray(); ++item_iter)
{
LLUUID item_id = *item_iter;
callback(item_id);
needs_callback = false;
}
}
else if (result.has("category_id"))
{
id = result["category_id"];
}
break;
// </FS:Zi>
default:
break;
}

View File

@ -88,11 +88,17 @@ protected:
void onCameraTrack();
void onCameraRotate();
F32 getOrbitRate(F32 time);
// <FS:Chanayane> Camera roll (from Alchemy)
void onRollLeftHeldDown();
void onRollRightHeldDown();
// </FS:Chanayane>
private:
LLButton* mPlusBtn { nullptr };
LLButton* mMinusBtn{ nullptr };
LLSlider* mSlider{ nullptr };
LLButton* mRollLeft{ nullptr };
LLButton* mRollRight{ nullptr };
friend class LLUICtrlFactory;
};
@ -177,6 +183,10 @@ void LLPanelCameraZoom::onCreate()
mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this));
mCommitCallbackRegistrar.add("Camera.track", boost::bind(&LLPanelCameraZoom::onCameraTrack, this));
mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this));
// <FS:Chanayane> Camera roll (from Alchemy)
mCommitCallbackRegistrar.add("Camera.roll_left", boost::bind(&LLPanelCameraZoom::onRollLeftHeldDown, this));
mCommitCallbackRegistrar.add("Camera.roll_right", boost::bind(&LLPanelCameraZoom::onRollRightHeldDown, this));
// </FS:Chanayane>
}
bool LLPanelCameraZoom::postBuild()
@ -184,6 +194,10 @@ bool LLPanelCameraZoom::postBuild()
mPlusBtn = getChild<LLButton>("zoom_plus_btn");
mMinusBtn = getChild<LLButton>("zoom_minus_btn");
mSlider = getChild<LLSlider>("zoom_slider");
// <FS:Chanayane> Camera roll (from Alchemy)
mRollLeft = getChild<LLButton>("roll_left");
mRollRight = getChild<LLButton>("roll_right");
// </FS:Chanayane>
return LLPanel::postBuild();
}
@ -213,6 +227,22 @@ void LLPanelCameraZoom::onZoomMinusHeldDown()
gAgentCamera.setOrbitOutKey(getOrbitRate(time));
}
// <FS:Chanayane> Camera roll (from Alchemy)
void LLPanelCameraZoom::onRollLeftHeldDown()
{
F32 time = mRollLeft->getHeldDownTime();
gAgentCamera.unlockView();
gAgentCamera.setRollLeftKey(getOrbitRate(time));
}
void LLPanelCameraZoom::onRollRightHeldDown()
{
F32 time = mRollRight->getHeldDownTime();
gAgentCamera.unlockView();
gAgentCamera.setRollRightKey(getOrbitRate(time));
}
// </FS:Chanayane>
void LLPanelCameraZoom::onCameraTrack()
{
// EXP-202 when camera panning activated, remove the hint

View File

@ -58,7 +58,10 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");

View File

@ -41,7 +41,10 @@
#include "llagentbenefits.h"
constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
// </FS:Chanayane>
S32 power_of_two(S32 sz, S32 upper)
{
@ -66,7 +69,12 @@ bool LLPanelSnapshot::postBuild()
LLUICtrl* save_btn = findChild<LLUICtrl>("save_btn");
if (save_btn)
{
save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
S32 w = getTypedPreviewWidth();
S32 h = getTypedPreviewHeight();
save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost(w, h)));
// </FS:Chanayane>
}
// </FS:Ansariel>
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));

View File

@ -187,7 +187,23 @@ LLPanelSnapshotInventory::~LLPanelSnapshotInventory()
void LLPanelSnapshotInventoryBase::onSend()
{
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 w = 0;
S32 h = 0;
if( mSnapshotFloater )
{
LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
if( preview )
{
preview->getSize(w, h);
}
}
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
// </FS:Chanayane>
if (can_afford_transaction(expected_upload_cost))
{
if (mSnapshotFloater)

View File

@ -30,6 +30,7 @@
#include "llsidetraypanelcontainer.h"
#include "llfloatersnapshot.h" // FIXME: create a snapshot model
#include "llsnapshotlivepreview.h" // <FS:Chanayane> 2048x2048 snapshots upload to inventory
#include "llfloaterreg.h"
#include "llfloaterflickr.h" // <FS:Ansariel> Share to Flickr
@ -92,7 +93,22 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key)
void LLPanelSnapshotOptions::updateUploadCost()
{
S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 w = 0;
S32 h = 0;
if( mSnapshotFloater )
{
LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
if( preview )
{
preview->getSize(w, h);
}
}
S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
// </FS:Chanayane>
getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
}

View File

@ -66,7 +66,10 @@ constexpr F32 FALL_TIME = 0.6f;
constexpr S32 BORDER_WIDTH = 6;
constexpr S32 TOP_PANEL_HEIGHT = 30;
constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList;
LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL;
@ -1137,7 +1140,10 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name)
LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL);
std::string who_took_it;
LLAgentUI::buildFullname(who_took_it);
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
// <FS:Chanayane> 2048x2048 snapshots upload to inventory
//S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(scaled->getWidth(), scaled->getHeight());
// </FS:Chanayane>
std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string;
std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string;
LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;

View File

@ -1814,6 +1814,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mFallbackImage(p.fallback_image),
mTextEnabledColor(p.text_enabled_color), // <FS:Zi> Add label/caption colors
mTextDisabledColor(p.text_disabled_color), // <FS:Zi> Add label/caption colors
mLabel(p.label), // <FS:Zi> FIRE-34300 - Fix label not showing in texture picker floater title
// <FS:Ansariel> Mask texture if desired
mIsMasked(false)
{

View File

@ -575,42 +575,24 @@ void RlvGiveToRLVOffer::moveAndRename(const LLUUID& idFolder, const LLUUID& idDe
const LLViewerInventoryCategory* pFolder = gInventory.getCategory(idFolder);
if ( (idDestination.notNull()) && (pFolder) )
{
bool needsRename = (pFolder->getName() != strName);
gInventory.changeCategoryParent(gInventory.getCategory(idFolder), idDestination, false);
gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, idFolder);
gInventory.notifyObservers();
gInventory.fetchDescendentsOf(idDestination);
LLPointer<LLInventoryCallback> cbMove;
if (idDestination != pFolder->getParentUUID())
// rename and restart this function if the folder doesn't have the correct name.
// This will also trigger another move above, but that should have no ill effects
// and might even help when the folder didn't move correctly the first time. -Zi
if (pFolder->getName() != strName)
{
// We have to move *after* the rename operation completes or AIS will drop it
if (!needsRename)
{
LLInventoryModel::update_list_t update;
LLInventoryModel::LLCategoryUpdate updOldParent(pFolder->getParentUUID(), -1);
update.push_back(updOldParent);
LLInventoryModel::LLCategoryUpdate updNewParent(idDestination, 1);
update.push_back(updNewParent);
gInventory.accountForUpdate(update);
LLPointer<LLViewerInventoryCategory> pNewFolder = new LLViewerInventoryCategory(pFolder);
pNewFolder->setParent(idDestination);
pNewFolder->updateParentOnServer(false);
gInventory.updateCategory(pNewFolder);
gInventory.notifyObservers();
if (cbFinal)
{
cbFinal.get()->fire(idFolder);
}
}
else
{
cbMove = new LLBoostFuncInventoryCallback(boost::bind(RlvGiveToRLVOffer::moveAndRename, _1, idDestination, strName, cbFinal));
}
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(RlvGiveToRLVOffer::moveAndRename, _1, idDestination, strName, cbFinal));
rename_category(&gInventory, idFolder, strName, cb);
return;
}
if (needsRename)
if (cbFinal)
{
rename_category(&gInventory, idFolder, strName, (cbMove) ? cbMove : cbFinal);
cbFinal.get()->fire(idFolder);
}
}
else if (cbFinal)

View File

@ -19,6 +19,8 @@
<panel name="controls">
<panel name="zoom">
<joystick_rotate name="cam_rotate_stick" tool_tip="Kamera um Fokus kreisen"/>
<button name="roll_left" tool_tip="Kamera nach links rollen" />
<button name="roll_right" tool_tip="Kamera nach rechts rollen" />
<slider_bar name="zoom_slider" tool_tip="Kamera auf Fokus zoomen"/>
<joystick_track name="cam_track_stick" tool_tip="Kamera nach oben, unten, links und rechts bewegen"/>
</panel>

View File

@ -71,6 +71,36 @@
tool_tip="Orbit camera around focus"
top="25"
width="78" />
<!-- <FS:Chanayane> Camera roll (from Alchemy) -->
<button
follows="bottom|left"
width="16"
height="16"
image_selected="VirtualTrackball_Rotate_Left_Active"
image_unselected="VirtualTrackball_Rotate_Left"
layout="topleft"
top="89"
left="2"
name="roll_left"
tool_tip="Roll camera Left">
<commit_callback function="Camera.roll_left" />
<mouse_held_callback function="Camera.roll_left" />
</button>
<button
follows="top|left"
width="16"
height="16"
image_selected="VirtualTrackball_Rotate_Right_Active"
image_unselected="VirtualTrackball_Rotate_Right"
layout="topleft"
top="89"
left="64"
name="roll_right"
tool_tip="Roll camera Right">
<commit_callback function="Camera.roll_right" />
<mouse_held_callback function="Camera.roll_right" />
</button>
<!-- </FS:Chanayane> -->
<button
follows="top|left"
height="18"

View File

@ -18,6 +18,8 @@
<panel name="controls">
<panel name="zoom">
<joystick_rotate name="cam_rotate_stick" tool_tip="Obróć kamerę wokół punktu skupienia"/>
<button name="roll_left" tool_tip="Przechyl kamerę w lewo" />
<button name="roll_right" tool_tip="Przechyl kamerę w prawo" />
<slider_bar name="zoom_slider" tool_tip="Przybliż kamerę do punktu skupienia"/>
<joystick_track name="cam_track_stick" tool_tip="Poruszaj kamerą w górę, w dół, w lewo i w prawo"/>
</panel>

View File

@ -19,6 +19,8 @@
<layout_stack name="camera_view_layout_stack">
<layout_panel name="camera_rotate_layout_panel">
<joystick_rotate name="cam_rotate_stick" tool_tip="Kamera um Fokus kreisen"/>
<button name="roll_left" tool_tip="Kamera nach links rollen" />
<button name="roll_right" tool_tip="Kamera nach rechts rollen" />
</layout_panel>
<layout_panel name="camera_zoom_layout_panel">
<slider_bar name="zoom_slider" tool_tip="Kamera auf Fokus zoomen"/>

View File

@ -17,6 +17,8 @@
<layout_stack name="camera_view_layout_stack">
<layout_panel name="camera_rotate_layout_panel">
<joystick_rotate name="cam_rotate_stick" tool_tip="Kamera um Fokus kreisen"/>
<button name="roll_left" tool_tip="Kamera nach links rollen" />
<button name="roll_right" tool_tip="Kamera nach rechts rollen" />
</layout_panel>
<layout_panel name="camera_zoom_layout_panel">
<slider_bar name="zoom_slider" tool_tip="Kamera auf Fokus zoomen"/>

View File

@ -155,6 +155,36 @@
tool_tip="Orbit camera around focus"
held_down_delay.seconds="0.0"
top="0" />
<!-- <FS:Chanayane> Camera roll (from Alchemy) -->
<button
follows="bottom|left"
width="12"
height="12"
image_selected="VirtualTrackball_Rotate_Left_Active"
image_unselected="VirtualTrackball_Rotate_Left"
layout="topleft"
top_delta="68"
left_delta="0"
name="roll_left"
tool_tip="Roll camera Left">
<commit_callback function="Camera.roll_left" />
<mouse_held_callback function="Camera.roll_left" />
</button>
<button
follows="bottom|right"
width="12"
height="12"
image_selected="VirtualTrackball_Rotate_Right_Active"
image_unselected="VirtualTrackball_Rotate_Right"
layout="topleft"
top_delta="0"
left_delta="68"
name="roll_right"
tool_tip="Roll camera Right">
<commit_callback function="Camera.roll_right" />
<mouse_held_callback function="Camera.roll_right" />
</button>
<!-- </FS:Chanayane> -->
</layout_panel>
<layout_panel

View File

@ -96,6 +96,36 @@ free_mode_title
tool_tip="Orbit camera around focus"
held_down_delay.seconds="0.0"
top="0" />
<!-- <FS:Chanayane> Camera roll (from Alchemy) -->
<button
follows="bottom|left"
width="12"
height="12"
image_selected="VirtualTrackball_Rotate_Left_Active"
image_unselected="VirtualTrackball_Rotate_Left"
layout="topleft"
top_delta="68"
left_delta="0"
name="roll_left"
tool_tip="Roll camera Left">
<commit_callback function="Camera.roll_left" />
<mouse_held_callback function="Camera.roll_left" />
</button>
<button
follows="bottom|right"
width="12"
height="12"
image_selected="VirtualTrackball_Rotate_Right_Active"
image_unselected="VirtualTrackball_Rotate_Right"
layout="topleft"
top_delta="0"
left_delta="68"
name="roll_right"
tool_tip="Roll camera Right">
<commit_callback function="Camera.roll_right" />
<mouse_held_callback function="Camera.roll_right" />
</button>
<!-- </FS:Chanayane> -->
</layout_panel>
<layout_panel

View File

@ -27,6 +27,8 @@
<layout_stack name="camera_view_layout_stack">
<layout_panel name="camera_rotate_layout_panel">
<joystick_rotate name="cam_rotate_stick" tool_tip="Obróć kamerę wokół punktu skupienia" />
<button name="roll_left" tool_tip="Przechyl kamerę w lewo" />
<button name="roll_right" tool_tip="Przechyl kamerę w prawo" />
</layout_panel>
<layout_panel name="camera_zoom_layout_panel">
<slider_bar name="zoom_slider" tool_tip="Przybliż kamerę do punktu skupienia" />

View File

@ -16,6 +16,8 @@
<layout_stack name="camera_view_layout_stack">
<layout_panel name="camera_rotate_layout_panel">
<joystick_rotate name="cam_rotate_stick" tool_tip="Obróć kamerę wokół punktu skupienia" />
<button name="roll_left" tool_tip="Przechyl kamerę w lewo" />
<button name="roll_right" tool_tip="Przechyl kamerę w prawo" />
</layout_panel>
<layout_panel name="camera_zoom_layout_panel">
<slider_bar name="zoom_slider" tool_tip="Przybliż kamerę do punktu skupienia" />