diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-16 19:24:53 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-16 19:24:53 +0000 |
commit | 2f1b75f03e8066b54d9dae16ab29095752c4ee8a (patch) | |
tree | 61ca8d02d2e947c07b86d3c860f6209d0f130d6a | |
parent | 2c8007bc4b295b69b5b8a9c540876e402e6d63dc (diff) |
SL-704 - first pass cleaning up comments. Also added LLControlAvatar::initInstance() as a potential hook for optimizations.
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llcontrolavatar.h | 1 | ||||
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanelobject.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llvograss.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 3 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 1 |
13 files changed, 36 insertions, 45 deletions
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<LLUICtrl>("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<LLUUID, S32> 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()) { |