#3189 Fix missed else condition
parent
f25314737f
commit
ec3fe8c2a5
|
|
@ -359,6 +359,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
|
|||
{
|
||||
if (asset_id.isNull() || override_json.empty())
|
||||
{
|
||||
// If there is no asset, there can't be an override
|
||||
queueApply(obj, side, asset_id);
|
||||
}
|
||||
else
|
||||
|
|
@ -371,6 +372,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
|
|||
{
|
||||
if (asset_id.isNull() || material_override == nullptr)
|
||||
{
|
||||
// If there is no asset, there can't be an override
|
||||
queueApply(obj, side, asset_id);
|
||||
}
|
||||
else
|
||||
|
|
@ -470,7 +472,7 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callba
|
|||
{
|
||||
data[i]["gltf_json"] = e.override_data->asJSON();
|
||||
}
|
||||
if (!e.override_json.empty())
|
||||
else if (!e.override_json.empty())
|
||||
{
|
||||
data[i]["gltf_json"] = e.override_json;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2265,23 +2265,9 @@ void LLSelectMgr::selectionRevertGLTFMaterials()
|
|||
//blank override out
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id);
|
||||
}
|
||||
if (old_asset_id != asset_id)
|
||||
{
|
||||
// Restore overrides and base material
|
||||
// Note: might not work reliably if asset is already there, might
|
||||
// have a server sided problem where servers applies override
|
||||
// first then resets it by adding asset, in which case need
|
||||
// to create a server ticket and chain asset then override
|
||||
// application.
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Enqueue override update to server
|
||||
// Note: this is suboptimal, better to send asset id as well
|
||||
// but there seems to be a server problem with queueApply
|
||||
// that ignores override in some cases
|
||||
LLGLTFMaterialList::queueModify(objectp, te, material);
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue