DRTVWR-601: Merge branch 'release/gltf-maint2' into DRTVWR-601-gha-libs
commit
0752cc0792
|
|
@ -1501,11 +1501,11 @@
|
|||
<key>creds</key>
|
||||
<string>github</string>
|
||||
<key>hash</key>
|
||||
<string>48bca5d0233d1e724a59f649a2c6c7ac5f40ec3c</string>
|
||||
<string>b037cc0b29ea70ee834cfae6dda5b7a25cd57174</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009335</string>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851460</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -1517,11 +1517,11 @@
|
|||
<key>creds</key>
|
||||
<string>github</string>
|
||||
<key>hash</key>
|
||||
<string>39f52d0350e130f41c5c758f7cb94e87b962c223</string>
|
||||
<string>bdea1fd5c4da9da5afde088d16188b45d0853e04</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009336</string>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851461</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
|
|
@ -1533,11 +1533,11 @@
|
|||
<key>creds</key>
|
||||
<string>github</string>
|
||||
<key>hash</key>
|
||||
<string>7b5e645fb7eb399abbea63bd21e8063bbb32a911</string>
|
||||
<string>f652ce0d6aef864689f0ed44255da4d9cd65a43f</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009339</string>
|
||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851463</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -1550,7 +1550,7 @@
|
|||
<key>copyright</key>
|
||||
<string>Copyright (c) 2010, Linden Research, Inc.</string>
|
||||
<key>version</key>
|
||||
<string>1.0.565768</string>
|
||||
<string>1.0.479d20a</string>
|
||||
<key>name</key>
|
||||
<string>llphysicsextensions_source</string>
|
||||
</map>
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ public:
|
|||
|
||||
static DERIVED_TYPE* getInstance()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
|
||||
//LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD; // TODO -- reenable this when we have a fix for using Tracy with coroutines
|
||||
// We know the viewer has LLSingleton dependency circularities. If you
|
||||
// feel strongly motivated to eliminate them, cheers and good luck.
|
||||
// (At that point we could consider a much simpler locking mechanism.)
|
||||
|
|
|
|||
|
|
@ -40,20 +40,20 @@ LLRenderNavPrim gRenderNav;
|
|||
//=============================================================================
|
||||
void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
|
||||
{
|
||||
LLColor4 cV(color);
|
||||
gGL.color4fv( cV.mV );
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
gGL.color4ubv(color.mV);
|
||||
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.vertex3fv( a.mV );
|
||||
gGL.vertex3fv( b.mV );
|
||||
gGL.vertex3fv( c.mV );
|
||||
}
|
||||
gGL.end();
|
||||
gGL.end();
|
||||
}
|
||||
//=============================================================================
|
||||
void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt )
|
||||
{
|
||||
pVBO->setBuffer();
|
||||
pVBO->drawArrays( mode, 0, vertCnt );
|
||||
pVBO->drawArrays( mode, 0, vertCnt );
|
||||
}
|
||||
//=============================================================================
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7.1.2
|
||||
7.1.3
|
||||
|
|
|
|||
|
|
@ -10676,7 +10676,7 @@
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>2.0</real>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>RendeSkyAutoAdjustBlueHorizonScale</key>
|
||||
<map>
|
||||
|
|
@ -10720,7 +10720,7 @@
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.001</real>
|
||||
<real>0.01</real>
|
||||
</map>
|
||||
<key>RenderSkySunlightScale</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -895,6 +895,14 @@ void LLEnvironment::initSingleton()
|
|||
gGenericDispatcher.addHandler(MESSAGE_PUSHENVIRONMENT, &environment_push_dispatch_handler);
|
||||
}
|
||||
|
||||
gSavedSettings.getControl("RenderSkyAutoAdjustProbeAmbiance")->getSignal()->connect(
|
||||
[](LLControlVariable*, const LLSD& new_val, const LLSD& old_val)
|
||||
{
|
||||
LLSettingsSky::sAutoAdjustProbeAmbiance = new_val.asReal();
|
||||
}
|
||||
);
|
||||
LLSettingsSky::sAutoAdjustProbeAmbiance = gSavedSettings.getF32("RenderSkyAutoAdjustProbeAmbiance");
|
||||
|
||||
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).stopListening(LISTENER_NAME);
|
||||
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -751,7 +751,8 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
|
|||
PERM_NONE,
|
||||
PERM_NONE,
|
||||
FALSE,
|
||||
NULL);
|
||||
NULL,
|
||||
PICK_TEXTURE);
|
||||
|
||||
mPickerHandle = floaterp->getHandle();
|
||||
|
||||
|
|
|
|||
|
|
@ -1724,7 +1724,9 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p
|
|||
while (iter != end)
|
||||
{
|
||||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
|
||||
if (sky && sky->canAutoAdjust())
|
||||
if (sky
|
||||
&& sky->canAutoAdjust()
|
||||
&& sky->getReflectionProbeAmbiance(true) != 0.f)
|
||||
{
|
||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,8 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
|
|||
// teach user about HDR settings
|
||||
if (mSettings
|
||||
&& mSettings->getSettingsType() == "sky"
|
||||
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
|
||||
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust()
|
||||
&& ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f)
|
||||
{
|
||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,69 +139,18 @@ static bool is_valid_update(const LLSD& data)
|
|||
}
|
||||
#endif
|
||||
|
||||
class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
|
||||
class LLGLTFMaterialOverrideDispatchHandler
|
||||
{
|
||||
LOG_CLASS(LLGLTFMaterialOverrideDispatchHandler);
|
||||
public:
|
||||
LLGLTFMaterialOverrideDispatchHandler() = default;
|
||||
~LLGLTFMaterialOverrideDispatchHandler() override = default;
|
||||
~LLGLTFMaterialOverrideDispatchHandler() = default;
|
||||
|
||||
void addCallback(void(*callback)(const LLUUID& object_id, S32 side))
|
||||
{
|
||||
mSelectionCallbacks.push_back(callback);
|
||||
}
|
||||
|
||||
bool operator()(const LLDispatcher* dispatcher, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// receive override data from simulator via LargeGenericMessage
|
||||
// message should have:
|
||||
// object_id - UUID of LLViewerObject
|
||||
// sides - array of S32 indices of texture entries
|
||||
// gltf_json - array of corresponding Strings of GLTF json for override data
|
||||
|
||||
LLSD message;
|
||||
bool success = true;
|
||||
#if 0 //deprecated
|
||||
for(const std::string& llsdRaw : strings)
|
||||
{
|
||||
std::istringstream llsdData(llsdRaw);
|
||||
if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
|
||||
{
|
||||
LL_WARNS() << "LLGLTFMaterialOverrideDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
LLGLTFOverrideCacheEntry object_override;
|
||||
if (!object_override.fromLLSD(message))
|
||||
{
|
||||
// malformed message, nothing we can do to handle it
|
||||
LL_DEBUGS("GLTF") << "Message without id:" << message << LL_ENDL;
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Cache the data
|
||||
{
|
||||
LLViewerRegion * region = LLWorld::instance().getRegionFromHandle(object_override.mRegionHandle);
|
||||
|
||||
if (region)
|
||||
{
|
||||
region->cacheFullUpdateGLTFOverride(object_override);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("GLTF") << "could not access region for material overrides message cache, region_handle: " << LL_ENDL;
|
||||
}
|
||||
}
|
||||
applyData(object_override);
|
||||
}
|
||||
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
void doSelectionCallbacks(const LLUUID& object_id, S32 side)
|
||||
{
|
||||
for (auto& callback : mSelectionCallbacks)
|
||||
|
|
@ -210,112 +159,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void applyData(const LLGLTFOverrideCacheEntry &object_override)
|
||||
{
|
||||
// Parse the data
|
||||
|
||||
#if 0 // DEPRECATED
|
||||
LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
|
||||
LL::WorkQueue::ptr_t general_queue = LL::WorkQueue::getInstance("General");
|
||||
|
||||
struct ReturnData
|
||||
{
|
||||
public:
|
||||
LLGLTFMaterial mMaterial;
|
||||
S32 mSide;
|
||||
bool mSuccess;
|
||||
};
|
||||
|
||||
if (!object_override.mSides.empty())
|
||||
{
|
||||
// fromJson() is performance heavy offload to a thread.
|
||||
main_queue->postTo(
|
||||
general_queue,
|
||||
[sides=object_override.mSides]() // Work done on general queue
|
||||
{
|
||||
std::vector<ReturnData> results;
|
||||
|
||||
results.reserve(sides.size());
|
||||
// parse json
|
||||
std::unordered_map<S32, LLSD>::const_iterator iter = sides.begin();
|
||||
std::unordered_map<S32, LLSD>::const_iterator end = sides.end();
|
||||
while (iter != end)
|
||||
{
|
||||
ReturnData result;
|
||||
|
||||
result.mMaterial.applyOverrideLLSD(iter->second);
|
||||
|
||||
result.mSuccess = true;
|
||||
result.mSide = iter->first;
|
||||
|
||||
results.push_back(result);
|
||||
iter++;
|
||||
}
|
||||
return results;
|
||||
},
|
||||
[object_id=object_override.mObjectId, this](std::vector<ReturnData> results) // Callback to main thread
|
||||
{
|
||||
LLViewerObject * obj = gObjectList.findObject(object_id);
|
||||
|
||||
if (results.size() > 0 )
|
||||
{
|
||||
std::unordered_set<S32> side_set;
|
||||
|
||||
for (auto const & result : results)
|
||||
{
|
||||
S32 side = result.mSide;
|
||||
if (result.mSuccess)
|
||||
{
|
||||
// copy to heap here because LLTextureEntry is going to take ownership with an LLPointer
|
||||
LLGLTFMaterial * material = new LLGLTFMaterial(result.mMaterial);
|
||||
|
||||
// flag this side to not be nulled out later
|
||||
side_set.insert(side);
|
||||
|
||||
if (obj)
|
||||
{
|
||||
obj->setTEGLTFMaterialOverride(side, material);
|
||||
}
|
||||
}
|
||||
|
||||
// unblock material editor
|
||||
if (obj && obj->getTE(side) && obj->getTE(side)->isSelected())
|
||||
{
|
||||
doSelectionCallbacks(object_id, side);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj && side_set.size() != obj->getNumTEs())
|
||||
{ // object exists and at least one texture entry needs to have its override data nulled out
|
||||
for (int i = 0; i < obj->getNumTEs(); ++i)
|
||||
{
|
||||
if (side_set.find(i) == side_set.end())
|
||||
{
|
||||
obj->setTEGLTFMaterialOverride(i, nullptr);
|
||||
if (obj->getTE(i) && obj->getTE(i)->isSelected())
|
||||
{
|
||||
doSelectionCallbacks(object_id, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (obj)
|
||||
{ // override list was empty or an error occurred, null out all overrides for this object
|
||||
for (int i = 0; i < obj->getNumTEs(); ++i)
|
||||
{
|
||||
obj->setTEGLTFMaterialOverride(i, nullptr);
|
||||
if (obj->getTE(i) && obj->getTE(i)->isSelected())
|
||||
{
|
||||
doSelectionCallbacks(obj->getID(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::vector<void(*)(const LLUUID& object_id, S32 side)> mSelectionCallbacks;
|
||||
|
|
@ -821,12 +664,6 @@ void LLGLTFMaterialList::flushMaterials()
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGLTFMaterialList::registerCallbacks()
|
||||
{
|
||||
gGenericDispatcher.addHandler("GLTFMaterialOverride", &handle_gltf_override_message);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool) )
|
||||
{
|
||||
|
|
@ -864,7 +701,3 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
|
|||
}
|
||||
}
|
||||
|
||||
void LLGLTFMaterialList::loadCacheOverrides(const LLGLTFOverrideCacheEntry& override)
|
||||
{
|
||||
handle_gltf_override_message.applyData(override);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ public:
|
|||
|
||||
void flushMaterials();
|
||||
|
||||
static void registerCallbacks();
|
||||
|
||||
// Queue an modification of a material that we want to send to the simulator. Call "flushUpdates" to flush pending updates.
|
||||
// id - ID of object to modify
|
||||
// side - TexureEntry index to modify, or -1 for all sides
|
||||
|
|
@ -99,8 +97,6 @@ public:
|
|||
// any override data that arrived before the object was ready to receive it
|
||||
void applyQueuedOverrides(LLViewerObject* obj);
|
||||
|
||||
static void loadCacheOverrides(const LLGLTFOverrideCacheEntry& override);
|
||||
|
||||
// Apply an override update with the given data
|
||||
void applyOverrideMessage(LLMessageSystem* msg, const std::string& data);
|
||||
|
||||
|
|
|
|||
|
|
@ -2554,6 +2554,12 @@ bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool LLAssetIDAndTypeMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
|
||||
{
|
||||
if (!item) return false;
|
||||
return (item->getActualType() == mType && item->getAssetUUID() == mAssetID);
|
||||
}
|
||||
|
||||
bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
|
||||
{
|
||||
LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
|
||||
|
|
|
|||
|
|
@ -278,6 +278,28 @@ protected:
|
|||
LLAssetType::EType mType;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLAssetIDAndTypeMatches
|
||||
//
|
||||
// Implementation of a LLInventoryCollectFunctor which returns TRUE if
|
||||
// the item matches both asset type and asset id.
|
||||
// This is needed in case you are looking for a specific type with default id
|
||||
// (since null is default for multiple asset types)
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLAssetIDAndTypeMatches: public LLInventoryCollectFunctor
|
||||
{
|
||||
public:
|
||||
LLAssetIDAndTypeMatches(const LLUUID& asset_id, LLAssetType::EType type): mAssetID(asset_id), mType(type) {}
|
||||
virtual ~LLAssetIDAndTypeMatches() {}
|
||||
bool operator()(LLInventoryCategory* cat,
|
||||
LLInventoryItem* item);
|
||||
|
||||
protected:
|
||||
LLUUID mAssetID;
|
||||
LLAssetType::EType mType;
|
||||
};
|
||||
|
||||
class LLIsValidItemLink : public LLInventoryCollectFunctor
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewermenufile.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llsdutil.h"
|
||||
|
|
@ -448,6 +449,10 @@ BOOL LLMaterialEditor::postBuild()
|
|||
mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY));
|
||||
mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_NORMAL_TEX_DIRTY));
|
||||
|
||||
// should match normal textures from mBumpyTextureCtrl
|
||||
mNormalTextureCtrl->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("DefaultObjectNormalTexture")));
|
||||
mNormalTextureCtrl->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
|
||||
|
||||
if (mIsOverride)
|
||||
{
|
||||
// Live editing needs a recovery mechanism on cancel
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ BOOL LLPanelFace::postBuild()
|
|||
pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
|
||||
pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
|
||||
pbr_ctrl->setBakeTextureEnabled(false);
|
||||
pbr_ctrl->setInventoryPickType(LLTextureCtrl::PICK_MATERIAL);
|
||||
pbr_ctrl->setInventoryPickType(PICK_MATERIAL);
|
||||
}
|
||||
|
||||
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
|
||||
|
|
@ -5176,8 +5176,9 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
|
|||
bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material?
|
||||
bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent?
|
||||
bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale?
|
||||
bool from_library = ALEXANDRIA_LINDEN_ID == itemp->getPermissions().getOwner();
|
||||
|
||||
if (can_copy && can_transfer && can_modify)
|
||||
if ((can_copy && can_transfer && can_modify) || from_library)
|
||||
{
|
||||
pbr_ctrl->setCanApply(true, true);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1969,7 +1969,8 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
|
|||
PERM_NONE,
|
||||
PERM_NONE,
|
||||
FALSE,
|
||||
NULL);
|
||||
NULL,
|
||||
PICK_TEXTURE);
|
||||
|
||||
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
||||
|
||||
|
|
@ -2304,7 +2305,8 @@ void LLPanelProfileFirstLife::onChangePhoto()
|
|||
PERM_NONE,
|
||||
PERM_NONE,
|
||||
FALSE,
|
||||
NULL);
|
||||
NULL,
|
||||
PICK_TEXTURE);
|
||||
|
||||
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
||||
|
||||
|
|
|
|||
|
|
@ -1959,26 +1959,30 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
if (mItem && objectp->isAttachment())
|
||||
{
|
||||
const LLPermissions& perm = mItem->getPermissions();
|
||||
BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
|
||||
if (!unrestricted)
|
||||
{
|
||||
// Attachments are in world and in inventory simultaneously,
|
||||
// at the moment server doesn't support such a situation.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
LLUUID asset_id = mMatId;
|
||||
if (mItem)
|
||||
{
|
||||
// If success, the material may be copied into the object's inventory
|
||||
BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
|
||||
if (!success)
|
||||
const LLPermissions& perm = mItem->getPermissions();
|
||||
bool from_library = perm.getOwner() == ALEXANDRIA_LINDEN_ID;
|
||||
if (objectp->isAttachment())
|
||||
{
|
||||
bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
|
||||
|
||||
if (!unrestricted && !from_library)
|
||||
{
|
||||
// Attachments are in world and in inventory simultaneously,
|
||||
// at the moment server doesn't support such a situation.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!from_library
|
||||
// Check if item may be copied into the object's inventory
|
||||
&& !LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
asset_id = mItem->getAssetUUID();
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
|
|
@ -1994,11 +1998,13 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
};
|
||||
|
||||
bool success = true;
|
||||
if (item &&
|
||||
(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
|
||||
if (item
|
||||
&& (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
|
||||
!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) ||
|
||||
!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())
|
||||
))
|
||||
)
|
||||
&& item->getPermissions().getOwner() != ALEXANDRIA_LINDEN_ID
|
||||
)
|
||||
{
|
||||
success = success && getSelection()->applyRestrictedPbrMaterialToTEs(item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -739,7 +739,6 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
|||
static LLCachedControl<F32> auto_adjust_blue_horizon_scale(gSavedSettings, "RenderSkyAutoAdjustBlueHorizonScale", 1.f);
|
||||
static LLCachedControl<F32> auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f);
|
||||
static LLCachedControl<F32> auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f);
|
||||
static LLCachedControl<F32> auto_adjust_probe_ambiance(gSavedSettings, "RenderSkyAutoAdjustProbeAmbiance", 1.f);
|
||||
static LLCachedControl<F32> sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f);
|
||||
static LLCachedControl<F32> ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f);
|
||||
|
||||
|
|
@ -772,8 +771,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
|||
shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV);
|
||||
shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV);
|
||||
|
||||
LLSettingsSky::sAutoAdjustProbeAmbiance = auto_adjust_probe_ambiance;
|
||||
probe_ambiance = auto_adjust_probe_ambiance; // NOTE -- must match LLSettingsSky::getReflectionProbeAmbiance value for "auto_adjust" true
|
||||
probe_ambiance = sAutoAdjustProbeAmbiance;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1511,9 +1511,6 @@ bool idle_startup()
|
|||
gXferManager->registerCallbacks(gMessageSystem);
|
||||
display_startup();
|
||||
|
||||
LLGLTFMaterialList::registerCallbacks();
|
||||
display_startup();
|
||||
|
||||
LLStartUp::initNameCache();
|
||||
display_startup();
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
|
|||
PermissionMask immediate_filter_perm_mask,
|
||||
PermissionMask dnd_filter_perm_mask,
|
||||
BOOL can_apply_immediately,
|
||||
LLUIImagePtr fallback_image)
|
||||
LLUIImagePtr fallback_image,
|
||||
EPickInventoryType pick_type)
|
||||
: LLFloater(LLSD()),
|
||||
mOwner( owner ),
|
||||
mImageAssetID( image_asset_id ),
|
||||
|
|
@ -181,7 +182,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
|
|||
mSetImageAssetIDCallback(NULL),
|
||||
mOnUpdateImageStatsCallback(NULL),
|
||||
mBakeTextureEnabled(FALSE),
|
||||
mInventoryPickType(LLTextureCtrl::PICK_TEXTURE)
|
||||
mInventoryPickType(pick_type)
|
||||
{
|
||||
mCanApplyImmediately = can_apply_immediately;
|
||||
buildFromFile("floater_texture_ctrl.xml");
|
||||
|
|
@ -225,7 +226,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
|
|||
|
||||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
|
||||
if (mInventoryPickType == PICK_MATERIAL
|
||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||
&& itemp && itemp->getAssetUUID().isNull())
|
||||
{
|
||||
|
|
@ -266,7 +267,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
|
|||
void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bool set_selection)
|
||||
{
|
||||
LLUUID asset_id = itemp->getAssetUUID();
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
|
||||
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;
|
||||
|
|
@ -425,11 +426,11 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
|
|||
bool is_material = cargo_type == DAD_MATERIAL;
|
||||
|
||||
bool allow_dnd = false;
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
allow_dnd = is_material;
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
allow_dnd = is_texture || is_mesh;
|
||||
}
|
||||
|
|
@ -602,9 +603,7 @@ BOOL LLFloaterTexturePicker::postBuild()
|
|||
// don't put keyboard focus on selected item, because the selection callback
|
||||
// will assume that this was user input
|
||||
|
||||
|
||||
|
||||
if(!mImageAssetID.isNull())
|
||||
if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
|
||||
}
|
||||
|
|
@ -661,7 +660,7 @@ void LLFloaterTexturePicker::draw()
|
|||
mGLTFMaterial = NULL;
|
||||
if (mImageAssetID.notNull())
|
||||
{
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
mGLTFMaterial = (LLFetchedGLTFMaterial*) gGLTFMaterialList.getMaterial(mImageAssetID);
|
||||
llassert(mGLTFMaterial == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(gGLTFMaterialList.getMaterial(mImageAssetID)) != nullptr);
|
||||
|
|
@ -786,27 +785,43 @@ void LLFloaterTexturePicker::draw()
|
|||
|
||||
const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
|
||||
{
|
||||
LLUUID loockup_id = asset_id;
|
||||
if (loockup_id.isNull())
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
loockup_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLUUID::null;
|
||||
}
|
||||
// null asset id means, no material or texture assigned
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
LLUUID loockup_id = asset_id;
|
||||
if (mInventoryPickType == PICK_MATERIAL && loockup_id == LLGLTFMaterialList::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;
|
||||
}
|
||||
|
||||
LLViewerInventoryCategory::cat_array_t cats;
|
||||
LLViewerInventoryItem::item_array_t items;
|
||||
LLAssetIDMatches asset_id_matches(loockup_id);
|
||||
gInventory.collectDescendentsIf(LLUUID::null,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::INCLUDE_TRASH,
|
||||
asset_id_matches);
|
||||
|
||||
if (loockup_id.isNull())
|
||||
{
|
||||
// looking for a material with a null id, null id is shared by a lot
|
||||
// of objects as a default value, so have to filter by type as well
|
||||
LLAssetIDAndTypeMatches matches(loockup_id, LLAssetType::AT_MATERIAL);
|
||||
gInventory.collectDescendentsIf(LLUUID::null,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::INCLUDE_TRASH,
|
||||
matches);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAssetIDMatches asset_id_matches(loockup_id);
|
||||
gInventory.collectDescendentsIf(LLUUID::null,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::INCLUDE_TRASH,
|
||||
asset_id_matches);
|
||||
}
|
||||
|
||||
|
||||
if (items.size())
|
||||
{
|
||||
|
|
@ -871,7 +886,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
|
|||
|
||||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
|
||||
if (mInventoryPickType == PICK_MATERIAL
|
||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||
&& itemp && itemp->getAssetUUID().isNull())
|
||||
{
|
||||
|
|
@ -1064,15 +1079,15 @@ void LLFloaterTexturePicker::onBtnAdd(void* userdata)
|
|||
{
|
||||
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
|
||||
|
||||
if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL_TEXTURE, true);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (self->mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_IMAGE, true);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if (self->mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL, true);
|
||||
}
|
||||
|
|
@ -1351,7 +1366,7 @@ void LLFloaterTexturePicker::changeMode()
|
|||
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
|
||||
|
||||
bool pipette_visible = (index == PICKER_INVENTORY)
|
||||
&& (mInventoryPickType != LLTextureCtrl::PICK_MATERIAL);
|
||||
&& (mInventoryPickType != PICK_MATERIAL);
|
||||
mPipetteBtn->setVisible(pipette_visible);
|
||||
|
||||
if (index == PICKER_BAKE)
|
||||
|
|
@ -1414,16 +1429,16 @@ void LLFloaterTexturePicker::refreshLocalList()
|
|||
{
|
||||
mLocalScrollCtrl->clearRows();
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
|
|
@ -1433,18 +1448,18 @@ void LLFloaterTexturePicker::refreshInventoryFilter()
|
|||
{
|
||||
U32 filter_types = 0x0;
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||
}
|
||||
|
|
@ -1479,13 +1494,13 @@ void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
|
|||
onModeSelect(0, this);
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryType type)
|
||||
void LLFloaterTexturePicker::setInventoryPickType(EPickInventoryType type)
|
||||
{
|
||||
mInventoryPickType = type;
|
||||
refreshLocalList();
|
||||
refreshInventoryFilter();
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
getChild<LLButton>("Pipette")->setVisible(false);
|
||||
}
|
||||
|
|
@ -1501,7 +1516,7 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
|
|||
|
||||
setTitle(pick + mLabel);
|
||||
}
|
||||
else if(mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if(mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
setTitle(getString("pick_material"));
|
||||
}
|
||||
|
|
@ -1509,6 +1524,12 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
|
|||
{
|
||||
setTitle(getString("pick_texture"));
|
||||
}
|
||||
|
||||
// refresh selection
|
||||
if (!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::setImmediateFilterPermMask(PermissionMask mask)
|
||||
|
|
@ -1543,16 +1564,16 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& fi
|
|||
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)handle.get();
|
||||
self->mLocalScrollCtrl->clearRows();
|
||||
|
||||
if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (self->mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if (self->mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
|
|
@ -1565,7 +1586,7 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
|
|||
if (inventory_item_id.notNull())
|
||||
{
|
||||
LLToolPipette::getInstance()->setResult(TRUE, "");
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
// tes have no data about material ids
|
||||
// Plus gltf materials are layered with overrides,
|
||||
|
|
@ -1807,7 +1828,8 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
|
|||
mImmediateFilterPermMask,
|
||||
mDnDFilterPermMask,
|
||||
mCanApplyImmediately,
|
||||
mFallbackImage);
|
||||
mFallbackImage,
|
||||
mInventoryPickType);
|
||||
mFloaterHandle = floaterp->getHandle();
|
||||
|
||||
LLFloaterTexturePicker* texture_floaterp = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
|
||||
|
|
@ -1828,7 +1850,6 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
|
|||
texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
|
||||
|
||||
texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
|
||||
texture_floaterp->setInventoryPickType(mInventoryPickType);
|
||||
}
|
||||
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
|
|
@ -1891,7 +1912,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
if (!mOpenTexPreview)
|
||||
{
|
||||
showPicker(FALSE);
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
//grab materials first...
|
||||
LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_MATERIAL));
|
||||
|
|
@ -2089,11 +2110,11 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
bool is_material = cargo_type == DAD_MATERIAL;
|
||||
|
||||
bool allow_dnd = false;
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
allow_dnd = is_material;
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (mInventoryPickType == PICK_TEXTURE)
|
||||
{
|
||||
allow_dnd = is_texture || is_mesh;
|
||||
}
|
||||
|
|
@ -2156,7 +2177,7 @@ void LLTextureCtrl::draw()
|
|||
|
||||
if (texture.isNull())
|
||||
{
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
if (mInventoryPickType == PICK_MATERIAL)
|
||||
{
|
||||
LLPointer<LLFetchedGLTFMaterial> material = gGLTFMaterialList.getMaterial(mImageAssetID);
|
||||
if (material)
|
||||
|
|
@ -2313,7 +2334,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
|
|||
// 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 (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;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,13 @@ enum LLPickerSource
|
|||
PICKER_UNKNOWN, // on cancel, default ids
|
||||
};
|
||||
|
||||
typedef enum e_pick_inventory_type
|
||||
{
|
||||
PICK_TEXTURE_MATERIAL = 0,
|
||||
PICK_TEXTURE = 1,
|
||||
PICK_MATERIAL = 2,
|
||||
} EPickInventoryType;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// LLTextureCtrl
|
||||
|
||||
|
|
@ -87,13 +94,6 @@ public:
|
|||
TEXTURE_CANCEL
|
||||
} ETexturePickOp;
|
||||
|
||||
typedef enum e_pick_inventory_type
|
||||
{
|
||||
PICK_TEXTURE_MATERIAL = 0,
|
||||
PICK_TEXTURE = 1,
|
||||
PICK_MATERIAL = 2,
|
||||
} EPickInventoryType;
|
||||
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||
{
|
||||
|
|
@ -276,7 +276,7 @@ private:
|
|||
S32 mLabelWidth;
|
||||
bool mOpenTexPreview;
|
||||
bool mBakeTextureEnabled;
|
||||
LLTextureCtrl::EPickInventoryType mInventoryPickType;
|
||||
EPickInventoryType mInventoryPickType;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -300,8 +300,8 @@ public:
|
|||
PermissionMask immediate_filter_perm_mask,
|
||||
PermissionMask dnd_filter_perm_mask,
|
||||
BOOL can_apply_immediately,
|
||||
LLUIImagePtr fallback_image_name
|
||||
);
|
||||
LLUIImagePtr fallback_image_name,
|
||||
EPickInventoryType pick_type);
|
||||
|
||||
virtual ~LLFloaterTexturePicker();
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ public:
|
|||
void setLocalTextureEnabled(BOOL enabled);
|
||||
void setBakeTextureEnabled(BOOL enabled);
|
||||
|
||||
void setInventoryPickType(LLTextureCtrl::EPickInventoryType type);
|
||||
void setInventoryPickType(EPickInventoryType type);
|
||||
void setImmediateFilterPermMask(PermissionMask mask);
|
||||
|
||||
static void onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle);
|
||||
|
|
@ -428,7 +428,7 @@ private:
|
|||
bool mLimitsSet;
|
||||
S32 mMaxDim;
|
||||
S32 mMinDim;
|
||||
LLTextureCtrl::EPickInventoryType mInventoryPickType;
|
||||
EPickInventoryType mInventoryPickType;
|
||||
|
||||
|
||||
texture_selected_callback mTextureSelectedCallback;
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tiny
|
|||
{
|
||||
rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
|
||||
rawImage->verticalFlip();
|
||||
rawImage->optimizeAwayAlpha();
|
||||
}
|
||||
|
||||
return rawImage;
|
||||
|
|
|
|||
|
|
@ -5041,11 +5041,6 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
|
|||
LLViewerObject* obj = gObjectList.findObject(id);
|
||||
if (obj)
|
||||
{
|
||||
LLViewerRegion* region = obj->getRegion();
|
||||
if(region)
|
||||
{
|
||||
region->loadCacheMiscExtras(obj->getLocalID());
|
||||
}
|
||||
obj->markForUpdate();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1879,8 +1879,6 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
|
|||
addActiveCacheEntry(entry);
|
||||
}
|
||||
|
||||
loadCacheMiscExtras(entry->getLocalID());
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
@ -3655,15 +3653,6 @@ std::string LLViewerRegion::getSimHostName()
|
|||
return std::string("...");
|
||||
}
|
||||
|
||||
void LLViewerRegion::loadCacheMiscExtras(U32 local_id)
|
||||
{
|
||||
auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
|
||||
if (iter != mImpl->mGLTFOverridesLLSD.end())
|
||||
{
|
||||
LLGLTFMaterialList::loadCacheOverrides(iter->second);
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
|
||||
|
|
|
|||
|
|
@ -435,8 +435,6 @@ private:
|
|||
bool isNonCacheableObjectCreated(U32 local_id);
|
||||
|
||||
public:
|
||||
void loadCacheMiscExtras(U32 local_id);
|
||||
|
||||
void applyCacheMiscExtras(LLViewerObject* obj);
|
||||
|
||||
struct CompareDistance
|
||||
|
|
|
|||
Loading…
Reference in New Issue