EFFECTIVE MERGE: svn merge -r 69928:70806 svn+ssh://svn/svn/linden/branches/maintenance-1 && svn merge -r 70948:70949 svn+ssh://svn/svn/linden/branches/maintenance-1-qa into release

ACTUAL MERGE: svn merge -r 71430:71431 svn+ssh://svn/svn/linden/qa/maintenance-1-merge-71429 into release
master
Don Kjer 2007-10-11 00:28:42 +00:00
parent 5ec8bbbe22
commit 1b550aaec2
18 changed files with 151 additions and 146 deletions

View File

@ -64,6 +64,8 @@ LLDate::LLDate(const std::string& iso8601_date)
{
if(!fromString(iso8601_date))
{
llwarns << "date " << iso8601_date << " failed to parse; "
<< "ZEROING IT OUT" << llendl;
mSecondsSinceEpoch = DATE_EPOCH;
}
}
@ -215,7 +217,7 @@ bool LLDate::fromStream(std::istream& s)
s >> fractional;
seconds_since_epoch += fractional;
}
s.get(); // skip the Z
c = s.get(); // skip the Z
if (c != 'Z') { return false; }
mSecondsSinceEpoch = seconds_since_epoch;

View File

@ -86,6 +86,8 @@ const S32 SCULPT_REZ_2 = 8;
const S32 SCULPT_REZ_3 = 16;
const S32 SCULPT_REZ_4 = 32;
const F32 SCULPT_MIN_AREA = 0.005f;
BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
{
LLVector3 test = (pt2-pt1)%(pt3-pt2);
@ -1828,6 +1830,18 @@ void LLVolume::createVolumeFaces()
}
inline LLVector3 sculpt_rgb_to_vector(U8 r, U8 g, U8 b)
{
// maps RGB values to vector values [0..255] -> [-0.5..0.5]
LLVector3 value;
value.mV[VX] = r / 256.f - 0.5f;
value.mV[VY] = g / 256.f - 0.5f;
value.mV[VZ] = b / 256.f - 0.5f;
return value;
}
// sculpt replaces generate() for sculpted surfaces
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
{
@ -1852,40 +1866,39 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
mMesh.resize(sizeS * sizeT);
sNumMeshPoints += mMesh.size();
S32 vertex_change = 0;
F32 area = 0;
// first test to see if image has enough variation to create non-degenerate geometry
if (!data_is_empty)
{
S32 last_index = 0;
for (S32 s = 0; s < sizeS; s++)
for (S32 t = 0; t < sizeT; t++)
for (S32 s = 0; s < sizeS - 1; s++)
for (S32 t = 0; t < sizeT - 1; t++)
{
U32 x = (U32) ((F32)s/(sizeS-1) * (F32) sculpt_width);
U32 y = (U32) ((F32)t/(sizeT-1) * (F32) sculpt_height);
// first coordinate
U32 x = (U32) ((F32)s/(sizeS) * (F32) sculpt_width);
U32 y = (U32) ((F32)t/(sizeT) * (F32) sculpt_height);
if (y == sculpt_height) // stitch bottom
{
y = sculpt_height - 1;
x = sculpt_width / 2;
}
// coordinate offset by 1
U32 x2 = (U32) ((F32)(s+1)/(sizeS) * (F32) sculpt_width);
U32 y2 = (U32) ((F32)(t+1)/(sizeT) * (F32) sculpt_height);
// three points on a triagle - find the image indices first
U32 p1_index = (x + y * sculpt_width) * sculpt_components;
U32 p2_index = (x2 + y * sculpt_width) * sculpt_components;
U32 p3_index = (x + y2 * sculpt_width) * sculpt_components;
if (x == sculpt_width) // stitch sides
x = 0;
// convert image data to vectors
LLVector3 p1 = sculpt_rgb_to_vector(sculpt_data[p1_index], sculpt_data[p1_index+1], sculpt_data[p1_index+2]);
LLVector3 p2 = sculpt_rgb_to_vector(sculpt_data[p2_index], sculpt_data[p2_index+1], sculpt_data[p2_index+2]);
LLVector3 p3 = sculpt_rgb_to_vector(sculpt_data[p3_index], sculpt_data[p3_index+1], sculpt_data[p3_index+2]);
if (y == 0) // stitch top
x = sculpt_width / 2;
U32 index = (x + y * sculpt_width) * sculpt_components;
if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) +
fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) +
fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 0)
vertex_change++;
last_index = index;
// compute the area of the parallelogram by taking the length of the cross product:
// (parallegram is an approximation of two triangles)
LLVector3 cross = (p1 - p2) % (p1 - p3);
// take length squared for efficiency (no sqrt)
area += cross.magVecSquared();
}
if ((F32)vertex_change / sizeS / sizeT < 0.02) // less than 2%
if (area < SCULPT_MIN_AREA * SCULPT_MIN_AREA)
data_is_empty = TRUE;
}
@ -1977,9 +1990,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
U32 index = (x + y * sculpt_width) * sculpt_components;
pt.mPos.mV[0] = sculpt_data[index ] / 256.f - 0.5f;
pt.mPos.mV[1] = sculpt_data[index+1] / 256.f - 0.5f;
pt.mPos.mV[2] = sculpt_data[index+2] / 256.f - 0.5f;
pt.mPos = sculpt_rgb_to_vector(sculpt_data[index], sculpt_data[index+1], sculpt_data[index+2]);
}
line += sizeT;
}

