Large snapshot update (part 1)
This commit concentrates on remembering what parameters where used for the last snapshot (the actual source, not the formatted one), thus - the parameters passed to rawSnapshot() - and then shows this snapshot as if it was just made whenever the UI parameter selection matches. The result is that the user can make a snapshot, save it (for example) to their harddisk and then change the destination and upload the same thing as snapshot. The code tries hard to make this possible by automatically adjusting the UI parameters to match every time the destination is changed PROVIDED it was already saved or uploaded before. If a snapshot wasn't saved and one changes destination then this currently doesn't happen (by you could manually make the parameters match, and still upload it). Also, if the resolution is changed for a particular destination then it won't automatically adjust it again. Obviously, snapshots are no longer refreshed when changing destination etc. You have to explicitly click "Refresh Snapshot" before the last one is deleted / replaced. The Debug Setting variables reflect the (last) manual choices in most cases (set in the onCommit functions). If such a choice is not allowed for a different destination then the UI is changed to reflect the current behavior and the checkbox is disabled so the user can't change it anymore. Then, if they change destination back - the Debug Setting variable is used to remember their last preference. A new Debug Setting has been added for this purpose: SnapshotLayerType (colors or depth). The old mSnapshotUpToDate has been removed and replaced with mShowFreezeFrameSnapshot. The old getSnapshotUpToDate() now returns something else (than mShowFreezeFrameSnapshot), namely whether or not the current raw snapshot was taken with the same parameters as are currently set in the UI. The unused functions getImageAspect() and getAspect() were removed. mCurImageIndex has been deleted. Index 0 now means "the last snapshot" and index 1 is temporarily used for the Falling Away animation. mDataSize was renamed to mFormattedDataSize. The size spinner arrows are now disabled too whenever the spinner edit field is disabled. A bug in Freeze Time was fixed, where avatars would still rotate around their axis in place (and without that their attachments moved!) Pressing ESC would return keyboard control to "walking" for the own avatar with the above as result for the own avatar. We now intercept ESC and use it (in Freeze Time mode) to return to the cammable preview when a 2D preview was being shown.
This commit is contained in:
@@ -308,10 +308,11 @@ public:
|
||||
enum ESnapshotType
|
||||
{
|
||||
SNAPSHOT_TYPE_COLOR,
|
||||
SNAPSHOT_TYPE_DEPTH,
|
||||
SNAPSHOT_TYPE_DEPTH
|
||||
};
|
||||
BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR);
|
||||
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
|
||||
// Returns the largest dimension (x or y) of the buffer (which is never larger than max_size), or 0 on failure.
|
||||
S32 rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
|
||||
BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE, F32 supersample = 1.f );
|
||||
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
|
||||
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
|
||||
|
||||
Reference in New Issue
Block a user