diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-09-27 20:59:07 +0300 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-09-28 03:55:43 +0300 |
commit | b894570e9af5eafd5de06f401fdc782599c063a2 (patch) | |
tree | 11d66c1c49e201a2426328545a04675092979b1d /indra/newview | |
parent | 6e32993c8787e7ba569d5a9ebcdb994c2ba03671 (diff) |
SL-19958 Fix default material not droping into texture ctrl
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 7e399a6808..bbacec843b 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -2101,8 +2101,16 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item) return mDropCallback(this, item); } - // no callback installed, so just set the image ids and carry on. - setImageAssetID( item->getAssetUUID() ); + // no callback installed, so just set the image ids and carry on. + LLUUID asset_id = item->getAssetUUID(); + + if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull()) + { + // If an inventory material has a null asset, consider it a valid blank material(gltf) + asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID; + } + + setImageAssetID(asset_id); mImageItemID = item->getUUID(); return TRUE; } |