Merge pull request #1014 from secondlife/v-1006
secondlife/viewer#1006: Review feedback: Move blank material constant to indra_constants.hmaster
commit
052a8a78e8
|
|
@ -89,3 +89,4 @@ const LLUUID IMG_USE_BAKED_AUX1 ("9742065b-19b5-297c-858a-29711d539043");
|
|||
const LLUUID IMG_USE_BAKED_AUX2 ("03642e83-2bd1-4eb9-34b4-4c47ed586d2d");
|
||||
const LLUUID IMG_USE_BAKED_AUX3 ("edd51b77-fc10-ce7a-4b3d-011dfc349e4f");
|
||||
|
||||
const LLUUID BLANK_MATERIAL_ASSET_ID ("968cbad0-4dad-d64e-71b5-72bf13ad051a");
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_SPECULAR;
|
|||
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_NORMAL;
|
||||
LL_COMMON_API extern const LLUUID BLANK_OBJECT_NORMAL;
|
||||
|
||||
LL_COMMON_API extern const LLUUID BLANK_MATERIAL_ASSET_ID;
|
||||
|
||||
// radius within which a chat message is fully audible
|
||||
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
||||
|
||||
|
|
|
|||
|
|
@ -1395,7 +1395,7 @@ LLPanelRegionTerrainInfo::LLPanelRegionTerrainInfo()
|
|||
}
|
||||
for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
|
||||
{
|
||||
mLastSetMaterials[i] = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
mLastSetMaterials[i] = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@ LLGLTFMaterialList::modify_queue_t LLGLTFMaterialList::sModifyQueue;
|
|||
LLGLTFMaterialList::apply_queue_t LLGLTFMaterialList::sApplyQueue;
|
||||
LLSD LLGLTFMaterialList::sUpdates;
|
||||
|
||||
const LLUUID LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID("968cbad0-4dad-d64e-71b5-72bf13ad051a");
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
// return true if given data is (probably) valid update message for ModifyMaterialParams capability
|
||||
static bool is_valid_update(const LLSD& data)
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ class LLGLTFOverrideCacheEntry;
|
|||
class LLGLTFMaterialList
|
||||
{
|
||||
public:
|
||||
static const LLUUID BLANK_MATERIAL_ASSET_ID;
|
||||
|
||||
LLGLTFMaterialList() {}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2124,7 +2124,7 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe
|
|||
|
||||
// Look for the item to base permissions off of
|
||||
item_out = nullptr;
|
||||
const bool blank_material = func.mMaterialId == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
const bool blank_material = func.mMaterialId == BLANK_MATERIAL_ASSET_ID;
|
||||
if (!blank_material)
|
||||
{
|
||||
LLAssetIDMatchesWithPerms item_has_perms(func.mMaterialId, ops);
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ BOOL LLPanelFace::postBuild()
|
|||
if (pbr_ctrl)
|
||||
{
|
||||
pbr_ctrl->setDefaultImageAssetID(LLUUID::null);
|
||||
pbr_ctrl->setBlankImageAssetID(LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID);
|
||||
pbr_ctrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
|
||||
pbr_ctrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
|
||||
pbr_ctrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
|
||||
pbr_ctrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
|
||||
|
|
@ -2029,7 +2029,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
|
|||
{
|
||||
mVOInventoryListener = nullptr;
|
||||
}
|
||||
if (!identical_pbr || pbr_id.isNull() || pbr_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
|
||||
if (!identical_pbr || pbr_id.isNull() || pbr_id == BLANK_MATERIAL_ASSET_ID)
|
||||
{
|
||||
mAgentInventoryListener = nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1782,7 +1782,7 @@ bool LLObjectSelection::applyRestrictedPbrMaterialToTEs(LLViewerInventoryItem* i
|
|||
LLUUID asset_id = item->getAssetUUID();
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
bool material_copied_all_faces = true;
|
||||
|
|
@ -1987,7 +1987,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
asset_id = mItem->getAssetUUID();
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
|
|||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||
|
||||
if (mInventoryPickType == PICK_MATERIAL
|
||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||
&& mImageAssetID == BLANK_MATERIAL_ASSET_ID
|
||||
&& itemp && itemp->getAssetUUID().isNull())
|
||||
{
|
||||
item_id = inv_view->getUUID();
|
||||
|
|
@ -273,7 +273,7 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo
|
|||
if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
|
||||
{
|
||||
// If an inventory item has a null asset, consider it a valid blank material(gltf)
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
setImageID(asset_id, set_selection);
|
||||
}
|
||||
|
|
@ -813,7 +813,7 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
|
|||
}
|
||||
|
||||
LLUUID loockup_id = asset_id;
|
||||
if (mInventoryPickType == PICK_MATERIAL && loockup_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
|
||||
if (mInventoryPickType == PICK_MATERIAL && loockup_id == BLANK_MATERIAL_ASSET_ID)
|
||||
{
|
||||
// default asset id means we are looking for an inventory item with a default asset UUID (null)
|
||||
loockup_id = LLUUID::null;
|
||||
|
|
@ -908,7 +908,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
|
|||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||
|
||||
if (mInventoryPickType == PICK_MATERIAL
|
||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||
&& mImageAssetID == BLANK_MATERIAL_ASSET_ID
|
||||
&& itemp && itemp->getAssetUUID().isNull())
|
||||
{
|
||||
inventory_id = inv_view->getUUID();
|
||||
|
|
@ -2395,7 +2395,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
|
|||
if (mInventoryPickType == 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;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
setImageAssetID(asset_id);
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,7 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
|
|||
if (asset_id.isNull())
|
||||
{
|
||||
// use blank material
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
hit_obj->setRenderMaterialID(hit_face, asset_id);
|
||||
|
|
@ -1318,7 +1318,7 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj,
|
|||
if (asset_id.isNull())
|
||||
{
|
||||
// use blank material
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
hit_obj->setRenderMaterialIDs(asset_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue