Added Build preferences, like Emerald's. Exposed UI for giving an item with autoresponse

Pulled LLDropTarget into its own files and brought in the callback version so we can use either, whereever we need them, without rewriting them.
This makes code for drag and drop items into boxes easier.

--------Auto-Response--------
Added item box to Adv. Chat, finally you can send autoresponse with item!
Taught to LLViewerMessage to understand this.

------------Build------------
Added in comment labels for more sections of system preferences.
Everything new in the System->Build tab will reset on cancel, except the item, I see no reason to reset an item.
Added in BuildPrefs, and settings like them.
Taught LLToolPlacer how to give creations material type, and size, and ask importtracker to do the rest.
LLViewerObjectList now pings importtracker whenever it notices newly created objects that are ours entirely, so we can exact our will upon them.
Cleaned up most of importtracker code so we can use only the parts we need, and do it well.
Added ObjectPhysicsProperties to message.xml
This commit is contained in:
Lirusaito
2012-07-08 11:20:56 -04:00
parent 6b11776fcf
commit 8ec8acf610
19 changed files with 648 additions and 169 deletions

View File

@@ -565,6 +565,14 @@
<boolean>false</boolean>
</map>
<key>ObjectPhysicsProperties</key>
<map>
<key>flavor</key>
<string>llsd</string>
<key>trusted-sender</key>
<boolean>true</boolean>
</map>
<!-- Server to client -->
<key>DisplayNameUpdate</key>
<map>

View File

