diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-11-15 14:32:30 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-11-15 14:32:30 +0800 |
commit | d17cea8d53cd2bc253d30228f6d2e0abcd59701b (patch) | |
tree | 0d3e9669c07083b74e6a46693372db655dd67d79 /indra/llprimitive | |
parent | 48af6d43580e07ea2b6833b6d44279bdd3f3e70d (diff) | |
parent | 843866d193a0fb5ea882408c8862335ab9c5539b (diff) |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llgltfmaterial.cpp | 1 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.cpp | 36 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.h | 5 |
3 files changed, 2 insertions, 40 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp index d2c911a189..ae165f7fa4 100644 --- a/indra/llprimitive/llgltfmaterial.cpp +++ b/indra/llprimitive/llgltfmaterial.cpp @@ -723,6 +723,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data) if (am.isInteger()) { mAlphaMode = (AlphaMode) am.asInteger(); + mOverrideAlphaMode = true; } const LLSD& ac = data["ac"]; diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index a7c78b0275..ee5bc80c28 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -2376,42 +2376,6 @@ void LLRenderMaterialParams::copy(const LLNetworkData& data) mEntries = param.mEntries; } -LLSD LLRenderMaterialParams::asLLSD() const -{ - LLSD ret; - - for (int i = 0; i < mEntries.size(); ++i) - { - ret[i]["te_idx"] = mEntries[i].te_idx; - ret[i]["id"] = mEntries[i].id; - } - - return ret; -} - -bool LLRenderMaterialParams::fromLLSD(LLSD& sd) -{ - if (sd.isArray()) - { - mEntries.resize(sd.size()); - for (int i = 0; i < sd.size(); ++i) - { - if (sd[i].has("te_idx") && sd.has("id")) - { - mEntries[i].te_idx = sd[i]["te_idx"].asInteger(); - mEntries[i].id = sd[i]["id"].asUUID(); - } - else - { - return false; - } - } - - return true; - } - - return false; -} void LLRenderMaterialParams::setMaterial(U8 te, const LLUUID& id) { diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index d2adfa4a3d..0b7dbd703a 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -382,10 +382,7 @@ public: BOOL unpack(LLDataPacker& dp) override; bool operator==(const LLNetworkData& data) const override; void copy(const LLNetworkData& data) override; - LLSD asLLSD() const; - operator LLSD() const { return asLLSD(); } - bool fromLLSD(LLSD& sd); - + void setMaterial(U8 te_idx, const LLUUID& id); const LLUUID& getMaterial(U8 te_idx) const; |