diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llfloaterenvironmentadjust.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatertools.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/llmaterialeditor.h | 1 | ||||
| -rw-r--r-- | indra/newview/llpaneleditsky.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelface.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llviewershadermgr.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_adjust_environment.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml | 2 | 
11 files changed, 32 insertions, 32 deletions
| diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index 18be4fffda..f3133ecb37 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -495,10 +495,12 @@ void LLFloaterEnvironmentAdjust::updateGammaLabel()      if (ambiance != 0.f)      {          childSetValue("scene_gamma_label", getString("hdr_string")); +        getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setToolTip(getString("hdr_tooltip"));      }      else      {          childSetValue("scene_gamma_label", getString("brightness_string")); +        getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setToolTip(std::string());      }  } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index b6acba6558..5fb4fb9b07 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -925,6 +925,9 @@ void LLFloaterTools::onClose(bool app_quitting)  	// hide the advanced object weights floater  	LLFloaterReg::hideInstance("object_weights"); +    // hide gltf material editor +    LLFloaterReg::hideInstance("live_material_editor"); +  	// prepare content for next call  	mPanelContents->clearContents(); diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index a0c3fd9a28..0897ed14c6 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -412,9 +412,6 @@ BOOL LLMaterialEditor::postBuild()      if (mIsOverride)      { -        // Material override change success callback -        LLGLTFMaterialList::addSelectionUpdateCallback(&LLMaterialEditor::updateLive); -          // Live editing needs a recovery mechanism on cancel          mBaseColorTextureCtrl->setOnCancelCallback(boost::bind(&LLMaterialEditor::onCancelCtrl, this, _1, _2, MATERIAL_BASE_COLOR_TEX_DIRTY));          mMetallicTextureCtrl->setOnCancelCallback(boost::bind(&LLMaterialEditor::onCancelCtrl, this, _1, _2, MATERIAL_METALLIC_ROUGHTNESS_TEX_DIRTY)); @@ -542,12 +539,6 @@ void LLMaterialEditor::draw()  {      if (mIsOverride)      { -        bool selection_empty = LLSelectMgr::getInstance()->getSelection()->isEmpty(); -        if (selection_empty && mHasSelection) -        { -            mSelectionNeedsUpdate = true; -        } -          if (mSelectionNeedsUpdate)          {              mSelectionNeedsUpdate = false; @@ -1790,22 +1781,6 @@ void LLMaterialEditor::updateLive()      mOverrideInProgress = false;  } -void LLMaterialEditor::updateLive(const LLUUID &object_id, S32 te) -{ -    if (mOverrideObjectId != object_id -        || mOverrideObjectTE != te) -    { -        // Ignore if waiting for override, -        // if not waiting, mark selection dirty -        mSelectionNeedsUpdate |= !mOverrideInProgress; -        return; -    } - -    // update for currently displayed object and face -    mSelectionNeedsUpdate = true; -    mOverrideInProgress = false; -} -  void LLMaterialEditor::loadLive()  {      LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("live_material_editor"); @@ -2816,7 +2791,7 @@ public:              // something went wrong update selection              LLMaterialEditor::updateLive();          } -        // else we will get updateLive(obj, id) from applied overrides +        // else we will get updateLive() from panel face      }      bool getResult() { return mSuccess; } diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index b29db706f8..1c40fcc348 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -110,7 +110,6 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener      void onSelectionChanged(); // live overrides selection changes      static void updateLive(); -    static void updateLive(const LLUUID &object_id, S32 te);      static void loadLive();      static bool canModifyObjectsMaterial(); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 0a7a4763be..839f25761a 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -342,10 +342,12 @@ void LLPanelSettingsSkyAtmosTab::updateGammaLabel(bool auto_adjust)      if (ambiance != 0.f)      {          childSetValue("scene_gamma_label", getString("hdr_string")); +        getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setToolTip(getString("hdr_tooltip"));      }      else      {          childSetValue("scene_gamma_label", getString("brightness_string")); +        getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setToolTip(std::string());      }  } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e1f08915fa..cb28fb4770 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -515,6 +515,7 @@ void LLPanelFace::draw()      if (sMaterialOverrideSelection.update())      {          setMaterialOverridesFromSelection(); +        LLMaterialEditor::updateLive();      }  } @@ -1056,6 +1057,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)          LLSelectedTEMaterial::getSpecularID(specmap_id, identical_spec);          static S32 selected_te = -1; +        static LLUUID prev_obj_id;          if ((LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()) &&               !LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())           { @@ -1070,7 +1072,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)                  }              } -            if (new_selection != selected_te) +            if ((new_selection != selected_te) +                || (prev_obj_id != objectp->getID()))              {                  bool te_has_media = objectp->getTE(new_selection) && objectp->getTE(new_selection)->hasMedia();                  bool te_has_pbr = objectp->getRenderMaterialID(new_selection).notNull(); @@ -1088,6 +1091,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)                      mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);                  }                  selected_te = new_selection; +                prev_obj_id = objectp->getID();              }          } 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;  } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 82b16d67bd..d52f0b68fa 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2286,12 +2286,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()          if (local_light_kill)          {              gDeferredSoftenWaterProgram.addPermutation("LOCAL_LIGHT_KILL", "1"); -            gDeferredSoftenWaterProgram.addPermutation("HAS_SSAO", "1");          }  		if (gSavedSettings.getBOOL("RenderDeferredSSAO"))  		{ //if using SSAO, take screen space light map into account as if shadows are enabled  			gDeferredSoftenWaterProgram.mShaderLevel = llmax(gDeferredSoftenWaterProgram.mShaderLevel, 2); +            gDeferredSoftenWaterProgram.addPermutation("HAS_SSAO", "1");  		}  		success = gDeferredSoftenWaterProgram.createShader(NULL, NULL); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9fc092d4b9..9336d99555 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -534,9 +534,12 @@ void LLViewerTexture::updateClass()      static LLCachedControl<U32> max_vram_budget(gSavedSettings, "RenderMaxVRAMBudget", 0); +	F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0; +	F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0; +      // get an estimate of how much video memory we're using       // NOTE: our metrics miss about half the vram we use, so this biases high but turns out to typically be within 5% of the real number -    F32 used = (LLImageGL::getTextureBytesAllocated() + LLVertexBuffer::getBytesAllocated()) / 1024 / 512; +	F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);      F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget; diff --git a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml index 518a83f846..91a1dffcb5 100644 --- a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml +++ b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml @@ -12,6 +12,7 @@           can_resize="false">    <string name="hdr_string">HDR Scale:</string>    <string name="brightness_string">Brightness:</string> +  <string name="hdr_tooltip">Intensity of lightning effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>      <layout_stack name="outer_stack"                    width="845"                    height="275" @@ -263,6 +264,7 @@                            min_val="0"                            max_val="10"                            name="probe_ambiance" +                          tool_tip="Intensity of environment based indirect lighting. At zero HDR scale becomes Brightness"                            top_pad="5"                            width="185"                            can_edit_text="true"/> diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml index 2d79bc74ab..da82c95c83 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml @@ -9,6 +9,7 @@          top="0">    <string name="hdr_string">HDR Scale:</string>    <string name="brightness_string">Brightness:</string> +  <string name="hdr_tooltip">Intensity of lightning effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>      <layout_stack              name="main_ls"              follows="all" @@ -332,6 +333,7 @@                            min_val="0"                            max_val="10"                            name="probe_ambiance" +                          tool_tip="Intensity of environment based indirect lighting. At zero HDR scale becomes Brightness"                            top_delta="20"                            width="219"                            can_edit_text="true"/> | 
