Intermiediary commit.

This commit is contained in:
Shyotl
2019-03-16 17:51:00 -05:00
parent 7cf55fa993
commit 2d8fbb89c9
58 changed files with 1857 additions and 1057 deletions

View File

@@ -482,6 +482,7 @@ set(viewer_SOURCE_FILES
lltoolselectrect.cpp
lltoolview.cpp
lltracker.cpp
lluiavatar.cpp
lluploaddialog.cpp
lluploadfloaterobservers.cpp
llurl.cpp
@@ -1020,6 +1021,7 @@ set(viewer_HEADER_FILES
lltracker.h
lltranslate.h
lluiconstants.h
lluiavatar.h
lluploaddialog.h
lluploadfloaterobservers.h
llurl.h

View File

@@ -4481,8 +4481,7 @@ void LLAgent::stopCurrentAnimations()
// re-assert at least the default standing animation, because
// viewers get confused by avs with no associated anims.
sendAnimationRequest(ANIM_AGENT_STAND,
ANIM_REQUEST_START);
sendAnimationRequest(ANIM_AGENT_STAND, ANIM_REQUEST_START);
}
}

View File

@@ -863,8 +863,8 @@ void LLWearableHoldingPattern::onAllComplete()
<< mResolved << " wearable items " << LL_ENDL;
LLAppearanceMgr::instance().updateAgentWearables(this);
// // Restore attachment pos overrides for the attachments that
// // are remaining in the outfit.
// Restore attachment pos overrides for the attachments that
// are remaining in the outfit.
// for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
// it != objects_to_retain.end();
// ++it)

View File

@@ -255,12 +255,12 @@ LLPumpIO* gServicePump = NULL;
BOOL gPacificDaylightTime = FALSE;
U64 gFrameTime = 0;
F32 gFrameTimeSeconds = 0.f;
F32 gFrameIntervalSeconds = 0.f;
U64MicrosecondsImplicit gFrameTime = 0;
F32SecondsImplicit gFrameTimeSeconds = 0.f;
F32SecondsImplicit gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
U64 gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
U32 gFrameStalls = 0;
const F64 FRAME_STALL_THRESHOLD = 1.0;
@@ -1341,7 +1341,8 @@ bool LLAppViewer::mainLoop()
|| (!gFocusMgr.getAppHasFocus() && !AIFilePicker::activePicker) )
{
// Sleep if we're not rendering, or the window is minimized.
S32 milliseconds_to_sleep = llclamp(gSavedSettings.getS32("BackgroundYieldTime"), 0, 1000);
static LLCachedControl<S32> s_bacground_yeild_time(gSavedSettings, "BackgroundYieldTime", 40);
S32 milliseconds_to_sleep = llclamp((S32)s_bacground_yeild_time, 0, 1000);
// don't sleep when BackgroundYieldTime set to 0, since this will still yield to other threads
// of equal priority on Windows
if (milliseconds_to_sleep > 0)
@@ -1368,7 +1369,7 @@ bool LLAppViewer::mainLoop()
ms_sleep(500);
}
const F64 max_idle_time = run_multiple_threads ? 0.0 : llmin(.005*10.0*gFrameIntervalSeconds, 0.005); // 50ms/second, no more than 5ms/frame
const F64 max_idle_time = run_multiple_threads ? 0.0 : llmin(.005*10.0*gFrameIntervalSeconds.value(), 0.005); // 50ms/second, no more than 5ms/frame
idleTimer.reset();
while(1)
{

View File

@@ -271,6 +271,7 @@ public:
// consts from viewer.h
const S32 AGENT_UPDATES_PER_SECOND = 10;
const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1;
// Globals with external linkage. From viewer.h
// *NOTE:Mani - These will be removed as the Viewer App Cleanup project continues.
@@ -303,13 +304,13 @@ extern LLPumpIO* gServicePump;
// Is the Pacific time zone (aka server time zone)
// currently in daylight savings time?
extern BOOL gPacificDaylightTime;
extern U64 gFrameTime; // The timestamp of the most-recently-processed frame
extern F32 gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
extern F32 gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern U64MicrosecondsImplicit gStartTime;
extern U64MicrosecondsImplicit gFrameTime; // The timestamp of the most-recently-processed frame
extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
extern U64 gStartTime;
extern U32 gFrameStalls;
extern LLTimer gRenderStartTime;

View File

@@ -512,7 +512,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
if (isState(ACTIVE) &&
!isState(ACTIVE_CHILD) &&
!mVObjp->isAttachment() &&
!mVObjp->isFlexible())
!mVObjp->isFlexible() &&
!mVObjp->isAnimatedObject())
{
clearState(ACTIVE | ANIMATED_CHILD);
@@ -939,9 +940,7 @@ void LLDrawable::updateSpatialExtents()
if (mVObjp)
{
const LLVector4a* exts = getSpatialExtents();
LLVector4a extents[2];
extents[0] = exts[0];
extents[1] = exts[1];
LLVector4a extents[2] = { exts[0], exts[1] };
mVObjp->updateSpatialExtents(extents[0], extents[1]);
setSpatialExtents(extents[0], extents[1]);

View File

@@ -1510,13 +1510,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
continue;
}
LLUUID mesh_id = volume->getParams().getSculptID();
if (mesh_id.isNull())
{
continue;
}
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj);
const LLMeshSkinInfo* skin = vobj->getSkinInfo();
if (!skin)
{
continue;
@@ -1729,7 +1723,7 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
LLVOVolume* vobj = drawable->getVOVolume();
if (!vobj)
if (!vobj || vobj->isNoLOD())
{
continue;
}
@@ -1742,13 +1736,7 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
continue;
}
LLUUID mesh_id = volume->getParams().getSculptID();
if (mesh_id.isNull())
{
continue;
}
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj);
const LLMeshSkinInfo* skin = vobj->getSkinInfo();
if (!skin)
{
continue;

View File

@@ -44,7 +44,7 @@
#include "llperlin.h"
extern bool gShiftFrame;
extern U64 gFrameTime;
extern U64MicrosecondsImplicit gFrameTime;
extern LLPipeline gPipeline;
LLSurfacePatch::LLSurfacePatch()

View File

@@ -0,0 +1,61 @@
/**
* @file lluiavatar.cpp
* @brief Implementation for special dummy avatar used in some UI views
*
* $LicenseInfo:firstyear=2017&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2017, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "lluiavatar.h"
#include "llagent.h" // Get state values from here
#include "llviewerobjectlist.h"
#include "pipeline.h"
#include "llanimationstates.h"
#include "llviewercontrol.h"
#include "llmeshrepository.h"
#include "llviewerregion.h"
LLUIAvatar::LLUIAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) :
LLVOAvatar(id, pcode, regionp)
{
mIsDummy = TRUE;
mIsUIAvatar = true;
}
// virtual
LLUIAvatar::~LLUIAvatar()
{
}
// virtual
void LLUIAvatar::initInstance()
{
LLVOAvatar::initInstance();
createDrawable( &gPipeline );
setPositionAgent(LLVector3::zero);
slamPosition();
updateJointLODs();
updateGeometry(mDrawable);
mInitFlags |= 1<<3;
}

View File

@@ -0,0 +1,44 @@
/**
* @file lluiavatar.h
* @brief Special dummy avatar used in some UI views
*
* $LicenseInfo:firstyear=2017&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2017, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_UIAVATAR_H
#define LL_UIAVATAR_H
#include "llvoavatar.h"
#include "llvovolume.h"
class LLUIAvatar:
public LLVOAvatar
{
LOG_CLASS(LLUIAvatar);
public:
LLUIAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual void initInstance(); // Called after construction to initialize the class.
virtual ~LLUIAvatar();
};
#endif //LL_CONTROLAVATAR_H

View File

@@ -6053,24 +6053,33 @@ class LLAvatarAddFriend : public view_listener_t
class LLAvatarResetSkeleton: public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLVOAvatar* avatar = NULL;
LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (obj)
{
avatar = obj->getAvatar();
}
if(avatar)
{
avatar->resetSkeleton(false);
}
return true;
}
{
avatar->resetSkeleton(false);
}
return true;
}
};
class LLAvatarResetSkeletonAndAnimations : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
if (avatar)
LLVOAvatar* avatar = NULL;
LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (obj)
{
avatar = obj->getAvatar();
}
if(avatar)
{
avatar->resetSkeleton(true);
}
@@ -6078,6 +6087,19 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
}
};
class LLAvatarEnableResetSkeleton: public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (obj && obj->getAvatar())
{
return true;
}
return false;
}
};
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -6869,9 +6891,10 @@ class LLAttachmentEnableDrop : public view_listener_t
LLViewerJointAttachment* attachment = NULL;
LLInventoryItem* item = NULL;
if (object)
// Do not enable drop if all faces of object are not enabled
if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES ))
{
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState());
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getAttachmentState());
attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL);
if (attachment)
@@ -9451,7 +9474,8 @@ void initialize_menus()
addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeletonAndAnimations");
addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton");
addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
addMenu(new LLAvatarCopyUUID(), "Avatar.CopyUUID");

File diff suppressed because it is too large Load Diff

View File

@@ -112,7 +112,10 @@ struct PotentialReturnableObject
//============================================================================
class LLViewerObject: public LLPrimitive, public LLRefCount, public LLGLUpdate
class LLViewerObject
: public LLPrimitive,
public LLRefCount,
public LLGLUpdate
{
protected:
~LLViewerObject(); // use unref()
@@ -219,6 +222,7 @@ public:
LLViewerRegion* getRegion() const { return mRegionp; }
BOOL isSelected() const { return mUserSelected; }
BOOL isAnySelected() const;
void setSelected(BOOL sel);
const LLUUID &getID() const { return mID; }
@@ -230,6 +234,7 @@ public:
virtual BOOL isFlexible() const { return FALSE; }
virtual BOOL isSculpted() const { return FALSE; }
virtual BOOL isMesh() const { return FALSE; }
virtual BOOL isRiggedMesh() const { return FALSE; }
virtual BOOL hasLightTexture() const { return FALSE; }
// This method returns true if the object is over land owned by
@@ -254,6 +259,8 @@ public:
*/
virtual BOOL setParent(LLViewerObject* parent);
virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent);
virtual void afterReparent();
virtual void addChild(LLViewerObject *childp);
virtual void removeChild(LLViewerObject *childp);
const_child_list_t& getChildren() const { return mChildList; }
@@ -378,7 +385,7 @@ public:
// U8 getState() { return mState; }
// [RLVa:KB] - Checked: 2010-09-26 (RLVa-1.3.0a) | Added: RLVa-1.3.0a
U8 getState() const { return mState; }
U8 getAttachmentState() const { return mAttachmentState; }
// [/RLVa:KB]
F32 getAppAngle() const { return mAppAngle; }
@@ -411,13 +418,16 @@ public:
void setCanSelect(BOOL canSelect);
void setDebugText(const std::string &utf8text);
void initHudText();
// <edit>
std::string getDebugText();
// </edit>
void setIcon(LLViewerTexture* icon_image);
void clearIcon();
void markForUpdate(BOOL priority);
void recursiveMarkForUpdate(BOOL priority);
virtual void markForUpdate(BOOL priority);
void updateVolume(const LLVolumeParams& volume_params);
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max);
virtual F32 getBinRadius();
@@ -430,6 +440,7 @@ public:
void setDrawableState(U32 state, BOOL recursive = TRUE);
void clearDrawableState(U32 state, BOOL recursive = TRUE);
BOOL isDrawableState(U32 state, BOOL recursive = TRUE) const;
// Called when the drawable shifts
virtual void onShift(const LLVector4a &shift_vector) { }
@@ -444,7 +455,7 @@ public:
// viewer object has the inventory stored locally.
void registerInventoryListener(LLVOInventoryListener* listener, void* user_data);
void removeInventoryListener(LLVOInventoryListener* listener);
BOOL isInventoryPending() { return mInventoryPending; }
BOOL isInventoryPending();
void clearInventoryListeners();
bool hasInventoryListeners();
void requestInventory();
@@ -543,6 +554,7 @@ public:
virtual void updateRegion(LLViewerRegion *regionp) {}
void updateFlags(BOOL physics_changed = FALSE);
void loadFlags(U32 flags); //load flags from cache or from message
BOOL setFlags(U32 flag, BOOL state);
BOOL setFlagsWithoutUpdate(U32 flag, BOOL state);
void setPhysicsShapeType(U8 type);
@@ -574,7 +586,7 @@ public:
public:
//counter-translation
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ;
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ;
//counter-rotation
void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations,
const std::vector<LLVector3>& positions) ;
@@ -681,6 +693,9 @@ public:
static BOOL sUseSharedDrawables;
public:
virtual bool isAnimatedObject() const;
protected:
// delete an item in the inventory, but don't tell the
// server. This is used internally by remove, update, and
@@ -757,9 +772,17 @@ protected:
callback_list_t mInventoryCallbacks;
S16 mInventorySerialNum;
enum EInventoryRequestState
{
INVENTORY_REQUEST_STOPPED,
INVENTORY_REQUEST_PENDING,
INVENTORY_XFER
};
EInventoryRequestState mInvRequestState;
U64 mInvRequestXFerId;
BOOL mInventoryDirty;
LLViewerRegion *mRegionp; // Region that this object belongs to.
BOOL mInventoryPending;
BOOL mInventoryDirty;
BOOL mDead;
BOOL mOrphaned; // This is an orphaned child
BOOL mUserSelected; // Cached user select information
@@ -772,7 +795,7 @@ protected:
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
LLQuaternion mPreviousRotation;
U8 mState; // legacy
U8 mAttachmentState; // this encodes the attachment id in a somewhat complex way. 0 if not an attachment.
LLViewerObjectMedia* mMedia; // NULL if no media associated
U8 mClickAction;
F32 mObjectCost; //resource cost of this object or -1 if unknown