View File

@ -863,6 +863,7 @@ void LLPrimitive::copyTEs(const LLPrimitive *primitivep)
setTERotation(i, tep->getRotation());
setTEBumpShinyFullbright(i, tep->getBumpShinyFullbright());
setTEMediaTexGen(i, tep->getMediaTexGen());
setTEGlow(i, tep->getGlow());
}
}

View File

@ -147,6 +147,10 @@ protected:
U8 mBump; // Bump map, shiny, and fullbright
U8 mMediaFlags; // replace with web page, movie, etc.
F32 mGlow;
// NOTE: when adding new data to this class, in addition to adding it to the serializers asLLSD/fromLLSD and the
// message packers (e.g. LLPrimitive::packTEMessage) you must also implement its copy in LLPrimitive::copyTEs()
};

View File

@ -1807,7 +1807,7 @@ BOOL LLLineEditor::prevalidateFloat(const LLWString &str)
for( ; i < len; i++ )
{
if( (decimal_point != trimmed[i] ) && !isdigit( trimmed[i] ) )
if( (decimal_point != trimmed[i] ) && !LLStringOps::isDigit( trimmed[i] ) )
{
success = FALSE;
break;
@ -1862,7 +1862,7 @@ BOOL LLLineEditor::postvalidateFloat(const LLString &str)
}
}
else
if( isdigit( trimmed[i] ) )
if( LLStringOps::isDigit( trimmed[i] ) )
{
has_digit = TRUE;
}
@ -1905,7 +1905,7 @@ BOOL LLLineEditor::prevalidateInt(const LLWString &str)
for( ; i < len; i++ )
{
if( !isdigit( trimmed[i] ) )
if( !LLStringOps::isDigit( trimmed[i] ) )
{
success = FALSE;
break;
@ -1934,7 +1934,7 @@ BOOL LLLineEditor::prevalidatePositiveS32(const LLWString &str)
S32 i = 0;
while(success && (i < len))
{
if(!isdigit(trimmed[i++]))
if(!LLStringOps::isDigit(trimmed[i++]))
{
success = FALSE;
}
@ -1968,7 +1968,7 @@ BOOL LLLineEditor::prevalidateNonNegativeS32(const LLWString &str)
S32 i = 0;
while(success && (i < len))
{
if(!isdigit(trimmed[i++]))
if(!LLStringOps::isDigit(trimmed[i++]))
{
success = FALSE;
}

View File

@ -456,7 +456,7 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
}
else if (mesg[0] == '/'
&& mesg[1]
&& isdigit(mesg[1]))
&& LLStringOps::isDigit(mesg[1]))
{
// This a special "/20" speak on a channel
S32 pos = 0;
@ -470,7 +470,7 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
channel_string[pos] = c;
pos++;
}
while(c && pos < 64 && isdigit(c));
while(c && pos < 64 && LLStringOps::isDigit(c));
// Move the pointer forward to the first non-whitespace char
// Check isspace before looping, so we can handle "/33foo"

View File

@ -298,20 +298,6 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
setVisible(FALSE);
}
// Allow us to download landmarks quickly when map is shown
class LLLandmarkFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver
{
public:
virtual void done()
{
// We need to find landmarks in all folders, so get the main
// background download going.
gInventory.startBackgroundFetch();
gInventory.removeObserver(this);
delete this;
}
};
// static
void LLFloaterWorldMap::show(void*, BOOL center_on_target)
{
@ -351,7 +337,6 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target)
LLFirstUse::useMap();
// Start speculative download of landmarks
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
gInventory.startBackgroundFetch(landmark_folder_id);

View File

@ -3678,6 +3678,14 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )
{
BOOL handled = FALSE;
// SL-51858: Key presses are not being passed to the Popup menu.
// A proper fix is non-trivial so instead just close the menu.
LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle);
if (menu->isOpen())
{
LLMenuGL::sMenuContainer->hideMenus();
}
LLView *item = NULL;
if (getChildCount() > 0)
{

View File

@ -780,7 +780,10 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
mObservers.erase(it);
break;
}
++it;
else
{
++it;
}
}
}
@ -1287,6 +1290,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
{
LLGroupMgrGroupData* group_datap;
group_iter existing_group = gGroupMgr->mGroups.find(id);
if (existing_group == gGroupMgr->mGroups.end())
{
@ -1320,7 +1324,6 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc)
void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
{
mGroups[group_datap->getID()] = group_datap;
if (mGroups.size() > MAX_CACHED_GROUPS)
{
// get rid of groups that aren't observed
@ -1330,8 +1333,8 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
if (oi == mObservers.end())
{
// not observed
LLGroupMgrGroupData* group_datap = gi->second;
delete group_datap;
LLGroupMgrGroupData* unobserved_groupp = gi->second;
delete unobserved_groupp;
mGroups.erase(gi++);
}
else
@ -1340,6 +1343,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
}
}
}
mGroups[group_datap->getID()] = group_datap;
}

