Let's all hijack skins. Also here's some half-finished code to fix the preview window.

This commit is contained in:
Beeks
2010-08-25 00:40:02 -04:00
parent 3b18bdc3d1
commit bd689b1dd2
4144 changed files with 11885 additions and 35 deletions

View File

@@ -66,6 +66,7 @@ include_directories(
set(viewer_SOURCE_FILES
dofloaterhex.cpp
dohexeditor.cpp
floatersculptpreview.cpp
hgfloatertexteditor.cpp
hippogridmanager.cpp
hipporestrequest.cpp
@@ -510,6 +511,7 @@ set(viewer_HEADER_FILES
dofloaterhex.h
dohexeditor.h
floatersculptpreview.h
hgfloatertexteditor.h
hippogridmanager.h
hipporestrequest.h

View File

@@ -0,0 +1,864 @@
/**
* @file LLFloaterSculptPreview.cpp
* @brief LLFloaterSculptPreview class implementation
*
* $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$
*/
#include "llviewerprecompiledheaders.h"
#include "floatersculptpreview.h"
#include "llimagebmp.h"
#include "llimagetga.h"
#include "llimagejpeg.h"
#include "llimagepng.h"
#include "llagent.h"
#include "llbutton.h"
#include "llcombobox.h"
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
#include "llrender.h"
#include "llface.h"
#include "llfocusmgr.h"
#include "lltextbox.h"
#include "lltoolmgr.h"
#include "llui.h"
#include "llviewercamera.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "pipeline.h"
#include "lluictrlfactory.h"
#include "llviewerimagelist.h"
#include "llstring.h"
#include "llviewercontrol.h"
//static
S32 LLFloaterSculptPreview::sUploadAmount = 10;
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREF_BUTTON_HEIGHT = 0;
const S32 PREVIEW_TEXTURE_HEIGHT = 512;
//-----------------------------------------------------------------------------
// LLFloaterSculptPreview()
//-----------------------------------------------------------------------------
LLFloaterSculptPreview::LLFloaterSculptPreview(LLImageRaw* src) :
//LLFloaterNameDesc(filename),
mAvatarPreview(NULL),
mSculptedPreview(NULL)
{
mLastMouseX = 0;
mLastMouseY = 0;
mImagep = NULL ;
mRawImagep = src;
}
LLFloaterSculptPreview* LLFloaterSculptPreview::show(LLImageRaw* src)
{
LLFloaterSculptPreview* floaterp = new LLFloaterSculptPreview(src);
llinfos << (floaterp->mRawImagep.notNull() ? "has raw image" : "no raw image") << llendl;
//floaterp->loadImage(src);
// Builds and adds to gFloaterView
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_sculpt_preview.xml");
gFloaterView->addChild(floaterp);
floaterp->open(); /*Flawfinder: ignore*/
gFloaterView->adjustToFitScreen(floaterp, FALSE);
llinfos << "build and adjusted" << llendl;
return floaterp;
}
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::postBuild()
{
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface)
{
iface->selectFirstItem();
}
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
childHide("bad_image_text");
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
{
mAvatarPreview = new LLPreviewAvatar(256, 256);
mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
mSculptedPreview = new LLPreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
childEnable("lossless_check");
gSavedSettings.setBOOL("EmeraldTemporaryUpload",FALSE);
childSetValue("temp_check",FALSE);
}
else
{
mAvatarPreview = NULL;
mSculptedPreview = NULL;
childShow("bad_image_text");
childDisable("clothing_type_combo");
childDisable("ok_btn");
}
return TRUE;
}
//-----------------------------------------------------------------------------
// LLFloaterSculptPreview()
//-----------------------------------------------------------------------------
LLFloaterSculptPreview::~LLFloaterSculptPreview()
{
clearAllPreviewTextures();
mRawImagep = NULL;
delete mAvatarPreview;
delete mSculptedPreview;
mImagep = NULL ;
}
//static
//-----------------------------------------------------------------------------
// onPreviewTypeCommit()
//-----------------------------------------------------------------------------
void LLFloaterSculptPreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata)
{
LLFloaterSculptPreview *fp =(LLFloaterSculptPreview *)userdata;
if (!fp->mAvatarPreview || !fp->mSculptedPreview)
{
return;
}
S32 which_mode = 0;
LLCtrlSelectionInterface* iface = fp->childGetSelectionInterface("clothing_type_combo");
if (iface)
{
which_mode = iface->getFirstSelectedIndex();
}
switch(which_mode)
{
case 0:
break;
case 1:
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, FALSE);
break;
case 2:
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, FALSE);
break;
case 3:
fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, FALSE);
break;
case 4:
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, FALSE);
break;
case 5:
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, TRUE);
break;
case 6:
fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
break;
case 7:
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
break;
case 8:
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, FALSE);
break;
case 9:
fp->mSculptedPreview->setPreviewTarget(fp->mRawImagep, 2.0f);
break;
default:
break;
}
fp->mAvatarPreview->refresh();
fp->mSculptedPreview->refresh();
}
//-----------------------------------------------------------------------------
// clearAllPreviewTextures()
//-----------------------------------------------------------------------------
void LLFloaterSculptPreview::clearAllPreviewTextures()
{
if (mAvatarPreview)
{
mAvatarPreview->clearPreviewTexture("mHairMesh0");
mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0");
mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0");
mAvatarPreview->clearPreviewTexture("mHeadMesh0");
mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0");
mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0");
mAvatarPreview->clearPreviewTexture("mSkirtMesh0");
}
}
//-----------------------------------------------------------------------------
// draw()
//-----------------------------------------------------------------------------
void LLFloaterSculptPreview::draw()
{
LLFloater::draw();
LLRect r = getRect();
if (mRawImagep.notNull())
{
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
U32 selected = 0;
if (iface)
selected = iface->getFirstSelectedIndex();
if (selected <= 0)
{
gl_rect_2d_checkerboard(mPreviewRect);
LLGLDisable gls_alpha(GL_ALPHA_TEST);
if(mImagep.notNull())
{
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
}
else
{
mImagep = new LLImageGL(mRawImagep, FALSE) ;
gGL.getTexUnit(0)->unbind(mImagep->getTarget()) ;
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
stop_glerror();
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
if (mAvatarPreview)
{
mAvatarPreview->setTexture(mImagep->getTexName());
mSculptedPreview->setTexture(mImagep->getTexName());
}
}
gGL.color3f(1.f, 1.f, 1.f);
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
}
gGL.end();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
stop_glerror();
}
else
{
if ((mAvatarPreview) && (mSculptedPreview))
{
gGL.color3f(1.f, 1.f, 1.f);
if (selected == 9)
{
gGL.getTexUnit(0)->bind(mSculptedPreview->getTexture());
}
else
{
gGL.getTexUnit(0)->bind(mAvatarPreview->getTexture());
}
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(0.f, 1.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.texCoord2f(0.f, 0.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 0.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 1.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
}
gGL.end();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
}
}
}
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
bringToFront( x, y );
gFocusMgr.setMouseCapture(this);
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
return TRUE;
}
return LLFloater::handleMouseDown(x, y, mask);
}
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture(FALSE);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::handleHover(S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
if (mAvatarPreview && hasMouseCapture())
{
if (local_mask == MASK_PAN)
{
// pan here
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface && iface->getFirstSelectedIndex() <= 0)
{
mPreviewImageRect.translate((F32)(x - mLastMouseX) * -0.005f * mPreviewImageRect.getWidth(),
(F32)(y - mLastMouseY) * -0.005f * mPreviewImageRect.getHeight());
}
else
{
mAvatarPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f);
mSculptedPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f);
}
}
else if (local_mask == MASK_ORBIT)
{
F32 yaw_radians = (F32)(x - mLastMouseX) * -0.01f;
F32 pitch_radians = (F32)(y - mLastMouseY) * 0.02f;
mAvatarPreview->rotate(yaw_radians, pitch_radians);
mSculptedPreview->rotate(yaw_radians, pitch_radians);
}
else
{
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface && iface->getFirstSelectedIndex() <= 0)
{
F32 zoom_amt = (F32)(y - mLastMouseY) * -0.002f;
mPreviewImageRect.stretch(zoom_amt);
}
else
{
F32 yaw_radians = (F32)(x - mLastMouseX) * -0.01f;
F32 zoom_amt = (F32)(y - mLastMouseY) * 0.02f;
mAvatarPreview->rotate(yaw_radians, 0.f);
mAvatarPreview->zoom(zoom_amt);
mSculptedPreview->rotate(yaw_radians, 0.f);
mSculptedPreview->zoom(zoom_amt);
}
}
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface && iface->getFirstSelectedIndex() <= 0)
{
if (mPreviewImageRect.getWidth() > 1.f)
{
mPreviewImageRect.stretch((1.f - mPreviewImageRect.getWidth()) * 0.5f);
}
else if (mPreviewImageRect.getWidth() < 0.1f)
{
mPreviewImageRect.stretch((0.1f - mPreviewImageRect.getWidth()) * 0.5f);
}
if (mPreviewImageRect.getHeight() > 1.f)
{
mPreviewImageRect.stretch((1.f - mPreviewImageRect.getHeight()) * 0.5f);
}
else if (mPreviewImageRect.getHeight() < 0.1f)
{
mPreviewImageRect.stretch((0.1f - mPreviewImageRect.getHeight()) * 0.5f);
}
if (mPreviewImageRect.mLeft < 0.f)
{
mPreviewImageRect.translate(-mPreviewImageRect.mLeft, 0.f);
}
else if (mPreviewImageRect.mRight > 1.f)
{
mPreviewImageRect.translate(1.f - mPreviewImageRect.mRight, 0.f);
}
if (mPreviewImageRect.mBottom < 0.f)
{
mPreviewImageRect.translate(0.f, -mPreviewImageRect.mBottom);
}
else if (mPreviewImageRect.mTop > 1.f)
{
mPreviewImageRect.translate(0.f, 1.f - mPreviewImageRect.mTop);
}
}
else
{
mAvatarPreview->refresh();
mSculptedPreview->refresh();
}
LLUI::setCursorPositionLocal(this, mLastMouseX, mLastMouseY);
}
if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview || !mSculptedPreview)
{
return LLFloater::handleHover(x, y, mask);
}
else if (local_mask == MASK_ORBIT)
{
gViewerWindow->setCursor(UI_CURSOR_TOOLCAMERA);
}
else if (local_mask == MASK_PAN)
{
gViewerWindow->setCursor(UI_CURSOR_TOOLPAN);
}
else
{
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
return TRUE;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (mPreviewRect.pointInRect(x, y) && mAvatarPreview)
{
mAvatarPreview->zoom((F32)clicks * -0.2f);
mAvatarPreview->refresh();
mSculptedPreview->zoom((F32)clicks * -0.2f);
mSculptedPreview->refresh();
}
return TRUE;
}
//-----------------------------------------------------------------------------
// onMouseCaptureLost()
//-----------------------------------------------------------------------------
// static
void LLFloaterSculptPreview::onMouseCaptureLostImagePreview(LLMouseHandler* handler)
{
gViewerWindow->showCursor();
}
//-----------------------------------------------------------------------------
// LLPreviewAvatar
//-----------------------------------------------------------------------------
LLPreviewAvatar::LLPreviewAvatar(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
{
mNeedsUpdate = TRUE;
mTargetJoint = NULL;
mTargetMesh = NULL;
mCameraDistance = 0.f;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
mCameraZoom = 1.f;
mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion());
mDummyAvatar->createDrawable(&gPipeline);
mDummyAvatar->mIsDummy = TRUE;
mDummyAvatar->mSpecialRenderMode = 2;
mDummyAvatar->setPositionAgent(LLVector3::zero);
mDummyAvatar->slamPosition();
mDummyAvatar->updateJointLODs();
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
// gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
mTextureName = 0;
}
LLPreviewAvatar::~LLPreviewAvatar()
{
mDummyAvatar->markDead();
}
void LLPreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male)
{
mTargetJoint = mDummyAvatar->mRoot.findJoint(joint_name);
// clear out existing test mesh
if (mTargetMesh)
{
mTargetMesh->setTestTexture(0);
}
if (male)
{
mDummyAvatar->setVisualParamWeight( "male", 1.f );
mDummyAvatar->updateVisualParams();
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
}
else
{
mDummyAvatar->setVisualParamWeight( "male", 0.f );
mDummyAvatar->updateVisualParams();
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
}
mDummyAvatar->mRoot.setVisible(FALSE, TRUE);
mTargetMesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name);
mTargetMesh->setTestTexture(mTextureName);
mTargetMesh->setVisible(TRUE, FALSE);
mCameraDistance = distance;
mCameraZoom = 1.f;
mCameraPitch = 0.f;
mCameraYaw = 0.f;
mCameraOffset.clearVec();
}
//-----------------------------------------------------------------------------
// clearPreviewTexture()
//-----------------------------------------------------------------------------
void LLPreviewAvatar::clearPreviewTexture(const std::string& mesh_name)
{
if (mDummyAvatar)
{
LLViewerJointMesh *mesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name);
// clear out existing test mesh
if (mesh)
{
mesh->setTestTexture(0);
}
}
}
//-----------------------------------------------------------------------------
// update()
//-----------------------------------------------------------------------------
BOOL LLPreviewAvatar::render()
{
mNeedsUpdate = FALSE;
LLVOAvatar* avatarp = mDummyAvatar;
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
glLoadIdentity();
LLGLSUIDefault def;
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
gl_rect_2d_simple( mWidth, mHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
glMatrixMode(GL_MODELVIEW);
gGL.popMatrix();
gGL.flush();
LLVector3 target_pos = mTargetJoint->getWorldPosition();
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
LLQuaternion(mCameraYaw, LLVector3::z_axis);
LLQuaternion av_rot = avatarp->mPelvisp->getWorldRotation() * camera_rot;
LLViewerCamera::getInstance()->setOriginAndLookAt(
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
LLVector3::z_axis, // up
target_pos + (mCameraOffset * av_rot) ); // point of interest
stop_glerror();
LLViewerCamera::getInstance()->setAspect((F32)mWidth / mHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
LLVertexBuffer::unbind();
avatarp->updateLOD();
if (avatarp->mDrawable.notNull())
{
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
// make sure alpha=0 shows avatar material color
LLGLDisable no_blend(GL_BLEND);
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
gGL.color4f(1,1,1,1);
return TRUE;
}
//-----------------------------------------------------------------------------
// refresh()
//-----------------------------------------------------------------------------
void LLPreviewAvatar::refresh()
{
mNeedsUpdate = TRUE;
}
//-----------------------------------------------------------------------------
// rotate()
//-----------------------------------------------------------------------------
void LLPreviewAvatar::rotate(F32 yaw_radians, F32 pitch_radians)
{
mCameraYaw = mCameraYaw + yaw_radians;
mCameraPitch = llclamp(mCameraPitch + pitch_radians, -0.95f * F_PI_BY_TWO, 0.95f * F_PI_BY_TWO);
}
//-----------------------------------------------------------------------------
// zoom()
//-----------------------------------------------------------------------------
void LLPreviewAvatar::zoom(F32 zoom_amt)
{
mCameraZoom = llclamp(mCameraZoom + zoom_amt, 0.5f, 20.f);
}
void LLPreviewAvatar::pan(F32 right, F32 up)
{
mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f);
mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f);
}
//-----------------------------------------------------------------------------
// LLPreviewSculpted
//-----------------------------------------------------------------------------
LLPreviewSculpted::LLPreviewSculpted(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
{
mNeedsUpdate = TRUE;
mCameraDistance = 0.f;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
mCameraZoom = 1.f;
mTextureName = 0;
LLVolumeParams volume_params;
volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE);
volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE);
F32 const HIGHEST_LOD = 4.0f;
mVolume = new LLVolume(volume_params, HIGHEST_LOD);
}
LLPreviewSculpted::~LLPreviewSculpted()
{
}
void LLPreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
{
mCameraDistance = distance;
mCameraZoom = 1.f;
mCameraPitch = 0.f;
mCameraYaw = 0.f;
mCameraOffset.clearVec();
if (imagep)
{
mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0);
}
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
U32 num_indices = vf.mIndices.size();
U32 num_vertices = vf.mVertices.size();
mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL, 0);
mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE);
LLStrider<LLVector3> vertex_strider;
LLStrider<LLVector3> normal_strider;
LLStrider<U16> index_strider;
mVertexBuffer->getVertexStrider(vertex_strider);
mVertexBuffer->getNormalStrider(normal_strider);
mVertexBuffer->getIndexStrider(index_strider);
// build vertices and normals
for (U32 i = 0; (S32)i < num_vertices; i++)
{
*(vertex_strider++) = vf.mVertices[i].mPosition;
LLVector3 normal = vf.mVertices[i].mNormal;
normal.normalize();
*(normal_strider++) = normal;
}
// build indices
for (U16 i = 0; i < num_indices; i++)
{
*(index_strider++) = vf.mIndices[i];
}
}
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
BOOL LLPreviewSculpted::render()
{
mNeedsUpdate = FALSE;
LLGLSUIDefault def;
LLGLDisable no_blend(GL_BLEND);
LLGLEnable cull(GL_CULL_FACE);
LLGLDepthTest depth(GL_TRUE);
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
glLoadIdentity();
gGL.color4f(1.f, 1.f, 1.f, 1.f);
gl_rect_2d_simple( mWidth, mHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
glMatrixMode(GL_MODELVIEW);
gGL.popMatrix();
glClear(GL_DEPTH_BUFFER_BIT);
LLVector3 target_pos(0, 0, 0);
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
LLQuaternion(mCameraYaw, LLVector3::z_axis);
LLQuaternion av_rot = camera_rot;
LLViewerCamera::getInstance()->setOriginAndLookAt(
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
LLVector3::z_axis, // up
target_pos + (mCameraOffset * av_rot) ); // point of interest
stop_glerror();
LLViewerCamera::getInstance()->setAspect((F32) mWidth / mHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
U32 num_indices = vf.mIndices.size();
mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL);
gPipeline.enableLightsAvatar();
gGL.pushMatrix();
const F32 SCALE = 1.25f;
gGL.scalef(SCALE, SCALE, SCALE);
const F32 BRIGHTNESS = 0.9f;
gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0);
gGL.popMatrix();
return TRUE;
}
//-----------------------------------------------------------------------------
// refresh()
//-----------------------------------------------------------------------------
void LLPreviewSculpted::refresh()
{
mNeedsUpdate = TRUE;
}
//-----------------------------------------------------------------------------
// rotate()
//-----------------------------------------------------------------------------
void LLPreviewSculpted::rotate(F32 yaw_radians, F32 pitch_radians)
{
mCameraYaw = mCameraYaw + yaw_radians;
mCameraPitch = llclamp(mCameraPitch + pitch_radians, -0.95f * F_PI_BY_TWO, 0.95f * F_PI_BY_TWO);
}
//-----------------------------------------------------------------------------
// zoom()
//-----------------------------------------------------------------------------
void LLPreviewSculpted::zoom(F32 zoom_amt)
{
mCameraZoom = llclamp(mCameraZoom + zoom_amt, 0.5f, 20.f);
}
void LLPreviewSculpted::pan(F32 right, F32 up)
{
mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f);
mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f);
}

