added preliminary support for shift-click texture viewing, the env var OPENSIM_RULES needs to be set to 1 for it to work (oh god this is bad)
This commit is contained in:
@@ -221,6 +221,10 @@ else (STANDALONE)
|
|||||||
)
|
)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
if($ENV{OPENSIM_RULES} EQUAL 1)
|
||||||
|
add_definitions(-DOPENSIM_RULES=1)
|
||||||
|
endif($ENV{OPENSIM_RULES} EQUAL 1)
|
||||||
|
|
||||||
if(SERVER)
|
if(SERVER)
|
||||||
include_directories(${LIBS_PREBUILT_DIR}/include/havok)
|
include_directories(${LIBS_PREBUILT_DIR}/include/havok)
|
||||||
endif(SERVER)
|
endif(SERVER)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class PlatformSetup(object):
|
|||||||
distcc = True
|
distcc = True
|
||||||
cmake_opts = []
|
cmake_opts = []
|
||||||
word_size = 32
|
word_size = 32
|
||||||
opensim_rules = False #whether or not to use rules fit for opensim
|
opensim_rules = 'OFF' #whether or not to use rules fit for opensim
|
||||||
using_express = False
|
using_express = False
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -69,6 +69,11 @@
|
|||||||
#include "llui.h"
|
#include "llui.h"
|
||||||
#include "llweb.h"
|
#include "llweb.h"
|
||||||
|
|
||||||
|
#if OPENSIM_RULES==1
|
||||||
|
#include "llpreview.h"
|
||||||
|
#include "llpreviewtexture.h"
|
||||||
|
#endif /* OPENSIM_RULES==1 */
|
||||||
|
|
||||||
extern void handle_buy(void*);
|
extern void handle_buy(void*);
|
||||||
|
|
||||||
extern BOOL gDebugClicks;
|
extern BOOL gDebugClicks;
|
||||||
@@ -158,8 +163,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
|
|||||||
LLViewerObject *object = mPick.getObject();
|
LLViewerObject *object = mPick.getObject();
|
||||||
LLViewerObject *parent = NULL;
|
LLViewerObject *parent = NULL;
|
||||||
|
|
||||||
#ifdef OPENSIM_RULES
|
#if OPENSIM_RULES==1
|
||||||
#warn "DICKS IN MY BUTT"
|
|
||||||
if(mPick.mKeyMask == MASK_SHIFT)
|
if(mPick.mKeyMask == MASK_SHIFT)
|
||||||
{
|
{
|
||||||
if(object)
|
if(object)
|
||||||
@@ -171,13 +175,34 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
|
|||||||
if(img)
|
if(img)
|
||||||
{
|
{
|
||||||
LLUUID image_id = img->getID();
|
LLUUID image_id = img->getID();
|
||||||
LLInventoryBridge::open_texture(image_id, std::string(image_id), true, LLUUID::null ,true);
|
|
||||||
|
// See if we can bring an exiting preview to the front
|
||||||
|
if( !LLPreview::show( image_id, true ) )
|
||||||
|
{
|
||||||
|
// There isn't one, so make a new preview
|
||||||
|
S32 left, top;
|
||||||
|
gFloaterView->getNewFloaterPosition(&left, &top);
|
||||||
|
LLRect rect = gSavedSettings.getRect("PreviewTextureRect");
|
||||||
|
rect.translate( left - rect.mLeft, top - rect.mTop );
|
||||||
|
|
||||||
|
LLPreviewTexture* preview;
|
||||||
|
preview = new LLPreviewTexture("preview texture",
|
||||||
|
rect,
|
||||||
|
image_id.getString(),
|
||||||
|
image_id,
|
||||||
|
LLUUID::null,
|
||||||
|
true);
|
||||||
|
preview->setSourceID(image_id);
|
||||||
|
preview->setFocus(TRUE);
|
||||||
|
|
||||||
|
gFloaterView->adjustToFitScreen(preview, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif /* OPENSIM_RULES */
|
#endif /* OPENSIM_RULES==1 */
|
||||||
|
|
||||||
if (mPick.mPickType != LLPickInfo::PICK_LAND)
|
if (mPick.mPickType != LLPickInfo::PICK_LAND)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user