SL-714 - fixes to get wireframes to display consistently when right-clicking on animated objects.

master
Brad Payne (Vir Linden) 2017-07-19 22:21:08 +01:00
parent 6837ca5cd8
commit 5610444d64
5 changed files with 36 additions and 6 deletions

View File

@ -194,7 +194,29 @@ void LLControlAvatar::updateDebugText()
std::vector<LLVOVolume*> volumes;
getAnimatedVolumes(volumes);
S32 animated_volume_count = volumes.size();
addDebugText(llformat("CAV obj %d anim %d", total_linkset_count, animated_volume_count));
std::string active_string;
for (std::vector<LLVOVolume*>::iterator it = volumes.begin();
it != volumes.end(); ++it)
{
LLVOVolume *volp = *it;
if (volp && volp->mDrawable)
{
if (volp->mDrawable->isActive())
{
active_string += "A";
}
else
{
active_string += "S";
}
}
else
{
active_string += "-";
}
}
addDebugText(llformat("CAV obj %d anim %d active %s",
total_linkset_count, animated_volume_count, active_string.c_str()));
#if 0
// AXON - detailed rigged mesh info
for (std::vector<LLVOVolume*>::iterator it = volumes.begin();

View File

@ -550,7 +550,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);

View File

@ -6764,10 +6764,9 @@ void LLSelectMgr::pauseAssociatedAvatars()
}
else
{
LLVOVolume *volp = dynamic_cast<LLVOVolume*>(object);
if (volp && volp->isAnimatedObject() && volp->getControlAvatar())
if (object && object->isAnimatedObject() && object->getControlAvatar())
{
mPauseRequests.push_back(volp->getControlAvatar()->requestPause());
mPauseRequests.push_back(object->getControlAvatar()->requestPause());
}
}
}

View File

@ -2965,6 +2965,12 @@ void LLViewerObject::unlinkControlAvatar()
// automatically remove the control avatar connection.
}
// virtual
bool LLViewerObject::isAnimatedObject() const
{
return false;
}
struct LLFilenameAndTask
{
LLUUID mTaskID;

View File

@ -693,7 +693,9 @@ public:
void linkControlAvatar();
// Remove any reference to control av for this prim
void unlinkControlAvatar();
virtual bool isAnimatedObject() const;
protected:
LLPointer<LLControlAvatar> mControlAvatar;