@@ -111,6 +111,7 @@ set(viewer_SOURCE_FILES
hippolimits.cpp
hipporestrequest.cpp
hippopanelgrids.cpp
importtracker.cpp
jcfloaterareasearch.cpp
chatbar_as_cmdline.cpp
qtoolalign.cpp
@@ -169,6 +170,7 @@ set(viewer_SOURCE_FILES
lldrawpoolwater.cpp
lldrawpoolwlsky.cpp
lldriverparam.cpp
lldroptarget.cpp
lldynamictexture.cpp
llemote.cpp
lleventinfo.cpp
@@ -603,6 +605,7 @@ set(viewer_HEADER_FILES
hippolimits.h
hipporestrequest.h
hippopanelgrids.h
importtracker.h
jcfloaterareasearch.h
lggdicdownload.h
lgghunspell_wrapper.h
@@ -664,6 +667,7 @@ set(viewer_HEADER_FILES
lldrawpoolwater.h
lldrawpoolwlsky.h
lldriverparam.h
lldroptarget.h
lldynamictexture.h
llemote.h
lleventinfo.h

View File

@@ -191,5 +191,164 @@
<integer>1</integer>
</map>
<key>BuildPrefs_Xsize</key>
<map>
<key>Comment</key>
<string>Default Size For New Objects to be created X</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.5</real>
</map>
<key>BuildPrefs_Ysize</key>
<map>
<key>Comment</key>
<string>Default Size For New Objects to be created Y</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.5</real>
</map>
<key>BuildPrefs_Zsize</key>
<map>
<key>Comment</key>
<string>Default Size For New Objects to be created Z</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.5</real>
</map>
<key>EmeraldBuildPrefs_Phantom</key>
<map>
<key>Comment</key>
<string>Default Setting For New Objects to be created, phantom flag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EmeraldBuildPrefs_Temporary</key>
<map>
<key>Comment</key>
<string>Default Setting For New Objects to be created, temp flag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EmeraldBuildPrefs_Physical</key>
<map>
<key>Comment</key>
<string>Default Setting For New Objects to be created, physical flag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EmeraldBuildPrefs_EmbedItem</key>
<map>
<key>Comment</key>
<string>Whether to add item to objects</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>BuildPrefs_Material</key>
<map>
<key>Comment</key>
<string>Default Setting For New Objects to be created, physical flag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Wood</string>
</map>
<key>EmeraldBuildPrefs_Color</key>
<map>
<key>Comment</key>
<string>Color of new objects textures</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>EmeraldBuildPrefs_Texture</key>
<map>
<key>Comment</key>
<string>Texture used as 'Default' for new object created</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>89556747-24cb-43ed-920b-47caed15465f</string>
</map>
<key>EmeraldBuildPrefs_Alpha</key>
<map>
<key>Comment</key>
<string>Default Alpha For New Objects to be created</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>EmeraldBuildPrefs_Glow</key>
<map>
<key>Comment</key>
<string>Default Glow For New Objects to be created</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>EmeraldBuildPrefs_FullBright</key>
<map>
<key>Comment</key>
<string>Default Setting For New Objects to be created, whether textures are full bright</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EmeraldBuildPrefs_Shiny</key>
<map>
<key>Comment</key>
<string>Shiny level used as 'Default' for new objects created</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>None</string>
</map>
</map>
</llsd>

View File

@@ -623,6 +623,17 @@
<key>Value</key>
<string></string>
</map>
<key>EmeraldBuildPrefs_Item</key>
<map>
<key>Comment</key>
<string>UUID of item added to new object created</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
</map>
</llsd>

View File

@@ -42,6 +42,10 @@
#include "llviewercontrol.h"
#include "lgghunspell_wrapper.h"
#include "llstartup.h"
LLDropTarget* mObjectDropTarget;
LLPrefsAscentChat* LLPrefsAscentChat::sInst;
LLPrefsAscentChat::LLPrefsAscentChat()
{
@@ -63,6 +67,28 @@ LLPrefsAscentChat::LLPrefsAscentChat()
childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this);
if(sInst)delete sInst; sInst = this;
LLView* target_view = getChild<LLView>("im_give_drop_target_rect");
if (target_view)
{
const std::string drop="drop target";
if (mObjectDropTarget) delete mObjectDropTarget;
mObjectDropTarget = new LLDropTarget(drop, target_view->getRect(), SinguIMResponseItemDrop);//, mAvatarID);
addChild(mObjectDropTarget);
}
if (LLStartUp::getStartupState() == STATE_STARTED)
{
LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("AscentInstantMessageResponseItemData");
LLViewerInventoryItem* item = gInventory.getItem(itemid);
if (item) childSetValue("im_give_disp_rect_txt","Currently set to: "+item->getName());
else if (itemid.isNull()) childSetValue("im_give_disp_rect_txt","Currently not set");
else childSetValue("im_give_disp_rect_txt","Currently set to an item not on this account");
}
else childSetValue("im_give_disp_rect_txt","Not logged in");
childSetCommitCallback("im_response", onCommitAutoResponse, this);
childSetCommitCallback("KeywordsOn", onCommitKeywords, this);
@@ -80,6 +106,8 @@ LLPrefsAscentChat::LLPrefsAscentChat()
LLPrefsAscentChat::~LLPrefsAscentChat()
{
sInst=NULL;
delete mObjectDropTarget; mObjectDropTarget=NULL;
}
//static
@@ -202,6 +230,13 @@ void LLPrefsAscentChat::onCommitAutoResponse(LLUICtrl* ctrl, void* user_data)
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", self->childGetValue("im_response"));
}
//static
void LLPrefsAscentChat::SinguIMResponseItemDrop(LLViewerInventoryItem* item)
{
gSavedPerAccountSettings.setString("AscentInstantMessageResponseItemData", item->getUUID().asString());
sInst->childSetValue("im_give_disp_rect_txt","Currently set to: "+item->getName());
}
//static
void LLPrefsAscentChat::onCommitKeywords(LLUICtrl* ctrl, void* user_data)
{
@@ -496,3 +531,4 @@ void LLPrefsAscentChat::apply()
refreshValues();
refresh();
}

View File

@@ -34,6 +34,7 @@
#include "llpanel.h"
#include "lldroptarget.h"
class LLPrefsAscentChat : public LLPanel
@@ -101,6 +102,9 @@ protected:
LLColor4 mKeywordsColor;
BOOL mKeywordsPlaySound;
LLUUID mKeywordsSound;
private:
static LLPrefsAscentChat* sInst;
static void SinguIMResponseItemDrop(LLViewerInventoryItem* item);
};
#endif

View File

@@ -41,14 +41,19 @@
#include "llcombobox.h"
#include "llfloaterchat.h" //For POWER USER affirmation.
#include "llradiogroup.h"
#include "lltexturectrl.h"
#include "lluictrlfactory.h"
#include "llviewercontrol.h"
#include "llstartup.h"
LLDropTarget* mBuildDropTarget;
LLPrefsAscentSys* LLPrefsAscentSys::sInst;
LLPrefsAscentSys::LLPrefsAscentSys()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
//General -----------------------------------------------------------------------------
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
childSetCommitCallback("double_click_teleport_check", onCommitCheckBox, this);
childSetCommitCallback("system_folder_check", onCommitCheckBox, this);
@@ -57,6 +62,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
childSetCommitCallback("power_user_check", onCommitCheckBox, this);
childSetCommitCallback("power_user_confirm_check", onCommitCheckBox, this);
//Command Line ------------------------------------------------------------------------
childSetCommitCallback("chat_cmd_toggle", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLinePos", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLineGround", onCommitCmdLine, this);
@@ -73,12 +79,43 @@ LLPrefsAscentSys::LLPrefsAscentSys()
childSetCommitCallback("AscentCmdLineTP2", onCommitCmdLine, this);
childSetCommitCallback("SinguCmdLineAway", onCommitCmdLine, this);
refreshValues();
//Build -------------------------------------------------------------------------------
childSetCommitCallback("next_owner_copy", onCommitCheckBox, this);
childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
childSetCommitCallback("material", onCommitComboBox, this);
childSetCommitCallback("combobox shininess", onCommitComboBox, this);
getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("EmeraldBuildPrefs_Texture")));
childSetCommitCallback("texture control", onCommitTexturePicker, this);
if(sInst)delete sInst; sInst = this;
LLView* target_view = getChild<LLView>("build_item_drop_target_rect");
if (target_view)
{
const std::string drop="drop target";
if (mBuildDropTarget) delete mBuildDropTarget;
mBuildDropTarget = new LLDropTarget(drop, target_view->getRect(), SinguBuildItemDrop);//, mAvatarID);
addChild(mBuildDropTarget);
}
if (LLStartUp::getStartupState() == STATE_STARTED)
{
LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("EmeraldBuildPrefs_Item");
LLViewerInventoryItem* item = gInventory.getItem(itemid);
if (item) childSetValue("build_item_add_disp_rect_txt", "Currently set to:\n"+item->getName());
else if (itemid.isNull()) childSetValue("build_item_add_disp_rect_txt", "Currently\nnot set");
else childSetValue("build_item_add_disp_rect_txt", "Currently set to\nan item not on this account");
}
else childSetValue("build_item_add_disp_rect_txt", "You are\nnot logged in");
refreshValues();
refresh();
}
LLPrefsAscentSys::~LLPrefsAscentSys()
{
sInst=NULL;
delete mBuildDropTarget; mBuildDropTarget=NULL;
}
//static
@@ -132,6 +169,12 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
LLFloaterChat::addChat(chat);
}
}
else if (ctrl->getName() == "next_owner_copy")
{
bool copy = gSavedSettings.getBOOL("NextOwnerCopy");
if (!copy) gSavedSettings.setBOOL("NextOwnerTransfer", true);
self->childSetEnabled("next_owner_transfer", copy);
}
}
//static
@@ -189,6 +232,24 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data)
gSavedSettings.setString("SinguCmdLineAway", self->childGetValue("SinguCmdLineAway"));
}
void LLPrefsAscentSys::onCommitComboBox(LLUICtrl* ctrl, void* userdata)
{
LLComboBox* box = (LLComboBox*)ctrl;
if(box) gSavedSettings.setString(box->getControlName(), box->getValue().asString());
}
void LLPrefsAscentSys::onCommitTexturePicker(LLUICtrl* ctrl, void* userdata)
{
LLTextureCtrl* image_ctrl = (LLTextureCtrl*)ctrl;
if(image_ctrl) gSavedSettings.setString("EmeraldBuildPrefs_Texture", image_ctrl->getImageAssetID().asString());
}
void LLPrefsAscentSys::SinguBuildItemDrop(LLViewerInventoryItem* item)
{
gSavedPerAccountSettings.setString("EmeraldBuildPrefs_Item", item->getUUID().asString());
sInst->childSetValue("build_item_add_disp_rect_txt","Currently set to:\n"+item->getName());
}
void LLPrefsAscentSys::refreshValues()
{
//General -----------------------------------------------------------------------------
@@ -240,10 +301,29 @@ void LLPrefsAscentSys::refreshValues()
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff");
//Build -------------------------------------------------------------------------------
mAlpha = gSavedSettings.getF32("EmeraldBuildPrefs_Alpha");
mColor = gSavedSettings.getColor4("EmeraldBuildPrefs_Color");
mFullBright = gSavedSettings.getBOOL("EmeraldBuildPrefs_FullBright");
mGlow = gSavedSettings.getF32("EmeraldBuildPrefs_Glow");
mMaterial = gSavedSettings.getString("BuildPrefs_Material");
mNextCopy = gSavedSettings.getBOOL("NextOwnerCopy");
mNextMod = gSavedSettings.getBOOL("NextOwnerModify");
mNextTrans = gSavedSettings.getBOOL("NextOwnerTransfer");
mShiny = gSavedSettings.getString("EmeraldBuildPrefs_Shiny");
mTemporary = gSavedSettings.getBOOL("EmeraldBuildPrefs_Temporary");
mTexture = gSavedSettings.getString("EmeraldBuildPrefs_Texture");
mPhantom = gSavedSettings.getBOOL("EmeraldBuildPrefs_Phantom");
mPhysical = gSavedSettings.getBOOL("EmeraldBuildPrefs_Physical");
mXsize = gSavedSettings.getF32("BuildPrefs_Xsize");
mYsize = gSavedSettings.getF32("BuildPrefs_Ysize");
mZsize = gSavedSettings.getF32("BuildPrefs_Zsize");
}
void LLPrefsAscentSys::refresh()
{
//General -----------------------------------------------------------------------------
childSetEnabled("center_after_teleport_check", mDoubleClickTeleport);
childSetEnabled("offset_teleport_check", mDoubleClickTeleport);
childSetValue("power_user_check", mPowerUser);
@@ -252,6 +332,7 @@ void LLPrefsAscentSys::refresh()
childSetEnabled("speed_rez_interval", mSpeedRez);
childSetEnabled("speed_rez_seconds", mSpeedRez);
//Command Line ------------------------------------------------------------------------
childSetEnabled("cmd_line_text_2", mCmdLine);
childSetEnabled("cmd_line_text_3", mCmdLine);
childSetEnabled("cmd_line_text_4", mCmdLine);
@@ -282,6 +363,7 @@ void LLPrefsAscentSys::refresh()
childSetEnabled("AscentCmdLineTP2", mCmdLine);
childSetEnabled("SinguCmdLineAway", mCmdLine);
//Security ----------------------------------------------------------------------------
childSetValue("AscentCmdLinePos", mCmdLinePos);
childSetValue("AscentCmdLineGround", mCmdLineGround);
childSetValue("AscentCmdLineHeight", mCmdLineHeight);
@@ -296,6 +378,24 @@ void LLPrefsAscentSys::refresh()
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
childSetValue("SinguCmdLineAway", mCmdLineAway);
//Build -------------------------------------------------------------------------------
childSetValue("EmeraldBuildPrefs_Alpha", mAlpha);
getChild<LLColorSwatchCtrl>("EmeraldBuildPrefs_Color")->setOriginal(mColor);
childSetValue("EmeraldBuildPrefs_FullBright", mFullBright);
childSetValue("EmeraldBuildPrefs_Glow", mGlow);
childSetValue("BuildPrefs_Material", mMaterial);
childSetValue("NextOwnerCopy", mNextCopy);
childSetValue("NextOwnerModify", mNextMod);
childSetValue("NextOwnerTransfer", mNextTrans);
childSetValue("EmeraldBuildPrefs_Phantom", mPhantom);
childSetValue("EmeraldBuildPrefs_Physical", mPhysical);
childSetValue("EmeraldBuildPrefs_Shiny", mShiny);
childSetValue("EmeraldBuildPrefs_Temporary", mTemporary);
childSetValue("EmeraldBuildPrefs_Texture", mTexture);
childSetValue("BuildPrefs_Xsize", mXsize);
childSetValue("BuildPrefs_Ysize", mYsize);
childSetValue("BuildPrefs_Zsize", mZsize);
}
void LLPrefsAscentSys::cancel()
@@ -348,6 +448,24 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);
gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff);
//Build -------------------------------------------------------------------------------
gSavedSettings.setF32("EmeraldBuildPrefs_Alpha", mAlpha);
gSavedSettings.setColor4("EmeraldBuildPrefs_Color", mColor);
gSavedSettings.setBOOL("EmeraldBuildPrefs_FullBright", mFullBright);
gSavedSettings.setF32("EmeraldBuildPrefs_Glow", mGlow);
gSavedSettings.setString("BuildPrefs_Material", mMaterial);
gSavedSettings.setBOOL("NextOwnerCopy", mNextCopy);
gSavedSettings.setBOOL("NextOwnerModify", mNextMod);
gSavedSettings.setBOOL("NextOwnerTransfer", mNextTrans);
gSavedSettings.setBOOL("EmeraldBuildPrefs_Phantom", mPhantom);
gSavedSettings.setBOOL("EmeraldBuildPrefs_Physical", mPhysical);
gSavedSettings.setString("EmeraldBuildPrefs_Shiny", mShiny);
gSavedSettings.setBOOL("EmeraldBuildPrefs_Temporary", mTemporary);
gSavedSettings.setString("EmeraldBuildPrefs_Texture", mTexture);
gSavedSettings.setF32("BuildPrefs_Xsize", mXsize);
gSavedSettings.setF32("BuildPrefs_Ysize", mYsize);
gSavedSettings.setF32("BuildPrefs_Zsize", mZsize);
}
void LLPrefsAscentSys::apply()

View File

@@ -34,6 +34,7 @@
#include "llpanel.h"
#include "lldroptarget.h"
class LLPrefsAscentSys : public LLPanel
@@ -50,6 +51,8 @@ public:
protected:
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
static void onCommitCmdLine(LLUICtrl* ctrl, void* user_data);
static void onCommitComboBox(LLUICtrl* ctrl, void* user_data);
static void onCommitTexturePicker(LLUICtrl* ctrl, void* user_data);
//General -----------------------------------------------------------------------------
BOOL mDoubleClickTeleport;
@@ -100,6 +103,26 @@ protected:
BOOL mDisableClickSit;
BOOL mDisplayScriptJumps;
F32 mNumScriptDiff;
//Build -------------------------------------------------------------------------------
F32 mAlpha;
LLColor4 mColor;
BOOL mFullBright;
F32 mGlow;
std::string mMaterial;
BOOL mNextCopy;
BOOL mNextMod;
BOOL mNextTrans;
std::string mShiny;
BOOL mTemporary;
std::string mTexture;
BOOL mPhantom;
BOOL mPhysical;
F32 mXsize;
F32 mYsize;
F32 mZsize;
private:
static LLPrefsAscentSys* sInst;
static void SinguBuildItemDrop(LLViewerInventoryItem* item);
};
#endif

