summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-09-28 01:06:17 +0000
committerDon Kjer <don@lindenlab.com>2012-09-28 01:06:17 +0000
commitf9a5cdba507096d16d834fe58c850b9f55ad9462 (patch)
tree80a77ee22fb563e5d9b4289a703d943a1d7f0f0d
parent3db6e3d9ec6c0b5a4cc9e825ee0c70eaa1461c98 (diff)
Started stubbing out llsd support for tex layer information.
-rw-r--r--autobuild.xml4
-rw-r--r--indra/llappearance/lltexlayer.cpp31
-rw-r--r--indra/llappearance/lltexlayer.h7
-rw-r--r--indra/llappearance/llwearable.h1
-rw-r--r--indra/llappearance/llwearabledata.h2
5 files changed, 41 insertions, 4 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 7195c00680..3ac2932075 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1254,9 +1254,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>02c3a65194635b57a5fff05ff47e62e5</string>
+ <string>84dae3ea3825fa0584ef3de78bcc1632</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/265256/arch/Linux/installer/llappearanceutility_source-0.1-linux-20120927.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/265271/arch/Linux/installer/llappearanceutility_source-0.1-linux-20120928.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index e90efac36b..79d870c61d 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -469,6 +469,31 @@ const std::string LLTexLayerSet::getBodyRegionName() const
}
+// virtual
+void LLTexLayerSet::asLLSD(LLSD& sd) const
+{
+ sd["visible"] = LLSD::Boolean(isVisible());
+ LLSD layer_list_sd;
+ layer_list_t::const_iterator layer_iter = mLayerList.begin();
+ layer_list_t::const_iterator layer_end = mLayerList.end();
+ for(; layer_iter != layer_end; ++layer_iter);
+ {
+ LLSD layer_sd;
+ //LLTexLayerInterface* layer = (*layer_iter);
+ //if (layer)
+ //{
+ // layer->asLLSD(layer_sd);
+ //}
+ layer_list_sd.append(layer_sd);
+ }
+ LLSD mask_list_sd;
+ LLSD info_sd;
+ sd["layers"] = layer_list_sd;
+ sd["masks"] = mask_list_sd;
+ sd["info"] = info_sd;
+}
+
+
void LLTexLayerSet::destroyComposite()
{
if( mComposite )
@@ -966,6 +991,12 @@ LLTexLayer::~LLTexLayer()
}
+void LLTexLayer::asLLSD(LLSD& sd) const
+{
+ // *TODO: Finish
+ sd["id"] = getUUID();
+}
+
//-----------------------------------------------------------------------------
// setInfo
//-----------------------------------------------------------------------------
diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h
index 692cfa1a38..a288d7fc50 100644
--- a/indra/llappearance/lltexlayer.h
+++ b/indra/llappearance/lltexlayer.h
@@ -89,6 +89,8 @@ public:
ERenderPass getRenderPass() const;
BOOL isVisibilityMask() const;
+ virtual void asLLSD(LLSD& sd) const {}
+
protected:
const std::string& getGlobalColor() const;
LLViewerVisualParam* getVisualParamPtr(S32 index) const;
@@ -163,10 +165,11 @@ public:
void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; }
LLLocalTextureObject* getLTO() { return mLocalTextureObject; }
+ /*virtual*/ void asLLSD(LLSD& sd) const;
+
static void calculateTexLayerColor(const param_color_list_t &param_list, LLColor4 &net_color);
protected:
LLUUID getUUID() const;
-private:
typedef std::map<U32, U8*> alpha_cache_t;
alpha_cache_t mAlphaCache;
LLLocalTextureObject* mLocalTextureObject;
@@ -214,6 +217,8 @@ public:
static BOOL sHasCaches;
+ virtual void asLLSD(LLSD& sd) const;
+
protected:
typedef std::vector<LLTexLayerInterface *> layer_list_t;
layer_list_t mLayerList;
diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h
index bc73ed4d8c..4a59811795 100644
--- a/indra/llappearance/llwearable.h
+++ b/indra/llappearance/llwearable.h
@@ -68,6 +68,7 @@ public:
LLAssetType::EType getAssetType() const;
S32 getDefinitionVersion() const { return mDefinitionVersion; }
void setDefinitionVersion( S32 new_version ) { mDefinitionVersion = new_version; }
+ static S32 getCurrentDefinitionVersion() { return LLWearable::sCurrentDefinitionVersion; }
public:
typedef std::vector<LLVisualParam*> visual_param_vec_t;
diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h
index 379384a989..3e92f2ead8 100644
--- a/indra/llappearance/llwearabledata.h
+++ b/indra/llappearance/llwearabledata.h
@@ -95,7 +95,7 @@ protected:
//--------------------------------------------------------------------
// Member variables
//--------------------------------------------------------------------
-private:
+protected:
LLAvatarAppearance* mAvatarAppearance;
typedef std::vector<LLWearable*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts)
typedef std::map<LLWearableType::EType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type