View File

@@ -291,7 +291,19 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// RN: this must be called after we have a drawable
// (from gPipeline.addObject)
// so that the drawable parent is set properly
findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
if(msg != NULL)
{
findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
}
else
{
LLViewerRegion* regionp = objectp->getRegion();
if(regionp != NULL)
{
findOrphans(objectp, regionp->getHost().getAddress(), regionp->getHost().getPort());
}
}
if(just_created && objectp &&
(gImportTracker.getState() == ImportTracker::WAND /*||
@@ -434,19 +446,15 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
S32 uncompressed_length = 2048;
compressed_dp.reset();
U32 flags = 0;
if (update_type != OUT_TERSE_IMPROVED)
{
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
}
uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i, 2048);
compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length);
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
U32 flags = 0;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
compressed_dp.unpackUUID(fullid, "ID");
compressed_dp.unpackU32(local_id, "LocalID");
compressed_dp.unpackU8(pcode, "PCode");
@@ -941,14 +949,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
// update global timer
F32 last_time = gFrameTimeSeconds;
U64 time = totalTime(); // this will become the new gFrameTime when the update is done
U64Microseconds time = totalTime(); // this will become the new gFrameTime when the update is done
// Time _can_ go backwards, for example if the user changes the system clock.
// It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here.
// llassert(time > gFrameTime);
F64 time_diff = U64_to_F64(time - gFrameTime)/(F64)SEC_TO_MICROSEC;
gFrameTime = time;
F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/(F64)SEC_TO_MICROSEC;
gFrameTimeSeconds = (F32)time_since_start;
F64Seconds time_diff = time - gFrameTime;
gFrameTime = time;
F64Seconds time_since_start = gFrameTime - gStartTime;
gFrameTimeSeconds = time_since_start;
gFrameIntervalSeconds = gFrameTimeSeconds - last_time;
if (gFrameIntervalSeconds < 0.f)
@@ -1033,7 +1041,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
LLVolumeImplFlexible::updateClass();
//update animated textures
LLViewerTextureAnim::updateClass();
if (gAnimateTextures)
{
LLViewerTextureAnim::updateClass();
}
}
@@ -1051,7 +1062,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
// don't factor frames that were paused into the stats
if (! mWasPaused)
{
LLViewerStats::getInstance()->updateFrameStats(time_diff);
LLViewerStats::getInstance()->updateFrameStats(time_diff.value());
}
/*
@@ -1252,9 +1263,11 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
bool new_dead_object = true;
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
LL_INFOS() << "Object " << objectp->mID << " already on dead list!" << LL_ENDL;
new_dead_object = false;
}
else
{
@@ -1296,7 +1309,10 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
// Also, not cleaned up
removeDrawable(objectp->mDrawable);
mNumDeadObjects++;
if(new_dead_object)
{
mNumDeadObjects++;
}
}
static LLTrace::BlockTimerStatHandle FTM_REMOVE_DRAWABLE("Remove Drawable");
@@ -2031,6 +2047,10 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL;
return NULL;
}
if(regionp)
{
regionp->addToCreatedList(local_id);
}
mUUIDObjectMap[fullid] = objectp;
if(objectp->isAvatar())

View File

@@ -141,6 +141,7 @@ public:
LLViewerObject *getSelectedObject(const U32 object_id);
inline S32 getNumObjects() { return (S32) mObjects.size(); }
inline S32 getNumActiveObjects() { return (S32) mActiveObjects.size(); }
void addToMap(LLViewerObject *objectp);
void removeFromMap(LLViewerObject *objectp);

View File

@@ -1101,7 +1101,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT);
while (!available && max_loop-- > 0)
{
F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
F32 max_time = llmin(gFrameIntervalSeconds.value()*10.f, 1.f);
//do some usefu work while we wait
LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread

View File

@@ -934,6 +934,10 @@ void LLViewerRegion::dirtyHeights()
}
}
void LLViewerRegion::clearCachedVisibleObjects()
{
}
BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
{
// did_update returns TRUE if we did at least one significant update
@@ -1446,6 +1450,81 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
class BaseFeaturesReceived : public LLHTTPClient::ResponderWithResult
{
LOG_CLASS(BaseFeaturesReceived);
public:
BaseFeaturesReceived(const std::string& retry_url, U64 region_handle, const char* classname, boost::function<void(LLViewerRegion*, const LLSD&)> fn,
S32 attempt = 0, S32 max_attempts = MAX_CAP_REQUEST_ATTEMPTS)
: mRetryURL(retry_url), mRegionHandle(region_handle), mAttempt(attempt), mMaxAttempts(max_attempts), mClassName(classname), mFunction(fn)
{ }
void httpFailure(void)
{
LL_WARNS("AppInit", mClassName) << dumpResponse() << LL_ENDL;
retry();
}
void httpSuccess(void)
{
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (!regionp) //region is removed or responder is not created.
{
LL_WARNS("AppInit", mClassName)
<< "Received results for region that no longer exists!" << LL_ENDL;
return;
}
const LLSD& content = getContent();
if (!content.isMap())
{
failureResult(400, "Malformed response contents", content);
return;
}
mFunction(regionp, content);
}
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return baseFeaturesReceived_timeout; }
/*virtual*/ char const* getName(void) const { return mClassName; }
private:
void retry()
{
if (mAttempt < mMaxAttempts)
{
mAttempt++;
LL_WARNS("AppInit", mClassName) << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
LLHTTPClient::get(mRetryURL, new BaseFeaturesReceived(*this));
}
}
std::string mRetryURL;
U64 mRegionHandle;
S32 mAttempt;
S32 mMaxAttempts;
const char* mClassName;
boost::function<void(LLViewerRegion*, const LLSD&)> mFunction;
};
void LLViewerRegion::requestSimulatorFeatures()
{
LL_DEBUGS("SimulatorFeatures") << "region " << getName() << " ptr " << this
<< " trying to request SimulatorFeatures" << LL_ENDL;
// kick off a request for simulator features
std::string url = getCapability("SimulatorFeatures");
if (!url.empty())
{
// kick off a request for simulator features
LLHTTPClient::get(url, new BaseFeaturesReceived(url, getHandle(), "SimulatorFeaturesReceived", &LLViewerRegion::setSimulatorFeatures));
}
else
{
LL_WARNS("AppInit", "SimulatorFeatures") << "SimulatorFeatures cap not set" << LL_ENDL;
}
}
boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
{
return mSimulatorFeaturesReceivedSignal.connect(cb);
@@ -1476,10 +1555,11 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
std::stringstream str;
LLSDSerialize::toPrettyXML(sim_features, str);
LL_DEBUGS("SimFeatures") << "\n" << str.str() << LL_ENDL;
LL_INFOS() << "region " << getName() << " " << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
setSimulatorFeaturesReceived(true);
}
void LLViewerRegion::setGamingData(const LLSD& gaming_data)
@@ -1554,6 +1634,14 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
return result;
}
void LLViewerRegion::removeFromCreatedList(U32 local_id)
{
}
void LLViewerRegion::addToCreatedList(U32 local_id)
{
}
// Get data packer for this object, if we have cached data
// AND the CRC matches. JC
LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type)
@@ -2041,64 +2129,6 @@ void LLViewerRegion::failedSeedCapability()
}
}
class BaseFeaturesReceived : public LLHTTPClient::ResponderWithResult
{
LOG_CLASS(BaseFeaturesReceived);
public:
BaseFeaturesReceived(const std::string& retry_url, U64 region_handle, const char* classname, boost::function<void(LLViewerRegion*, const LLSD&)> fn,
S32 attempt = 0, S32 max_attempts = MAX_CAP_REQUEST_ATTEMPTS)
: mRetryURL(retry_url), mRegionHandle(region_handle), mAttempt(attempt), mMaxAttempts(max_attempts), mClassName(classname), mFunction(fn)
{ }
void httpFailure(void)
{
LL_WARNS("AppInit", mClassName) << dumpResponse() << LL_ENDL;
retry();
}
void httpSuccess(void)
{
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region is removed or responder is not created.
{
LL_WARNS("AppInit", mClassName)
<< "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
const LLSD& content = getContent();
if (!content.isMap())
{
failureResult(400, "Malformed response contents", content);
return;
}
mFunction(regionp, content);
}
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return baseFeaturesReceived_timeout; }
/*virtual*/ char const* getName(void) const { return mClassName; }
private:
void retry()
{
if (mAttempt < mMaxAttempts)
{
mAttempt++;
LL_WARNS("AppInit", mClassName) << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
LLHTTPClient::get(mRetryURL, new BaseFeaturesReceived(*this));
}
}
std::string mRetryURL;
U64 mRegionHandle;
S32 mAttempt;
S32 mMaxAttempts;
const char* mClassName;
boost::function<void(LLViewerRegion*, const LLSD&)> mFunction;
};
void LLViewerRegion::setCapability(const std::string& name, const std::string& url)
{
if(name == "EventQueueGet")
@@ -2114,10 +2144,8 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u
else if (name == "SimulatorFeatures")
{
// although this is not needed later, add it so we can check if the sim supports it at all later
mImpl->mCapabilities[name] = url;
// kick off a request for simulator features
LLHTTPClient::get(url, new BaseFeaturesReceived(url, getHandle(), "SimulatorFeaturesReceived", &LLViewerRegion::setSimulatorFeatures));
mImpl->mCapabilities["SimulatorFeatures"] = url;
requestSimulatorFeatures();
}
else if (name == "GamingData")
{

View File

@@ -328,6 +328,7 @@ public:
bool meshUploadEnabled() const;
// has region received its simulator features list? Requires an additional query after caps received.
void requestSimulatorFeatures();
void setSimulatorFeaturesReceived(bool);
bool simulatorFeaturesReceived() const;
boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb);
@@ -361,6 +362,7 @@ public:
void requestCacheMisses();
void addCacheMissFull(const U32 local_id);
void clearCachedVisibleObjects();
void dumpCache();
void unpackRegionHandshake();
@@ -392,6 +394,9 @@ public:
void resetMaterialsCapThrottle();
U32 getMaxMaterialsPerTransaction() const;
void removeFromCreatedList(U32 local_id);
void addToCreatedList(U32 local_id);
public:
struct CompareDistance
{

View File

@@ -1321,12 +1321,11 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
}
S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB
//LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
if (get_recommended)
max_texmem = llmin(max_texmem, system_ram/2);
else
max_texmem = llmin(max_texmem, system_ram);
// limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
max_texmem = llmin(max_texmem, (S32Megabytes) (mem_multiplier * max_texmem));

View File

@@ -3596,8 +3596,8 @@ void LLViewerWindow::updateMouseDelta()
static F32 fdy = 0.f;
F32 amount = 16.f;
fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
mCurrentMouseDelta.set(ll_round(fdx), ll_round(fdy));
mouse_vel.setVec(fdx,fdy);

View File

@@ -1033,22 +1033,22 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] =
S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS;
bool LLVOAvatar::sRenderGroupTitles = true;
S32 LLVOAvatar::sNumVisibleChatBubbles = 0;
BOOL LLVOAvatar::sDebugInvisible = FALSE;
BOOL LLVOAvatar::sShowAttachmentPoints = FALSE;
BOOL LLVOAvatar::sShowAnimationDebug = FALSE;
BOOL LLVOAvatar::sShowFootPlane = FALSE;
BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE;
BOOL LLVOAvatar::sDebugInvisible = false;
bool LLVOAvatar::sShowAttachmentPoints = false;
BOOL LLVOAvatar::sShowAnimationDebug = false;
bool LLVOAvatar::sShowFootPlane = false;
bool LLVOAvatar::sVisibleInFirstPerson = false;
F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
BOOL LLVOAvatar::sUseImpostors = FALSE;
BOOL LLVOAvatar::sJointDebug = FALSE;
bool LLVOAvatar::sUseImpostors = false;
BOOL LLVOAvatar::sJointDebug = false;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
F32 LLVOAvatar::sGreyUpdateTime = 0.f;
//Move to LLVOAvatarSelf
BOOL LLVOAvatar::sDebugAvatarRotation = FALSE;
BOOL LLVOAvatar::sDebugAvatarRotation = false;
//-----------------------------------------------------------------------------
// Helper functions
@@ -1113,6 +1113,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mUseServerBakes(FALSE),
mLastUpdateRequestCOFVersion(-1),
mLastUpdateReceivedCOFVersion(-1),
mIsUIAvatar(false),
// <edit>
mHasPhysicsParameters( false ),
mIdleMinute(0),
@@ -1403,8 +1404,8 @@ std::string LLVOAvatar::rezStatusToString(S32 rez_status)
{
if (rez_status==0) return "cloud";
if (rez_status==1) return "gray";
if (rez_status==2) return "textured";
if (rez_status==3) return "textured_and_downloaded";
if (rez_status==2) return "downloading";
if (rez_status==3) return "full";
return "unknown";
}
@@ -1474,7 +1475,7 @@ void LLVOAvatar::dumpBakedStatus()
const ETextureIndex index = baked_dict->mTextureIndex;
if (!inst->isTextureDefined(index))
{
LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName;
LL_CONT << " " << (LLAvatarAppearanceDictionary::getInstance()->getTexture(index) ? LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName : "");
}
}
LL_CONT << " ) " << inst->getUnbakedPixelAreaRank();
@@ -1635,6 +1636,8 @@ void LLVOAvatar::initInstance(void)
//VTPause(); // VTune
mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) );
mInitFlags |= 1<<1;
}
// virtual
@@ -2423,13 +2426,11 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
//-----------------------------------------------------------------------------
void LLVOAvatar::releaseMeshData()
{
if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy)
if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || isUIAvatar())
{
return;
}
//LL_DEBUGS() << "Releasing mesh data" << LL_ENDL;
// cleanup mesh data
for (avatar_joint_list_t::iterator iter = mMeshLOD.begin();
iter != mMeshLOD.end();
@@ -2477,6 +2478,10 @@ void LLVOAvatar::releaseMeshData()
void LLVOAvatar::restoreMeshData()
{
llassert(!isSelf());
if (mDrawable.isNull())
{
return;
}
//LL_INFOS() << "Restoring" << LL_ENDL;
mMeshValid = TRUE;
@@ -2655,9 +2660,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
//LL_INFOS() << getRotation() << LL_ENDL;
//LL_INFOS() << getPosition() << LL_ENDL;
return retval;
}
@@ -2774,7 +2776,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
LL_RECORD_BLOCK_TIME(FTM_JOINT_UPDATE);
if (mIsSitting && getParent())
if (isSitting() && getParent())
{
LLViewerObject *root_object = (LLViewerObject*)getRoot();
LLDrawable* drawablep = root_object->mDrawable;
@@ -2964,7 +2966,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
//--------------------------------------------------------------------------------------------
if ( mIsSitting )
if ( isSitting() )
{
LLVector3 headOffset = LLVector3( 0.0f, 0.0f, mHeadOffset.mV[2] );
mVoiceVisualizer->setVoiceSourceWorldPosition( mRoot->getWorldPosition() + headOffset );
@@ -3101,7 +3103,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
}
}
if(mDrawable)
if (mDrawable.notNull())
{
mDrawable->movePartition();
@@ -3229,19 +3231,22 @@ void LLVOAvatar::idleUpdateLoadingEffect()
// update visibility when avatar is partially loaded
if (updateIsFullyLoaded()) // changed?
{
if (isFullyLoaded() && mFirstFullyVisible && isSelf())
{
LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
{
LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
}
if (isFullyLoaded())
{
if (mFirstFullyVisible)
{
mFirstFullyVisible = FALSE;
if (isSelf())
{
LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
else
{
LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
}
}
deleteParticleSource();
updateLOD();
}
@@ -4753,22 +4758,22 @@ void LLVOAvatar::updateHeadOffset()
{
midEyePt = midEyePt * ~mDrawable->getWorldRotation();
}
if (mIsSitting)
if (isSitting())
{
mHeadOffset = midEyePt;
mHeadOffset = midEyePt;
}
else
{
F32 u = llmax(0.f, HEAD_MOVEMENT_AVG_TIME - (1.f / gFPSClamped));
mHeadOffset = lerp(midEyePt, mHeadOffset, u);
mHeadOffset = lerp(midEyePt, mHeadOffset, u);
}
}
//------------------------------------------------------------------------
// postPelvisSetRecalc
//------------------------------------------------------------------------
void LLVOAvatar::postPelvisSetRecalc()
{
mRoot->updateWorldMatrixChildren();
{
mRoot->updateWorldMatrixChildren();
computeBodySize();
dirtyMesh(2);
}
@@ -4781,7 +4786,7 @@ void LLVOAvatar::updateVisibility()
if (mIsDummy)
{
visible = TRUE;
visible = FALSE;
}
else if (mDrawable.isNull())
{
@@ -4798,14 +4803,14 @@ void LLVOAvatar::updateVisibility()
visible = FALSE;
}
if(isSelf())
if (isSelf())
{
if (!gAgentWearables.areWearablesLoaded())
{
visible = FALSE;
}
}
else if( !mFirstAppearanceMessageReceived )
else if (!mFirstAppearanceMessageReceived)
{
visible = FALSE;
}
@@ -4855,19 +4860,21 @@ void LLVOAvatar::updateVisibility()
LL_INFOS() << "PA: " << getPositionAgent() << LL_ENDL;
/*LL_INFOS() << "SPA: " << sel_pos_agent << LL_ENDL;
LL_INFOS() << "WPA: " << wrist_right_pos_agent << LL_ENDL;*/
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
if (LLViewerObject *attached_object = (*attachment_iter))
{
if (attached_object->mDrawable->isVisible())
if (attached_object && attached_object->mDrawable->isVisible())
{
LL_INFOS() << attachment->getName() << " visible" << LL_ENDL;
}
@@ -4926,6 +4933,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
return num_indices;
}
if (mDrawable.isNull())
{
return num_indices;
}
LLFace* face = mDrawable->getFace(0);
bool needs_rebuild = !face || !face->getVertexBuffer() || mDrawable->isState(LLDrawable::REBUILD_GEOMETRY);
@@ -5098,7 +5110,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
{
if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender)
{
if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy)
if (isTextureVisible(TEX_HEAD_BAKED) || isUIAvatar())
{
LLViewerJoint* head_mesh = getViewerJoint(MESH_ID_HEAD);
if (head_mesh)
@@ -5108,7 +5120,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
first_pass = FALSE;
}
}
if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy)
if (isTextureVisible(TEX_UPPER_BAKED) || isUIAvatar())
{
LLViewerJoint* upper_mesh = getViewerJoint(MESH_ID_UPPER_BODY);
if (upper_mesh)
@@ -5118,7 +5130,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
first_pass = FALSE;
}
if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy)
if (isTextureVisible(TEX_LOWER_BAKED) || isUIAvatar())
{
LLViewerJoint* lower_mesh = getViewerJoint(MESH_ID_LOWER_BODY);
if (lower_mesh)
@@ -5150,7 +5162,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
U32 LLVOAvatar::renderTransparent(BOOL first_pass)
{
U32 num_indices = 0;
if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (mIsDummy || isTextureVisible(TEX_SKIRT_BAKED)) )
if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (isUIAvatar() || isTextureVisible(TEX_SKIRT_BAKED)) )
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f);
LLViewerJoint* skirt_mesh = getViewerJoint(MESH_ID_SKIRT);
@@ -5229,7 +5241,7 @@ U32 LLVOAvatar::renderRigid()
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy)
if (isTextureVisible(TEX_EYES_BAKED) || isUIAvatar())
{
LLViewerJoint* eyeball_left = getViewerJoint(MESH_ID_EYEBALL_LEFT);
LLViewerJoint* eyeball_right = getViewerJoint(MESH_ID_EYEBALL_RIGHT);
@@ -5450,7 +5462,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set<LLUUID>& ids) const
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index);
if (texture_dict->mIsLocalTexture)
if (texture_dict && texture_dict->mIsLocalTexture)
{
ids.insert(imagep->getID());
}
@@ -5609,8 +5621,8 @@ void LLVOAvatar::updateTextures()
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index);
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
if (texture_dict->mIsLocalTexture)
const EBakedTextureIndex baked_index = texture_dict ? texture_dict->mBakedTextureIndex : EBakedTextureIndex::BAKED_NUM_INDICES;
if (texture_dict && texture_dict->mIsLocalTexture)
{
addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, mBakedTextureDatas[baked_index].mIsUsed);
}
@@ -5862,7 +5874,7 @@ void LLVOAvatar::processAnimationStateChanges()
startMotion(ANIM_AGENT_WALK_ADJUST);
stopMotion(ANIM_AGENT_FLY_ADJUST);
}
else if (mInAir && !mIsSitting)
else if (mInAir && !isSitting())
{
stopMotion(ANIM_AGENT_WALK_ADJUST);
startMotion(ANIM_AGENT_FLY_ADJUST);
@@ -6293,7 +6305,7 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
LLVOVolume* pVObj = pVO->mDrawable->getVOVolume();
if ( pVObj )
{
const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj );
const LLMeshSkinInfo* pSkinData = pVObj->getSkinInfo();
if (pSkinData
&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig
&& pSkinData->mAlternateBindMatrix.size() > 0 )
@@ -6721,7 +6733,7 @@ void LLVOAvatar::getGround(const LLVector3 &in_pos_agent, LLVector3 &out_pos_age
LLVector3d z_vec(0.0f, 0.0f, 1.0f);
LLVector3d p0_global, p1_global;
if (mIsDummy)
if (isUIAvatar())
{
outNorm.setVec(z_vec);
out_pos_agent = in_pos_agent;
@@ -6750,7 +6762,7 @@ F32 LLVOAvatar::getTimeDilation()
//-----------------------------------------------------------------------------
F32 LLVOAvatar::getPixelArea() const
{
if (mIsDummy)
if (isUIAvatar())
{
return 100000.f;
}
@@ -6801,6 +6813,7 @@ BOOL LLVOAvatar::loadSkeletonNode ()
return TRUE;
}
//-----------------------------------------------------------------------------
// initAttachmentPoints(): creates attachment points if needed, sets state based on avatar_lad.xml.
//-----------------------------------------------------------------------------
@@ -7181,7 +7194,7 @@ namespace
LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* viewer_object)
{
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState());
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getAttachmentState());
// This should never happen unless the server didn't process the attachment point
// correctly, but putting this check in here to be safe.
@@ -7438,7 +7451,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
//-----------------------------------------------------------------------------
void LLVOAvatar::sitDown(BOOL bSitting)
{
if (mIsSitting != bSitting) mIdleTimer.reset(); // Sitting changed, not idle
if (isSitting() != bSitting) mIdleTimer.reset(); // Sitting changed, not idle
mIsSitting = bSitting;
if (isSelf())
{
@@ -9589,14 +9602,14 @@ void LLVOAvatar::cullAvatarsByPixelArea()
if (gFrameTimeSeconds != sUnbakedUpdateTime) // only update once per frame
{
sUnbakedUpdateTime = gFrameTimeSeconds;
sUnbakedTime += gFrameIntervalSeconds;
sUnbakedTime += gFrameIntervalSeconds.value();
}
if (grey_avatars > 0)
{
if (gFrameTimeSeconds != sGreyUpdateTime) // only update once per frame
{
sGreyUpdateTime = gFrameTimeSeconds;
sGreyTime += gFrameIntervalSeconds;
sGreyTime += gFrameIntervalSeconds.value();
}
}
}
@@ -9777,7 +9790,7 @@ void LLVOAvatar::updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const
bind_shape_matrix.affineTransform(v, t);
final_mat.affineTransform(t, pos[j]);
pos[j].add(av_pos);
pos[j].add(av_pos); // Algorithm tweaked to stop hosing up normals.
if (norm)
{
@@ -9798,10 +9811,10 @@ U32 LLVOAvatar::getPartitionType() const
//static
void LLVOAvatar::updateImpostors()
{
LLCharacter::sAllowInstancesChange = FALSE ;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
std::vector<LLCharacter*> instances_copy = LLCharacter::sInstances;
for (std::vector<LLCharacter*>::iterator iter = instances_copy.begin();
iter != instances_copy.end(); ++iter)
{
LLVOAvatar* avatar = (LLVOAvatar*) *iter;
if (!avatar->isDead() && avatar->needsImpostorUpdate() && avatar->isVisible() && avatar->isImpostor())
@@ -9809,8 +9822,6 @@ void LLVOAvatar::updateImpostors()
gPipeline.generateImpostor(avatar);
}
}
LLCharacter::sAllowInstancesChange = TRUE ;
}
BOOL LLVOAvatar::isImpostor() const
@@ -9995,12 +10006,11 @@ void LLVOAvatar::calculateUpdateRenderCost()
for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
{
LLUUID image_id = it->first;
if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
continue;
if (all_textures.find(image_id) == all_textures.end())
if( ! (image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
&& (all_textures.find(image_id) == all_textures.end()))
{
// attachment texture not previously seen.
LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL;
LL_DEBUGS("ARCdetail") << "attachment_texture: " << image_id.asString() << LL_ENDL;
all_textures.insert(image_id);
}
}
@@ -10020,7 +10030,7 @@ void LLVOAvatar::calculateUpdateRenderCost()
continue;
if (all_textures.find(image_id) == all_textures.end())
{
LL_INFOS() << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL;
LL_DEBUGS("ARCdetail") << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL;
all_textures.insert(image_id);
}
}

View File

@@ -248,7 +248,7 @@ public:
void dumpAnimationState();
virtual LLJoint* getJoint(const std::string &name);
LLJoint* getJoint(S32 num);
LLJoint* getJoint(S32 num);
void addAttachmentOverridesForObject(LLViewerObject *vo);
void resetJointsOnDetach(const LLUUID& mesh_id);
@@ -283,6 +283,7 @@ public:
public:
virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent
virtual bool isUIAvatar() const { return mIsUIAvatar; } // True if this avatar is a supplemental av used in some UI views (no associated user)
private: //aligned members
LL_ALIGN_16(LLVector4a mImpostorExtents[2]);
@@ -336,13 +337,13 @@ public:
static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible")
static F32 sRenderDistance; //distance at which avatars will render.
static BOOL sShowAnimationDebug; // show animation debug info
static BOOL sUseImpostors; //use impostors for far away avatars
static BOOL sShowFootPlane; // show foot collision plane reported by server
static BOOL sVisibleInFirstPerson;
static bool sUseImpostors; //use impostors for far away avatars
static bool sShowFootPlane; // show foot collision plane reported by server
static bool sVisibleInFirstPerson;
static S32 sNumLODChangesThisFrame;
static S32 sNumVisibleChatBubbles;
static BOOL sDebugInvisible;
static BOOL sShowAttachmentPoints;
static bool sShowAttachmentPoints;
static F32 sLODFactor; // user-settable LOD factor
static F32 sPhysicsLODFactor; // user-settable physics LOD factor
static BOOL sJointDebug; // output total number of joints being touched for each avatar
@@ -474,6 +475,8 @@ private:
S32 mUpdatePeriod;
S32 mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
public:
bool mIsUIAvatar;
//--------------------------------------------------------------------
// Morph masks
//--------------------------------------------------------------------

View File

@@ -260,6 +260,8 @@ void LLVOAvatarSelf::initInstance()
doPeriodically(update_avatar_rez_metrics, 5.0);
doPeriodically(check_for_unsupported_baked_appearance, 120.0);
doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0);
mInitFlags |= 1<<2;
}
void LLVOAvatarSelf::setHoverIfRegionEnabled()
@@ -609,6 +611,13 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
if (!jointp && mScreenp)
{
jointp = mScreenp->findJoint(name);
if (jointp)
{
joint_map_t::value_type entry;
strncpy(entry.first, name.c_str(), sizeof(entry.first));
entry.second = jointp;
mJointMap.emplace_back(entry);
}
}
return jointp;
@@ -3107,7 +3116,7 @@ BOOL LLVOAvatarSelf::needsRenderBeam()
// don't render selection beam on hud objects
is_touching_or_grabbing = FALSE;
}
return is_touching_or_grabbing || (mState & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection());
return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection());
}
void dump_visual_param(apr_file_t* file, LLVisualParam const* viewer_param, F32 value);

