meow-7.2.2
Ansariel 2023-11-20 13:05:41 +01:00
commit 89720cdb59
4 changed files with 5 additions and 51 deletions

View File

@ -723,6 +723,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
if (am.isInteger())
{
mAlphaMode = (AlphaMode) am.asInteger();
mOverrideAlphaMode = true;
}
const LLSD& ac = data["ac"];

View File

@ -2390,42 +2390,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)
{

View File

@ -390,10 +390,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;

View File

@ -1843,17 +1843,9 @@ static void pack_textures(
if (normal_img)
{
normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img);
LLPointer<LLImageJ2C> test;
test = LLViewerTextureList::convertToUploadFile(normal_img, 1024, true);
S32 lossy_bytes = normal_j2c->getDataSize();
S32 lossless_bytes = test->getDataSize();
LL_DEBUGS("MaterialEditor") << llformat("Lossless vs Lossy: (%d/%d) = %.2f", lossless_bytes, lossy_bytes, (F32)lossless_bytes / lossy_bytes) << LL_ENDL;
normal_j2c = test;
// create a losslessly compressed version of the normal map
normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img, 1024, false, true);
LL_DEBUGS("MaterialEditor") << "Normal: " << normal_j2c->getDataSize() << LL_ENDL;
}
if (mr_img)