Merge branch 'DRTVWR-582-maint-U' of https://github.com/secondlife/viewer
# Conflicts: # indra/llcommon/stdtypes.h # indra/newview/llimprocessing.cppmaster
commit
5c357d3690
|
|
@ -41,7 +41,7 @@ typedef unsigned int U32;
|
|||
|
||||
// to express an index that might go negative
|
||||
// (ssize_t is provided by SOME compilers, don't collide)
|
||||
typedef typename std::make_signed<std::size_t>::type llssize; // <FS:Ansariel> Stop Linux complaining
|
||||
typedef typename std::make_signed<std::size_t>::type llssize;
|
||||
|
||||
#if LL_WINDOWS
|
||||
// https://docs.microsoft.com/en-us/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ from io import StringIO
|
|||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
|
||||
|
||||
from llbase import llsd
|
||||
import llsd
|
||||
|
||||
# we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ import os
|
|||
import sys
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
|
||||
from llbase.fastest_elementtree import parse as xml_parse
|
||||
from llbase import llsd
|
||||
from llsd.fastest_elementtree import parse as xml_parse
|
||||
import llsd
|
||||
from testrunner import freeport, run, debug, VERBOSE
|
||||
import time
|
||||
|
||||
|
|
|
|||
|
|
@ -1566,26 +1566,21 @@ LLVector3 LLAgent::getReferenceUpVector()
|
|||
void LLAgent::pitch(F32 angle)
|
||||
{
|
||||
// don't let user pitch if pointed almost all the way down or up
|
||||
mFrameAgent.pitch(clampPitchToLimits(angle));
|
||||
}
|
||||
|
||||
|
||||
// Radians, positive is forward into ground
|
||||
//-----------------------------------------------------------------------------
|
||||
// clampPitchToLimits()
|
||||
//-----------------------------------------------------------------------------
|
||||
F32 LLAgent::clampPitchToLimits(F32 angle)
|
||||
{
|
||||
// A dot B = mag(A) * mag(B) * cos(angle between A and B)
|
||||
// so... cos(angle between A and B) = A dot B / mag(A) / mag(B)
|
||||
// = A dot B for unit vectors
|
||||
|
||||
LLVector3 skyward = getReferenceUpVector();
|
||||
|
||||
const F32 look_down_limit = 179.f * DEG_TO_RAD;;
|
||||
const F32 look_up_limit = 1.f * DEG_TO_RAD;
|
||||
// SL-19286 Avatar is upside down when viewed from below
|
||||
// after left-clicking the mouse on the avatar and dragging down
|
||||
//
|
||||
// The issue is observed on angle below 10 degrees
|
||||
const F32 look_down_limit = 179.f * DEG_TO_RAD;
|
||||
const F32 look_up_limit = 10.f * DEG_TO_RAD;
|
||||
|
||||
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
|
||||
F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
|
||||
|
||||
// clamp pitch to limits
|
||||
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
|
||||
|
|
@ -1596,8 +1591,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
|
|||
{
|
||||
angle = look_up_limit - angle_from_skyward;
|
||||
}
|
||||
|
||||
return angle;
|
||||
|
||||
if (fabs(angle) > 1e-4)
|
||||
{
|
||||
mFrameAgent.pitch(angle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -644,7 +644,6 @@ public:
|
|||
void roll(F32 angle);
|
||||
void yaw(F32 angle);
|
||||
LLVector3 getReferenceUpVector();
|
||||
F32 clampPitchToLimits(F32 angle);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Autopilot
|
||||
|
|
|
|||
|
|
@ -1876,13 +1876,24 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
LL_WARNS() << "Null avatar drawable!" << LL_ENDL;
|
||||
return LLVector3d::zero;
|
||||
}
|
||||
|
||||
head_offset.clearVec();
|
||||
F32 fixup;
|
||||
if (gAgentAvatarp->hasPelvisFixup(fixup))
|
||||
{
|
||||
head_offset[VZ] -= fixup;
|
||||
}
|
||||
if (gAgentAvatarp->isSitting())
|
||||
{
|
||||
head_offset.mdV[VZ] += 0.1;
|
||||
}
|
||||
|
||||
if (gAgentAvatarp->isSitting() && gAgentAvatarp->getParent())
|
||||
{
|
||||
gAgentAvatarp->updateHeadOffset();
|
||||
head_offset.mdV[VX] = gAgentAvatarp->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] = gAgentAvatarp->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ] + 0.1f;
|
||||
head_offset.mdV[VX] += gAgentAvatarp->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] += gAgentAvatarp->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] += gAgentAvatarp->mHeadOffset.mV[VZ];
|
||||
const LLMatrix4& mat = ((LLViewerObject*) gAgentAvatarp->getParent())->getRenderMatrix();
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent
|
||||
((gAgentAvatarp->getPosition()+
|
||||
|
|
@ -1890,11 +1901,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
}
|
||||
else
|
||||
{
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ];
|
||||
if (gAgentAvatarp->isSitting())
|
||||
{
|
||||
head_offset.mdV[VZ] += 0.1;
|
||||
}
|
||||
head_offset.mdV[VZ] += gAgentAvatarp->mHeadOffset.mV[VZ];
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition());//frame_center_global;
|
||||
head_offset = head_offset * gAgentAvatarp->getRenderRotation();
|
||||
camera_position_global = camera_position_global + head_offset;
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
|
|||
|
||||
if (!region || !parcel) return FALSE;
|
||||
|
||||
S32 pos_x = S32(agent_pos_region.mV[VX]);
|
||||
S32 pos_y = S32(agent_pos_region.mV[VY]);
|
||||
S32 pos_z = S32(agent_pos_region.mV[VZ]);
|
||||
S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f);
|
||||
S32 pos_y = S32(agent_pos_region.mV[VY] + 0.5f);
|
||||
S32 pos_z = S32(agent_pos_region.mV[VZ] + 0.5f);
|
||||
|
||||
// Round the numbers based on the velocity
|
||||
F32 velocity_mag_sq = gAgent.getVelocity().magVecSquared();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer
|
|||
mGlobalScale(1.0f),
|
||||
mMarkedForDeath(false),
|
||||
mRootVolp(NULL),
|
||||
mControlAVBridge(NULL),
|
||||
mScaleConstraintFixup(1.0),
|
||||
mRegionChanged(false)
|
||||
{
|
||||
|
|
@ -379,6 +380,12 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
|
|||
}
|
||||
}
|
||||
|
||||
void LLControlAvatar::markDead()
|
||||
{
|
||||
super::markDead();
|
||||
mControlAVBridge = NULL;
|
||||
}
|
||||
|
||||
bool LLControlAvatar::computeNeedsUpdate()
|
||||
{
|
||||
computeUpdatePeriod();
|
||||
|
|
|
|||
|
|
@ -35,9 +35,12 @@ class LLControlAvatar:
|
|||
{
|
||||
LOG_CLASS(LLControlAvatar);
|
||||
|
||||
using super = LLVOAvatar;
|
||||
|
||||
public:
|
||||
LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
|
||||
virtual void initInstance(); // Called after construction to initialize the class.
|
||||
virtual void initInstance(); // Called after construction to initialize the class.
|
||||
virtual void markDead();
|
||||
virtual ~LLControlAvatar();
|
||||
|
||||
// If this is an attachment, return the avatar it is attached to. Otherwise NULL.
|
||||
|
|
@ -90,6 +93,7 @@ public:
|
|||
F32 mGlobalScale;
|
||||
|
||||
LLVOVolume *mRootVolp;
|
||||
class LLControlAVBridge* mControlAVBridge;
|
||||
|
||||
bool mMarkedForDeath;
|
||||
|
||||
|
|
|
|||
|
|
@ -770,6 +770,19 @@ void LLDrawable::movePartition()
|
|||
if (part)
|
||||
{
|
||||
part->move(this, getSpatialGroup());
|
||||
|
||||
// SL-18251 "On-screen animesh characters using pelvis offset animations
|
||||
// disappear when root goes off-screen"
|
||||
//
|
||||
// Update extents of the root node when Control Avatar changes it's bounds
|
||||
if (mRenderType == LLPipeline::RENDER_TYPE_CONTROL_AV && isRoot())
|
||||
{
|
||||
LLControlAvatar* controlAvatar = dynamic_cast<LLControlAvatar*>(getVObj().get());
|
||||
if (controlAvatar && controlAvatar->mControlAVBridge)
|
||||
{
|
||||
((LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0))->setState(LLViewerOctreeGroup::DIRTY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1231,10 +1244,11 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
|||
{
|
||||
setSpatialBridge(new LLHUDBridge(this, getRegion()));
|
||||
}
|
||||
else if (mVObjp->isAnimatedObject() && mVObjp->getControlAvatar())
|
||||
{
|
||||
setSpatialBridge(new LLControlAVBridge(this, getRegion()));
|
||||
}
|
||||
else if (mVObjp->isAnimatedObject() && mVObjp->getControlAvatar())
|
||||
{
|
||||
setSpatialBridge(new LLControlAVBridge(this, getRegion()));
|
||||
mVObjp->getControlAvatar()->mControlAVBridge = (LLControlAVBridge*)getSpatialBridge();
|
||||
}
|
||||
// check HUD first, because HUD is also attachment
|
||||
else if (mVObjp->isAttachment())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2373,13 +2373,19 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
|
|||
from_group = message_data["from_group"].asString() == "Y";
|
||||
}
|
||||
|
||||
EInstantMessage dialog = static_cast<EInstantMessage>(message_data["dialog"].asInteger());
|
||||
LLUUID session_id = message_data["transaction-id"].asUUID();
|
||||
if (session_id.isNull() && dialog == IM_FROM_TASK)
|
||||
{
|
||||
session_id = message_data["asset_id"].asUUID();
|
||||
}
|
||||
LLIMProcessing::processNewMessage(
|
||||
message_data["from_agent_id"].asUUID(),
|
||||
from_group,
|
||||
message_data["to_agent_id"].asUUID(),
|
||||
message_data.has("offline") ? static_cast<U8>(message_data["offline"].asInteger()) : IM_OFFLINE,
|
||||
static_cast<EInstantMessage>(message_data["dialog"].asInteger()),
|
||||
message_data["transaction-id"].asUUID(),
|
||||
dialog,
|
||||
session_id,
|
||||
static_cast<U32>(message_data["timestamp"].asInteger()),
|
||||
message_data["from_agent_name"].asString(),
|
||||
message_data["message"].asString(),
|
||||
|
|
|
|||
|
|
@ -243,6 +243,59 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform)
|
||||
{
|
||||
// Get coordinates of the adding extents
|
||||
const LLVector4a& min = addingExtents[0];
|
||||
const LLVector4a& max = addingExtents[1];
|
||||
|
||||
// Get coordinates of all corners of the bounding box
|
||||
LLVector3 corners[] =
|
||||
{
|
||||
LLVector3(min[0], min[1], min[2]),
|
||||
LLVector3(min[0], min[1], max[2]),
|
||||
LLVector3(min[0], max[1], min[2]),
|
||||
LLVector3(min[0], max[1], max[2]),
|
||||
LLVector3(max[0], min[1], min[2]),
|
||||
LLVector3(max[0], min[1], max[2]),
|
||||
LLVector3(max[0], max[1], min[2]),
|
||||
LLVector3(max[0], max[1], max[2])
|
||||
};
|
||||
|
||||
// New extents (to be expanded)
|
||||
LLVector3 extents[] =
|
||||
{
|
||||
LLVector3(mExtents[0].getF32ptr()),
|
||||
LLVector3(mExtents[1].getF32ptr())
|
||||
};
|
||||
|
||||
LLQuaternion backwardRotation = ~currentTransform.getRotation();
|
||||
for (LLVector3& corner : corners)
|
||||
{
|
||||
// Make coordinates relative to the current position
|
||||
corner -= currentTransform.getPosition();
|
||||
// Rotate coordinates backward to the current rotation
|
||||
corner.rotVec(backwardRotation);
|
||||
// Expand root extents on the current corner
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
if (corner[j] < extents[0][j])
|
||||
extents[0][j] = corner[j];
|
||||
if (corner[j] > extents[1][j])
|
||||
extents[1][j] = corner[j];
|
||||
}
|
||||
}
|
||||
|
||||
// Set new expanded extents
|
||||
mExtents[0].load3(extents[0].mV);
|
||||
mExtents[1].load3(extents[1].mV);
|
||||
|
||||
// Calculate new center and size
|
||||
mBounds[0].setAdd(mExtents[0], mExtents[1]);
|
||||
mBounds[0].mul(0.5f);
|
||||
mBounds[1].setSub(mExtents[0], mExtents[1]);
|
||||
mBounds[1].mul(0.5f);
|
||||
}
|
||||
|
||||
BOOL LLSpatialGroup::addObject(LLDrawable *drawablep)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ public:
|
|||
BOOL addObject(LLDrawable *drawablep);
|
||||
BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
|
||||
BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
|
||||
void expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform);
|
||||
void shift(const LLVector4a &offset);
|
||||
void destroyGL(bool keep_occlusion = false);
|
||||
|
||||
|
|
@ -710,8 +711,10 @@ public:
|
|||
|
||||
class LLControlAVBridge : public LLVolumeBridge
|
||||
{
|
||||
using super = LLVolumeBridge;
|
||||
public:
|
||||
LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
|
||||
virtual void updateSpatialExtents();
|
||||
};
|
||||
|
||||
class LLHUDBridge : public LLVolumeBridge
|
||||
|
|
|
|||
|
|
@ -1283,7 +1283,11 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLPointer<LLInventoryItem> item_p
|
|||
|
||||
void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc )
|
||||
{
|
||||
if(item && !item->getCreatorUUID().isNull())
|
||||
if (item && !item->getDescription().empty())
|
||||
{
|
||||
LLAvatarActions::showProfile(LLUUID(item->getDescription()));
|
||||
}
|
||||
else if (item && !item->getCreatorUUID().isNull())
|
||||
{
|
||||
LLAvatarActions::showProfile(item->getCreatorUUID());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5369,6 +5369,28 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi
|
|||
mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV;
|
||||
}
|
||||
|
||||
void LLControlAVBridge::updateSpatialExtents()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
|
||||
|
||||
LLControlAvatar* controlAvatar = getVObj()->getControlAvatar();
|
||||
|
||||
LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0);
|
||||
|
||||
bool rootWasDirty = root->isDirty();
|
||||
|
||||
super::updateSpatialExtents(); // root becomes non-dirty here
|
||||
|
||||
// SL-18251 "On-screen animesh characters using pelvis offset animations
|
||||
// disappear when root goes off-screen"
|
||||
//
|
||||
// Expand extents to include Control Avatar placed outside of the bounds
|
||||
if (controlAvatar && (rootWasDirty || controlAvatar->mPlaying))
|
||||
{
|
||||
root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform());
|
||||
}
|
||||
}
|
||||
|
||||
bool can_batch_texture(LLFace* facep)
|
||||
{
|
||||
if (facep->getTextureEntry()->getBumpmap())
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
name="remove_friend">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.RemoveFriend" />
|
||||
<menu_item_call.on_enable
|
||||
<menu_item_call.on_visible
|
||||
function="Avatar.EnableItem"
|
||||
parameter="can_delete" />
|
||||
</menu_item_call>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ viewer_dir = os.path.dirname(__file__)
|
|||
# indra.util.llmanifest under their system Python!
|
||||
sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
|
||||
from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError, MissingError
|
||||
from llbase import llsd
|
||||
import llsd
|
||||
|
||||
class ViewerManifest(LLManifest,FSViewerManifest):
|
||||
def is_packaging_viewer(self):
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
|||
$/LicenseInfo$
|
||||
"""
|
||||
|
||||
from llbase import llsd
|
||||
import llsd
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ $/LicenseInfo$
|
|||
|
||||
import argparse
|
||||
from lxml import etree
|
||||
from llbase import llsd
|
||||
import llsd
|
||||
|
||||
def get_metrics_record(infiles):
|
||||
for filename in args.infiles:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import numpy as np
|
|||
import pandas as pd
|
||||
import json
|
||||
from collections import Counter, defaultdict
|
||||
from llbase import llsd
|
||||
import llsd
|
||||
import io
|
||||
import re
|
||||
import os
|
||||
|
|
|
|||
Loading…
Reference in New Issue