View File

@@ -0,0 +1,144 @@
/**
* @file LLFloaterSculptPreview.h
* @brief LLFloaterSculptPreview 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_LLFloaterSculptPreview_H
#define LL_LLFloaterSculptPreview_H
#include "llfloater.h"
#include "llresizehandle.h"
#include "lldynamictexture.h"
#include "llquaternion.h"
#include "llviewerobjectlist.h"
class LLComboBox;
class LLJoint;
class LLViewerJointMesh;
class LLVOAvatar;
class LLTextBox;
class LLVertexBuffer;
class LLPreviewSculpted : public LLDynamicTexture
{
public:
LLPreviewSculpted(S32 width, S32 height);
virtual ~LLPreviewSculpted();
void setPreviewTarget(LLImageRaw *imagep, F32 distance);
void setTexture(U32 name) { mTextureName = name; }
BOOL render();
void refresh();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_amt);
void pan(F32 right, F32 up);
virtual BOOL needsRender() { return mNeedsUpdate; }
protected:
BOOL mNeedsUpdate;
U32 mTextureName;
F32 mCameraDistance;
F32 mCameraYaw;
F32 mCameraPitch;
F32 mCameraZoom;
LLVector3 mCameraOffset;
LLPointer<LLVolume> mVolume;
LLPointer<LLVertexBuffer> mVertexBuffer;
};
class LLPreviewAvatar : public LLDynamicTexture
{
public:
LLPreviewAvatar(S32 width, S32 height);
virtual ~LLPreviewAvatar();
void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male);
void setTexture(U32 name) { mTextureName = name; }
void clearPreviewTexture(const std::string& mesh_name);
BOOL render();
void refresh();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_amt);
void pan(F32 right, F32 up);
virtual BOOL needsRender() { return mNeedsUpdate; }
protected:
BOOL mNeedsUpdate;
LLJoint* mTargetJoint;
LLViewerJointMesh* mTargetMesh;
F32 mCameraDistance;
F32 mCameraYaw;
F32 mCameraPitch;
F32 mCameraZoom;
LLVector3 mCameraOffset;
LLPointer<LLVOAvatar> mDummyAvatar;
U32 mTextureName;
};
class LLFloaterSculptPreview : public LLFloater
{
public:
LLFloaterSculptPreview(LLImageRaw* src);
virtual ~LLFloaterSculptPreview();
static LLFloaterSculptPreview* show(LLImageRaw* src);
virtual 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);
static void onMouseCaptureLostImagePreview(LLMouseHandler*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
void clearAllPreviewTextures();
protected:
static void onPreviewTypeCommit(LLUICtrl*,void*);
void draw();
bool loadImage(LLImageRaw* src);
LLPointer<LLImageRaw> mRawImagep;
LLPreviewAvatar* mAvatarPreview;
LLPreviewSculpted* mSculptedPreview;
S32 mLastMouseX;
S32 mLastMouseY;
LLRect mPreviewRect;
LLRectf mPreviewImageRect;
LLPointer<LLImageGL> mImagep ;
LLViewerObject* tmpvolume;
static S32 sUploadAmount;
};
#endif // LL_LLFloaterSculptPreview_H

View File

@@ -693,7 +693,7 @@ void LLFloaterAvatarList::refreshAvatarList()
}
//<edit> custom colors for certain types of avatars!
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "RadarAvatar" ).getValue();
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapAvatar" ).getValue();
LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition());
LLUUID estate_owner = LLUUID::null;
if(parent_estate && parent_estate->isAlive())
@@ -704,22 +704,22 @@ void LLFloaterAvatarList::refreshAvatarList()
//Lindens are always more Linden than your friend, make that take precedence
if(LLMuteList::getInstance()->isLinden(entry->getName()))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "RadarLinden" ).getValue();
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapLinden" ).getValue();
}
//first make sure their parent estate actually still exists and is alive, and yes, I am lazy.
else if(estate_owner.notNull() && av_id == estate_owner)
{
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "RadarEstateOwner" ).getValue();
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapEstateOwner" ).getValue();
}
//without these people, SL would suck.
else if(is_agent_friend(av_id))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "RadarFriend" ).getValue();
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapFriend" ).getValue();
}
//big fat jerkface who is probably a jerk, display them as such.
else if(LLMuteList::getInstance()->isMuted(av_id))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "RadarMuted" ).getValue();
element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapMuted" ).getValue();
}
//</edit>

View File

@@ -85,12 +85,13 @@ void LLPanelSkins::refresh()
datas.clear();
//comboBox->add("===OFF===");
std::string path_name(gDirUtilp->getSkinBaseDir()+gDirUtilp->getDirDelimiter());
llinfos << "Reading skin listing from " << path_name << llendl;
bool found = true;
std::string currentSkinName("");
while(found)
{
found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
//llinfos << "path name " << path_name << " and name " << name << " and found " << found << llendl;
llinfos << "path name " << path_name << " and name " << name << " and found " << found << llendl;
if(found)
{
LLSD data;
@@ -101,8 +102,8 @@ void LLPanelSkins::refresh()
{
datas.push_back(data);
comboBox->add(data["skin_name"].asString());
//llinfos << "data is length " << datas.size() << " foldername field is "
// << data["folder_name"].asString() << " and looking for " << gSavedSettings.getString("SkinCurrent") <<llendl;
llinfos << "data is length " << datas.size() << " foldername field is "
<< data["folder_name"].asString() << " and looking for " << gSavedSettings.getString("SkinCurrent") <<llendl;
if(data["folder_name"].asString()==mSkin)
{
//llinfos << "found!!!!!!1!1" << llendl;

View File

@@ -41,6 +41,7 @@
#include "llimagetga.h"
#include "llinventoryview.h"
#include "llinventory.h"
#include "floatersculptpreview.h"
#include "llresmgr.h"
#include "lltextbox.h"
#include "lltextureview.h"
@@ -68,6 +69,8 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
const LLUUID& object_id,
BOOL show_keep_discard)
: LLPreview(name, rect, title, item_uuid, object_id, TRUE, PREVIEW_TEXTURE_MIN_WIDTH, PREVIEW_TEXTURE_MIN_HEIGHT ),
mItemImageID(item_uuid),
mImageName(name),
mLoadingFullImage( FALSE ),
mShowKeepDiscard(show_keep_discard),
mCopyToInv(FALSE),
@@ -111,7 +114,6 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
}
}
// Note: uses asset_id as a dummy item id.
LLPreviewTexture::LLPreviewTexture(
const std::string& name,
@@ -130,10 +132,12 @@ LLPreviewTexture::LLPreviewTexture(
PREVIEW_TEXTURE_MIN_WIDTH,
PREVIEW_TEXTURE_MIN_HEIGHT ),
mImageID(asset_id),
mItemImageID(asset_id),
mImageName(name),
mLoadingFullImage( FALSE ),
mShowKeepDiscard(FALSE),
mCopyToInv(copy_to_inv),
mIsCopyable(TRUE),
mIsCopyable(copy_to_inv),
mLastHeight(0),
mLastWidth(0),
mAspectRatio(0.f)
@@ -175,11 +179,15 @@ void LLPreviewTexture::init()
if (mCopyToInv)
{
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_embedded_texture.xml");
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
}
else if (mShowKeepDiscard)
{
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture_keep_discard.xml");
childSetAction("Keep",onKeepBtn,this);
childSetAction("Discard",onDiscardBtn,this);
}
@@ -210,7 +218,10 @@ void LLPreviewTexture::init()
old_rect.getWidth(), old_rect.getHeight());
childSetRect("dimensions", new_rect);
}
childSetAction("copy_uuid", onClickCopyID, this);
childSetEnabled("copy_uuid", canSaveAs());
childSetAction("preview_sculpt", onPreviewSculpt, this);
childSetEnabled("preview_sculpt", canSaveAs());
if (!mCopyToInv)
{
@@ -250,6 +261,7 @@ void LLPreviewTexture::draw()
if ( mImage.notNull() )
{
if(mImage->isMissingAsset()) setTitle("Asset Missing");
// Draw the texture
glColor3f( 1.f, 1.f, 1.f );
gl_draw_scaled_image(interior.mLeft,
@@ -331,14 +343,46 @@ void LLPreviewTexture::draw()
}
}
void LLPreviewTexture::onClickCopyID(void* data)
{
LLPreviewTexture *self = (LLPreviewTexture*)data;
char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
self->mImageID.toString(buffer);
llinfos << "copying id " << self->mImageID << " to clipboard" << llendl;
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
}
void LLPreviewTexture::onPreviewSculpt(void* data)
{
LLPreviewTexture *self = (LLPreviewTexture*)data;
self->mImage->setLoadedCallback( LLPreviewTexture::OnFileLoadedForPreview,
0, TRUE, FALSE, new LLUUID( self->mItemUUID ) );
}
void LLPreviewTexture::OnFileLoadedForPreview(BOOL success,
LLViewerImage *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
BOOL final,
void* userdata)
{
if( final && success )
{
LLFloaterSculptPreview::show(src);
}
}
void LLPreviewTexture::onClickSaveButton(void* user_data)
{
LLPreviewTexture* self = (LLPreviewTexture*)user_data;
self->saveAs();
}
// virtual
BOOL LLPreviewTexture::canSaveAs() const
{
// <edit>
//return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
return !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
// </edit>
return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
}
@@ -364,10 +408,10 @@ void LLPreviewTexture::saveAs()
}
mLoadingFullImage = TRUE;
getWindow()->incBusyCount();
// <edit>
//mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
mImage->setLoadedCallbackNoAux( LLPreviewTexture::onFileLoadedForSave,
// </edit>
// <edit>
//mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
mImage->setLoadedCallbackNoAux( LLPreviewTexture::onFileLoadedForSave,
// </edit>
0, TRUE, FALSE, new LLUUID( mItemUUID ) );
}
@@ -430,17 +474,17 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
}
}
// <edit>
// virtual
LLUUID LLPreviewTexture::getItemID()
{
const LLViewerInventoryItem* item = getItem();
if(item)
{
return item->getUUID();
}
return LLUUID::null;
}
// <edit>
// virtual
LLUUID LLPreviewTexture::getItemID()
{
const LLViewerInventoryItem* item = getItem();
if(item)
{
return item->getUUID();
}
return LLUUID::null;
}
// </edit>
// It takes a while until we get height and width information.

View File

@@ -60,16 +60,20 @@ public:
~LLPreviewTexture();
virtual void draw();
static void onClickCopyID(void* data);
static void onPreviewSculpt(void* data);
static void SaveToInventory(void* data);
virtual BOOL canSaveAs() const;
virtual void saveAs();
// <edit>
virtual LLUUID getItemID();
// </edit>
// <edit>
virtual LLUUID getItemID();
// </edit>
virtual void loadAsset();
virtual EAssetStatus getAssetStatus();
static void onClickSaveButton (void* user_data);
static void saveToFile(void* userdata);
static void onFileLoadedForSave(
BOOL success,
@@ -79,8 +83,16 @@ public:
S32 discard_level,
BOOL final,
void* userdata );
static void OnFileLoadedForPreview(
BOOL success,
LLViewerImage *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
BOOL final,
void* userdata );
LLImageRaw* mImageRaw;
protected:
void init();
bool setAspectRatio(const F32 width, const F32 height);
@@ -90,6 +102,9 @@ protected:
private:
void updateDimensions();
LLUUID mItemImageID;
std::string mImageName;
LLUUID mAssetImageID;
LLUUID mImageID;
LLPointer<LLViewerImage> mImage;
BOOL mLoadingFullImage;

View File

@@ -0,0 +1,15 @@
<llsd>
<map>
<key>skin_name</key>
<string>Dark Orange</string>
<key>author_name</key>
<string>Pony Ghost</string>
<key>additional_author_names</key>
<string>Linden Lab</string>
<key>skin_info</key>
<string>Game-style interface. Make your Second Life Viewer more like online games
If you like it, there are still many other colors for you to choose.</string>
<key>folder_name</key>
<string>darkorange</string>
</map>
</llsd>

View File

@@ -0,0 +1,16 @@
<llsd>
<map>
<key>skin_name</key>
<string>Dark Red</string>
<key>author_name</key>
<string>LordGregGreg</string>
<key>additional_author_names</key>
<string>Chalice Yao, JB Kraft, Linden Lab</string>
<key>skin_info</key>
<string>Everything should always be red
All Images and modifications done are provided free to use, modify, and distribute, so long as this infomation is distributed with it.
</string>
<key>folder_name</key>
<string>darkgred</string>
</map>
</llsd>

View File

@@ -0,0 +1,14 @@
<llsd>
<map>
<key>skin_name</key>
<string>Default</string>
<key>author_name</key>
<string>Linden Lab</string>
<key>additional_author_names</key>
<string></string>
<key>skin_info</key>
<string>This is the default skin for nearly every Second Life viewer.</string>
<key>folder_name</key>
<string>default</string>
</map>
</llsd>

View File

@@ -0,0 +1,14 @@
<llsd>
<map>
<key>skin_name</key>
<string>Emerald Gems</string>
<key>author_name</key>
<string>Ikaru Aichi</string>
<key>additional_author_names</key>
<string>Linden Lab</string>
<key>skin_info</key>
<string> </string>
<key>folder_name</key>
<string>emerald</string>
</map>
</llsd>

View File

@@ -0,0 +1,14 @@
<llsd>
<map>
<key>skin_name</key>
<string>Gemini</string>
<key>author_name</key>
<string>Skills Hak</string>
<key>additional_author_names</key>
<string>Linden Lab</string>
<key>skin_info</key>
<string>Originally made for the INFAMOUS Gemini viewer. Also default skin of Second Life 3.0. Use it if you don't like eye-cancer.</string>
<key>folder_name</key>
<string>gemini</string>
</map>
</llsd>

View File

@@ -0,0 +1,16 @@
<llsd>
<map>
<key>skin_name</key>
<string>Greg Red @ @</string>
<key>author_name</key>
<string>LordGregGreg</string>
<key>additional_author_names</key>
<string>Chalice Yao, JB Kraft, Linden Lab</string>
<key>skin_info</key>
<string>Everything should always be red
All Images and modifications done are provided free to use, modify, and distribute, so long as this infomation is distributed with it.
</string>
<key>folder_name</key>
<string>gred</string>
</map>
</llsd>

View File

@@ -0,0 +1,14 @@
<llsd>
<map>
<key>skin_name</key>
<string>Open Life</string>
<key>author_name</key>
<string>3DX</string>
<key>additional_author_names</key>
<string>Linden Lab</string>
<key>skin_info</key>
<string>This is the skin from the open life viewer.</string>
<key>folder_name</key>
<string>openlife</string>
</map>
</llsd>

View File

@@ -0,0 +1,3 @@
This skin was modified by Pony Ghost from the default linden skin provided for the Green Life Emerald Viewer.
All Images and modifications done are provided free to use, modify, and distribute, so long as this infomation is distributed with it.

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings version = "101">
</settings>

View File

@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings version = "101">
<!-- WINDOWS -->
<TitleBarFocusColor value="255, 255, 255, 30" /> <!-- Focused window title bar highlight, no equivalent for unfocused windows -->
<FloaterFocusBorderColor value="0, 0, 0, 80" />
<FloaterUnfocusBorderColor value="0, 0, 0, 80" />
<FocusBackgroundColor value="62, 62, 62, 255" /> <!-- Background color of focused floaters -->
<DefaultBackgroundColor value="62, 62, 62, 140" /> <!-- Background color for unfocused floaters -->
<ColorDropShadow value="0, 0, 0, 200" /> <!-- The drop shadow behind windows and menus -->
<DefaultHighlightDark value="26, 26, 26, 255" />
<DefaultHighlightLight value="115, 132, 155, 255" />
<DefaultShadowDark value="26, 26, 26, 255" />
<DefaultShadowLight value="0, 0, 0, 255" />
<!-- LABELS -->
<LabelDisabledColor value="147, 169, 213, 77" />
<LabelSelectedColor value="255, 255, 255, 255" />
<LabelSelectedDisabledColor value="164, 190, 237, 128" />
<LabelTextColor value="147, 169, 213, 255" />
<!-- LOGIN -->
<LoginProgressBarBgColor value="255, 255, 255, 255" />
<LoginProgressBarFgColor value="255, 255, 255, 255" />
<LoginProgressBoxBorderColor value="0, 30, 60, 0" />
<LoginProgressBoxCenterColor value="0, 0, 0, 200" />
<LoginProgressBoxShadowColor value="0, 0, 0, 200" />
<LoginProgressBoxTextColor value="255, 255, 255, 255"/>
<!-- BUTTONS -->
<ButtonLabelColor value="220, 220, 220, 255" /> <!-- Text labels for buttons, like the "OK" text -->
<ButtonLabelSelectedColor value="220, 220, 220, 255" />
<ButtonLabelDisabledColor value="147, 169, 213, 200" />
<ButtonLabelSelectedDisabledColor value="164, 190, 237, 200" />
<ButtonSelectedBgColor value="62, 62, 62, 255" />
<ButtonSelectedColor value="255, 255, 255, 255" />
<ButtonUnselectedBgColor value="62, 62, 62, 255" />
<ButtonUnselectedFgColor value="255, 255, 255, 255" />
<ButtonBorderColor value="239, 156, 0, 255" />
<ButtonFlashBgColor value="255, 190, 62, 127" />
<ButtonColor value="255, 255, 255, 255" /> <!-- Blended with button art, usually left as opaque white -->
<ButtonImageColor value="255, 255, 255, 255" /> <!-- Blended with button art, usually left as opaque white -->
<!-- SLIDERS -->
<SliderDisabledThumbColor value="0, 0, 0, 255" />
<SliderThumbCenterColor value="200, 200, 200, 255" />
<SliderThumbOutlineColor value="255, 255, 255, 255" />
<SliderTrackColor value="255, 255, 255, 255" />
<!-- TEXTFIELDS -->
<TextBgFocusColor value="200, 209, 204, 255" /> <!-- Text field background when receiving input (focused) -->
<TextBgReadOnlyColor value="62, 62, 62, 160" /> <!-- Text field background when read-only -->
<TextBgWriteableColor value="200, 209, 204, 230" /> <!-- Text field background when not receiving input (unfocused) -->
<TextCursorColor value="0, 0, 0, 255" />
<TextFgColor value="0, 0, 0, 255" />
<TextFgReadOnlyColor value="255, 255, 255, 200" />
<TextFgTentativeColor value="0, 0, 0, 128" />
<TextEmbeddedItemReadOnlyColor value="58, 147, 242, 255" /> <!-- i.e. About Land name that you don't own -->
<TextEmbeddedItemColor value="0, 0, 128, 255" />
<TextDefaultColor value="0, 20, 0, 255"/>
<TextLinkColor value="144, 165, 208, 255"/>
<TextLinkHoverColor value="255, 255, 255, 255"/>
<!-- LISTBOXES -->
<ScrollBgReadOnlyColor value="200, 209, 204, 255" />
<ScrollBgWriteableColor value="200, 209, 204, 255" />
<ScrollBGStripeColor value="100, 100, 100, 40" />
<ScrollDisabledColor value="128, 128, 128, 204" />
<ScrollSelectedBGColor value="100, 100, 188, 150" />
<ScrollSelectedFGColor value="0, 0, 0, 204" /> <!-- Text color -->
<ScrollUnselectedColor value="0, 0, 0, 204" /> <!-- Text color -->
<ScrollHighlightedColor value="183, 184, 188, 128" /> <!-- Hover color -->
<ScrollbarThumbColor value="60, 76, 124, 255" /> <!-- Scroll bar-->
<ScrollbarTrackColor value="153, 154, 158, 255" /> <!-- Scroll bar background-->
<!-- MENUS -->
<MenuBarBgColor value="62, 62, 62, 255" />
<MenuBarGodBgColor value="62, 128, 62, 255" />
<MenuNonProductionGodBgColor value="0, 128, 0, 255" />
<MenuNonProductionBgColor value="128, 0, 0, 255" />
<MenuDefaultBgColor value="0, 0, 0, 255" />
<MenuItemDisabledColor value="133, 133, 164, 128" /> <!-- Menu text color; also text color for pie menus and treeviews (like Inventory) -->
<MenuItemEnabledColor value="255, 255, 255, 255" /> <!-- Menu text color; also text color for pie menus and treeviews (like Inventory) -->
<MenuItemHighlightBgColor value="183, 184, 188, 100" />
<MenuItemHighlightFgColor value="255, 255, 255, 255" /> <!-- Highlighted menu text color; also treeview node selection highlight -->
<MenuPopupBgColor value="0, 0, 0, 255" />
<!-- PIE MENUS -->
<PieMenuBgColor value="62, 62, 62, 150" />
<PieMenuLineColor value="0, 0, 0, 128" />
<PieMenuSelectedColor value="183, 184, 188, 77" />
<!-- TOOLTIPS -->
<ToolTipBgColor value="183, 184, 188, 200" />
<ToolTipBorderColor value="171, 212, 245, 255" />
<ToolTipTextColor value="0, 0, 0, 255" />
<!-- NOTIFICATION POP-UPS -->
<NotifyBoxColor value="70, 170, 255, 255" />
<NotifyTextColor value="0, 0, 0, 255" />
<NotifyCautionBoxColor value="254, 209, 118, 255" /> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="70, 170, 255, 255" />
<GroupNotifyTextColor value="0, 30, 60, 255" />
<!-- CHAT AND IM HISTORY TEXTBOX COLORS -->
<ChatHistoryBgColor value="0, 0, 0, 0" />
<ChatHistoryTextColor value="255, 255, 255, 255" />
<IMHistoryBgColor value="0, 30, 80, 200" />
<IMHistoryTextColor value="255, 255, 255, 255" />
<!-- IN-WORLD SELECTION -->
<SilhouetteParentColor value="255, 255, 0, 255" />
<SilhouetteChildColor value="32, 106, 196, 255" />
<HighlightParentColor value="171, 212, 245, 255" />
<HighlightChildColor value="171, 212, 245, 255" />
<HighlightInspectColor value="255, 0, 255, 255" />
<!-- EDIT MODE GRID -->
<GridFocusPointColor value="255, 255, 255, 128" />
<GridlineColor value="255, 255, 255, 255" />
<GridlineBGColor value="235, 235, 255, 200" />
<GridlineShadowColor value="0, 0, 0, 80" />
<!-- PROPERTY LINES -->
<PropertyColorAvail value="0, 0, 0, 0" />
<PropertyColorGroup value="0, 184, 184, 102" />
<PropertyColorOther value="255, 0, 0, 102" />
<PropertyColorSelf value="0, 255, 0, 102" />
<PropertyColorForSale value="255, 128, 0, 102" />
<PropertyColorAuction value="128, 0, 255, 102" /> <!-- Match the color on the world map -->
<!-- Icon Enable/Disable -->
<IconEnabledColor value="255, 255, 255, 255"/>
<IconDisabledColor value="147, 169, 213, 200"/>
<!-- MAP -->
<MapAvatar value="0, 255, 0, 255" />
<MapFriend value="255, 255, 0, 255" />
<!-- MINI-MAP -->
<NetMapBackgroundColor value="0, 0, 0, 77" />
<NetMapYouOwnAboveWater value="0, 255, 255, 255" />
<NetMapYouOwnBelowWater value="0, 200, 200, 255" />
<NetMapGroupOwnAboveWater value="255, 0, 255, 255" />
<NetMapGroupOwnBelowWater value="200, 0, 200, 255" />
<NetMapOtherOwnAboveWater value="60, 60, 60, 255" />
<NetMapOtherOwnBelowWater value="30, 30, 30, 255" />
<NetMapThisRegion value="255, 255, 255, 255" />
<NetMapLiveRegion value="204, 204, 204, 255" />
<NetMapDeadRegion value="255, 128, 128, 255" />
<NetMapFrustum value="255, 255, 255, 20" />
<NetMapFrustumRotating value="255, 255, 255, 51" />
<!-- HELP WINDOW -->
<HelpBgColor value="200, 209, 204, 255" />
<HelpFgColor value="0, 0, 0, 255" />
<HelpScrollTrackColor value="183, 184, 188, 255" />
<HelpScrollThumbColor value="80, 96, 124, 255" />
<HelpScrollHighlightColor value="115, 132, 155, 255" />
<HelpScrollShadowColor value="0, 0, 0, 255" />
<!-- MISC -->
<AvatarNameColor value="251, 175, 93, 255" /> <!-- Text color of avatar nametags -->
<FocusColor value="239, 156, 0, 255" /> <!-- Color of the glow around UI controls with keyboard focus -->
<FloaterButtonImageColor value="239, 156, 0, 255" /> <!-- The floater buttons (like the close box) are white images that receive this color. -->
<ButtonCautionImageColor value="255, 255, 255, 255" /> <!-- Match the caution dialog buttons to the default -->
<HealthTextColor value="255, 255, 255, 255" />
<MapAutopilotColor value="255, 128, 0, 255" />
<ContextSilhouetteColor value="239, 156, 0, 255" /> <!-- For "context" highlighting, i.e. pie menu -->
<ScriptBgReadOnlyColor value="100, 100, 100, 255" />
<ParcelTextColor value="144, 165, 208, 255" /> <!-- Parcel name on menu bar, normal state -->
<ParcelHoverColor value="255, 255, 255, 255" /> <!-- Parcel name on menu bar, hover state -->
<TimeTextColor value="255, 255, 255, 255" /> <!-- SL Time on menu bar -->
<BalanceTextColor value="0, 255, 0, 255" /> <!-- Linden dollar balance on menu bar -->
<HealthTextColor value="255, 255, 255, 255" /> <!-- Damage meter text on menu bar -->
<GroupOverTierColor value="110, 15, 15, 255" /> <!-- Warning text in Group Info window -->
<FilterBackgroundColor value="0, 0, 20, 255" /> <!-- Matching region of Inventory search text -->
<FilterTextColor value="255, 200, 70, 255" />
<InventoryItemSuffixColor value="191, 216, 216, 255" /> <!-- "worn", "no modify", etc-->
<InventorySearchStatusColor value="255, 255, 255, 255" />
<ConsoleBackground value="0, 0, 0, 255" />
<FolderViewLoadingMessageTextColor value="240, 165, 90, 255"/> <!-- "loading..." in the inv -->
<InventoryBackgroundColor value="62, 62, 62, 80"/>
<!-- Alert box colors -->
<AlertBoxColor value="62, 62, 62, 255" /> <!-- Warnings floaters, like when returning objects -->
<AlertTextColor value="147, 169, 213, 255" />
<AlertCautionBoxColor value="254, 209, 118, 255" /> <!-- Background color of caution alerts -->
<AlertCautionTextColor value="0, 0, 0, 255" /> <!-- Foreground color of the special title text in caution alerts -->
<!-- Multi sliders, as in the sky animation setting -->
<MultiSliderDisabledThumbColor value="0, 0, 0, 255"/>
<MultiSliderThumbCenterColor value="183, 184, 188, 255"/>
<MultiSliderThumbOutlineColor value="0, 0, 0, 255"/>
<MultiSliderTrackColor value="30, 30, 30, 255"/>
<MultiSliderThumbCenterSelectedColor value="255, 50, 50, 255"/>
<MultiSliderTriangleColor value="255, 255, 50, 255"/>
</settings>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More