[opensource-dev] Avatar layer commit question

2011-08-31 Thread Serpentu
This is a somewhat specialized question.
I am currently exploring ways to commit a texture onto an avatar layer
without having the appearance panel open.

>From what i understood in the code, the function  *
gAgentAvatarp->setLocalTexture* that applies the texture in
*LLPanelEditWearable::onTexturePickerCommit
*asks for, among other things, the slot index (certain wearables such as
skin have more than one slot, such as head/upper body/lower body) which is
exactly what it's asking for in form of a *entry->mTextureIndex.*
Long story short, it determines the slot by looking at the texture ctrl
which obviously i can't have when the appearance panel does not exist.

I have discovered that wearable/mTEmap(texture map)/mTexLayers/mTexLayerSet
contains a mBakedTexIndex which seems, from my observation, to contain a
name for it's appropriate slot of an appropriate wearable.

So my question is: would it be correct to assume that i can manually
extrapolate mTextureIndex needed for setLocalTexture from mBakedTexIndex, or
am i missing something here?
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Avatar layer commit question

2011-08-31 Thread Serpentu
To clear some things up, i'm talking about taking LLWearableType::EType
and LLVOAvatarDefines::EBakedTextureIndex
and with both of them figuring out which LLVOAvatarDefines::ETextureIndex is
to pass along.

Example: if the wearable is of type LLWearableType::WT_ALPHA
and the baked texture index is LLVOAvatarDefines::BAKED_EYES
then LLVOAvatarDefines::ETextureIndex would likely be
the LLVOAvatarDefines::TEX_EYES_ALPHA

I would really appreciate someone with experience in this particular area of
the viewer code to confirm or deny if it is indeed possible to guess
any LLVOAvatarDefines::ETextureIndex that way.
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges