summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelobject.cpp36
-rw-r--r--indra/newview/llpanelobject.h22
-rw-r--r--indra/newview/llselectmgr.cpp12
-rw-r--r--indra/newview/llselectmgr.h2
-rw-r--r--indra/newview/llviewerobject.cpp27
-rw-r--r--indra/newview/llviewerobject.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml18
7 files changed, 62 insertions, 61 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 669ff3ffd6..991e97b767 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -138,9 +138,9 @@ BOOL LLPanelObject::postBuild()
mCheckPhantom = getChild<LLCheckBoxCtrl>("Phantom Checkbox Ctrl");
childSetCommitCallback("Phantom Checkbox Ctrl",onCommitPhantom,this);
- // PhysicsShapeType combobox
- mComboPhysicsShapeType = getChild<LLComboBox>("Physics Shape Type Combo Ctrl");
- childSetCommitCallback("Physics Shape Type Combo Ctrl", onCommitPhysicsShapeType,this);
+ // PhysicsRep combobox
+ mComboPhysicsRep = getChild<LLComboBox>("Physics Rep Combo Ctrl");
+ childSetCommitCallback("Physics Rep Combo Ctrl", onCommitPhysicsRep,this);
// Position
mLabelPosition = getChild<LLTextBox>("label position");
@@ -324,7 +324,7 @@ LLPanelObject::LLPanelObject()
mIsPhysical(FALSE),
mIsTemporary(FALSE),
mIsPhantom(FALSE),
- mPhysicsShapeType(0),
+ mPhysicsRep(0),
mCastShadows(TRUE),
mSelectedType(MI_BOX),
mSculptTextureRevert(LLUUID::null),
@@ -532,9 +532,9 @@ void LLPanelObject::getState( )
mCheckPhantom->set( mIsPhantom );
mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible );
- mPhysicsShapeType = objectp->getPhysicsShapeType();
- mComboPhysicsShapeType->setCurrentByIndex(mPhysicsShapeType);
- mComboPhysicsShapeType->setEnabled(editable);
+ mPhysicsRep = objectp->getPhysicsRep();
+ mComboPhysicsRep->setCurrentByIndex(mPhysicsRep);
+ mComboPhysicsRep->setEnabled(editable);
#if 0 // 1.9.2
mCastShadows = root_objectp->flagCastShadows();
@@ -1241,19 +1241,19 @@ void LLPanelObject::sendIsPhantom()
}
}
-void LLPanelObject::sendPhysicsShapeType()
+void LLPanelObject::sendPhysicsRep()
{
- U8 value = (U8)mComboPhysicsShapeType->getCurrentIndex();
- if (mPhysicsShapeType != value)
+ U8 value = (U8)mComboPhysicsRep->getCurrentIndex();
+ if (mPhysicsRep != value)
{
- LLSelectMgr::getInstance()->selectionUpdatePhysicsShapeType(value);
- mPhysicsShapeType = value;
+ LLSelectMgr::getInstance()->selectionUpdatePhysicsRep(value);
+ mPhysicsRep = value;
- llinfos << "update physics shape type sent" << llendl;
+ llinfos << "update physicsrep sent" << llendl;
}
else
{
- llinfos << "update physics shape type not changed" << llendl;
+ llinfos << "update physicstep not changed" << llendl;
}
}
@@ -1930,8 +1930,8 @@ void LLPanelObject::clearCtrls()
mCheckTemporary ->setEnabled( FALSE );
mCheckPhantom ->set(FALSE);
mCheckPhantom ->setEnabled( FALSE );
- mComboPhysicsShapeType->setCurrentByIndex(0);
- mComboPhysicsShapeType->setEnabled(FALSE);
+ mComboPhysicsRep->setCurrentByIndex(0);
+ mComboPhysicsRep->setEnabled(FALSE);
#if 0 // 1.9.2
mCheckCastShadows->set(FALSE);
mCheckCastShadows->setEnabled( FALSE );
@@ -2027,10 +2027,10 @@ void LLPanelObject::onCommitPhantom( LLUICtrl* ctrl, void* userdata )
}
// static
-void LLPanelObject::onCommitPhysicsShapeType(LLUICtrl* ctrl, void* userdata )
+void LLPanelObject::onCommitPhysicsRep(LLUICtrl* ctrl, void* userdata )
{
LLPanelObject* self = (LLPanelObject*) userdata;
- self->sendPhysicsShapeType();
+ self->sendPhysicsRep();
}
// static
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index 7f368c38c7..fbc0902141 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -65,14 +65,14 @@ public:
static bool precommitValidate(const LLSD& data);
static void onCommitLock(LLUICtrl *ctrl, void *data);
- static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
- static void onCommitScale( LLUICtrl* ctrl, void* userdata);
- static void onCommitRotation( LLUICtrl* ctrl, void* userdata);
- static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
- static void onCommitTemporary( LLUICtrl* ctrl, void* userdata);
- static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
- static void onCommitPhysicsShapeType( LLUICtrl* ctrl, void* userdata);
- static void onCommitCastShadows( LLUICtrl* ctrl, void* userdata);
+ static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
+ static void onCommitScale( LLUICtrl* ctrl, void* userdata);
+ static void onCommitRotation( LLUICtrl* ctrl, void* userdata);
+ static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
+ static void onCommitTemporary( LLUICtrl* ctrl, void* userdata);
+ static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
+ static void onCommitPhysicsRep( LLUICtrl* ctrl, void* userdata);
+ static void onCommitCastShadows( LLUICtrl* ctrl, void* userdata);
static void onCommitParametric(LLUICtrl* ctrl, void* userdata);
@@ -94,7 +94,7 @@ protected:
void sendIsPhysical();
void sendIsTemporary();
void sendIsPhantom();
- void sendPhysicsShapeType();
+ void sendPhysicsRep();
void sendCastShadows();
void sendSculpt();
@@ -167,7 +167,7 @@ protected:
LLCheckBoxCtrl *mCheckPhysics;
LLCheckBoxCtrl *mCheckTemporary;
LLCheckBoxCtrl *mCheckPhantom;
- LLComboBox *mComboPhysicsShapeType;
+ LLComboBox *mComboPhysicsRep;
LLCheckBoxCtrl *mCheckCastShadows;
LLTextureCtrl *mCtrlSculptTexture;
@@ -180,7 +180,7 @@ protected:
BOOL mIsPhysical; // to avoid sending "physical" when not changed
BOOL mIsTemporary; // to avoid sending "temporary" when not changed
BOOL mIsPhantom; // to avoid sending "phantom" when not changed
- U8 mPhysicsShapeType; // to avoid sending "physics shape type" when not changed
+ U8 mPhysicsRep; // to avoid sending "physics rep spec" when not changed
BOOL mCastShadows; // to avoid sending "cast shadows" when not changed
S32 mSelectedType; // So we know what selected type we last were
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index d47cc06ebc..d15017e0a1 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3931,15 +3931,15 @@ void LLSelectMgr::selectionUpdateCastShadows(BOOL cast_shadows)
getSelection()->applyToObjects(&func);
}
-struct LLSelectMgrApplyPhysicsShapeType : public LLSelectedObjectFunctor
+struct LLSelectMgrApplyPhysicsRep : public LLSelectedObjectFunctor
{
- LLSelectMgrApplyPhysicsShapeType(U8 value) : mValue(value) {}
+ LLSelectMgrApplyPhysicsRep(U8 value) : mValue(value) {}
U8 mValue;
virtual bool apply(LLViewerObject* object)
{
if ( object->permModify() ) // preemptive permissions check
{
- object->setPhysicsShapeType( mValue );
+ object->setPhysicsRep( mValue );
object->updateFlags();
}
return true;
@@ -3947,10 +3947,10 @@ struct LLSelectMgrApplyPhysicsShapeType : public LLSelectedObjectFunctor
};
-void LLSelectMgr::selectionUpdatePhysicsShapeType(U8 type)
+void LLSelectMgr::selectionUpdatePhysicsRep(U8 rep)
{
- llwarns << "physics shape type ->" << (U32)type << llendl;
- LLSelectMgrApplyPhysicsShapeType func(type);
+ llwarns << "physics rep ->" << (U32)rep << llendl;
+ LLSelectMgrApplyPhysicsRep func(rep);
getSelection()->applyToObjects(&func);
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 544b1ff594..27e0c5dfa9 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -483,7 +483,7 @@ public:
void selectionUpdatePhysics(BOOL use_physics);
void selectionUpdateTemporary(BOOL is_temporary);
void selectionUpdatePhantom(BOOL is_ghost);
- void selectionUpdatePhysicsShapeType(U8 type);
+ void selectionUpdatePhysicsRep(U8 rep);
void selectionUpdateCastShadows(BOOL cast_shadows);
void selectionDump();
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 7b94e49a2a..f18fee3ede 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -53,7 +53,6 @@
#include "llprimitive.h"
#include "llquantize.h"
#include "llregionhandle.h"
-#include "llsdserialize.h"
#include "lltree_common.h"
#include "llxfermanager.h"
#include "message.h"
@@ -200,7 +199,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mGLName(0),
mbCanSelect(TRUE),
mFlags(0),
- mPhysicsShapeType(0),
+ mPhysicsRep(0),
mDrawable(),
mCreateSelected(FALSE),
mRenderMedia(FALSE),
@@ -4964,10 +4963,10 @@ void LLViewerObject::updateFlags()
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
gMessageSystem->addBOOL("CastsShadows", flagCastShadows() );
gMessageSystem->nextBlock("ExtraPhysics");
- gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
+ gMessageSystem->addU8("PhysicsRep", getPhysicsRep() );
gMessageSystem->sendReliable( regionp->getHost() );
- if (getPhysicsShapeType() != 0)
+ if (getPhysicsRep() != 0)
{
llwarns << "sent non default physics rep" << llendl;
}
@@ -5002,9 +5001,9 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
return setit;
}
-void LLViewerObject::setPhysicsShapeType(U8 type)
+void LLViewerObject::setPhysicsRep(U8 rep)
{
- mPhysicsShapeType = type;
+ mPhysicsRep = rep;
updateFlags();
}
@@ -5218,7 +5217,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
return ;
}
-
+#include "../llcommon/llsdserialize.h"
class ObjectPhysicsProperties : public LLHTTPNode
{
public:
@@ -5232,8 +5231,11 @@ public:
for ( S32 i = 0; i < numEntries; i++ )
{
- LLSD& currObjectData = objectData[i];
- U32 localID = currObjectData["LocalID"].asInteger();
+ U32 localID = objectData[i]["LocalID"].asInteger();
+
+ std::ostringstream string;
+ LLSDSerialize::serialize( input, string, LLSDSerialize::LLSD_XML, LLSDFormatter::OPTIONS_PRETTY);
+ llinfos << string.str() << llendl;
// Iterate through nodes at end, since it can be on both the regular AND hover list
struct f : public LLSelectedNodeFunctor
@@ -5248,12 +5250,11 @@ public:
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
+ U8 physicsRepSpec = (U8)objectData[i]["PhysicsRepSpec"].asInteger();
+
if (node)
{
- // The LLSD message builder doesn't know how to handle U8, so we need to send as S8 and cast
- U8 physicsShapeType = (U8)currObjectData["PhysicsShapeType"].asInteger();
-
- node->getObject()->setPhysicsShapeType(physicsShapeType);
+ node->getObject()->setPhysicsRep(physicsRepSpec);
}
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index de7bfc0e07..49709d643a 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -459,7 +459,7 @@ public:
inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); }
- inline U8 getPhysicsShapeType() const { return mPhysicsShapeType; }
+ inline U8 getPhysicsRep() const { return mPhysicsRep; }
bool getIncludeInSearch() const;
void setIncludeInSearch(bool include_in_search);
@@ -476,7 +476,7 @@ public:
void updateFlags();
BOOL setFlags(U32 flag, BOOL state);
- void setPhysicsShapeType(U8 type);
+ void setPhysicsRep(U8 rep);
virtual void dump() const;
static U32 getNumZombieObjects() { return sNumZombieObjects; }
@@ -557,7 +557,7 @@ public:
U32 mFlags;
// Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties
- U8 mPhysicsShapeType;
+ U8 mPhysicsRep;
// Pipeline classes
LLPointer<LLDrawable> mDrawable;
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index b987cd9108..3bb8e9c055 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1425,7 +1425,7 @@ even though the user gets a free copy.
height="10"
layout="topleft"
left_delta="0"
- name="label physicsshapetype"
+ name="label physicsrep"
top_pad="10"
width="121">
Physics Rep:
@@ -1434,18 +1434,18 @@ even though the user gets a free copy.
height="23"
layout="topleft"
follows="left|top"
- name="Physics Shape Type Combo Ctrl"
- tool_tip="Choose the physics shape type"
+ name="Physics Rep Combo Ctrl"
+ tool_tip="Choose the physics representation"
left_pad="0"
width="108">
<combo_box.item
- label="Prim"
- name="Prim"
- value="Prim" />
+ label="Default"
+ name="Default"
+ value="Default" />
<combo_box.item
- label="None"
- name="None"
- value="None" />
+ label="No Shape"
+ name="No Shape"
+ value="No Shape" />
<combo_box.item
label="Convex Hull"
name="Convex Hull"