View File

@@ -7,31 +7,30 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llframetimer.h"
#include "llprimitive.h"
#include "llviewercontrol.h"
//#include "llprimitive.h"
#include "llcontrol.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llvolumemessage.h"
#include "llchat.h"
//#include "llvolumemessage.h"
//#include "llchat.h"
#include "importtracker.h"
#include "llsdserialize.h"
//#include "llsdserialize.h"
#include "lltooldraganddrop.h"
#include "llassetuploadresponders.h"
#include "lleconomy.h"
//#include "llassetuploadresponders.h"
//#include "lleconomy.h"
#include "llfloaterperms.h"
//#include "llfloaterperms.h"
#include "llviewertexteditor.h"
//#include "llviewertexteditor.h"
#include "jclslpreproc.h"
//#include "jclslpreproc.h"
ImportTracker gImportTracker;
extern LLAgent gAgent;
void ImportTracker::importer(std::string file, void (*callback)(LLViewerObject*))
/*void ImportTracker::importer(std::string file, void (*callback)(LLViewerObject*))
{
mDownCallback = callback;
asset_insertions = 0;
@@ -71,7 +70,7 @@ void ImportTracker::import(LLSD& ls_data)
state = BUILDING;
//llinfos << "IMPORTED, BUILDING.." << llendl;
plywood_above_head();
}
}*/
void ImportTracker::expectRez()
{
@@ -80,7 +79,7 @@ void ImportTracker::expectRez()
//llinfos << "EXPECTING CUBE..." << llendl;
}
void ImportTracker::clear()
/*void ImportTracker::clear()
{
if(linkset.isDefined())lastrootid = linkset[0]["LocalID"].asInteger();
localids.clear();
@@ -88,7 +87,7 @@ void ImportTracker::clear()
state = IDLE;
finish();
}
void cmdline_printchat(std::string message);
void cmdline_printchat(std::string message);*/
LLViewerObject* find(U32 local)
{
S32 i;
@@ -104,7 +103,7 @@ LLViewerObject* find(U32 local)
}
return NULL;
}
void ImportTracker::finish()
/*void ImportTracker::finish()
{
if(asset_insertions == 0)
{
@@ -144,13 +143,13 @@ void ImportTracker::cleanUp()
}
}
else cleargroups();
}
}*/
void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected)
{
switch (state)
{
//lgg crap
//lgg crap to change remaining prim parameters from the ascent system build preferences subtab
case WAND:
if(justCreated && createSelected)
{
@@ -165,14 +164,16 @@ void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected)
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)newid);
msg->addStringFast(_PREHASH_MediaURL, NULL);
//sets texture stuff
LLPrimitive obj;
obj.setNumTEs(U8(10));
S32 shinnyLevel = 0;
if(gSavedSettings.getString("EmeraldBuildPrefs_Shiny")== "None") shinnyLevel = 0;
if(gSavedSettings.getString("EmeraldBuildPrefs_Shiny")== "Low") shinnyLevel = 1;
if(gSavedSettings.getString("EmeraldBuildPrefs_Shiny")== "Medium") shinnyLevel = 2;
if(gSavedSettings.getString("EmeraldBuildPrefs_Shiny")== "High") shinnyLevel = 3;
static LLCachedControl<std::string> sshinystr(gSavedSettings, "EmeraldBuildPrefs_Shiny");
std::string shinystr = sshinystr;
//if(shinystr == "None") shinnyLevel = 0; //We're already 0.
if(shinystr == "Low") shinnyLevel = 1;
else if(shinystr == "Medium") shinnyLevel = 2;
else if(shinystr == "High") shinnyLevel = 3;
for (int i = 0; i < 10; i++)
{
@@ -193,21 +194,21 @@ void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected)
obj.packTEMessage(gMessageSystem);
msg->sendReliable(gAgent.getRegion()->getHost());
//sets some object parameters
msg->newMessage("ObjectFlagUpdate");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)newid );
msg->addBOOLFast(_PREHASH_UsePhysics, gSavedSettings.getBOOL("EmeraldBuildPrefs_Physical"));
msg->addBOOL("IsTemporary", gSavedSettings.getBOOL("EmeraldBuildPrefs_Temporary"));
msg->addBOOL("IsPhantom", gSavedSettings.getBOOL("EmeraldBuildPrefs_Phantom") );
msg->addBOOLFast(_PREHASH_IsTemporary, gSavedSettings.getBOOL("EmeraldBuildPrefs_Temporary"));
msg->addBOOLFast(_PREHASH_IsPhantom, gSavedSettings.getBOOL("EmeraldBuildPrefs_Phantom") );
msg->addBOOL("CastsShadows", true );
msg->sendReliable(gAgent.getRegion()->getHost());
if(gSavedSettings.getBOOL("EmeraldBuildPrefs_EmbedItem"))
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem((LLUUID)gSavedSettings.getString("EmeraldBuildPrefs_Item"));
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem((LLUUID)gSavedPerAccountSettings.getString("EmeraldBuildPrefs_Item"));
LLViewerObject* objectp = find((U32)newid);
if(objectp)
if(item)
@@ -250,12 +251,11 @@ void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected)
flags |= PERM_TRANSFER;
}
msg->addU32Fast(_PREHASH_Mask, flags);
msg->sendReliable(gAgent.getRegion()->getHost());
msg->sendReliable(gAgent.getRegion()->getHost());
//llinfos << "LGG SENDING CUBE TEXTURE.." << llendl;
}
break;
case BUILDING:
/* case BUILDING:
if (justCreated && (int)localids.size() < linkset.size())
{
@@ -298,10 +298,10 @@ void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected)
break;
case LINKING:
link();
break;
break;*/
}
}
struct InventoryImportInfo
/*struct InventoryImportInfo
{
U32 localid;
LLAssetType::EType type;
@@ -427,8 +427,8 @@ public:
void fire(const LLUUID &inv_item)
{
S32 file_size;
LLAPRFile infile ;
infile.open(data->filename, LL_APR_RB, NULL, &file_size);
LLAPRFile infile;
infile.open(data->filename, LL_APR_RB, LLAPRFile::access_t(), &file_size);
if (infile.getFileHandle())
{
//cmdline_printchat("got file handle @ postinv");
@@ -445,7 +445,7 @@ public:
case LLAssetType::AT_NOTECARD:
//cmdline_printchat("case notecard @ postinv");
{
/*LLViewerTextEditor* edit = new LLViewerTextEditor("",LLRect(0,0,0,0),S32_MAX,"");
*//*LLViewerTextEditor* edit = new LLViewerTextEditor("",LLRect(0,0,0,0),S32_MAX,"");
S32 size = gVFS->getSize(data->assetid, data->type);
U8* buffer = new U8[size];
gVFS->getData(data->assetid, data->type, buffer, 0, size);
@@ -461,7 +461,7 @@ public:
file.remove();
LLVFile newfile(gVFS, data->assetid, data->type, LLVFile::APPEND);
newfile.setMaxSize(size);
newfile.write((const U8*)card.c_str(),size);*/
newfile.write((const U8*)card.c_str(),size);*//*
//FAIL.
@@ -484,14 +484,14 @@ public:
U8* buffer = new U8[size];
gVFS->getData(data->assetid, data->type, buffer, 0, size);
std::string script((char*)buffer);
BOOL domono = JCLSLPreprocessor::mono_directive(script);
/*if(script.find("//mono\n") != -1)
BOOL domono = FALSE;//Phox- this needs to be fixed when the preproc is added = JCLSLPreprocessor::mono_directive(script);
*//*if(script.find("//mono\n") != -1)
{
domono = TRUE;
}else if(script.find("//lsl2\n") != -1)
{
domono = FALSE;
}*/
}*//*
delete buffer;
buffer = 0;
body["target"] = (domono == TRUE) ? "mono" : "lsl2";
@@ -592,7 +592,7 @@ void ImportTracker::send_inventory(LLSD& prim)
std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory");
S32 file_size;
LLAPRFile infile ;
infile.open(data->filename, LL_APR_RB, NULL, &file_size);
infile.open(data->filename, LL_APR_RB, LLAPRFile::access_t(), &file_size);
if (infile.getFileHandle())
{
//cmdline_printchat("got file handle");
@@ -625,8 +625,8 @@ void ImportTracker::send_inventory(LLSD& prim)
//cmdline_printchat("case cloth/bodypart");
{
S32 file_size;
LLAPRFile infile ;
infile.open(data->filename, LL_APR_RB, NULL, &file_size);
LLAPRFile infile;
infile.open(data->filename, LL_APR_RB, LLAPRFile::access_t(), &file_size);
if (infile.getFileHandle())
{
//cmdline_printchat("got file handle @ cloth");
@@ -716,7 +716,7 @@ void ImportTracker::send_properties(LLSD& prim, int counter)
msg->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER);
msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED);
msg->addU32Fast(_PREHASH_Mask, U32(atoi(prim["next_owner_mask"].asString().c_str())));
/*msg->sendReliable(gAgent.getRegion()->getHost());
*//*msg->sendReliable(gAgent.getRegion()->getHost());
//LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectPermissions);
@@ -724,13 +724,13 @@ void ImportTracker::send_properties(LLSD& prim, int counter)
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_HeaderData);
msg->addBOOLFast(_PREHASH_Override, data->mOverride);*/
msg->addBOOLFast(_PREHASH_Override, data->mOverride);*//*
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger());
msg->addU8Fast(_PREHASH_Field, PERM_GROUP);
msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED);
msg->addU32Fast(_PREHASH_Mask, U32(atoi(prim["group_mask"].asString().c_str())));
/*msg->sendReliable(gAgent.getRegion()->getHost());
*//*msg->sendReliable(gAgent.getRegion()->getHost());
//LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectPermissions);
@@ -738,7 +738,7 @@ void ImportTracker::send_properties(LLSD& prim, int counter)
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_HeaderData);
msg->addBOOLFast(_PREHASH_Override, data->mOverride);*/
msg->addBOOLFast(_PREHASH_Override, data->mOverride);*//*
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger());
msg->addU8Fast(_PREHASH_Field, PERM_EVERYONE);
@@ -1119,4 +1119,4 @@ void ImportTracker::plywood_above_head()
msg->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null);
msg->sendReliable(region->getHost());
}
*/