View File

@ -1784,8 +1784,14 @@ void LLFolderBridge::folderOptionsMenu()
checkFolderForContentsOfType(model, is_gesture) )
{
mItems.push_back("Folder Wearables Separator");
mItems.push_back("Add To Outfit");
mItems.push_back("Replace Outfit");
// Only enable add/replace outfit for non-default folders.
const LLInventoryCategory* category = model->getCategory(mUUID);
if (!category || (LLAssetType::AT_NONE == category->getPreferredType()))
{
mItems.push_back("Add To Outfit");
mItems.push_back("Replace Outfit");
}
mItems.push_back("Take Off Items");
}
hideContextEntries(*mMenu, mItems, disabled_items);

View File

@ -168,11 +168,11 @@ LLPanelGroup::LLPanelGroup(const std::string& filename,
mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID);
mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID);
gGroupMgr->addObserver(this);
// Pass on construction of this panel to the control factory.
gUICtrlFactory->buildPanel(this, filename, &getFactoryMap());
mFilename = filename;
gGroupMgr->addObserver(this);
}
LLPanelGroup::~LLPanelGroup()

View File

@ -151,6 +151,13 @@ LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID&
hostp->addFloater(self, TRUE);
}
// Start speculative download of sounds and animations
LLUUID animation_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_ANIMATION);
gInventory.startBackgroundFetch(animation_folder_id);
LLUUID sound_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_SOUND);
gInventory.startBackgroundFetch(sound_folder_id);
// this will call refresh when we have everything.
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
if(item && !item->isComplete())
@ -577,8 +584,10 @@ void LLPreviewGesture::addAnimations()
LLComboBox* combo = mAnimationCombo;
combo->removeall();
LLString none_text = childGetText("none_text");
combo->add("-- None --", LLUUID::null);
combo->add(none_text, LLUUID::null);
// Add all the default (legacy) animations
S32 i;
@ -628,6 +637,13 @@ void LLPreviewGesture::addAnimations()
void LLPreviewGesture::addSounds()
{
LLComboBox* combo = mSoundCombo;
combo->removeall();
LLString none_text = childGetText("none_text");
combo->add(none_text, LLUUID::null);
// Get all inventory items that are sounds
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@ -655,8 +671,6 @@ void LLPreviewGesture::addSounds()
std::sort(sounds.begin(), sounds.end(), SortItemPtrsByName());
// And load up the combobox
LLComboBox* combo = mSoundCombo;
combo->removeall();
std::vector<LLInventoryItem*>::iterator it;
for (it = sounds.begin(); it != sounds.end(); ++it)
{

View File

@ -3272,7 +3272,6 @@ void LLSelectMgr::deselectAll()
mLastSentSelectionCenterGlobal.clearVec();
updatePointAt();
updateSelectionCenter();
}
void LLSelectMgr::deselectUnused()
@ -5302,11 +5301,8 @@ void LLSelectMgr::updateSelectionCenter()
mShowSelection = FALSE;
mSelectionBBox = LLBBox();
mPauseRequest = NULL;
if (gAgent.getAvatarObject())
{
gAgent.getAvatarObject()->mHUDTargetZoom = 1.f;
gAgent.getAvatarObject()->mHUDCurZoom = 1.f;
}
resetAgentHUDZoom();
}
else
{
@ -5604,6 +5600,33 @@ BOOL LLSelectMgr::setForceSelection(BOOL force)
return force;
}
void LLSelectMgr::resetAgentHUDZoom()
{
if (gAgent.getAvatarObject())
{
gAgent.getAvatarObject()->mHUDTargetZoom = 1.f;
gAgent.getAvatarObject()->mHUDCurZoom = 1.f;
}
}
void LLSelectMgr::getAgentHUDZoom(F32 &target_zoom, F32 &current_zoom) const
{
if (gAgent.getAvatarObject())
{
target_zoom = gAgent.getAvatarObject()->mHUDTargetZoom;
current_zoom = gAgent.getAvatarObject()->mHUDCurZoom;
}
}
void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom)
{
if (gAgent.getAvatarObject())
{
gAgent.getAvatarObject()->mHUDTargetZoom = target_zoom;
gAgent.getAvatarObject()->mHUDCurZoom = current_zoom;
}
}
LLObjectSelection::LLObjectSelection() :
LLRefCount(),
mSelectType(SELECT_TYPE_WORLD)

