Merge git://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -60,8 +60,12 @@ class LLPidLockFile
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLPidLockFile( ) :
|
LLPidLockFile( ) :
|
||||||
mSaving(FALSE), mWaiting(FALSE),
|
mAutosave(false),
|
||||||
mClean(TRUE), mPID(LLApp::getPid())
|
mSaving(false),
|
||||||
|
mWaiting(false),
|
||||||
|
mPID(LLApp::getPid()),
|
||||||
|
mNameTable(NULL),
|
||||||
|
mClean(true)
|
||||||
{
|
{
|
||||||
mLockName = gDirUtilp->getTempDir() + "/savelock";
|
mLockName = gDirUtilp->getTempDir() + "/savelock";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,16 +80,14 @@ public:
|
|||||||
static const S32 READ_WRITE;
|
static const S32 READ_WRITE;
|
||||||
static const S32 APPEND;
|
static const S32 APPEND;
|
||||||
|
|
||||||
|
protected:
|
||||||
LLAssetType::EType mFileType;
|
LLAssetType::EType mFileType;
|
||||||
|
|
||||||
LLUUID mFileID;
|
LLUUID mFileID;
|
||||||
|
|
||||||
protected:
|
|
||||||
S32 mPosition;
|
S32 mPosition;
|
||||||
S32 mMode;
|
S32 mMode;
|
||||||
LLVFS *mVFS;
|
LLVFS *mVFS;
|
||||||
F32 mPriority;
|
F32 mPriority;
|
||||||
BOOL mOnReadQueue;
|
|
||||||
|
|
||||||
S32 mBytesRead;
|
S32 mBytesRead;
|
||||||
LLVFSThread::handle_t mHandle;
|
LLVFSThread::handle_t mHandle;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>Boolean</string>
|
<string>Boolean</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>SGBlockCardSpam</key>
|
<key>SGBlockCardSpam</key>
|
||||||
<map>
|
<map>
|
||||||
|
|||||||
@@ -11390,6 +11390,7 @@
|
|||||||
<param
|
<param
|
||||||
id="1105"
|
id="1105"
|
||||||
group="1"
|
group="1"
|
||||||
|
sex="female"
|
||||||
wearable="shape"
|
wearable="shape"
|
||||||
name="Breast_Physics_LeftRight_Controller"
|
name="Breast_Physics_LeftRight_Controller"
|
||||||
label="Breast Physics LeftRight Controller"
|
label="Breast Physics LeftRight Controller"
|
||||||
|
|||||||
@@ -704,8 +704,8 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||||||
{
|
{
|
||||||
LLVector3 box = (facep->mExtents[1] - facep->mExtents[0]) * 0.25f;
|
LLVector3 box = (facep->mExtents[1] - facep->mExtents[0]) * 0.25f;
|
||||||
LLVector3 v = (facep->mCenterLocal-camera.getOrigin());
|
LLVector3 v = (facep->mCenterLocal-camera.getOrigin());
|
||||||
LLVector3 at = camera.getAtAxis();
|
const LLVector3& at = camera.getAtAxis();
|
||||||
for (U32 j = 0; j < 3; j++)
|
for (U32 j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
v.mV[j] -= box.mV[j] * at.mV[j];
|
v.mV[j] -= box.mV[j] * at.mV[j];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,11 +102,15 @@ public:
|
|||||||
mLastTime(0),
|
mLastTime(0),
|
||||||
mPosition_local(0),
|
mPosition_local(0),
|
||||||
mVelocityJoint_local(0),
|
mVelocityJoint_local(0),
|
||||||
mPositionLastUpdate_local(0)
|
mPositionLastUpdate_local(0),
|
||||||
|
mAccelerationJoint_local(0),
|
||||||
|
mVelocity_local(0)
|
||||||
{
|
{
|
||||||
mJointState = new LLJointState;
|
mJointState = new LLJointState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getString(std::ostringstream &oss);
|
||||||
|
|
||||||
BOOL initialize();
|
BOOL initialize();
|
||||||
|
|
||||||
~LLPhysicsMotion() {}
|
~LLPhysicsMotion() {}
|
||||||
@@ -127,8 +131,7 @@ protected:
|
|||||||
{
|
{
|
||||||
return sDefaultController[controller_key];
|
return sDefaultController[controller_key];
|
||||||
}
|
}
|
||||||
const std::string& param_name = (*entry).second.c_str();
|
return mCharacter->getVisualParamWeight((*entry).second.c_str());
|
||||||
return mCharacter->getVisualParamWeight(param_name.c_str());
|
|
||||||
}
|
}
|
||||||
void setParamValue(LLViewerVisualParam *param,
|
void setParamValue(LLViewerVisualParam *param,
|
||||||
const F32 new_value_local,
|
const F32 new_value_local,
|
||||||
@@ -194,6 +197,80 @@ BOOL LLPhysicsMotion::initialize()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string LLPhysicsMotionController::getString()
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
oss << "{" << std::endl <<
|
||||||
|
"Active: " << mActive << std::endl <<
|
||||||
|
"IsDefault: " << mIsDefault << std::endl <<
|
||||||
|
"Stopped: " << isStopped() << std::endl <<
|
||||||
|
"Name: " << getName() << std::endl <<
|
||||||
|
"ID: " << getID().asString() << std::endl;
|
||||||
|
|
||||||
|
for (motion_vec_t::iterator iter = mMotions.begin();iter != mMotions.end();++iter)
|
||||||
|
{
|
||||||
|
(*iter)->getString(oss);
|
||||||
|
}
|
||||||
|
oss << "}" << std::endl;
|
||||||
|
return oss.str();
|
||||||
|
}
|
||||||
|
void getParamString(U32 depth, LLViewerVisualParam *param, std::ostringstream &oss)
|
||||||
|
{
|
||||||
|
std::string indent;
|
||||||
|
indent.resize(depth,' ');
|
||||||
|
|
||||||
|
oss <<
|
||||||
|
indent << "getID: " << param->getID() << std::endl <<
|
||||||
|
indent << "getName: " << param->getName() << std::endl <<
|
||||||
|
indent << "getDisplayName: " << param->getDisplayName() << std::endl <<
|
||||||
|
indent << "getGroup: " << param->getGroup() << std::endl <<
|
||||||
|
indent << "getSex: " << param->getSex() << std::endl <<
|
||||||
|
indent << "getMinWeight: " << param->getMinWeight() << std::endl <<
|
||||||
|
indent << "getMaxWeight: " << param->getMaxWeight() << std::endl <<
|
||||||
|
indent << "getDefaultWeight: " << param->getDefaultWeight() << std::endl <<
|
||||||
|
indent << "getWeight: " << param->getWeight() << std::endl <<
|
||||||
|
indent << "getCurrentWeight: " << param->getCurrentWeight() << std::endl <<
|
||||||
|
indent << "getLastWeight: " << param->getLastWeight() << std::endl <<
|
||||||
|
indent << "isAnimating: " << param->isAnimating() << std::endl <<
|
||||||
|
indent << "isTweakable: " << param->isTweakable() << std::endl;
|
||||||
|
}
|
||||||
|
void LLPhysicsMotion::getString(std::ostringstream &oss)
|
||||||
|
{
|
||||||
|
oss <<
|
||||||
|
" mParamDriverName: " << mParamDriverName << std::endl <<
|
||||||
|
" mParamControllerName: " << mParamControllerName << std::endl <<
|
||||||
|
" mMotionDirectionVec: " << mMotionDirectionVec << std::endl <<
|
||||||
|
" mJointName: " << mJointName << std::endl <<
|
||||||
|
" mPosition_local: " << mPosition_local << std::endl <<
|
||||||
|
" mVelocityJoint_local: " << mVelocityJoint_local << std::endl <<
|
||||||
|
" mAccelerationJoint_local: " << mAccelerationJoint_local << std::endl <<
|
||||||
|
" mPositionLastUpdate_local: " << mPositionLastUpdate_local << std::endl <<
|
||||||
|
" mPosition_world: " << mPosition_world << std::endl <<
|
||||||
|
" mVelocity_local: " << mVelocity_local << std::endl;
|
||||||
|
if(mParamDriver)
|
||||||
|
{
|
||||||
|
oss << " <DRIVER>" << std::endl;
|
||||||
|
getParamString(2,mParamDriver,oss);
|
||||||
|
LLDriverParam *driver_param = dynamic_cast<LLDriverParam *>(mParamDriver);
|
||||||
|
if(driver_param)
|
||||||
|
{
|
||||||
|
for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin();
|
||||||
|
iter != driver_param->mDriven.end();++iter)
|
||||||
|
{
|
||||||
|
oss << " <DRIVEN>" << std::endl;
|
||||||
|
getParamString(3,iter->mParam,oss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
oss << " mParamDriver: (NULL)" << std::endl;
|
||||||
|
oss << " Controllers:" << std::endl;
|
||||||
|
for(controller_map_t::const_iterator it = mParamControllers.begin(); it!= mParamControllers.end(); ++it)
|
||||||
|
{
|
||||||
|
oss << " mParamControllers[\"" << it->first << "\"] = \"" << it->second << "\" =" << getParamValue(it->first) << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
|
LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
|
||||||
LLMotion(id),
|
LLMotion(id),
|
||||||
mCharacter(NULL),
|
mCharacter(NULL),
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ class LLPhysicsMotionController :
|
|||||||
public LLMotion
|
public LLMotion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
std::string getString();
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
LLPhysicsMotionController(const LLUUID &id);
|
LLPhysicsMotionController(const LLUUID &id);
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
|
|||||||
|
|
||||||
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
||||||
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
||||||
iter != child_list.end(); iter++)
|
iter != child_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
LLViewerObject* childp = *iter;
|
LLViewerObject* childp = *iter;
|
||||||
if (childp && childp->mDrawable.notNull())
|
if (childp && childp->mDrawable.notNull())
|
||||||
@@ -197,7 +197,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
|
|||||||
}
|
}
|
||||||
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
||||||
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
||||||
iter != child_list.end(); iter++)
|
iter != child_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
LLViewerObject* childp = *iter;
|
LLViewerObject* childp = *iter;
|
||||||
if (childp && childp->mText.notNull())
|
if (childp && childp->mText.notNull())
|
||||||
@@ -266,7 +266,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
|
|||||||
|
|
||||||
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
||||||
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
||||||
iter != child_list.end(); iter++)
|
iter != child_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
LLViewerObject* childp = *iter;
|
LLViewerObject* childp = *iter;
|
||||||
if (childp && childp->mDrawable.notNull())
|
if (childp && childp->mDrawable.notNull())
|
||||||
@@ -291,7 +291,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
|
|||||||
}
|
}
|
||||||
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
LLViewerObject::const_child_list_t& child_list = object->getChildren();
|
||||||
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
||||||
iter != child_list.end(); iter++)
|
iter != child_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
LLViewerObject* childp = *iter;
|
LLViewerObject* childp = *iter;
|
||||||
if (childp->mText.notNull())
|
if (childp->mText.notNull())
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void calcLOD();
|
void calcLOD();
|
||||||
void setupDrawable(LLViewerObject *object);
|
void setupDrawable(LLViewerObject *object);
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
BOOL mVisibleInFirst;
|
BOOL mVisibleInFirst;
|
||||||
LLVector3 mOriginalPos;
|
LLVector3 mOriginalPos;
|
||||||
S32 mGroup;
|
S32 mGroup;
|
||||||
|
|||||||
@@ -3421,8 +3421,8 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped)
|
|||||||
// Set position relative to parent, if no parent, relative to region
|
// Set position relative to parent, if no parent, relative to region
|
||||||
if (!isRoot())
|
if (!isRoot())
|
||||||
{
|
{
|
||||||
LLViewerObject::setPosition(pos_parent);
|
LLViewerObject::setPosition(pos_parent, damped);
|
||||||
updateDrawable(damped);
|
//updateDrawable(damped);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3463,6 +3463,7 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
|
|||||||
LLVector3 position_offset = getPosition() * getParent()->getRotation();
|
LLVector3 position_offset = getPosition() * getParent()->getRotation();
|
||||||
|
|
||||||
((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset);
|
((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset);
|
||||||
|
updateDrawable(damped);
|
||||||
}
|
}
|
||||||
else if (isJointChild())
|
else if (isJointChild())
|
||||||
{
|
{
|
||||||
@@ -3471,15 +3472,14 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
|
|||||||
LLQuaternion inv_parent_rot = parent->getRotation();
|
LLQuaternion inv_parent_rot = parent->getRotation();
|
||||||
inv_parent_rot.transQuat();
|
inv_parent_rot.transQuat();
|
||||||
LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot;
|
LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot;
|
||||||
LLViewerObject::setPosition(pos_parent);
|
LLViewerObject::setPosition(pos_parent, damped);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLViewerObject::setPosition(pos_edit);
|
LLViewerObject::setPosition(pos_edit, damped);
|
||||||
mPositionRegion = pos_edit;
|
mPositionRegion = pos_edit;
|
||||||
mPositionAgent = mRegionp->getPosAgentFromRegion(mPositionRegion);
|
mPositionAgent = mRegionp->getPosAgentFromRegion(mPositionRegion);
|
||||||
}
|
}
|
||||||
updateDrawable(damped);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -827,13 +827,14 @@ void LLViewerObjectList::clearDebugText()
|
|||||||
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
|
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
|
||||||
{
|
{
|
||||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||||
if (mDeadObjects.count(objectp->mID))
|
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
|
||||||
{
|
{
|
||||||
llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl;
|
llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
|
||||||
return;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mDeadObjects.insert(objectp->mID);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp));
|
|
||||||
|
|
||||||
// Cleanup any references we have to this object
|
// Cleanup any references we have to this object
|
||||||
// Remove from object map so noone can look it up.
|
// Remove from object map so noone can look it up.
|
||||||
|
|||||||
@@ -202,8 +202,7 @@ protected:
|
|||||||
|
|
||||||
vobj_list_t mMapObjects;
|
vobj_list_t mMapObjects;
|
||||||
|
|
||||||
typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map;
|
std::set<LLUUID> mDeadObjects;
|
||||||
vo_map mDeadObjects; // Need to keep multiple entries per UUID
|
|
||||||
|
|
||||||
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
||||||
std::map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
std::map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
||||||
|
|||||||
@@ -175,4 +175,27 @@ CMD_SCRIPT(gettext)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "llphysicsmotion.h"
|
||||||
|
|
||||||
|
void cmdline_printchat(std::string message);
|
||||||
|
CMD_CHAT(physparams)
|
||||||
|
{
|
||||||
|
//args[1] = avatar name
|
||||||
|
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();iter != LLCharacter::sInstances.end(); ++iter)
|
||||||
|
{
|
||||||
|
LLVOAvatar* inst = (LLVOAvatar*) *iter;
|
||||||
|
if(!inst)continue;
|
||||||
|
if(inst->getFullname().find(args[1].asString())!=std::string::npos)
|
||||||
|
{
|
||||||
|
LLPhysicsMotionController *motion = (LLPhysicsMotionController*)(inst->findMotion(LLUUID("7360e029-3cb8-ebc4-863e-212df440d987")));
|
||||||
|
cmdline_printchat(std::string("Phys param info for ")+inst->getFullname()+":\n");
|
||||||
|
if(motion)
|
||||||
|
{
|
||||||
|
cmdline_printchat(motion->getString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
cmdline_printchat("Unable to find physics motion controller\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif //shy_mod
|
#endif //shy_mod
|
||||||
|
|||||||
Reference in New Issue
Block a user