summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalgltfmaterials.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-04 18:57:48 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-04 18:57:48 +0200
commit11c87378be68d9102d7dcf94d714b3c5c1923952 (patch)
treed7a3cd05c69172c328233166c2ad0c0b6fc9b555 /indra/newview/lllocalgltfmaterials.h
parentd26f545c5aa22d8267a2284c787bc9503e8b6cc9 (diff)
SL-18560 Make local materials save correctly from right-click menu
Diffstat (limited to 'indra/newview/lllocalgltfmaterials.h')
-rw-r--r--indra/newview/lllocalgltfmaterials.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h
index 097f2ea30a..3bdccbbf3d 100644
--- a/indra/newview/lllocalgltfmaterials.h
+++ b/indra/newview/lllocalgltfmaterials.h
@@ -29,18 +29,17 @@
#include "lleventtimer.h"
#include "llpointer.h"
+#include "llgltfmateriallist.h"
class LLScrollListCtrl;
class LLGLTFMaterial;
class LLViewerObject;
-class LLViewerFetchedTexture;
-class LLFetchedGLTFMaterial;
-class LLLocalGLTFMaterial
+class LLLocalGLTFMaterial : public LLFetchedGLTFMaterial
{
public: /* main */
LLLocalGLTFMaterial(std::string filename, S32 index);
- ~LLLocalGLTFMaterial();
+ virtual ~LLLocalGLTFMaterial();
public: /* accessors */
std::string getFilename();
@@ -48,7 +47,6 @@ public: /* accessors */
LLUUID getTrackingID();
LLUUID getWorldID();
S32 getIndexInFile();
- bool getValid();
public:
bool updateSelf();
@@ -74,20 +72,11 @@ private: /* members */
std::string mShortName;
LLUUID mTrackingID;
LLUUID mWorldID;
- bool mValid;
LLSD mLastModified;
EExtension mExtension;
ELinkStatus mLinkStatus;
S32 mUpdateRetries;
S32 mMaterialIndex; // Single file can have more than one
-
- // Maintain textures and material pointers to
- // make sure they won't be deleted in any way
- LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
- LLPointer<LLViewerFetchedTexture> mBaseColorFetched;
- LLPointer<LLViewerFetchedTexture> mNormalFetched;
- LLPointer<LLViewerFetchedTexture> mMRFetched;
- LLPointer<LLViewerFetchedTexture> mEmissiveFetched;
};
class LLLocalGLTFMaterialTimer : public LLEventTimer
@@ -120,9 +109,9 @@ public:
void doUpdates();
private:
- std::list<LLLocalGLTFMaterial*> mMaterialList;
+ std::list<LLPointer<LLLocalGLTFMaterial> > mMaterialList;
LLLocalGLTFMaterialTimer mTimer;
- typedef std::list<LLLocalGLTFMaterial*>::iterator local_list_iter;
+ typedef std::list<LLPointer<LLLocalGLTFMaterial> >::iterator local_list_iter;
};
#endif // LL_LOCALGLTFMATERIALS_H