View File

@@ -103,7 +103,7 @@ LLVOGrass::~LLVOGrass()
void LLVOGrass::updateSpecies()
{
mSpecies = mState;
mSpecies = getAttachmentState();
if (!sSpeciesTable.count(mSpecies))
{

View File

@@ -53,7 +53,7 @@
const F32 MAX_PART_LIFETIME = 120.f;
extern U64 gFrameTime;
extern U64MicrosecondsImplicit gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
S32 LLVOPartGroup::sVBSlotFree[];

View File

@@ -480,7 +480,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
{
U8 tdpbuffer[1024];
LLDataPackerBinaryBuffer tdp(tdpbuffer, 1024);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_TextureEntry, tdpbuffer, 0, block_num);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_TextureEntry, tdpbuffer, 0, block_num, 1024);
S32 result = unpackTEMessage(tdp);
if (result & teDirtyBits)
{
@@ -969,13 +969,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
// if it's a mesh
if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
{ //meshes might not have all LODs, get the force detail to best existing LOD
LLUUID mesh_id = volume_params.getSculptID();
lod = gMeshRepo.getActualMeshLOD(volume_params, lod);
if (lod == -1)
if (NO_LOD != lod)
{
is404 = TRUE;
lod = 0;
lod = gMeshRepo.getActualMeshLOD(volume_params, lod);
if (lod == -1)
{
is404 = TRUE;
lod = 0;
}
}
}
}
@@ -1207,18 +1208,18 @@ void LLVOVolume::sculpt()
}
}
S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius)
S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius, F32 lod_factor)
{
S32 cur_detail;
if (LLPipeline::sDynamicLOD)
{
// We've got LOD in the profile, and in the twist. Use radius.
F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance;
F32 tan_angle = (lod_factor*radius)/distance;
cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f));
}
else
{
cur_detail = llclamp((S32) (sqrtf(radius)*LLVOVolume::sLODFactor*4.f), 0, 3);
cur_detail = llclamp((S32) (sqrtf(radius)*lod_factor*4.f), 0, 3);
}
return cur_detail;
}
@@ -1234,10 +1235,16 @@ BOOL LLVOVolume::calcLOD()
F32 radius;
F32 distance;
F32 lod_factor = LLVOVolume::sLODFactor;
if (mDrawable->isState(LLDrawable::RIGGED) && getAvatar() && getAvatar()->mDrawable)
{
LLVOAvatar* avatar = getAvatar();
// Not sure how this can really happen, but alas it does. Better exit here than crashing.
if( !avatar || !avatar->mDrawable )
{
return FALSE;
}
distance = avatar->mDrawable->mDistanceWRTCamera;
radius = avatar->getBinRadius();
}
@@ -1261,8 +1268,16 @@ BOOL LLVOVolume::calcLOD()
// DON'T Compensate for field of view changing on FOV zoom.
distance *= F_PI/3.f;
cur_detail = computeLODDetail(ll_round(distance, 0.01f),
ll_round(radius, 0.01f));
if (isHUDAttachment())
{
// HUDs always show at highest detail
cur_detail = 3;
}
else
{
cur_detail = computeLODDetail(ll_round(distance, 0.01f), ll_round(radius, 0.01f), lod_factor);
}
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) &&
@@ -1279,10 +1294,7 @@ BOOL LLVOVolume::calcLOD()
mLOD = cur_detail;
return TRUE;
}
else
{
return FALSE;
}
return FALSE;
}
BOOL LLVOVolume::updateLOD()
@@ -1372,7 +1384,8 @@ void LLVOVolume::updateFaceFlags()
BOOL LLVOVolume::setParent(LLViewerObject* parent)
{
BOOL ret = FALSE ;
if (parent != getParent())
LLViewerObject *old_parent = (LLViewerObject*) getParent();
if (parent != old_parent)
{
ret = LLViewerObject::setParent(parent);
if (ret && mDrawable)
@@ -1380,6 +1393,7 @@ BOOL LLVOVolume::setParent(LLViewerObject* parent)
gPipeline.markMoved(mDrawable);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
}
onReparent(old_parent, parent);
}
return ret ;
@@ -2458,7 +2472,9 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
LL_WARNS("MediaOnAPrim") << "FAILED to bounce back URL \"" << url << "\" -- unloading impl" << LL_ENDL;
impl->setMediaFailed(true);
}
else {
// Make sure we are not bouncing to url we came from
else if (impl->getCurrentMediaURL() != url)
{
// Okay, navigate now
LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL;
impl->navigateTo(url, "", false, true);
@@ -3202,6 +3218,23 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible)
return res;
}
const LLMeshSkinInfo* LLVOVolume::getSkinInfo() const
{
if (getVolume())
{
return gMeshRepo.getSkinInfo(getVolume()->getParams().getSculptID(), this);
}
else
{
return NULL;
}
}
// virtual
BOOL LLVOVolume::isRiggedMesh() const
{
return isMesh() && getSkinInfo();
}
//----------------------------------------------------------------------------
void LLVOVolume::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point)
@@ -3263,7 +3296,7 @@ void LLVOVolume::updateRadius()
BOOL LLVOVolume::isAttachment() const
{
return mState != 0 ;
return mAttachmentState != 0 ;
}
BOOL LLVOVolume::isHUDAttachment() const
@@ -3271,7 +3304,7 @@ BOOL LLVOVolume::isHUDAttachment() const
// *NOTE: we assume hud attachment points are in defined range
// since this range is constant for backwards compatibility
// reasons this is probably a reasonable assumption to make
S32 attachment_id = ATTACHMENT_ID_FROM_STATE(mState);
S32 attachment_id = ATTACHMENT_ID_FROM_STATE(mAttachmentState);
return ( attachment_id >= 31 && attachment_id <= 38 );
}
@@ -3644,10 +3677,17 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u
void LLVOVolume::setSelected(BOOL sel)
{
LLViewerObject::setSelected(sel);
if (mDrawable.notNull())
{
markForUpdate(TRUE);
}
if (isAnimatedObject())
{
getRootEdit()->recursiveMarkForUpdate(TRUE);
}
else
{
if (mDrawable.notNull())
{
markForUpdate(TRUE);
}
}
}
void LLVOVolume::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
@@ -3756,6 +3796,12 @@ const LLMatrix4a& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const
return xform->getWorldMatrix();
}
void LLVOVolume::markForUpdate(BOOL priority)
{
LLViewerObject::markForUpdate(priority);
mVolumeChanged = TRUE;
}
LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const
{
LLVector3 ret = pos - getRenderPosition();
@@ -4016,7 +4062,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
bool LLVOVolume::treatAsRigged()
{
return (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()) &&
isAttachment() &&
(isAttachment() || isAnimatedObject()) &&
mDrawable.notNull() &&
mDrawable->isState(LLDrawable::RIGGED);
}
@@ -4048,9 +4094,7 @@ void LLVOVolume::updateRiggedVolume(bool force_update)
}
LLVolume* volume = getVolume();
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(volume->getParams().getSculptID(), this);
const LLMeshSkinInfo* skin = getSkinInfo();
if (!skin)
{
clearRiggedVolume();
@@ -4149,7 +4193,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
bind_shape_matrix.affineTransform(v, t);
final_mat.affineTransform(t, pos[j]);
pos[j].add(av_pos);
pos[j].add(av_pos); // Algorithm tweaked to stop hosing up normals.
}
//update bounding box
@@ -5500,9 +5544,11 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
if (!drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
{
LLVOVolume* vobj = drawablep->getVOVolume();
if (vobj->isNoLOD()) continue;
vobj->preRebuild();
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))