View File

@ -602,7 +602,12 @@ public:
LLVector3d getSelectionCenterGlobal() const { return mSelectionCenterGlobal; }
void updateSelectionCenter();
void updatePointAt();
void resetAgentHUDZoom();
void setAgentHUDZoom(F32 target_zoom, F32 current_zoom);
void getAgentHUDZoom(F32 &target_zoom, F32 &current_zoom) const;
void updatePointAt();
// Internal list maintenance functions. TODO: Make these private!
void remove(std::vector<LLViewerObject*>& objects);

View File

@ -1078,7 +1078,17 @@ BOOL idle_startup()
}
else if (message_response)
{
emsg << message_response;
// XUI: fix translation for strings returned during login
// We need a generic table for translations
LLString big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
if ( big_reason.size() == 0 )
{
emsg << message_response;
}
else
{
emsg << big_reason;
}
}
if(reason_response && (0 == strcmp(reason_response, "tos")))
@ -3099,67 +3109,6 @@ void init_stat_view()
stat_barp->mDisplayBar = FALSE;
// Pipeline statistics
LLStatView *pipeline_statviewp;
pipeline_statviewp = new LLStatView("pipeline stat view", "Pipeline", "", rect);
render_statviewp->addChildAtEnd(pipeline_statviewp);
stat_barp = pipeline_statviewp->addStat("Visible Drawables", &(gPipeline.mNumVisibleDrawablesStat));
stat_barp->setUnitLabel("");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 10000.f;
stat_barp->mTickSpacing = 1000.f;
stat_barp->mLabelSpacing = 5000.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("Visible Faces", &(gPipeline.mNumVisibleFacesStat));
stat_barp->setUnitLabel("");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 40000.f;
stat_barp->mTickSpacing = 5000.f;
stat_barp->mLabelSpacing = 10000.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("DirtyGeom", &(gPipeline.mGeometryChangesStat));
stat_barp->setUnitLabel("/fr");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 1000.f;
stat_barp->mTickSpacing = 100.f;
stat_barp->mLabelSpacing = 500.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("DirtyLight", &(gPipeline.mLightingChangesStat));
stat_barp->setUnitLabel("/fr");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 1000.f;
stat_barp->mTickSpacing = 100.f;
stat_barp->mLabelSpacing = 500.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("MoveList", &(gPipeline.mMoveChangesStat));
stat_barp->setUnitLabel("dr");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 1000.f;
stat_barp->mTickSpacing = 100.f;
stat_barp->mLabelSpacing = 500.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("Compiles", &(gPipeline.mCompilesStat));
stat_barp->setUnitLabel("/fr");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 1000.f;
stat_barp->mTickSpacing = 100.f;
stat_barp->mLabelSpacing = 500.f;
stat_barp->mPerSec = FALSE;
stat_barp = pipeline_statviewp->addStat("Verts Relit", &(gPipeline.mVerticesRelitStat));
stat_barp->setUnitLabel("/fr");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 40000.f;
stat_barp->mTickSpacing = 10000.f;
stat_barp->mLabelSpacing = 20000.f;
stat_barp->mPerSec = FALSE;
// Texture statistics
LLStatView *texture_statviewp;
texture_statviewp = new LLStatView("texture stat view", "Texture", "", rect);

View File

@ -155,6 +155,11 @@ LLHandle<LLObjectSelection> LLToolSelect::handleObjectSelection(LLViewerObject *
}
else
{
// Save the current zoom values because deselect resets them.
F32 target_zoom;
F32 current_zoom;
gSelectMgr->getAgentHUDZoom(target_zoom, current_zoom);
// JC - Change behavior to make it easier to select children
// of linked sets. 9/3/2002
if( !already_selected || ignore_group)
@ -171,6 +176,9 @@ LLHandle<LLObjectSelection> LLToolSelect::handleObjectSelection(LLViewerObject *
{
gSelectMgr->selectObjectAndFamily(object);
}
// restore the zoom to the previously stored values.
gSelectMgr->setAgentHUDZoom(target_zoom, current_zoom);
}
if (!gAgent.getFocusOnAvatar() && // if camera not glued to avatar

View File

@ -748,13 +748,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::resetFrameStats()
{
mCompilesStat.addValue(sCompiles);
mLightingChangesStat.addValue(mLightingChanges);
mGeometryChangesStat.addValue(mGeometryChanges);
mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
mVerticesRelitStat.addValue(mVerticesRelit);
mNumVisibleFacesStat.addValue(mNumVisibleFaces);
mNumVisibleDrawablesStat.addValue((S32)mVisibleList.size());
mTrianglesDrawn = 0;
sCompiles = 0;
@ -856,8 +850,6 @@ void LLPipeline::updateMove()
return;
}
mMoveChangesStat.addValue((F32)mMovedList.size());
for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
iter != mRetexturedList.end(); ++iter)
{

View File

@ -349,19 +349,12 @@ public:
BOOL mBackfaceCull;
S32 mTrianglesDrawn;
LLStat mTrianglesDrawnStat;
LLStat mCompilesStat;
S32 mVerticesRelit;
LLStat mVerticesRelitStat;
S32 mLightingChanges;
LLStat mLightingChangesStat;
S32 mGeometryChanges;
LLStat mGeometryChangesStat;
LLStat mMoveChangesStat;
S32 mNumVisibleFaces;
LLStat mNumVisibleFacesStat;
LLStat mNumVisibleDrawablesStat;
static S32 sCompiles;