View File

@@ -7,38 +7,38 @@
#ifndef IMPORTTRACKER_H
#define IMPORTTRACKER_H
#include "llviewerobject.h"
//#include "llviewerobject.h"
class ImportTracker
{
public:
enum ImportState { IDLE, WAND, BUILDING, LINKING, POSITIONING };
enum ImportState { IDLE, WAND/*, BUILDING, LINKING, POSITIONING*/ };
ImportTracker()
: numberExpected(0),
state(IDLE),
state(IDLE)/*,
last(0),
groupcounter(0),
updated(0)
updated(0)*/
{ }
ImportTracker(LLSD &data) { state = IDLE; linkset = data; numberExpected=0;}
~ImportTracker() { localids.clear(); linkset.clear(); }
ImportTracker(LLSD &data) { state = IDLE; /*linkset = data;*/ numberExpected=0;}
~ImportTracker() { /*localids.clear(); linkset.clear();*/ }
//Chalice - support import of linkset groups
void importer(std::string file, void (*callback)(LLViewerObject*));
void cleargroups();
void import(LLSD &ls_data);
//void importer(std::string file, void (*callback)(LLViewerObject*));
//void cleargroups();
//void import(LLSD &ls_data);
void expectRez();
void clear();
void finish();
void cleanUp();
//void clear();
//void finish();
//void cleanUp();
void get_update(S32 newid, BOOL justCreated = false, BOOL createSelected = false);
const int getState() { return state; }
U32 asset_insertions;
/* U32 asset_insertions;
protected:
void send_inventory(LLSD &prim);
@@ -52,11 +52,11 @@ class ImportTracker
void wear(LLSD &prim);
void position(LLSD &prim);
void plywood_above_head();
*/
private:
int numberExpected;
int state;
S32 last;
/* S32 last;
LLVector3 root;
LLQuaternion rootrot;
std::list<S32> localids;
@@ -71,7 +71,7 @@ class ImportTracker
std::string asset_dir;
void (*mDownCallback)(LLViewerObject*);
U32 lastrootid;
U32 lastrootid;*/
};
extern ImportTracker gImportTracker;

View File

