Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llinventorybridge.cpp # indra/newview/pipeline.h # indra/newview/skins/default/xui/en/menu_inventory.xmlmaster
commit
2053458181
|
|
@ -39,7 +39,7 @@ const F32 DEFAULT_NEAR_PLANE = 0.25f;
|
|||
const F32 DEFAULT_FAR_PLANE = 64.f; // far reaches across two horizontal, not diagonal, regions
|
||||
|
||||
const F32 MAX_ASPECT_RATIO = 50.0f;
|
||||
const F32 MAX_NEAR_PLANE = 10.f;
|
||||
const F32 MAX_NEAR_PLANE = 1023.9f; // Clamp the near plane just before the skybox ends
|
||||
const F32 MAX_FAR_PLANE = 100000.0f; //1000000.0f; // Max allowed. Not good Z precision though.
|
||||
const F32 MAX_FAR_CLIP = 512.0f;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ const F32 LIGHT_MAX_CUTOFF = 180.f;
|
|||
const F32 REFLECTION_PROBE_MIN_AMBIANCE = 0.f;
|
||||
const F32 REFLECTION_PROBE_MAX_AMBIANCE = 100.f;
|
||||
const F32 REFLECTION_PROBE_DEFAULT_AMBIANCE = 0.f;
|
||||
// *NOTE: Clip distances are clamped in LLCamera::setNear. The max clip
|
||||
// distance is currently limited by the skybox
|
||||
const F32 REFLECTION_PROBE_MIN_CLIP_DISTANCE = 0.f;
|
||||
const F32 REFLECTION_PROBE_MAX_CLIP_DISTANCE = 1024.f;
|
||||
const F32 REFLECTION_PROBE_DEFAULT_CLIP_DISTANCE = 0.f;
|
||||
|
|
|
|||
|
|
@ -12543,7 +12543,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>-0.004</real>
|
||||
<real>-0.002</real>
|
||||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
|
|
|||
|
|
@ -57,5 +57,8 @@ void main()
|
|||
frag_data[1] = vec4(0.0);
|
||||
frag_data[2] = vec4(0.0, 0.0, 0.0, GBUFFER_FLAG_HAS_ATMOS);
|
||||
frag_data[3] = vec4(c.rgb, c.a);
|
||||
|
||||
// Added and commented out for a ground truth. Do not uncomment - Geenz
|
||||
//gl_FragDepth = 0.999985f;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ void main()
|
|||
vec4 pos = (modelview_projection_matrix * vert);
|
||||
|
||||
// smash to *almost* far clip plane -- stars are still behind
|
||||
pos.z = pos.w*0.999999;
|
||||
// SL-19283 - finagle the moon position to be between clouds and stars.
|
||||
pos.z = pos.w*0.999991;
|
||||
gl_Position = pos;
|
||||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,9 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
|
|||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
|
||||
|
||||
// teach user about HDR settings
|
||||
if (mSettings && ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
|
||||
if (mSettings
|
||||
&& mSettings->getSettingsType() == "sky"
|
||||
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
|
||||
{
|
||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -809,7 +809,7 @@ void hide_context_entries(LLMenuGL& menu,
|
|||
|
||||
// descend into split menus:
|
||||
LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item);
|
||||
if ((name == "More") && branchp)
|
||||
if (((name == "More") || (name == "create_new")) && branchp)
|
||||
{
|
||||
hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries);
|
||||
}
|
||||
|
|
@ -864,7 +864,7 @@ void hide_context_entries(LLMenuGL& menu,
|
|||
// so that some other UI element from multi-select doesn't later set this invisible.
|
||||
menu_item->pushVisible(TRUE);
|
||||
|
||||
bool enabled = (menu_item->getEnabled() == TRUE);
|
||||
bool enabled = true;
|
||||
for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2)
|
||||
{
|
||||
enabled &= (*itor2 != name);
|
||||
|
|
@ -4709,10 +4709,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
|
|||
disabled_items.push_back(std::string("New Note"));
|
||||
disabled_items.push_back(std::string("New Settings"));
|
||||
disabled_items.push_back(std::string("New Gesture"));
|
||||
disabled_items.push_back(std::string("New Material"));
|
||||
disabled_items.push_back(std::string("New Clothes"));
|
||||
disabled_items.push_back(std::string("New Body Parts"));
|
||||
// <FS:Ansariel>
|
||||
disabled_items.push_back(std::string("upload_def"));
|
||||
//disabled_items.push_back(std::string("create_new")); // <FS:Ansariel> Undo weird menu design
|
||||
}
|
||||
if (favorites == mUUID)
|
||||
{
|
||||
|
|
@ -4738,10 +4740,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
|
|||
disabled_items.push_back(std::string("New Script"));
|
||||
disabled_items.push_back(std::string("New Note"));
|
||||
disabled_items.push_back(std::string("New Gesture"));
|
||||
disabled_items.push_back(std::string("New Material"));
|
||||
disabled_items.push_back(std::string("New Clothes"));
|
||||
disabled_items.push_back(std::string("New Body Parts"));
|
||||
// <FS:Ansariel>
|
||||
disabled_items.push_back(std::string("upload_def"));
|
||||
//disabled_items.push_back(std::string("create_new")); // <FS:Ansariel> Undo weird menu design
|
||||
}
|
||||
if (marketplace_listings_id == mUUID)
|
||||
{
|
||||
|
|
@ -4811,23 +4815,19 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
|
|||
if (!isMarketplaceListingsFolder() && !model->isObjectDescendentOf(mUUID, outfits_id))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// <FS:Ansariel> Undo weird menu design
|
||||
items.push_back(std::string("upload_def"));
|
||||
//items.push_back(std::string("create_new")); // <FS:Ansariel> Undo weird menu design
|
||||
items.push_back(std::string("New Script"));
|
||||
items.push_back(std::string("New Note"));
|
||||
items.push_back(std::string("New Gesture"));
|
||||
items.push_back(std::string("New Material"));
|
||||
items.push_back(std::string("New Clothes"));
|
||||
items.push_back(std::string("New Body Parts"));
|
||||
items.push_back(std::string("New Settings"));
|
||||
// </FS:Ansariel>
|
||||
items.push_back(std::string("upload_def"));
|
||||
|
||||
// <FS:Ansariel> Undo weird menu design
|
||||
if (!LLEnvironment::instance().isInventoryEnabled())
|
||||
{
|
||||
disabled_items.push_back("New Settings");
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
}
|
||||
if (menu_items_added)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1574,7 +1574,11 @@ void LLMaterialEditor::onSaveAsMsgCallback(const LLSD& notification, const LLSD&
|
|||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("InvalidMaterialName");
|
||||
LLNotificationsUtil::add("InvalidMaterialName", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
LLNotificationsUtil::add("SaveMaterialAs", LLSD().with("DESC", mMaterialName), LLSD(),
|
||||
boost::bind(&LLMaterialEditor::onSaveAsMsgCallback, this, _1, _2));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3209,7 +3213,11 @@ S32 LLMaterialEditor::saveTextures()
|
|||
{
|
||||
mUploadingTexturesCount++;
|
||||
work_count++;
|
||||
saveTexture(mBaseColorJ2C, mBaseColorName, mBaseColorTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
|
||||
// For ease of inventory management, we prepend the material name.
|
||||
std::string name = mMaterialName + ": " + mBaseColorName;
|
||||
|
||||
saveTexture(mBaseColorJ2C, name, mBaseColorTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
{
|
||||
LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key);
|
||||
if (me)
|
||||
|
|
@ -3247,7 +3255,11 @@ S32 LLMaterialEditor::saveTextures()
|
|||
{
|
||||
mUploadingTexturesCount++;
|
||||
work_count++;
|
||||
saveTexture(mNormalJ2C, mNormalName, mNormalTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
|
||||
// For ease of inventory management, we prepend the material name.
|
||||
std::string name = mMaterialName + ": " + mNormalName;
|
||||
|
||||
saveTexture(mNormalJ2C, name, mNormalTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
{
|
||||
LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key);
|
||||
if (me)
|
||||
|
|
@ -3285,7 +3297,11 @@ S32 LLMaterialEditor::saveTextures()
|
|||
{
|
||||
mUploadingTexturesCount++;
|
||||
work_count++;
|
||||
saveTexture(mMetallicRoughnessJ2C, mMetallicRoughnessName, mMetallicTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
|
||||
// For ease of inventory management, we prepend the material name.
|
||||
std::string name = mMaterialName + ": " + mMetallicRoughnessName;
|
||||
|
||||
saveTexture(mMetallicRoughnessJ2C, name, mMetallicTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
{
|
||||
LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key);
|
||||
if (me)
|
||||
|
|
@ -3324,7 +3340,11 @@ S32 LLMaterialEditor::saveTextures()
|
|||
{
|
||||
mUploadingTexturesCount++;
|
||||
work_count++;
|
||||
saveTexture(mEmissiveJ2C, mEmissiveName, mEmissiveTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
|
||||
// For ease of inventory management, we prepend the material name.
|
||||
std::string name = mMaterialName + ": " + mEmissiveName;
|
||||
|
||||
saveTexture(mEmissiveJ2C, name, mEmissiveTextureUploadId, [key](LLUUID newAssetId, LLSD response)
|
||||
{
|
||||
LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", LLSD(key));
|
||||
if (me)
|
||||
|
|
|
|||
|
|
@ -327,8 +327,8 @@ void LLReflectionMap::doOcclusion(const LLVector4a& eye)
|
|||
if (mOcclusionQuery == 0)
|
||||
{ // no query was previously issued, allocate one and issue
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("rmdo - glGenQueries");
|
||||
glGenQueries(1, &mOcclusionQuery);
|
||||
do_query = true;
|
||||
//glGenQueries(1, &mOcclusionQuery);
|
||||
do_query = false;
|
||||
}
|
||||
else
|
||||
{ // query was previously issued, check it and only issue a new query
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
extern BOOL gCubeSnapshot;
|
||||
extern BOOL gTeleportDisplay;
|
||||
|
||||
static U32 sUpdateCount = 0;
|
||||
|
||||
// get the next highest power of two of v (or v if v is already a power of two)
|
||||
//defined in llvertexbuffer.cpp
|
||||
extern U32 nhpo2(U32 v);
|
||||
|
|
@ -91,7 +93,7 @@ static bool check_priority(LLReflectionMap* a, LLReflectionMap* b)
|
|||
return false;
|
||||
}
|
||||
else if (b->mCubeIndex == -1)
|
||||
{ // certainly higher priority than b
|
||||
{ // b is not a candidate for updating, a is higher priority by default
|
||||
return true;
|
||||
}
|
||||
else if (!a->mComplete && !b->mComplete)
|
||||
|
|
@ -103,7 +105,13 @@ static bool check_priority(LLReflectionMap* a, LLReflectionMap* b)
|
|||
return update_score(a) > update_score(b);
|
||||
}
|
||||
|
||||
// one of these probes is not complete, if b is complete, a is higher priority
|
||||
// a or b is not complete,
|
||||
if (sUpdateCount % 3 == 0)
|
||||
{ // every third update, allow complete probes to cut in line in front of non-complete probes to avoid spammy probe generators from deadlocking scheduler (SL-20258))
|
||||
return !b->mComplete;
|
||||
}
|
||||
|
||||
// prioritize incomplete probe
|
||||
return b->mComplete;
|
||||
}
|
||||
|
||||
|
|
@ -351,6 +359,7 @@ void LLReflectionMapManager::update()
|
|||
|
||||
probe->autoAdjustOrigin();
|
||||
|
||||
sUpdateCount++;
|
||||
mUpdatingProbe = probe;
|
||||
doProbeUpdate();
|
||||
}
|
||||
|
|
@ -537,8 +546,14 @@ void LLReflectionMapManager::doProbeUpdate()
|
|||
|
||||
updateProbeFace(mUpdatingProbe, mUpdatingFace);
|
||||
|
||||
bool debug_updates = gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PROBE_UPDATES) && mUpdatingProbe->mViewerObject;
|
||||
|
||||
if (++mUpdatingFace == 6)
|
||||
{
|
||||
if (debug_updates)
|
||||
{
|
||||
mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 1, 1));
|
||||
}
|
||||
updateNeighbors(mUpdatingProbe);
|
||||
mUpdatingFace = 0;
|
||||
if (isRadiancePass())
|
||||
|
|
@ -552,6 +567,10 @@ void LLReflectionMapManager::doProbeUpdate()
|
|||
mRadiancePass = true;
|
||||
}
|
||||
}
|
||||
else if (debug_updates)
|
||||
{
|
||||
mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 0, 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Do the reflection map update render passes.
|
||||
|
|
|
|||
|
|
@ -267,11 +267,11 @@ void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXfor
|
|||
LLVector3(mExtents[1].getF32ptr())
|
||||
};
|
||||
|
||||
LLQuaternion backwardRotation = ~currentTransform.getRotation();
|
||||
LLQuaternion backwardRotation = ~currentTransform.getWorldRotation();
|
||||
for (LLVector3& corner : corners)
|
||||
{
|
||||
// Make coordinates relative to the current position
|
||||
corner -= currentTransform.getPosition();
|
||||
corner -= currentTransform.getWorldPosition();
|
||||
// Rotate coordinates backward to the current rotation
|
||||
corner.rotVec(backwardRotation);
|
||||
// Expand root extents on the current corner
|
||||
|
|
|
|||
|
|
@ -301,7 +301,8 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
|
|||
mLineEditor->setText(edit_text_contents);
|
||||
|
||||
std::string notif_name = mNotification->getName();
|
||||
if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) || ("CreateSubfolder" == notif_name))
|
||||
if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) ||
|
||||
("CreateSubfolder" == notif_name) || ("SaveMaterialAs" == notif_name))
|
||||
{
|
||||
mLineEditor->setPrevalidate(&LLTextValidate::validateASCII);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1123,6 +1123,54 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
|
|||
hit_obj->sendTEUpdate();
|
||||
}
|
||||
|
||||
void LLToolDragAndDrop::dropMaterial(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
LLToolDragAndDrop::ESource source,
|
||||
const LLUUID& src_id,
|
||||
bool all_faces)
|
||||
{
|
||||
LLSelectNode* nodep = nullptr;
|
||||
if (hit_obj->isSelected())
|
||||
{
|
||||
// update object's saved materials
|
||||
nodep = LLSelectMgr::getInstance()->getSelection()->findNode(hit_obj);
|
||||
}
|
||||
|
||||
// If user dropped a material onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if (all_faces)
|
||||
{
|
||||
dropMaterialAllFaces(hit_obj, item, source, src_id);
|
||||
|
||||
if (nodep)
|
||||
{
|
||||
uuid_vec_t material_ids;
|
||||
gltf_materials_vec_t override_materials;
|
||||
S32 num_faces = hit_obj->getNumTEs();
|
||||
for (S32 face = 0; face < num_faces; face++)
|
||||
{
|
||||
material_ids.push_back(hit_obj->getRenderMaterialID(face));
|
||||
override_materials.push_back(nullptr);
|
||||
}
|
||||
nodep->saveGLTFMaterials(material_ids, override_materials);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dropMaterialOneFace(hit_obj, hit_face, item, source, src_id);
|
||||
|
||||
// If user dropped a material onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if (nodep
|
||||
&& gFloaterTools->getVisible()
|
||||
&& nodep->mSavedGLTFMaterialIds.size() > hit_face)
|
||||
{
|
||||
nodep->mSavedGLTFMaterialIds[hit_face] = hit_obj->getRenderMaterialID(hit_face);
|
||||
nodep->mSavedGLTFOverrideMaterials[hit_face] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
|
|
@ -1228,6 +1276,71 @@ void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_fac
|
|||
avatar->userSetOptionalTE( hit_face, image);
|
||||
}
|
||||
*/
|
||||
void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id,
|
||||
bool all_faces,
|
||||
S32 tex_channel)
|
||||
{
|
||||
LLSelectNode* nodep = nullptr;
|
||||
if (hit_obj->isSelected())
|
||||
{
|
||||
// update object's saved textures
|
||||
nodep = LLSelectMgr::getInstance()->getSelection()->findNode(hit_obj);
|
||||
}
|
||||
|
||||
if (all_faces)
|
||||
{
|
||||
dropTextureAllFaces(hit_obj, item, source, src_id);
|
||||
|
||||
// If user dropped a texture onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if (nodep)
|
||||
{
|
||||
uuid_vec_t texture_ids;
|
||||
S32 num_faces = hit_obj->getNumTEs();
|
||||
for (S32 face = 0; face < num_faces; face++)
|
||||
{
|
||||
LLViewerTexture* tex = hit_obj->getTEImage(face);
|
||||
if (tex != nullptr)
|
||||
{
|
||||
texture_ids.push_back(tex->getID());
|
||||
}
|
||||
else
|
||||
{
|
||||
texture_ids.push_back(LLUUID::null);
|
||||
}
|
||||
}
|
||||
nodep->saveTextures(texture_ids);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dropTextureOneFace(hit_obj, hit_face, item, source, src_id);
|
||||
|
||||
// If user dropped a texture onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
LLPanelFace* panel_face = gFloaterTools->getPanelFace();
|
||||
if (nodep
|
||||
&& gFloaterTools->getVisible()
|
||||
&& panel_face
|
||||
&& panel_face->getTextureDropChannel() == 0 /*texture*/
|
||||
&& nodep->mSavedTextures.size() > hit_face)
|
||||
{
|
||||
LLViewerTexture* tex = hit_obj->getTEImage(hit_face);
|
||||
if (tex != nullptr)
|
||||
{
|
||||
nodep->mSavedTextures[hit_face] = tex->getID();
|
||||
}
|
||||
else
|
||||
{
|
||||
nodep->mSavedTextures[hit_face] = LLUUID::null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
|
|
@ -2212,104 +2325,48 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
|||
{
|
||||
if (cargo_type == DAD_TEXTURE)
|
||||
{
|
||||
LLSelectNode *nodep = nullptr;
|
||||
if (obj->isSelected())
|
||||
bool all_faces = mask & MASK_SHIFT;
|
||||
if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
|
||||
{
|
||||
// update object's saved textures
|
||||
nodep = LLSelectMgr::getInstance()->getSelection()->findNode(obj);
|
||||
}
|
||||
|
||||
if((mask & MASK_SHIFT))
|
||||
{
|
||||
dropTextureAllFaces(obj, item, mSource, mSourceID);
|
||||
|
||||
// If user dropped a texture onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if (nodep)
|
||||
{
|
||||
uuid_vec_t texture_ids;
|
||||
S32 num_faces = obj->getNumTEs();
|
||||
for (S32 face = 0; face < num_faces; face++)
|
||||
{
|
||||
LLViewerTexture *tex = obj->getTEImage(face);
|
||||
if (tex != nullptr)
|
||||
{
|
||||
texture_ids.push_back(tex->getID());
|
||||
}
|
||||
else
|
||||
{
|
||||
texture_ids.push_back(LLUUID::null);
|
||||
}
|
||||
}
|
||||
nodep->saveTextures(texture_ids);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dropTextureOneFace(obj, face, item, mSource, mSourceID);
|
||||
|
||||
// If user dropped a texture onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
LLPanelFace* panel_face = gFloaterTools->getPanelFace();
|
||||
if (nodep
|
||||
&& gFloaterTools->getVisible()
|
||||
&& panel_face
|
||||
&& panel_face->getTextureDropChannel() == 0 /*texture*/
|
||||
&& nodep->mSavedGLTFMaterialIds.size() > face)
|
||||
{
|
||||
LLViewerTexture *tex = obj->getTEImage(face);
|
||||
if (tex != nullptr)
|
||||
{
|
||||
nodep->mSavedTextures[face] = tex->getID();
|
||||
}
|
||||
else
|
||||
{
|
||||
nodep->mSavedTextures[face] = LLUUID::null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cargo_type == DAD_MATERIAL)
|
||||
{
|
||||
LLSelectNode *nodep = nullptr;
|
||||
if (obj->isSelected())
|
||||
{
|
||||
// update object's saved materials
|
||||
nodep = LLSelectMgr::getInstance()->getSelection()->findNode(obj);
|
||||
}
|
||||
|
||||
// If user dropped a material onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if ((mask & MASK_SHIFT))
|
||||
{
|
||||
dropMaterialAllFaces(obj, item, mSource, mSourceID);
|
||||
|
||||
if (nodep)
|
||||
{
|
||||
uuid_vec_t material_ids;
|
||||
gltf_materials_vec_t override_materials;
|
||||
S32 num_faces = obj->getNumTEs();
|
||||
for (S32 face = 0; face < num_faces; face++)
|
||||
{
|
||||
material_ids.push_back(obj->getRenderMaterialID(face));
|
||||
override_materials.push_back(nullptr);
|
||||
}
|
||||
nodep->saveGLTFMaterials(material_ids, override_materials);
|
||||
}
|
||||
dropTexture(obj, face, item, mSource, mSourceID, all_faces);
|
||||
}
|
||||
else
|
||||
{
|
||||
dropMaterialOneFace(obj, face, item, mSource, mSourceID);
|
||||
|
||||
// If user dropped a material onto face it implies
|
||||
// applying texture now without cancel, save to selection
|
||||
if (nodep
|
||||
&& gFloaterTools->getVisible()
|
||||
&& nodep->mSavedGLTFMaterialIds.size() > face)
|
||||
{
|
||||
nodep->mSavedGLTFMaterialIds[face] = obj->getRenderMaterialID(face);
|
||||
nodep->mSavedGLTFOverrideMaterials[face] = nullptr;
|
||||
}
|
||||
ESource source = mSource;
|
||||
LLUUID source_id = mSourceID;
|
||||
LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
// if Cancel pressed
|
||||
if (option == 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
dropTexture(obj, face, item, source, source_id, all_faces);
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (cargo_type == DAD_MATERIAL)
|
||||
{
|
||||
bool all_faces = mask & MASK_SHIFT;
|
||||
if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
|
||||
{
|
||||
dropMaterial(obj, face, item, mSource, mSourceID, all_faces);
|
||||
}
|
||||
else
|
||||
{
|
||||
ESource source = mSource;
|
||||
LLUUID source_id = mSourceID;
|
||||
LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
// if Cancel pressed
|
||||
if (option == 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
dropMaterial(obj, face, item, source, source_id, all_faces);
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (cargo_type == DAD_MESH)
|
||||
|
|
|
|||
|
|
@ -243,7 +243,15 @@ public:
|
|||
BOOL active,
|
||||
ESource source,
|
||||
const LLUUID& src_id);
|
||||
static void dropTextureOneFace(LLViewerObject* hit_obj, S32 hit_face,
|
||||
static void dropTexture(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id,
|
||||
bool all_faces,
|
||||
S32 tex_channel = -1);
|
||||
static void dropTextureOneFace(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id,
|
||||
|
|
@ -252,7 +260,14 @@ public:
|
|||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id);
|
||||
static void dropMaterialOneFace(LLViewerObject* hit_obj, S32 hit_face,
|
||||
static void dropMaterial(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id,
|
||||
bool all_faces);
|
||||
static void dropMaterialOneFace(LLViewerObject* hit_obj,
|
||||
S32 hit_face,
|
||||
LLInventoryItem* item,
|
||||
ESource source,
|
||||
const LLUUID& src_id);
|
||||
|
|
|
|||
|
|
@ -1257,7 +1257,11 @@ U64 info_display_from_string(std::string info_display)
|
|||
}
|
||||
else if ("reflection probes" == info_display)
|
||||
{
|
||||
return LLPipeline::RENDER_DEBUG_REFLECTION_PROBES;
|
||||
return LLPipeline::RENDER_DEBUG_REFLECTION_PROBES;
|
||||
}
|
||||
else if ("probe updates" == info_display)
|
||||
{
|
||||
return LLPipeline::RENDER_DEBUG_PROBE_UPDATES;
|
||||
}
|
||||
else if ("texture size" == info_display)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -610,7 +610,8 @@ public:
|
|||
RENDER_DEBUG_TRIANGLE_COUNT = 0x80000000,
|
||||
RENDER_DEBUG_IMPOSTORS = 0x100000000,
|
||||
RENDER_DEBUG_REFLECTION_PROBES = 0x200000000,
|
||||
RENDER_DEBUG_TEXTURE_SIZE = 0x400000000
|
||||
RENDER_DEBUG_PROBE_UPDATES = 0x400000000,
|
||||
RENDER_DEBUG_TEXTURE_SIZE = 0x800000000
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@
|
|||
<menu_item_check label="Gruppen-Objekte einschließen" name="Include Group-Owned Objects"/>
|
||||
<menu_item_check label="Unsichtbare Objekte auswählen" name="Select Invisible Objects"/>
|
||||
<menu_item_check label="Reflexionstests auswählen" name="Select Reflection Probes"/>
|
||||
<menu_item_check label="Updates Reflexionstests" name="Probe Updates"/>
|
||||
<menu_item_check label="Nach Umgebung auswählen" name="Select By Surrounding"/>
|
||||
<menu_item_check label="Physische Form beim Editieren anzeigen" name="Show Physics Shape"/>
|
||||
<menu_item_check label="Auswahlumrandung anzeigen" name="Show Selection Outlines"/>
|
||||
|
|
|
|||
|
|
@ -2446,6 +2446,13 @@ Geben Sie Ihr Kennwort erneut ein und klicken Sie auf OK.
|
|||
Sie haben die Position dieser Auswahl aktualisiert, aber die anderen Daten behalten ihre ursprünglichen Werte.
|
||||
<usetemplate name="okbutton" yestext="OK"/>
|
||||
</notification>
|
||||
<notification name="ApplyInventoryToObject">
|
||||
Sie wenden „kein Kopieren“ auf einen Gegenstand im Inventar an.
|
||||
Dieser Gegegstand wird in das Objekt-Inventar verschoben und nicht kopiert.
|
||||
|
||||
Gegenstand verschieben?
|
||||
<usetemplate ignoretext="Warnhinweis anzeigen, bevor ich „kein Kopieren“-Gegenstände auf ein Objekt anwende." name="okcancelignore" notext="Abbrechen" yestext="OK"/>
|
||||
</notification>
|
||||
<notification name="MoveInventoryFromObject">
|
||||
Sie haben „nicht kopierfähige“ Inventarobjekte ausgewählt.
|
||||
Diese Objekte werden nicht kopiert, sondern in Ihr Inventar verschoben.
|
||||
|
|
|
|||
|
|
@ -4264,6 +4264,16 @@
|
|||
function="Advanced.ToggleInfoDisplay"
|
||||
parameter="reflection probes" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Probe Updates"
|
||||
name="Probe Updates">
|
||||
<menu_item_check.on_check
|
||||
function="Advanced.CheckInfoDisplay"
|
||||
parameter="probe updates" />
|
||||
<menu_item_check.on_click
|
||||
function="Advanced.ToggleInfoDisplay"
|
||||
parameter="probe updates" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Particles"
|
||||
name="Particles">
|
||||
|
|
|
|||
|
|
@ -6270,6 +6270,22 @@ You have updated the location of this pick but the other details will retain the
|
|||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ApplyInventoryToObject"
|
||||
type="alertmodal">
|
||||
You are applying 'no copy' inventory item.
|
||||
This item will be moved to object's inventory, not copied.
|
||||
|
||||
Move the inventory item?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Warn me before I apply 'no-copy' items to an object"
|
||||
name="okcancelignore"
|
||||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="MoveInventoryFromObject"
|
||||
|
|
|
|||
Loading…
Reference in New Issue