View File

@@ -142,6 +142,8 @@ public:
void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point);
/*virtual*/ BOOL setParent(LLViewerObject* parent);
S32 getLOD() const { return mLOD; }
void setNoLOD() { mLOD = NO_LOD; mLODChanged = TRUE; }
bool isNoLOD() const { return NO_LOD == mLOD; }
const LLVector3 getPivotPositionAgent() const;
const LLMatrix4a& getRelativeXform() const { return mRelativeXform; }
const LLMatrix4a& getRelativeXformInvTrans() const { return mRelativeXformInvTrans; }
@@ -173,8 +175,8 @@ public:
/*virtual*/ F32 getRadius() const { return mVObjRadius; };
const LLMatrix4a& getWorldMatrix(LLXformMatrix* xform) const;
void markForUpdate(BOOL priority) { LLViewerObject::markForUpdate(priority); mVolumeChanged = TRUE; }
void faceMappingChanged() { mFaceMappingChanged=TRUE; };
void markForUpdate(BOOL priority);
void faceMappingChanged() { mFaceMappingChanged=TRUE; };
/*virtual*/ void onShift(const LLVector4a &shift_vector); // Called when the drawable shifts
@@ -273,13 +275,14 @@ public:
virtual BOOL isFlexible() const;
virtual BOOL isSculpted() const;
virtual BOOL isMesh() const;
virtual BOOL isRiggedMesh() const;
virtual BOOL hasLightTexture() const;
BOOL isVolumeGlobal() const;
BOOL canBeFlexible() const;
BOOL setIsFlexible(BOOL is_flexible);
const LLMeshSkinInfo* getSkinInfo() const;
// Functions that deal with media, or media navigation
// Update this object's media data with the given media data array
@@ -345,7 +348,7 @@ public:
void clearRiggedVolume();
protected:
S32 computeLODDetail(F32 distance, F32 radius);
S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor);
BOOL calcLOD();
LLFace* addFace(S32 face_index);
void updateTEData();

View File

@@ -769,6 +769,17 @@ void LLWorld::updateRegions(F32 max_update_time)
}
}
void LLWorld::clearAllVisibleObjects()
{
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
{
//clear all cached visible objects.
(*iter)->clearCachedVisibleObjects();
}
}
void LLWorld::updateParticles()
{
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
@@ -842,7 +853,6 @@ LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff)
}
#endif
void LLWorld::renderPropertyLines()
{
S32 region_count = 0;

View File

@@ -157,6 +157,7 @@ public:
void getInfo(LLSD& info);
void clearAllVisibleObjects();
public:
typedef std::list<LLViewerRegion*> region_list_t;
const region_list_t& getRegionList() const { return mActiveRegionList; }

View File

@@ -10576,11 +10576,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
LLVOAvatar::sUseImpostors = TRUE;
LLVOAvatar::sUseImpostors = true;
sUseOcclusion = occlusion;
sReflectionRender = FALSE;
sImpostorRender = FALSE;
sShadowRender = FALSE;
sReflectionRender = false;
sImpostorRender = false;
sShadowRender = false;
popRenderTypeMask();
gGL.matrixMode(LLRender::MM_PROJECTION);

View File

@@ -370,7 +370,7 @@ RlvObject::RlvObject(const LLUUID& idObj) : m_idObj(idObj), m_nLookupMisses(0)
{
LLViewerObject* pObj = gObjectList.findObject(idObj);
m_fLookup = (NULL != pObj);
m_idxAttachPt = (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getState()) : 0;
m_idxAttachPt = (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getAttachmentState()) : 0;
m_idRoot = (pObj) ? pObj->getRootEdit()->getID() : LLUUID::null;
}

View File

@@ -422,7 +422,7 @@ inline S32 RlvAttachPtLookup::getAttachPointIndex(std::string strText)
// Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-0.2.0d
inline S32 RlvAttachPtLookup::getAttachPointIndex(const LLViewerObject* pObj)
{
return (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getState()) : 0;
return (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getAttachmentState()) : 0;
}
// ============================================================================

View File

@@ -38,9 +38,11 @@
</menu_item_call>
<menu_item_call enabled="true" label="Reset Skeleton" mouse_opaque="true" name="Reset Skeleton">
<on_click function="Avatar.ResetSkeleton" />
<on_enable function="Avatar.EnableResetSkeleton" />
</menu_item_call>
<menu_item_call enabled="true" label="Reset Skeleton And Animations" mouse_opaque="true" name="Reset Skeleton And Animations">
<on_click function="Avatar.ResetSkeletonAndAnimations" />
<on_enable function="Avatar.EnableResetSkeleton" />
</menu_item_call>
<menu_item_call enabled="false" hidden="false" label="S. Count" mouse_opaque="true" name="ScriptCount">
<on_click function="Object.ScriptCount" />