diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/lldrawable.cpp | 14 | ||||
| -rwxr-xr-x | indra/newview/lldrawable.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llpreviewscript.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.h | 2 | 
5 files changed, 23 insertions, 1 deletions
| diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 7414b24811..5c42868127 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -968,6 +968,20 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)  	mVObjp->onShift(shift_vector);  } +bool LLDrawable::hasVertexBuffer() const +{ +	for (S32 i = 0; i < getNumFaces(); i++) +	{ +		LLFace *facep = getFace(i); +		if (facep && facep->getVertexBuffer() != NULL) +		{ +			return true; +		} +	} + +	return false; +} +  const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const  {  	mXform.getMinMax(min,max); diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index a3461d4c01..4648e6272e 100755 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -173,6 +173,7 @@ public:  	bool isVisible() const;  	bool isRecentlyVisible() const; +	bool hasVertexBuffer() const;  	virtual void cleanupReferences(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 870304a7b8..61a34d0581 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2101,7 +2101,7 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id,  void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)  {  	LLViewerObject* object = gObjectList.findObject(mObjectUUID); -	if(!object) +	if(!object || !object->hasVertexBuffer())  	{  		LLNotificationsUtil::add("SaveScriptFailObjectNotFound");  		return; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9e2999e521..df5ce65486 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -444,6 +444,11 @@ void LLViewerObject::markDead()  	}  } +bool LLViewerObject::hasVertexBuffer() const  +{ +	return mDrawable.notNull() && mDrawable->hasVertexBuffer(); +} +  void LLViewerObject::dump() const  {  	LL_INFOS() << "Type: " << pCodeToString(mPrimitiveCode) << LL_ENDL; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index a2008215d2..31b2bd6b99 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -188,6 +188,8 @@ public:  	virtual U32 getNumIndices() const;  	S32 getNumFaces() const { return mNumFaces; } +	bool hasVertexBuffer() const; +  	// Graphical stuff for objects - maybe broken out into render class later?  	virtual void updateTextures();  	virtual void boostTexturePriority(BOOL boost_children = TRUE);	// When you just want to boost priority of this object | 
