From 7691780825940364e3faa7a682490f51491d44dc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 25 May 2017 11:11:02 +0100 Subject: SL-694 - Added extra param field for flags related to extended mesh functionality. Currently this is just one bit to flag an object as able to animate --- indra/newview/llpanelvolume.cpp | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index c9f8683e0e..423d0a8d88 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -86,6 +86,7 @@ BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters { + childSetCommitCallback("Animated Mesh Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitAnimatedMeshCheckbox, this, _1, _2), NULL); childSetCommitCallback("Flexible1D Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL); childSetCommitCallback("FlexNumSections",onCommitFlexible,this); getChild("FlexNumSections")->setValidateBeforeCommit(precommitValidate); @@ -347,7 +348,16 @@ void LLPanelVolume::getState( ) getChildView("Light Focus")->setEnabled(false); getChildView("Light Ambiance")->setEnabled(false); } - + + // Animated Mesh + BOOL is_animated_mesh = volobjp && volobjp->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG; + getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); + // AXON FIXME CHECK FOR SKIN INFO ALSO + // WHAT ABOUT isPermanentEnforced? + // What about linksets with some skinned objects? + BOOL can_be_animated_mesh = volobjp && volobjp->canBeAnimatedMesh() && editable; + getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(can_be_animated_mesh); + // Flexible properties BOOL is_flexible = volobjp && volobjp->isFlexible(); getChild("Flexible1D Checkbox Ctrl")->setValue(is_flexible); @@ -899,6 +909,31 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) self->refresh(); } +void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*) +{ + LLViewerObject* objectp = mObject; + if (!objectp || (objectp->getPCode() != LL_PCODE_VOLUME)) + { + return; + } + LLVOVolume *volobjp = (LLVOVolume *)objectp; + BOOL animated_mesh = getChild("Animated Mesh Checkbox Ctrl")->getValue(); + U32 flags = volobjp->getExtendedMeshFlags(); + U32 new_flags = flags; + if (animated_mesh) + { + new_flags |= LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG; + } + else + { + new_flags &= ~LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG; + } + if (new_flags != flags) + { + volobjp->setExtendedMeshFlags(new_flags); + } +} + void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) { if (mObject->flagObjectPermanent()) -- cgit v1.3 From 4d68945595227b0f863a1c496be5da0f3c3c5113 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 30 May 2017 15:59:23 +0100 Subject: SL-694 - UI initialization, set mType in LLExtendedMeshParams constructor --- indra/llprimitive/llprimitive.cpp | 1 + indra/newview/llpanelvolume.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 54b87fec78..c847cf653f 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -2033,6 +2033,7 @@ bool LLLightImageParams::fromLLSD(LLSD& sd) LLExtendedMeshParams::LLExtendedMeshParams() { + mType = PARAMS_EXTENDED_MESH; mFlags = 0; } diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 423d0a8d88..58cbede57b 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -597,6 +597,7 @@ void LLPanelVolume::clearCtrls() getChildView("Light Radius")->setEnabled(false); getChildView("Light Falloff")->setEnabled(false); + getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(false); getChildView("Flexible1D Checkbox Ctrl")->setEnabled(false); getChildView("FlexNumSections")->setEnabled(false); getChildView("FlexGravity")->setEnabled(false); -- cgit v1.3 From c5dc0ee36e8d17fd0cf25f5a1fbdfb8609a64ee0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 9 Jun 2017 21:13:54 +0100 Subject: SL-704 - code cleanup --- indra/newview/llcontrolavatar.cpp | 5 +--- indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/llpanelvolume.cpp | 4 +-- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llvoavatar.cpp | 54 ++++++++++++++++++++------------------ indra/newview/llvograss.cpp | 2 +- indra/newview/llvovolume.cpp | 10 +++---- indra/newview/llvovolume.h | 4 +-- 8 files changed, 42 insertions(+), 41 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 1ecd3305ed..a8caba08af 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -92,14 +92,11 @@ void LLControlAvatar::updateGeom(LLVOVolume *obj) LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj) { - // TRIF Lifted from LLPreviewAnimation + // AXON Lifted from LLPreviewAnimation LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR); cav->createDrawable(&gPipeline); cav->mIsDummy = TRUE; cav->mSpecialRenderMode = 1; - //cav->setPositionAgent(obj->getRenderPosition()); - //cav->slamPosition(); - //cav->setRotation(obj->getRotation()); cav->updateJointLODs(); cav->updateGeometry(cav->mDrawable); cav->startMotion(ANIM_AGENT_STAND, 5.0f); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index fa4fd7c533..869e37e08c 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -468,7 +468,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); // AXON fix - if (avatarp->isDead() || /*avatarp->mIsDummy ||*/ avatarp->mDrawable.isNull()) + if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) { return; } diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 58cbede57b..f34194db19 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -355,8 +355,8 @@ void LLPanelVolume::getState( ) // AXON FIXME CHECK FOR SKIN INFO ALSO // WHAT ABOUT isPermanentEnforced? // What about linksets with some skinned objects? - BOOL can_be_animated_mesh = volobjp && volobjp->canBeAnimatedMesh() && editable; - getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(can_be_animated_mesh); + BOOL can_be_animated_object = volobjp && volobjp->canBeAnimatedObject() && editable; + getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(can_be_animated_object); // Flexible properties BOOL is_flexible = volobjp && volobjp->isFlexible(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7fd87f99d3..db237d30ea 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5091,7 +5091,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) return; } - if (!volp->isAnimatedMesh()) + if (!volp->isAnimatedObject()) { LL_WARNS("Messaging") << "AXON Received animation state for non-animated object" << uuid << LL_ENDL; return; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7ba264f35a..1c9f79b200 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1944,7 +1944,9 @@ void LLVOAvatar::resetSkeleton(bool reset_animations) //----------------------------------------------------------------------------- void LLVOAvatar::releaseMeshData() { - if (sInstances.size() < AVATAR_RELEASE_THRESHOLD)// || mIsDummy) + // AXON what should we be doing here for control avs? Why are + // dummies treated differently in the first place? + if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy) { return; } @@ -2740,7 +2742,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() LLPartData::LL_PART_EMISSIVE_MASK | // LLPartData::LL_PART_FOLLOW_SRC_MASK | LLPartData::LL_PART_TARGET_POS_MASK ); - // TRIF skip cloud effects for dummy avs as well + // AXON skip cloud effects for dummy avs as well if (!mIsDummy && !isTooComplex()) // do not generate particles for overly-complex avatars { setParticleSource(particle_parameters, getID()); @@ -3533,7 +3535,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } // change animation time quanta based on avatar render load - if (!isSelf())// && !mIsDummy) + // AXON how should control avs be handled here? + bool is_pure_dummy = mIsDummy && !isControlAvatar(); + if (!isSelf() && !is_pure_dummy) { F32 time_quantum = clamp_rescale((F32)sInstances.size(), 10.f, 35.f, 0.f, 0.25f); F32 pixel_area_scale = clamp_rescale(mPixelArea, 100, 5000, 1.f, 0.f); @@ -3655,8 +3659,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) //-------------------------------------------------------------------- // Propagate viewer object rotation to root of avatar //-------------------------------------------------------------------- - // FIXME TRIF - just skipping this for now for all dummy avs - if (!mIsDummy && !isAnyAnimationSignaled(AGENT_NO_ROTATE_ANIMS, NUM_AGENT_NO_ROTATE_ANIMS)) + // AXON - also skip for control avatars + if (!isControlAvatar() && !isAnyAnimationSignaled(AGENT_NO_ROTATE_ANIMS, NUM_AGENT_NO_ROTATE_ANIMS)) { LLQuaternion iQ; LLVector3 upDir( 0.0f, 0.0f, 1.0f ); @@ -4356,11 +4360,12 @@ U32 LLVOAvatar::renderSkinned() } BOOL first_pass = TRUE; + bool is_pure_dummy = mIsDummy && !isControlAvatar(); if (!LLDrawPoolAvatar::sSkipOpaque) { if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) { - if (isTextureVisible(TEX_HEAD_BAKED))// || mIsDummy) + if (isTextureVisible(TEX_HEAD_BAKED) || is_pure_dummy) { LLViewerJoint* head_mesh = getViewerJoint(MESH_ID_HEAD); if (head_mesh) @@ -4370,7 +4375,7 @@ U32 LLVOAvatar::renderSkinned() first_pass = FALSE; } } - if (isTextureVisible(TEX_UPPER_BAKED))// || mIsDummy) + if (isTextureVisible(TEX_UPPER_BAKED) || is_pure_dummy) { LLViewerJoint* upper_mesh = getViewerJoint(MESH_ID_UPPER_BODY); if (upper_mesh) @@ -4380,7 +4385,7 @@ U32 LLVOAvatar::renderSkinned() first_pass = FALSE; } - if (isTextureVisible(TEX_LOWER_BAKED))// || mIsDummy) + if (isTextureVisible(TEX_LOWER_BAKED) || is_pure_dummy) { LLViewerJoint* lower_mesh = getViewerJoint(MESH_ID_LOWER_BODY); if (lower_mesh) @@ -4437,20 +4442,14 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) } first_pass = FALSE; } - // Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair) - // TODO: 1.25 will be able to switch this logic back to calling isTextureVisible(); - if (!mIsDummy) + if (isTextureVisible(TEX_HAIR_BAKED)) { - if ( (getImage(TEX_HAIR_BAKED, 0) && getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE) - || LLDrawPoolAlpha::sShowDebugAlpha) - { - LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR); - if (hair_mesh) - { - num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); - } - first_pass = FALSE; - } + LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR); + if (hair_mesh) + { + num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); + } + first_pass = FALSE; } if (LLPipeline::sImpostorRender) { @@ -4491,7 +4490,9 @@ U32 LLVOAvatar::renderRigid() gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); } - if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy) + bool is_pure_dummy = mIsDummy && !isControlAvatar(); + + if (isTextureVisible(TEX_EYES_BAKED) || is_pure_dummy) { LLViewerJoint* eyeball_left = getViewerJoint(MESH_ID_EYEBALL_LEFT); LLViewerJoint* eyeball_right = getViewerJoint(MESH_ID_EYEBALL_RIGHT); @@ -5529,7 +5530,7 @@ void LLVOAvatar::rebuildAttachmentOverrides() void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo) { bool non_attached_case = false; - // FIXME TRIF - will this work if vo has child objects? + // FIXME AXON - will this work if vo has child objects? if (vo->mControlAvatar) { non_attached_case = true; @@ -5759,7 +5760,7 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const //----------------------------------------------------------------------------- // resetJointsOnDetach //----------------------------------------------------------------------------- -// TRIF handle NPC case +// AXON handle NPC case void LLVOAvatar::resetJointsOnDetach(LLViewerObject *vo) { LLVOAvatar *av = vo->getAvatarAncestor(); @@ -5788,7 +5789,7 @@ void LLVOAvatar::resetJointsOnDetach(LLViewerObject *vo) //----------------------------------------------------------------------------- // resetJointsOnDetach //----------------------------------------------------------------------------- -// TRIF handle NPC case +// AXON handle NPC case void LLVOAvatar::resetJointsOnDetach(const LLUUID& mesh_id) { //Subsequent joints are relative to pelvis @@ -5867,6 +5868,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; + // AXON update for control avs? if (mIsDummy) { outNorm.setVec(z_vec); @@ -5896,6 +5898,7 @@ F32 LLVOAvatar::getTimeDilation() //----------------------------------------------------------------------------- F32 LLVOAvatar::getPixelArea() const { + // AXON update for control avatars if (mIsDummy) { return 100000.f; @@ -6827,6 +6830,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) BOOL LLVOAvatar::isVisible() const { + // AXON should we flag control avs as invisible? return mDrawable.notNull() && (!mOrphaned || isSelf()) && (mDrawable->isVisible() || mIsDummy); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index e7e4e6f228..337f969f3d 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -92,7 +92,7 @@ LLVOGrass::~LLVOGrass() void LLVOGrass::updateSpecies() { - // TRIF is grass still even supported? This use of state seems odd. + // AXON is grass still even supported? This use of state seems odd. mSpecies = getAttachmentState(); if (!sSpeciesTable.count(mSpecies)) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a2f417a5cc..59e1895bc6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3308,7 +3308,7 @@ void LLVOVolume::setExtendedMeshFlags(U32 flags) } } -bool LLVOVolume::canBeAnimatedMesh() const +bool LLVOVolume::canBeAnimatedObject() const { if (!isMesh()) { @@ -3322,9 +3322,9 @@ bool LLVOVolume::canBeAnimatedMesh() const return true; } -bool LLVOVolume::isAnimatedMesh() const +bool LLVOVolume::isAnimatedObject() const { - return canBeAnimatedMesh() && (getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG); + return canBeAnimatedObject() && (getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG); } //---------------------------------------------------------------------------- @@ -4850,11 +4850,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic(); - // TRIF why this variable? Only different from rigged if + // AXON why this variable? Only different from rigged if // there are no LLFaces associated with the drawable. bool is_rigged = false; - // TRIF handle NPC case + // AXON handle NPC case if (rigged && pAvatarVO) { pAvatarVO->addAttachmentOverridesForObject(vobj); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 5918166aff..75dabd961a 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -269,8 +269,8 @@ public: // Extended Mesh Properties U32 getExtendedMeshFlags() const; void setExtendedMeshFlags(U32 flags); - bool canBeAnimatedMesh() const; - bool isAnimatedMesh() const; + bool canBeAnimatedObject() const; + bool isAnimatedObject() const; // Functions that deal with media, or media navigation -- cgit v1.3 From 3c8ff04c0fa5c891a0454d7542f78f65eb5032dc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 21 Jun 2017 15:25:50 +0100 Subject: SL-722 - animated object checkbox is based on state of root prim. Enabled only when root prim or whole linkset is being edited. --- indra/newview/llpanelvolume.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index f34194db19..5e87c174d6 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -238,6 +238,11 @@ void LLPanelVolume::getState( ) { volobjp = (LLVOVolume *)objectp; } + LLVOVolume *root_volobjp = NULL; + if (root_objectp && (root_objectp->getPCode() == LL_PCODE_VOLUME)) + { + root_volobjp = (LLVOVolume *)root_objectp; + } if( !objectp ) { @@ -350,13 +355,17 @@ void LLPanelVolume::getState( ) } // Animated Mesh - BOOL is_animated_mesh = volobjp && volobjp->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG; + BOOL is_animated_mesh = root_volobjp && root_volobjp->isAnimatedObject(); getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); // AXON FIXME CHECK FOR SKIN INFO ALSO // WHAT ABOUT isPermanentEnforced? // What about linksets with some skinned objects? - BOOL can_be_animated_object = volobjp && volobjp->canBeAnimatedObject() && editable; - getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(can_be_animated_object); + BOOL enabled_animated_object_box = FALSE; + if (root_volobjp && root_volobjp == volobjp) + { + enabled_animated_object_box = root_volobjp && root_volobjp->canBeAnimatedObject() && editable; + } + getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box); // Flexible properties BOOL is_flexible = volobjp && volobjp->isFlexible(); -- cgit v1.3 From 0b57379b127b9ef5f925f52176544ac8f447ce1f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 27 Jun 2017 20:52:02 +0100 Subject: SL-722 - animated mesh checkbox inactive unless there's a single object or linkset, all volumes --- indra/newview/llpanelvolume.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 5e87c174d6..c5fbc1f71b 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -266,6 +266,8 @@ void LLPanelVolume::getState( ) BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1; + BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && + LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1; // Select Single Message if (single_volume) @@ -355,7 +357,7 @@ void LLPanelVolume::getState( ) } // Animated Mesh - BOOL is_animated_mesh = root_volobjp && root_volobjp->isAnimatedObject(); + BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); // AXON FIXME CHECK FOR SKIN INFO ALSO // WHAT ABOUT isPermanentEnforced? @@ -363,7 +365,7 @@ void LLPanelVolume::getState( ) BOOL enabled_animated_object_box = FALSE; if (root_volobjp && root_volobjp == volobjp) { - enabled_animated_object_box = root_volobjp && root_volobjp->canBeAnimatedObject() && editable; + enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable; } getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box); -- cgit v1.3 From 3346281be35ab6fa3a46c7f166bb1f7da066d5e3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 18 Sep 2017 19:51:44 +0100 Subject: SL-790 - Adding UI checks for actions that would increase the animated object attachment count --- indra/llcommon/indra_constants.h | 1 + indra/newview/llpanelvolume.cpp | 8 ++++++++ indra/newview/llviewerjointattachment.cpp | 19 +++++++++++++++++++ indra/newview/llviewerjointattachment.h | 1 + indra/newview/llvoavatar.cpp | 29 +++++++++++++++++++++++------ indra/newview/llvoavatar.h | 5 +++-- 6 files changed, 55 insertions(+), 8 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index fda84aa5a8..99ad5f2473 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -154,6 +154,7 @@ const U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT; // attachment constants const S32 MAX_AGENT_ATTACHMENTS = 38; +const S32 MAX_AGENT_ANIMATED_OBJECT_ATTACHMENTS = 1; const U8 ATTACHMENT_ADD = 0x80; // god levels diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index c5fbc1f71b..6a71da3918 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -78,6 +78,8 @@ #include "llviewercontrol.h" #include "llmeshrepository.h" +#include "llvoavatarself.h" + #include // "Features" Tab @@ -366,6 +368,12 @@ void LLPanelVolume::getState( ) if (root_volobjp && root_volobjp == volobjp) { enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable; + if (enabled_animated_object_box && !is_animated_mesh && + root_volobjp->isAttachment() && !gAgentAvatarp->canAttachMoreAnimatedObjects()) + { + // Turning this attachment animated would cause us to exceed the limit. + enabled_animated_object_box = false; + } } getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box); diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 66e392ac42..cf9243a871 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -356,6 +356,25 @@ void LLViewerJointAttachment::setOriginalPosition(LLVector3& position) setPosition(position); } +//----------------------------------------------------------------------------- +// getNumAnimatedObjects() +//----------------------------------------------------------------------------- +S32 LLViewerJointAttachment::getNumAnimatedObjects() const +{ + S32 count = 0; + for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin(); + iter != mAttachedObjects.end(); + ++iter) + { + const LLViewerObject *attached_object = *iter; + if (attached_object->isAnimatedObject()) + { + count++; + } + } + return count; +} + //----------------------------------------------------------------------------- // clampObjectPosition() //----------------------------------------------------------------------------- diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h index 9addafaee1..9641ab4208 100644 --- a/indra/newview/llviewerjointattachment.h +++ b/indra/newview/llviewerjointattachment.h @@ -77,6 +77,7 @@ public: S32 getGroup() const { return mGroup; } S32 getPieSlice() const { return mPieSlice; } S32 getNumObjects() const { return mAttachedObjects.size(); } + S32 getNumAnimatedObjects() const; void clampObjectPosition(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4664eeffc4..5e0c5d6858 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6579,19 +6579,36 @@ U32 LLVOAvatar::getNumAttachments() const //----------------------------------------------------------------------------- // canAttachMoreObjects() +// Returns true if we can attach more objects. //----------------------------------------------------------------------------- -BOOL LLVOAvatar::canAttachMoreObjects() const +BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const { - return (getNumAttachments() < MAX_AGENT_ATTACHMENTS); + return (getNumAttachments() + n) <= MAX_AGENT_ATTACHMENTS; } //----------------------------------------------------------------------------- -// canAttachMoreObjects() -// Returns true if we can attach more objects. +// getNumAnimatedObjectAttachments() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const +U32 LLVOAvatar::getNumAnimatedObjectAttachments() const { - return (getNumAttachments() + n) <= MAX_AGENT_ATTACHMENTS; + U32 num_attachments = 0; + for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); + iter != mAttachmentPoints.end(); + ++iter) + { + const LLViewerJointAttachment *attachment_pt = (*iter).second; + num_attachments += attachment_pt->getNumAnimatedObjects(); + } + return num_attachments; +} + +//----------------------------------------------------------------------------- +// canAttachMoreAnimatedObjects() +// Returns true if we can attach more animated objects. +//----------------------------------------------------------------------------- +BOOL LLVOAvatar::canAttachMoreAnimatedObjects(U32 n) const +{ + return (getNumAnimatedObjectAttachments() + n) <= MAX_AGENT_ANIMATED_OBJECT_ATTACHMENTS; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1a39c3a3d9..1a87a62946 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -777,10 +777,11 @@ public: BOOL hasHUDAttachment() const; LLBBox getHUDBBox() const; void resetHUDAttachments(); - BOOL canAttachMoreObjects() const; - BOOL canAttachMoreObjects(U32 n) const; + BOOL canAttachMoreObjects(U32 n=1) const; + BOOL canAttachMoreAnimatedObjects(U32 n=1) const; protected: U32 getNumAttachments() const; // O(N), not O(1) + U32 getNumAnimatedObjectAttachments() const; // O(N), not O(1) /** Wearables ** ** -- cgit v1.3 From 2f1b75f03e8066b54d9dae16ab29095752c4ee8a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Nov 2017 19:24:53 +0000 Subject: SL-704 - first pass cleaning up comments. Also added LLControlAvatar::initInstance() as a potential hook for optimizations. --- indra/newview/llcontrolavatar.cpp | 8 +++++++- indra/newview/llcontrolavatar.h | 1 + indra/newview/lldrawpoolavatar.cpp | 1 - indra/newview/llpanelobject.cpp | 3 ++- indra/newview/llpanelvolume.cpp | 3 --- indra/newview/llselectmgr.cpp | 6 +++--- indra/newview/llviewermessage.cpp | 13 +++++++------ indra/newview/llviewerobject.cpp | 2 +- indra/newview/llvoavatar.cpp | 22 +++++++++++----------- indra/newview/llvograss.cpp | 1 - indra/newview/llvovolume.cpp | 17 ++++------------- indra/newview/llvovolume.h | 3 --- indra/newview/pipeline.cpp | 1 - 13 files changed, 36 insertions(+), 45 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 848a8b0d40..afa6be188d 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -49,6 +49,13 @@ LLControlAvatar::~LLControlAvatar() { } +// virtual +void LLControlAvatar::initInstance() +{ + // AXON - potential optimizations here - avoid creating system avatar mesh since it's not used. + LLVOAvatar::initInstance(); +} + void LLControlAvatar::matchVolumeTransform() { if (mRootVolp) @@ -173,7 +180,6 @@ void LLControlAvatar::updateVolumeGeom() LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj) { - // AXON Lifted from LLPreviewAnimation LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR); cav->mRootVolp = obj; diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 308d431615..a0f7912d24 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -37,6 +37,7 @@ class LLControlAvatar: public: LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); + virtual void initInstance(); // Called after construction to initialize the class. virtual ~LLControlAvatar(); void matchVolumeTransform(); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 30560eeb7b..206d4f4c7a 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -467,7 +467,6 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); -// AXON fix if (avatarp->isDead() || (avatarp->mIsDummy && !avatarp->isControlAvatar()) || avatarp->mDrawable.isNull()) { return; diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 43d6245a63..8f2cf5bb89 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -343,7 +343,8 @@ void LLPanelObject::getState( ) // can move or rotate only linked group with move permissions, or sub-object with move and modify perms - // AXON it's not entirely clear what the motivation is to have 3 + // AXON REVIEW BEFORE RELEASE, behavior during edit is glitchy. + // it's not entirely clear what the motivation is to have 3 // different rules for enablement. At least the difference between // move and rotate looks like just a parens error, have updated accordingly. BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ((objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 6a71da3918..5c4c430f83 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -361,9 +361,6 @@ void LLPanelVolume::getState( ) // Animated Mesh BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); - // AXON FIXME CHECK FOR SKIN INFO ALSO - // WHAT ABOUT isPermanentEnforced? - // What about linksets with some skinned objects? BOOL enabled_animated_object_box = FALSE; if (root_volobjp && root_volobjp == volobjp) { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f666f447cb..473d7e5b5f 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -664,9 +664,9 @@ void LLSelectMgr::confirmUnlinkObjects(const LLSD& notification, const LLSD& res // the selection and give an error message when the uer has a // reasonable expectation for the link to work, but it will fail. // -// AXON - additional check that if the selection includes at least one -// animated object, the total mesh triangle count cannot exceed the -// designated limit. +// For animated objects, there's additional check that if the +// selection includes at least one animated object, the total mesh +// triangle count cannot exceed the designated limit. bool LLSelectMgr::enableLinkObjects() { bool new_value = false; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0b2931886a..7260d7f928 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5106,7 +5106,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) LLControlAvatar *avatarp = volp->getControlAvatar(); if (!avatarp) { - LL_WARNS() << "AXON no control avatar, ignoring" << LL_ENDL; + LL_WARNS("Messaging") << "AXON no control avatar, ignoring" << LL_ENDL; return; } @@ -5120,17 +5120,19 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) if (!avatarp->mPlaying) { avatarp->mPlaying = true; - avatarp->updateVolumeGeom(); - avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); + if (!avatarp->mRootVolp->isAnySelected()) + { + avatarp->updateVolumeGeom(); + avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); + } } #else - // AXON + // AXON REMOVE BEFORE RELEASE? // In this block we switch back into static mode when no animations are // playing. This is mostly useful for debugging. if (num_blocks > 0 && !avatarp->mPlaying) { avatarp->mPlaying = true; - // AXON need to update all objects in the linkset, not just the one where animation is playing if (!avatarp->mRootVolp->isAnySelected()) { avatarp->updateVolumeGeom(); @@ -5140,7 +5142,6 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) else if (num_blocks == 0 && avatarp->mPlaying) { avatarp->mPlaying = false; - // AXON need to update all objects in the linkset, not just the one where animation is playing if (!avatarp->mRootVolp->isAnySelected()) { avatarp->updateVolumeGeom(); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 3435217fa4..7d370aff35 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3609,7 +3609,7 @@ F32 LLViewerObject::recursiveGetEstTrianglesMax() const S32 LLViewerObject::getAnimatedObjectMaxTris() const { S32 max_tris = 0; - // AXON remove after server testing done + // AXON REMOVE AFTER SERVER TESTING DONE if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits")) { max_tris = S32_MAX; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cdbe87de75..ea7214d937 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1108,7 +1108,7 @@ void LLVOAvatar::cleanupClass() } // virtual -void LLVOAvatar::initInstance(void) +void LLVOAvatar::initInstance() { //------------------------------------------------------------------------- // register motions @@ -3470,7 +3470,7 @@ void LLVOAvatar::updateDebugText() LLVOVolume *volp = control_av->mRootVolp; if (volp) { - volp->requestInventory(); // AXON should be a no-op if already requested or fetched? + volp->requestInventory(); LLViewerInventoryItem* item = volp->getInventoryItemByAsset(motionp->getID()); if (item) { @@ -3658,10 +3658,9 @@ void LLVOAvatar::updateFootstepSounds() void LLVOAvatar::computeUpdatePeriod() { bool visually_muted = isVisuallyMuted(); - // AXON FIXME this expression is a crawling horror if (mDrawable.notNull() && isVisible() - && (!isSelf() || visually_muted) // AXON would the self ever be visually muted? + && (!isSelf() || visually_muted) && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate @@ -3881,7 +3880,8 @@ void LLVOAvatar::updateTimeStep() bool is_pure_dummy = mIsDummy && !isControlAvatar(); if (!isSelf() && !is_pure_dummy) // ie, non-self avatars, and animated objects will be affected. { - // AXON note that sInstances counts animated objects and standard avatars in the same bucket. Is this desirable? + // AXON note that sInstances counts animated objects and + // standard avatars in the same bucket. Is this desirable? F32 time_quantum = clamp_rescale((F32)sInstances.size(), 10.f, 35.f, 0.f, 0.25f); F32 pixel_area_scale = clamp_rescale(mPixelArea, 100, 5000, 1.f, 0.f); F32 time_step = time_quantum * pixel_area_scale; @@ -3999,7 +3999,9 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w //-------------------------------------------------------------------- if (!isControlAvatar() && !isAnyAnimationSignaled(AGENT_NO_ROTATE_ANIMS, NUM_AGENT_NO_ROTATE_ANIMS)) { - // AXON - should we always skip for control avatars? Rotation fixups for avatars in motion, some may be relevant. + // AXON - should we always skip for control avatars? + // Rotation fixups for avatars in motion, some may be + // relevant. updateOrientation(agent, speed, delta_time); } } @@ -5999,7 +6001,6 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const //----------------------------------------------------------------------------- // removeAttachmentOverridesForObject //----------------------------------------------------------------------------- -// AXON handle NPC case void LLVOAvatar::removeAttachmentOverridesForObject(LLViewerObject *vo) { if (vo->getAvatar() != this && vo->getAvatarAncestor() != this) @@ -6028,7 +6029,6 @@ void LLVOAvatar::removeAttachmentOverridesForObject(LLViewerObject *vo) //----------------------------------------------------------------------------- // removeAttachmentOverridesForObject //----------------------------------------------------------------------------- -// AXON handle NPC case void LLVOAvatar::removeAttachmentOverridesForObject(const LLUUID& mesh_id) { //Subsequent joints are relative to pelvis @@ -6107,7 +6107,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; - // AXON update for control avs? + // AXON UPDATE FOR CONTROL AVS? if (mIsDummy) { outNorm.setVec(z_vec); @@ -6137,7 +6137,7 @@ F32 LLVOAvatar::getTimeDilation() //----------------------------------------------------------------------------- F32 LLVOAvatar::getPixelArea() const { - // AXON update for control avatars + // AXON UPDATE FOR CONTROL AVATARS if (mIsDummy) { return 100000.f; @@ -6675,7 +6675,7 @@ U32 LLVOAvatar::getNumAnimatedObjectAttachments() const S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const { S32 max_attach = 0; - // AXON remove after server testing done + // AXON REMOVE AFTER SERVER TESTING DONE if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits")) { max_attach = MAX_AGENT_ATTACHMENTS; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 337f969f3d..5def0f0c0f 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -92,7 +92,6 @@ LLVOGrass::~LLVOGrass() void LLVOGrass::updateSpecies() { - // AXON is grass still even supported? This use of state seems odd. mSpecies = getAttachmentState(); if (!sSpeciesTable.count(mSpecies)) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 54029f75fd..96f2255265 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -91,7 +91,6 @@ U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1; BOOL gAnimateTextures = TRUE; //extern BOOL gHideSelectedObjects; -// AXON TEMP S32 LLVOVolume::sForceLOD = -1; F32 LLVOVolume::sLODFactor = 1.f; F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop @@ -1234,7 +1233,7 @@ void LLVOVolume::sculpt() S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius) { S32 cur_detail; - // AXON TEMP + // AXON TEMP REMOVE if (LLVOVolume::sForceLOD>=0 && LLVOVolume::sForceLOD<=3) { cur_detail = LLVOVolume::sForceLOD; @@ -3341,8 +3340,6 @@ BOOL LLVOVolume::isRiggedMesh() const } //---------------------------------------------------------------------------- -// AXON - methods related to extended mesh flags - U32 LLVOVolume::getExtendedMeshFlags() const { const LLExtendedMeshParams *param_block = @@ -3412,7 +3409,6 @@ bool LLVOVolume::canBeAnimatedObject() const F32 est_tris = recursiveGetEstTrianglesMax(); if (est_tris < 0 || est_tris > getAnimatedObjectMaxTris()) { - LL_DEBUGS("AXON") << "est_tris " << est_tris << " is outside limit of 0-" << getAnimatedObjectMaxTris() << LL_ENDL; return false; } return true; @@ -3441,6 +3437,8 @@ bool LLVOVolume::isAnimatedObject() const // Only the root of a linkset can have the animated object flag set // Only the root of a linkset can have a control avatar (iff the animated object flag is set) // Only skinned mesh volumes can have the animated object flag set, or a control avatar +// +// AXON REVIEW BASED ON FINAL RULES bool LLVOVolume::isAnimatedObjectStateConsistent() const { if (!canBeAnimatedObject()) @@ -3486,16 +3484,9 @@ void LLVOVolume::updateAnimatedObjectStateOnReparent(LLViewerObject *old_parent, // AXON - depending on whether animated objects can be attached, // we may want to include or remove the isAvatar() check. + // BUG?? if (new_parent && !new_parent->isAvatar()) { -#if 0 // AXON - MAINT-7819 - // Object should inherit control avatar and animated mesh flag - // from parent, so clear them out from our own state - if (getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG) - { - setExtendedMeshFlags(getExtendedMeshFlags() & ~LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG); - } -#endif if (mControlAvatar.notNull()) { LLControlAvatar *av = mControlAvatar; diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index f12eb168f6..afeb1c852b 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -281,9 +281,6 @@ public: bool isAnimatedObjectStateConsistent() const; void updateAnimatedObjectStateOnReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); - // AXON For animated objects, we need to track animations requested - // per-object, then reconcile those to manage the control avatar - // animation state. std::map mObjectSignaledAnimations; // requested state of Animation name/value // Functions that deal with media, or media navigation diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 436c0cbf43..bab81f4294 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3352,7 +3352,6 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f { #if 1 // AXON debugging - LLVOVolume *vol_obj = drawablep->getVOVolume(); if (vol_obj && vol_obj->isAnimatedObject() && vol_obj->isRiggedMesh()) { -- cgit v1.3 From 267e31717cc89c97fc077ae6ffef13e5ce59f18d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 2 Apr 2018 21:57:31 +0100 Subject: SL-897 - notification wording fixes --- indra/newview/llpanelvolume.cpp | 12 ++++++++++++ indra/newview/skins/default/xui/en/notifications.xml | 14 +++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 6c17fb9f8d..5e7aef69f1 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -365,6 +365,18 @@ void LLPanelVolume::getState( ) if (root_volobjp && root_volobjp == volobjp) { enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable; +#if 0 + if (!enabled_animated_object_box) + { + LL_INFOS() << "not enabled: srv " << single_root_volume << " root_volobjp " << (bool) root_volobjp << LL_ENDL; + if (root_volobjp) + { + LL_INFOS() << " cba " << root_volobjp->canBeAnimatedObject() + << " editable " << editable << " permModify() " << root_volobjp->permModify() + << " ispermenf " << root_volobjp->isPermanentEnforced() << LL_ENDL; + } + } +#endif if (enabled_animated_object_box && !is_animated_mesh && root_volobjp->isAttachment() && !gAgentAvatarp->canAttachMoreAnimatedObjects()) { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 982d12d702..671a185fe2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10202,7 +10202,7 @@ Unable to create requested object. The region is full. name="CantCreateAnimatedObjectTooLarge" type="notify"> fail -Unable to create requested animated object because it exceeds the size limit. +Unable to create requested animated object because it exceeds the rigged triangle limit. fail -Can't link these objects because the resulting animated object would exceed the size limit. +Can't link these objects because the resulting animated object would exceed the rigged triangle limit. fail -Can't make this object into an animated object because it would exceed the size limit. +Can't make this object into an animated object because it would exceed the rigged triangle limit. + + + + fail +Can't change animated object state for this object because it would cause parcel limit to be exceeded.