@@ -0,0 +1,81 @@
/**
* @file lldroptarget.cpp
* @Class LLDropTarget
*
* This handy class is a simple way to drop something on another
* view. It handles drop events, always setting itself to the size of
* its parent.
*
* Altered to support a callback so it can return the item
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Pulled into its own file for more widespread use
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* $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 "lldroptarget.h"
#include "lltooldraganddrop.h"
#include "llinventorymodel.h"
LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id) :
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
mAgentID(agent_id),
mDownCallback(NULL)
{
}
LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*)) :
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
mDownCallback(callback)
{
}
LLDropTarget::~LLDropTarget()
{
}
void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
{
llinfos << "LLDropTarget::doDrop()" << llendl;
}
BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
{
if(!getParent()) return false;
if(!mDownCallback) LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop, cargo_type, cargo_data, accept);
else
{
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
if (gInventory.getItem(inv_item->getUUID()))
{
*accept = ACCEPT_YES_COPY_SINGLE;
if (drop) mDownCallback(inv_item);
}
else *accept = ACCEPT_NO;
}
return true;
}

View File

@@ -0,0 +1,64 @@
/**
* @file lldroptarget.h
* @Class LLDropTarget
*
* This handy class is a simple way to drop something on another
* view. It handles drop events, always setting itself to the size of
* its parent.
*
* Altered to support a callback so it can return the item
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Pulled into its own file for more widespread use
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* $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 LLDROPTARGET_H
#define LLDROPTARGET_H
#include "stdtypes.h"
#include "llview.h"
class LLViewerInventoryItem;
class LLDropTarget : public LLView
{
public:
LLDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*));
LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id);
~LLDropTarget();
void doDrop(EDragAndDropType cargo_type, void* cargo_data);
//
// LLView functionality
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg);
void setAgentID(const LLUUID &agent_id){ mAgentID = agent_id;}
protected:
LLUUID mAgentID;
void (*mDownCallback)(LLViewerInventoryItem*);
};
#endif // LLDROPTARGET_H

View File

@@ -85,6 +85,7 @@
#include "lluictrlfactory.h"
#include "llviewermenu.h"
#include "llavatarnamecache.h"
#include "lldroptarget.h"
#include <iosfwd>
@@ -105,68 +106,6 @@ extern void callback_invite_to_group(LLUUID group_id, void *user_data);
extern void handle_lure(const LLUUID& invitee);
extern void handle_pay_by_id(const LLUUID& payee);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLDropTarget
//
// This handy class is a simple way to drop something on another
// view. It handles drop events, always setting itself to the size of
// its parent.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLDropTarget : public LLView
{
public:
LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id);
~LLDropTarget();
void doDrop(EDragAndDropType cargo_type, void* cargo_data);
//
// LLView functionality
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
void setAgentID(const LLUUID &agent_id) { mAgentID = agent_id; }
protected:
LLUUID mAgentID;
};
LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect,
const LLUUID& agent_id) :
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
mAgentID(agent_id)
{
}
LLDropTarget::~LLDropTarget()
{
}
void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
{
llinfos << "LLDropTarget::doDrop()" << llendl;
}
BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
if(getParent())
{
LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop,
cargo_type, cargo_data, accept);
return TRUE;
}
return FALSE;
}
//-----------------------------------------------------------------------------
// LLPanelAvatarTab()

View File

@@ -72,6 +72,7 @@
#include "llparcel.h" // always rez
#include "llviewerparcelmgr.h" // always rez
// </edit>
#include "importtracker.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -222,8 +223,19 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
// Set params for new object based on its PCode.
LLQuaternion rotation;
LLVector3 scale = DEFAULT_OBJECT_SCALE;
LLVector3 scale = LLVector3(
gSavedSettings.getF32("BuildPrefs_Xsize"),
gSavedSettings.getF32("BuildPrefs_Ysize"),
gSavedSettings.getF32("BuildPrefs_Zsize"));
U8 material = LL_MCODE_WOOD;
if(gSavedSettings.getString("BuildPrefs_Material")== "Stone") material = LL_MCODE_STONE;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Metal") material = LL_MCODE_METAL;
//if(gSavedSettings.getString("BuildPrefs_Material")== "Wood") material = LL_MCODE_WOOD; redundant
else if(gSavedSettings.getString("BuildPrefs_Material")== "Flesh") material = LL_MCODE_FLESH;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Rubber") material = LL_MCODE_RUBBER;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Plastic") material = LL_MCODE_PLASTIC;
BOOL create_selected = FALSE;
LLVolumeParams volume_params;
@@ -465,7 +477,8 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
// Pack in name value pairs
gMessageSystem->sendReliable(regionp->getHost());
//Actually call expectRez so that importtracker can do its thing
gImportTracker.expectRez();
// Spawns a message, so must be after above send
if (create_selected)
{

View File

@@ -2261,7 +2261,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
position,
false);
}
LLGiveInventory::doGiveInventoryItem(from_id, item);
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
}
}
}

View File

@@ -87,6 +87,9 @@
extern F32 gMinObjectDistance;
extern BOOL gAnimateTextures;
#include "importtracker.h"
extern ImportTracker gImportTracker;
void dialog_refresh_all();
#define CULL_VIS
@@ -271,6 +274,15 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// so that the drawable parent is set properly
findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
if(just_created && objectp &&
(gImportTracker.getState() == ImportTracker::WAND /*||
gImportTracker.getState() == ImportTracker::BUILDING*/) &&
objectp->mCreateSelected && objectp->permYouOwner() &&
objectp->permModify() && objectp->permCopy() && objectp->permTransfer())
{
gImportTracker.get_update(objectp->mLocalID, just_created, objectp->mCreateSelected);
}
// If we're just wandering around, don't create new objects selected.
if (just_created
&& update_type != OUT_TERSE_IMPROVED

View File

@@ -55,8 +55,10 @@
<check_box bottom_delta="-20" follows="left|top" initial_value="false" label="Send as soon as they start typing" name="AscentInstantMessageShowOnTyping"/>
<check_box bottom_delta="-20" follows="left|top" initial_value="false" label="Don't show IMs you auto-responsed to" name="AscentInstantMessageShowResponded"/>
<check_box bottom_delta="-20" follows="left|top" initial_value="false" label="Autorespond to every message" name="AscentInstantMessageResponseRepeat"/>
<check_box bottom_delta="-20" follows="left|top" initial_value="false" label="Send an item along with the response" name="AscentInstantMessageResponseItem" tool_tip="You can include an inventory item to send along with your auto response by dragging it from your inventory to the location below"/>
<text bottom_delta="120" left_delta="245" follows="left|top" height="18" name="text_box1">Response Text:</text>
<check_box bottom_delta="-20" follows="left|top" initial_value="false" label="Send an item along with the response" name="AscentInstantMessageResponseItem" tool_tip="You can include an inventory item to send along with your auto response by dragging it from your inventory to the location below"/>
<view_border blevel_style="in" bottom_delta="-20" follows="left|top" height="18" left_delta="5" mouse_opaque="false" name="im_give_drop_target_rect" width="220"/>
<text bottom_delta="0" drop_shadow_visible="true" follows="left|top" halign="center" height="16" name="im_give_disp_rect_txt" tool_tip="Drop an inventory item here to have it given along with the auto-response." width="230">Drop item here (Currently: NONE)</text>
<text bottom_delta="140" left_delta="240" follows="left|top" height="18" name="text_box1">Response Text:</text>
<text_editor bottom_delta="-110" follows="left|top" height="110" max_length="1100" name="im_response" width="230" word_wrap="true" spell_check="true"/>
<text bottom_delta="-25" follows="left|top" height="18" name="text_box2">
#f for user's first name, #l for last name,

View File

@@ -98,43 +98,44 @@
<check_box bottom_delta="-20" follows="top" label="Values are percent" left_delta="-5" tool_tip="Default settings are Percentages and every axis set at 50" name="EmPivotPercToggle" control_name="AscentBuildPrefs_PivotIsPercent"/>
<check_box bottom_delta="60" follows="top" label="Enable highlighting of selected prims" left_delta="140" name="EmBuildPrefsRenderHighlight_toggle" control_name="AscentRenderHighlightSelections"/>
<check_box bottom_delta="-20" follows="top" initial_value="false" label="Show axis arrow on root prim position" tool_tip="Default behaviour is to show the axis on the center of mass of a linkset. If enabled, the axis will be shown on the root prim of the linkset instead." name="EmBuildPrefsActualRoot_toggle" control_name="AscentBuildPrefs_ActualRoot"/>
<view_border bevel_style="none" border_thickness="1" bottom="-165" follows="top" height="60" left="5" name="NextOwnerBorder" width="130"/>
<!--This is sorta very obvious, afterall, you created it, must you be told this is for next owner? Uncomment if so(otherwise delete?)<text bottom_delta="65" follows="top" height="10" left_delta="20" name="text_box7">Allow next owner:</text>-->
<check_box bottom_delta="40" follows="top" height="16" initial_value="false" label="Copy permissions" tool_tip="Next owner can make copies of creations" name="next_owner_copy" control_name="NextOwnerCopy"/>
<check_box follows="top" height="16" initial_value="false" label="Modify permission" tool_tip="Next owner can edit creations" name="next_owner_modify" control_name="NextOwnerModify"/>
<check_box follows="top" height="16" initial_value="true" label="Transfer permission" tool_tip="Next owner can give(or sell) creations" name="next_owner_transfer" control_name="NextOwnerTransfer"/>
<!--This should probably be removed as it will be self-explanatory since There is code to do this for the upload permissions, dimming the box, already, and that mechanic should be worked into here.<text bottom_delta="-15" follows="top" height="10" name="text_box8">*If "copy" is unchecked, "transfer" must be enabled. This will also set upload permissions.</text>Furthermore, based on this comment, the control is for both, should we have separate controls? or unify them? If separated, the above bordered area will need to be carefully migrated into panel_permissions.xml(Which will be embedded into the Set Default Permissions floater as well as here, either way.) and will need modifications, it may therefore be better to unify.-->
<texture_picker allow_no_texture="false" bottom="-185" can_apply_immediately="true" default_image_name="Default" follows="top" height="80" label=" Texture" left="165" name="texture control" control_name="PhoenixBuildPrefs_Texture" tool_tip="Click to choose a texture" width="64"/>
<check_box bottom="-125" left="240" follows="top" height="16" label="Phantom" name="EmPhantomToggle" control_name="PhoenixBuildPrefs_Phantom"/>
<check_box follows="top" height="16" label="Physical" name="EmPhysicalToggle" control_name="PhoenixBuildPrefs_Physical"/>
<check_box follows="top" height="16" label="Temporary" name="EmTemporaryToggle" control_name="PhoenixBuildPrefs_Temporary"/>
<combo_box bottom="-184" left="246" follows="top" height="18" name="material" width="64" control_name="PhoenixBuildPrefs_Material">
<combo_item name="Stone" value="Stone">Stone</combo_item>
<combo_item name="Metal" value="Metal">Metal</combo_item>
<combo_item name="Glass" value="Glass">Glass</combo_item>
<combo_item name="Wood" value="Wood">Wood</combo_item>
<combo_item name="Flesh" value="Flesh">Flesh</combo_item>
<combo_item name="Plastic" value="Plastic">Plastic</combo_item>
<combo_item name="Rubber" value="Rubber">Rubber</combo_item>
<view_border bevel_style="none" border_thickness="1" bottom="-180" follows="top" height="70" left="5" name="NextOwnerBorder" width="130"/>
<text bottom_delta="60" follows="top" height="10" left_delta="10" name="text_box7">Allow next owner:</text>
<check_box follows="top" height="16" initial_value="false" label="Copy permissions" tool_tip="Next owner can make copies of creations" name="next_owner_copy" control_name="NextOwnerCopy"/>
<check_box follows="top" height="16" initial_value="false" label="Modify permission" tool_tip="Next owner can edit creations" name="next_owner_modify" control_name="NextOwnerModify"/>
<check_box follows="top" height="16" initial_value="true" label="Transfer permission" tool_tip="Next owner can give(or sell) creations" name="next_owner_transfer" control_name="NextOwnerTransfer"/>
<texture_picker allow_no_texture="false" bottom="-190" can_apply_immediately="true" default_image_name="Default" follows="top" height="80" label=" Texture" left="155" name="texture control" control_name="EmeraldBuildPrefs_Texture" tool_tip="Click to choose a texture" width="64"/>
<check_box bottom="-131" left_delta="75" follows="top" height="16" label="Phantom" name="EmPhantomToggle" control_name="EmeraldBuildPrefs_Phantom"/>
<check_box follows="top" height="16" label="Physical" name="EmPhysicalToggle" control_name="EmeraldBuildPrefs_Physical"/>
<check_box follows="top" height="16" label="Temporary" name="EmTemporaryToggle" control_name="EmeraldBuildPrefs_Temporary"/>
<combo_box bottom="-190" left_delta="6" follows="top" height="18" name="material" width="64" control_name="BuildPrefs_Material">
<combo_item name="Stone" value="Stone">Stone</combo_item>
<combo_item name="Metal" value="Metal">Metal</combo_item>
<combo_item name="Glass" value="Glass">Glass</combo_item>
<combo_item name="Wood" value="Wood">Wood</combo_item>
<combo_item name="Flesh" value="Flesh">Flesh</combo_item>
<combo_item name="Plastic" value="Plastic">Plastic</combo_item>
<combo_item name="Rubber" value="Rubber">Rubber</combo_item>
</combo_box>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom="-185" can_apply_immediately="true" color="1, 1, 1, 1" follows="top" height="80" label=" Color" left_delta="76" name="colorswatch" tool_tip="Click to open Color Picker" width="64" control_name="PhoenixBuildPrefs_Color"/>
<spinner bottom_delta="60" decimal_digits="0" follows="top" height="16" increment="1" label="Alpha" label_width="45" left_delta="70" max_val="100" min_val="0" name="alpha" width="97" control_name="PhoenixBuildPrefs_Alpha"/>
<spinner bottom_delta="-20" decimal_digits="2" follows="top" height="16" increment="0.05" label="Glow" label_width="45" max_val="1" min_val="0" name="glow" width="97" control_name="PhoenixBuildPrefs_Glow"/>
<check_box follows="top" height="16" label="Full Bright" name="EmFBToggle" control_name="PhoenixBuildPrefs_FullBright"/>
<text follows="top">Shine</text><combo_box bottom_delta="-5" follows="top" left_delta="33" height="18" name="combobox shininess" tool_tip="Set the amount of shine for the object" width="64" control_name="PhoenixBuildPrefs_Shiny">
<combo_item name="None" value="None">None</combo_item>
<combo_item name="Low" value="Low">Low</combo_item>
<combo_item name="Medium" value="Medium">Medium</combo_item>
<combo_item name="High" value="High">High</combo_item>
</combo_box>
<check_box name="PhoenixBuildPrefsEmbedItem" left="5" bottom_delta="0" follows="top" initial_value="false" label="Put an item into new objects" control_name="PhoenixBuildPrefs_EmbedItem"/>
<view_border blevel_style="in" bottom_delta="-20" left="29" follows="top" height="16" name="im_give_drop_target_rect" width="124"/>
<text bottom_delta="0" follows="top" height="16" name="Give inventory">Drop inventory item here</text>
<view_border blevel_style="in" bottom_delta="-36" follows="top" height="36" name="build_item_add_disp_rect" width="124"/>
<text bottom_delta="18" left_delta="22" follows="top" height="16" name="build_item_add_disp_rect_txt">Currently set to:
<!--This should probably be one of those <string>'s, since they seem to be somehow mercurial- er... git-->ITEM</text>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom="-190" can_apply_immediately="true" color="1, 1, 1, 1" follows="top" height="80" label=" Color" left_delta="76" name="colorswatch" tool_tip="Click to open Color Picker" width="64" control_name="EmeraldBuildPrefs_Color"/>
<spinner bottom_delta="60" decimal_digits="0" follows="top" height="16" increment="1" label="Alpha" label_width="45" left_delta="70" max_val="100" min_val="0" name="alpha" width="97" control_name="EmeraldBuildPrefs_Alpha"/>
<spinner bottom_delta="-20" decimal_digits="2" follows="top" height="16" increment="0.05" label="Glow" label_width="45" max_val="1" min_val="0" name="glow" width="97" control_name="EmeraldBuildPrefs_Glow"/>
<check_box follows="top" height="16" label="Full Bright" name="EmFBToggle" control_name="EmeraldBuildPrefs_FullBright"/>
<text follows="top">Shine</text>
<combo_box bottom_delta="-5" follows="top" left_delta="33" height="18" name="combobox shininess" tool_tip="Set the amount of shine for the object" width="64" control_name="EmeraldBuildPrefs_Shiny">
<combo_item name="None" value="None">None</combo_item>
<combo_item name="Low" value="Low">Low</combo_item>
<combo_item name="Medium" value="Medium">Medium</combo_item>
<combo_item name="High" value="High">High</combo_item>
</combo_box>
<check_box name="EmeraldBuildPrefsEmbedItem" left="5" bottom_delta="-15" follows="top" initial_value="false" label="Put an item into new objects" control_name="EmeraldBuildPrefs_EmbedItem"/>
<view_border blevel_style="in" bottom_delta="-20" left="25" follows="top" height="16" name="build_item_drop_target_rect" width="140"/>
<text bottom_delta="0" left_delta="8" follows="top" height="16" name="Give inventory">Drop inventory item here</text>
<view_border blevel_style="in" bottom_delta="-35" left_delta="-8" follows="top" height="35" name="build_item_add_disp_rect" width="140"/>
<text bottom_delta="15" left_delta="0" follows="top" height="16" name="build_item_add_disp_rect_txt" halign="center" width="138">Currently set to:
ITEM</text>
<spinner bottom="369" left="370" decimal_digits="5" follows="left|top" height="16" increment="0.0005" label="X size" label_width="40" max_val="10" min_val="0.0001" name="X size" width="110" control_name="BuildPrefs_Xsize"/>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.0005" label="Y size" label_width="40" max_val="10" min_val="0.0001" name="Y size" width="110" control_name="BuildPrefs_Ysize"/>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.0005" label="Z size" label_width="40" max_val="10" min_val="0.0001" name="Z size" width="110" control_name="BuildPrefs_Zsize"/>
</panel>
</tab_container>

View File

@@ -2061,7 +2061,7 @@ version 2.0
{ IsPhantom BOOL }
{ CastsShadows BOOL }
}
{
{
ExtraPhysics Variable
{ PhysicsShapeType U8 }
{ Density F32 }
@@ -2975,7 +2975,7 @@ version 2.0
{ BillableFactor F32 }
{ ObjectBonusFactor F32 }
{ WaterHeight F32 }
{ TerrainRaiseLimit F32 }
{ TerrainRaiseLimit F32 }
{ TerrainLowerLimit F32 }
{ PricePerMeter S32 }
{ RedirectGridX S32 }
@@ -4251,6 +4251,10 @@ version 2.0
Buttons Variable
{ ButtonLabel Variable 1 }
}
{
OwnerData Variable
{ OwnerID LLUUID }
}
}