THE BIGGIE.

Holy hell, this was an interesting one to implement. I wish I understood it better. Unfortunately I think this marks the end of trying to re-implement the Local Inventory for Temp and Local textures. It's just not feasible now that the entire inventory system has been whipped into a code shitstorm.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-22 06:48:48 -04:00
parent 3d4fee4614
commit ec55705bdd
48 changed files with 8559 additions and 7177 deletions

View File

@@ -203,7 +203,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mJointInfo(NULL),
mState(0),
mMedia(NULL),
mClickAction(0)
mClickAction(0),
mAttachmentItemID(LLUUID::null)
{
if(!is_global)
{
@@ -504,9 +505,20 @@ BOOL LLViewerObject::isOverGroupOwnedLand() const
&& mRegionp->getParcelOverlay()->isOwnedGroup(getPositionRegion());
}
void LLViewerObject::setParent(LLViewerObject* parent)
BOOL LLViewerObject::setParent(LLViewerObject* parent)
{
LLPrimitive::setParent(parent);
if (mParent != parent)
{
LLViewerObject* old_parent = (LLViewerObject*)mParent ;
BOOL ret = LLPrimitive::setParent(parent);
if (ret && old_parent && parent)
{
old_parent->removeChild(this) ;
}
return ret ;
}
return FALSE ;
}
void LLViewerObject::addChild(LLViewerObject *childp)
@@ -525,8 +537,10 @@ void LLViewerObject::addChild(LLViewerObject *childp)
childp->mbCanSelect = mbCanSelect;
}
childp->setParent(this);
mChildList.push_back(childp);
if (childp->setParent(this))
{
mChildList.push_back(childp);
}
}
void LLViewerObject::removeChild(LLViewerObject *childp)
@@ -622,12 +636,16 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
{
return FALSE;
}
BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL);
if (!ret)
{
return FALSE ;
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
if( (old_parent != parentp && old_parent)
|| (parentp && parentp->isActive()))
@@ -5177,3 +5195,19 @@ std::string LLViewerObject::getAttachmentPointName()
return llformat("unsupported point %d", point);
}
// </edit>
const LLUUID &LLViewerObject::extractAttachmentItemID()
{
LLUUID item_id = LLUUID::null;
LLNameValue* item_id_nv = getNVPair("AttachItemID");
if (item_id_nv)
{
const char* s = item_id_nv->getString();
if (s)
{
item_id.set(s);
}
}
setAttachmentItemID(item_id);
return getAttachmentItemID();
}