diff options
author | Merov Linden <merov@lindenlab.com> | 2013-10-14 16:30:08 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-10-14 16:30:08 -0700 |
commit | c2f5365f986aab49d5c7cfa2834a68f5b35c09c2 (patch) | |
tree | 4cbbf7bd730ad0ad3aa00569c4364dad51de6082 /indra/llcharacter | |
parent | 0cf0efb6e31d505bc079f757fe7d832110797199 (diff) | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/llcharacter')
46 files changed, 112 insertions, 35 deletions
diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index a1712699eb..2573417b26 100644..100755 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -16,6 +16,10 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ${LLXML_SYSTEM_INCLUDE_DIRS} + ) set(llcharacter_SOURCE_FILES llanimationstates.cpp @@ -76,6 +80,15 @@ list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) +target_link_libraries( + llcharacter + ${LLCOMMON_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLMESSAGE_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLXML_LIBRARIES} + ) + # Add tests if (LL_TESTS) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 155226cf17..c16cae1bbc 100644..100755 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -46,7 +46,7 @@ LLUUID const ANIM_AGENT_BLOW_KISS ("db84829b-462c-ee83-1e27-9bbee66b LLUUID const ANIM_AGENT_BORED ("b906c4ba-703b-1940-32a3-0c7f7d791510"); LLUUID const ANIM_AGENT_BOW ("82e99230-c906-1403-4d9c-3889dd98daba"); LLUUID const ANIM_AGENT_BRUSH ("349a3801-54f9-bf2c-3bd0-1ac89772af01"); -LLUUID const ANIM_AGENT_BUSY ("efcf670c-2d18-8128-973a-034ebc806b67"); +LLUUID const ANIM_AGENT_DO_NOT_DISTURB ("efcf670c-2d18-8128-973a-034ebc806b67"); LLUUID const ANIM_AGENT_CLAP ("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); LLUUID const ANIM_AGENT_COURTBOW ("9ba1c942-08be-e43a-fb29-16ad440efc50"); LLUUID const ANIM_AGENT_CROUCH ("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); @@ -211,7 +211,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_BORED]= mAnimStringTable.addString("express_bored"); mAnimMap[ANIM_AGENT_BOW]= mAnimStringTable.addString("bow"); mAnimMap[ANIM_AGENT_BRUSH]= mAnimStringTable.addString("brush"); - mAnimMap[ANIM_AGENT_BUSY]= mAnimStringTable.addString("busy"); + mAnimMap[ANIM_AGENT_DO_NOT_DISTURB]= mAnimStringTable.addString("busy"); mAnimMap[ANIM_AGENT_CLAP]= mAnimStringTable.addString("clap"); mAnimMap[ANIM_AGENT_COURTBOW]= mAnimStringTable.addString("courtbow"); mAnimMap[ANIM_AGENT_CROUCH]= mAnimStringTable.addString("crouch"); diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index aa6579ac8e..84185c3f92 100644..100755 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -56,7 +56,7 @@ extern const LLUUID ANIM_AGENT_BLOW_KISS; extern const LLUUID ANIM_AGENT_BORED; extern const LLUUID ANIM_AGENT_BOW; extern const LLUUID ANIM_AGENT_BRUSH; -extern const LLUUID ANIM_AGENT_BUSY; +extern const LLUUID ANIM_AGENT_DO_NOT_DISTURB; extern const LLUUID ANIM_AGENT_CLAP; extern const LLUUID ANIM_AGENT_COURTBOW; extern const LLUUID ANIM_AGENT_CROUCH; diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h index d363a6e595..b06c279b8f 100644..100755 --- a/indra/llcharacter/llbvhconsts.h +++ b/indra/llcharacter/llbvhconsts.h @@ -27,7 +27,7 @@ #ifndef LL_LLBVHCONSTS_H #define LL_LLBVHCONSTS_H -const F32 MAX_ANIM_DURATION = 30.f; +const F32 MAX_ANIM_DURATION = 60.f; typedef enum e_constraint_type { diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 2a0df26384..2a0df26384 100644..100755 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h index f816b76277..f816b76277 100644..100755 --- a/indra/llcharacter/llbvhloader.h +++ b/indra/llcharacter/llbvhloader.h diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 0a6a8f9fa6..85cf1cd3f5 100644..100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -286,7 +286,7 @@ void LLCharacter::removeAnimationData(std::string name) //----------------------------------------------------------------------------- // setVisualParamWeight() //----------------------------------------------------------------------------- -BOOL LLCharacter::setVisualParamWeight(LLVisualParam* which_param, F32 weight, BOOL upload_bake) +BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight, BOOL upload_bake) { S32 index = which_param->getID(); visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index); diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 3ebb2bffb0..5740dbce77 100644..100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -93,13 +93,6 @@ public: // get the height & normal of the ground under a point virtual void getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm) = 0; - // allocate an array of joints for the character skeleton - // this must be overloaded to support joint subclasses, - // and is called implicitly from buildSkeleton(). - // Note this must handle reallocation as it will be called - // each time buildSkeleton() is called. - virtual BOOL allocateCharacterJoints( U32 num ) = 0; - // skeleton joint accessor to support joint subclasses virtual LLJoint *getCharacterJoint( U32 i ) = 0; @@ -197,7 +190,7 @@ public: void addVisualParam(LLVisualParam *param); void addSharedVisualParam(LLVisualParam *param); - virtual BOOL setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE ); + virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE ); virtual BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake = FALSE ); virtual BOOL setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake = FALSE ); diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 0d0b85ba60..4e8c3268c5 100644..100755 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -258,3 +258,4 @@ void LLEditingMotion::onDeactivate() // End + diff --git a/indra/llcharacter/lleditingmotion.h b/indra/llcharacter/lleditingmotion.h index 7b1c8bb059..7b1c8bb059 100644..100755 --- a/indra/llcharacter/lleditingmotion.h +++ b/indra/llcharacter/lleditingmotion.h diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index c23694639e..c23694639e 100644..100755 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h index 66b618c473..66b618c473 100644..100755 --- a/indra/llcharacter/llgesture.h +++ b/indra/llcharacter/llgesture.h diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index 696dba0d95..696dba0d95 100644..100755 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp diff --git a/indra/llcharacter/llhandmotion.h b/indra/llcharacter/llhandmotion.h index 08de7056c8..08de7056c8 100644..100755 --- a/indra/llcharacter/llhandmotion.h +++ b/indra/llcharacter/llhandmotion.h diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 15a58a8389..2b1aa194a9 100644..100755 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -530,3 +530,4 @@ void LLEyeMotion::onDeactivate() } // End + diff --git a/indra/llcharacter/llheadrotmotion.h b/indra/llcharacter/llheadrotmotion.h index 569dbef2dd..569dbef2dd 100644..100755 --- a/indra/llcharacter/llheadrotmotion.h +++ b/indra/llcharacter/llheadrotmotion.h diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 19907933cb..09a7c11a22 100644..100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -40,7 +40,9 @@ S32 LLJoint::sNumTouches = 0; // LLJoint() // Class Constructor //----------------------------------------------------------------------------- -LLJoint::LLJoint() + + +void LLJoint::init() { mName = "unnamed"; mParent = NULL; @@ -48,7 +50,20 @@ LLJoint::LLJoint() mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; mUpdateXform = TRUE; - mJointNum = -1; +} + +LLJoint::LLJoint() : + mJointNum(-1) +{ + init(); + touch(); + mResetAfterRestoreOldXform = false; +} + +LLJoint::LLJoint(S32 joint_num) : + mJointNum(joint_num) +{ + init(); touch(); mResetAfterRestoreOldXform = false; } @@ -58,15 +73,12 @@ LLJoint::LLJoint() // LLJoint() // Class Constructor //----------------------------------------------------------------------------- -LLJoint::LLJoint(const std::string &name, LLJoint *parent) +LLJoint::LLJoint(const std::string &name, LLJoint *parent) : + mJointNum(0) { - mName = "unnamed"; - mParent = NULL; - mXform.setScaleChildOffset(TRUE); - mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); - mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; + init(); mUpdateXform = FALSE; - mJointNum = 0; + // *TODO: mResetAfterRestoreOldXform is not initialized!!! setName(name); if (parent) diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index dc3c58cf64..2b1e2005c6 100644..100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -105,10 +105,15 @@ public: public: LLJoint(); + LLJoint(S32 joint_num); + // *TODO: Only used for LLVOAvatarSelf::mScreenp. *DOES NOT INITIALIZE mResetAfterRestoreOldXform* LLJoint( const std::string &name, LLJoint *parent=NULL ); - virtual ~LLJoint(); +private: + void init(); + +public: // set name and parent void setup( const std::string &name, LLJoint *parent=NULL ); @@ -178,7 +183,6 @@ public: virtual BOOL isAnimatable() const { return TRUE; } S32 getJointNum() const { return mJointNum; } - void setJointNum(S32 joint_num) { mJointNum = joint_num; } void restoreOldXform( void ); void restoreToDefaultXform( void ); diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index 1331900791..1331900791 100644..100755 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp diff --git a/indra/llcharacter/lljointsolverrp3.h b/indra/llcharacter/lljointsolverrp3.h index 88b5d08710..88b5d08710 100644..100755 --- a/indra/llcharacter/lljointsolverrp3.h +++ b/indra/llcharacter/lljointsolverrp3.h diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h index b9c91f80b5..b9c91f80b5 100644..100755 --- a/indra/llcharacter/lljointstate.h +++ b/indra/llcharacter/lljointstate.h diff --git a/indra/llcharacter/llkeyframefallmotion.cpp b/indra/llcharacter/llkeyframefallmotion.cpp index 60ab2e9929..60ab2e9929 100644..100755 --- a/indra/llcharacter/llkeyframefallmotion.cpp +++ b/indra/llcharacter/llkeyframefallmotion.cpp diff --git a/indra/llcharacter/llkeyframefallmotion.h b/indra/llcharacter/llkeyframefallmotion.h index 7f0a2fdda2..7f0a2fdda2 100644..100755 --- a/indra/llcharacter/llkeyframefallmotion.h +++ b/indra/llcharacter/llkeyframefallmotion.h diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index c6f45bffa2..07ef52228e 100644..100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -672,7 +672,8 @@ BOOL LLKeyframeMotion::onActivate() //----------------------------------------------------------------------------- BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask) { - llassert(time >= 0.f); + // llassert(time >= 0.f); // This will fire + time = llmax(0.f, time); if (mJointMotionList->mLoop) { @@ -2304,3 +2305,4 @@ LLKeyframeMotion::JointConstraint::~JointConstraint() } // End + diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index b1422b2b90..b1422b2b90 100644..100755 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index 82fe8971f5..82fe8971f5 100644..100755 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h index 24e8141753..24e8141753 100644..100755 --- a/indra/llcharacter/llkeyframemotionparam.h +++ b/indra/llcharacter/llkeyframemotionparam.h diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp index 3f91532c8e..3f91532c8e 100644..100755 --- a/indra/llcharacter/llkeyframestandmotion.cpp +++ b/indra/llcharacter/llkeyframestandmotion.cpp diff --git a/indra/llcharacter/llkeyframestandmotion.h b/indra/llcharacter/llkeyframestandmotion.h index c2634ecd6d..c2634ecd6d 100644..100755 --- a/indra/llcharacter/llkeyframestandmotion.h +++ b/indra/llcharacter/llkeyframestandmotion.h diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index d52eb89a5c..69f064b615 100644..100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -390,3 +390,4 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) return TRUE; } + diff --git a/indra/llcharacter/llkeyframewalkmotion.h b/indra/llcharacter/llkeyframewalkmotion.h index 0e8d21b765..0e8d21b765 100644..100755 --- a/indra/llcharacter/llkeyframewalkmotion.h +++ b/indra/llcharacter/llkeyframewalkmotion.h diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp index 2551f125d0..a07f9f4d2e 100644..100755 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -169,3 +169,4 @@ BOOL LLMotion::canDeprecate() } // End + diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index 6e532aac2f..6e532aac2f 100644..100755 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 4f6351709e..e9fb91ad73 100644..100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -29,8 +29,6 @@ //----------------------------------------------------------------------------- #include "linden_common.h" -#include "llmemtype.h" - #include "llmotioncontroller.h" #include "llkeyframemotion.h" #include "llmath.h" @@ -44,6 +42,7 @@ const U32 MAX_MOTION_INSTANCES = 32; //----------------------------------------------------------------------------- // Constants and statics //----------------------------------------------------------------------------- +F32 LLMotionController::sCurrentTimeFactor = 1.f; LLMotionRegistry LLMotionController::sRegistry; //----------------------------------------------------------------------------- @@ -127,7 +126,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id ) // Class Constructor //----------------------------------------------------------------------------- LLMotionController::LLMotionController() - : mTimeFactor(1.f), + : mTimeFactor(sCurrentTimeFactor), mCharacter(NULL), mAnimTime(0.f), mPrevTimerElapsed(0.f), @@ -335,7 +334,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp) //----------------------------------------------------------------------------- LLMotion* LLMotionController::createMotion( const LLUUID &id ) { - LLMemType mt(LLMemType::MTYPE_ANIMATION); // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index b996f708d2..52eaf557b1 100644..100755 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -168,6 +168,9 @@ public: const LLFrameTimer& getFrameTimer() { return mTimer; } + static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; }; + static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; }; + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap @@ -187,7 +190,8 @@ protected: void deactivateStoppedMotions(); protected: - F32 mTimeFactor; + F32 mTimeFactor; // 1.f for normal speed + static F32 sCurrentTimeFactor; // Value to use for initialization static LLMotionRegistry sRegistry; LLPoseBlender mPoseBlender; diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index e2d284834f..e2d284834f 100644..100755 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h index 92820159d4..92820159d4 100644..100755 --- a/indra/llcharacter/llmultigesture.h +++ b/indra/llcharacter/llmultigesture.h diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index 55e1b6e9ea..55e1b6e9ea 100644..100755 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h index b486852605..b486852605 100644..100755 --- a/indra/llcharacter/llpose.h +++ b/indra/llcharacter/llpose.h diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index e0454131a5..e0454131a5 100644..100755 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp diff --git a/indra/llcharacter/llstatemachine.h b/indra/llcharacter/llstatemachine.h index a2f7e59bd2..a2f7e59bd2 100644..100755 --- a/indra/llcharacter/llstatemachine.h +++ b/indra/llcharacter/llstatemachine.h diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index 489aef923c..fa5f06328e 100644..100755 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -169,3 +169,4 @@ void LLTargetingMotion::onDeactivate() // End + diff --git a/indra/llcharacter/lltargetingmotion.h b/indra/llcharacter/lltargetingmotion.h index 0971417e1e..0971417e1e 100644..100755 --- a/indra/llcharacter/lltargetingmotion.h +++ b/indra/llcharacter/lltargetingmotion.h diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 809b312abe..f7cb0f76b7 100644..100755 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -168,7 +168,8 @@ LLVisualParam::LLVisualParam() mIsAnimating( FALSE ), mID( -1 ), mInfo( 0 ), - mIsDummy(FALSE) + mIsDummy(FALSE), + mParamLocation(LOC_UNKNOWN) { } @@ -250,6 +251,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake) if (mIsDummy) { setWeight(target_value, upload_bake); + mTargetWeight = mCurWeight; return; } @@ -319,3 +321,32 @@ void LLVisualParam::resetDrivenParams() // nothing to do for non-driver parameters return; } + +const std::string param_location_name(const EParamLocation& loc) +{ + switch (loc) + { + case LOC_UNKNOWN: return "unknown"; + case LOC_AV_SELF: return "self"; + case LOC_AV_OTHER: return "other"; + case LOC_WEARABLE: return "wearable"; + default: return "error"; + } +} + +void LLVisualParam::setParamLocation(EParamLocation loc) +{ + if (mParamLocation == LOC_UNKNOWN || loc == LOC_UNKNOWN) + { + mParamLocation = loc; + } + else if (mParamLocation == loc) + { + // no action + } + else + { + lldebugs << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl; + } +} + diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 694e27f371..60ea7a369a 100644..100755 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -50,6 +50,16 @@ enum EVisualParamGroup NUM_VISUAL_PARAM_GROUPS }; +enum EParamLocation +{ + LOC_UNKNOWN, + LOC_AV_SELF, + LOC_AV_OTHER, + LOC_WEARABLE +}; + +const std::string param_location_name(const EParamLocation& loc); + const S32 MAX_TRANSMITTED_VISUAL_PARAMS = 255; //----------------------------------------------------------------------------- @@ -89,6 +99,7 @@ protected: // An interface class for a generalized parametric modification of the avatar mesh // Contains data that is specific to each Avatar //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLVisualParam { public: @@ -149,6 +160,9 @@ public: void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; } + void setParamLocation(EParamLocation loc); + EParamLocation getParamLocation() const { return mParamLocation; } + protected: F32 mCurWeight; // current weight F32 mLastWeight; // last weight @@ -160,6 +174,7 @@ protected: S32 mID; // id for storing weight/morphtarget compares compactly LLVisualParamInfo *mInfo; -}; + EParamLocation mParamLocation; // where does this visual param live? +} LL_ALIGN_POSTFIX(16); #endif // LL_LLVisualParam_H diff --git a/indra/llcharacter/tests/lljoint_test.cpp b/indra/llcharacter/tests/lljoint_test.cpp index e92aa832d6..da151808f2 100644..100755 --- a/indra/llcharacter/tests/lljoint_test.cpp +++ b/indra/llcharacter/tests/lljoint_test.cpp @@ -150,11 +150,11 @@ namespace tut template<> template<> void lljoint_object::test<11>() { - LLJoint lljoint("parent"); S32 joint_num = 12; - lljoint.setJointNum(joint_num); + LLJoint lljoint(joint_num); + lljoint.setName("parent"); S32 jointNum = lljoint.getJointNum(); - ensure("setJointNum()/getJointNum failed ", (jointNum == joint_num)); + ensure("getJointNum failed ", (jointNum == joint_num)); } template<> template<> |