From 1beb15c93b139e4494bb90cce30b1c67accb4b08 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 25 Apr 2013 17:59:45 -0400 Subject: Added tag 3.5.1-release for changeset 13149a524874 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f2ea8cb0ea..c3cfbeb4f7 100644 --- a/.hgtags +++ b/.hgtags @@ -442,3 +442,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 9d8726eca785acad694564516f16dd639faf45c0 3.5.1-beta2 4b7fa963b80e2056ab648f83a4d61310b3cedb3d DRTVWR-314 65ae89aeb7ea674a555e439e963f17949322ac94 3.5.1-beta3 +13149a524874b608aeb76325b35faff113a5ea53 3.5.1-release -- cgit v1.2.3 From 5c6d52f260900a483b7c9d8421ed5619b897d026 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:01:38 -0700 Subject: NORSPEC-156 modify fullbrightF colorspace conversion to eliminate delta with non-deferred fullbright look --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index b91aaf80fb..4dfd13d406 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,12 +42,9 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color; - color.rgb = pow(color.rgb, vec3(2.2)); + vec4 color = diffuseLookup(vary_texcoord0.xy)*pow(vertex_color.rgb,vec3(2.2f,2.2f,2.2f)); color.rgb = fullbrightAtmosTransport(color.rgb); - color.rgb = fullbrightScaleSoftClip(color.rgb); - frag_color = color; } -- cgit v1.2.3 From 8f5fc2d4c19dfaadc8113d17c219e3316e42d5bc Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:14:08 -0700 Subject: NORSPEC-156 move gamma correction to vert shader --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 2 +- indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 4dfd13d406..bb28f02aab 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,7 +42,7 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)*pow(vertex_color.rgb,vec3(2.2f,2.2f,2.2f)); + vec4 color = diffuseLookup(vary_texcoord0.xy)* vertex_color; color.rgb = fullbrightAtmosTransport(color.rgb); color.rgb = fullbrightScaleSoftClip(color.rgb); frag_color = color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index 2e6982d101..dd56a8c2b0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -58,7 +58,7 @@ void main() calcAtmospherics(pos.xyz); - vertex_color = diffuse_color; - + vertex_color.rgb = pow(diffuse_color, vec3(2.2f,2.2f,2.2f)); + vertex_color.a = diffuse_color.a; } -- cgit v1.2.3 From 0ee77e86deefdcee39a472b50178009a2ed99036 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 7 May 2013 15:21:49 -0700 Subject: NORSPEC-147 make repeats per meter disabled when in planar mode and make UI reps consistent across layers --- indra/newview/llpanelface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index f55d53fa29..877c7743fa 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1537,7 +1537,7 @@ void LLPanelFace::getState() { enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull())); identical = identical_spec_repeats; - repeats = repeats_spec * (identical_planar_texgen ? 2.0f : 1.0f); + repeats = repeats_spec; } break; @@ -1545,12 +1545,12 @@ void LLPanelFace::getState() { enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull())); identical = identical_norm_repeats; - repeats = repeats_norm * (identical_planar_texgen ? 2.0f : 1.0f); + repeats = repeats_norm; } break; } - getChildView("rptctrl")->setEnabled(enabled); + getChildView("rptctrl")->setEnabled(identical_planar_texgen ? FALSE : enabled); getChild("rptctrl")->setValue(editable ? repeats : 1.0f); getChild("rptctrl")->setTentative(!identical); } @@ -1978,7 +1978,7 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata) bool show_bumpiness = (!show_media) && (material_type == MATTYPE_NORMAL) && combo_matmedia->getEnabled(); bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled(); self->getChildView("combobox mattype")->setVisible(!show_media); - self->getChildView("rptctrl")->setVisible(show_texture); + self->getChildView("rptctrl")->setVisible(true); // Media controls self->getChildView("media_info")->setVisible(show_media); -- cgit v1.2.3 From 5aaab576ba42d35449ec8696d79aeb85d6d8015c Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:53:47 -0700 Subject: NORSPEC-156 back to the fix that actually works --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 5 ++++- indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index bb28f02aab..cb050c800f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,9 +42,12 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)* vertex_color; + vec4 color = diffuseLookup(vary_texcoord0.xy) * pow(vertex_color.rgb,vec3(2.2f)); + color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = fullbrightScaleSoftClip(color.rgb); + frag_color = color; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index dd56a8c2b0..3f09a15375 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -57,8 +57,6 @@ void main() vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; calcAtmospherics(pos.xyz); - - vertex_color.rgb = pow(diffuse_color, vec3(2.2f,2.2f,2.2f)); - vertex_color.a = diffuse_color.a; - + + vertex_color = diffuse_color; } -- cgit v1.2.3 From ae0f362f220c54e72700b96545b9f4956ee8a113 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 20:00:38 -0700 Subject: Rollback NORSPEC-156 change which fails to compile due to implicit cast --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index cb050c800f..8d76485886 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,7 +42,8 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy) * pow(vertex_color.rgb,vec3(2.2f)); + vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + color.rgb = pow(color.rgb,vec3(2.2f,2.2f,2.2f)); color.rgb = fullbrightAtmosTransport(color.rgb); -- cgit v1.2.3 From 186b60457808d5fb280531bc96aba8fc8b67ef12 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 May 2013 10:22:10 -0400 Subject: remove duplications and other errors introduced during the merge --- indra/llcommon/llavatarname.h | 5 ----- indra/llcommon/llfasttimer.cpp | 6 ----- indra/llprimitive/llprimitive.cpp | 9 -------- indra/newview/llvoavatar.cpp | 46 +++++++-------------------------------- 4 files changed, 8 insertions(+), 58 deletions(-) diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 87e7d95f32..7542a8dece 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -69,11 +69,6 @@ public: // *TODO: Eliminate this in favor of username only std::string getLegacyName() const; - // Returns "James Linden" or "bobsmith123 Resident" for backwards - // compatibility with systems like voice and muting - // *TODO: Eliminate this in favor of username only - std::string getLegacyName() const; - // "José Sanchez" or "James Linden", UTF-8 encoded Unicode // Takes the display name preference into account. This is truly the name that should // be used for all UI where an avatar name has to be used unless we truly want something else (rare) diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index ec94691cae..9b15804e97 100644 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -567,12 +567,6 @@ LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer() return *NamedTimerFactory::instance().getRootTimer(); } -//static -LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer() -{ - return *NamedTimerFactory::instance().getRootTimer(); -} - //static void LLFastTimer::nextFrame() { diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index d69a23c1d7..fe0e7e0133 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1372,15 +1372,6 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam return applyParsedTEMessage(tec); } -S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num) -{ - LLTEContents tec; - S32 retval = parseTEMessage(mesgsys, block_name, block_num, tec); - if (!retval) - return retval; - return applyParsedTEMessage(tec); -} - S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) { // use a negative block_num to indicate a single-block read (a non-variable block) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cf97f20ecf..d19cdd9e4c 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5839,8 +5839,6 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const } return FALSE; } - } - return FALSE; } return FALSE; } @@ -6478,8 +6476,7 @@ void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com { morph_target->applyMask(tex_data, width, height, num_components, maskedMorph->mInvert); } -} -} + } } @@ -7439,30 +7436,6 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara { // MULTIPLE_WEARABLES: extend to multiple wearables? LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); - if( te_image ) - { - std::string uuid_str; - te_image->getID().toString( uuid_str ); - apr_file_printf( file, "\t\t\n", te, uuid_str.c_str()); - } - } - } - } - } - else - { - // Just dump all params sequentially. - for (LLVisualParam* param = getFirstVisualParam(); param; param = getNextVisualParam()) - { - LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param; - dump_visual_param(file, viewer_param, viewer_param->getWeight()); - } - - for (U8 te = 0; te < TEX_NUM_INDICES; te++) - { - { - // MULTIPLE_WEARABLES: extend to multiple wearables? - LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); if( te_image ) { std::string uuid_str; @@ -7471,7 +7444,6 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara } } } - } } else @@ -7485,19 +7457,17 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara for (U8 te = 0; te < TEX_NUM_INDICES; te++) { + // MULTIPLE_WEARABLES: extend to multiple wearables? + LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); + if( te_image ) { - // MULTIPLE_WEARABLES: extend to multiple wearables? - LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); - if( te_image ) - { - std::string uuid_str; - te_image->getID().toString( uuid_str ); - apr_file_printf( file, "\t\t\n", te, uuid_str.c_str()); - } + std::string uuid_str; + te_image->getID().toString( uuid_str ); + apr_file_printf( file, "\t\t\n", te, uuid_str.c_str()); } } - } + apr_file_printf( file, "\t\n" ); apr_file_printf( file, "\n\n" ); -- cgit v1.2.3 From ff919a884b2c466d679164b6b7c440c2cd7581b7 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Thu, 9 May 2013 14:01:31 -0700 Subject: NORSPEC-170 make adv lighting checkbox reflect whether deferred shaders loaded successfully --- indra/newview/llfloaterpreference.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index b45c944a5f..55b03986d0 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1149,7 +1149,7 @@ void LLFloaterPreference::refreshEnabledState() //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders"); - BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) && shaders && gGLManager.mHasFramebufferObject && @@ -1163,7 +1163,9 @@ void LLFloaterPreference::refreshEnabledState() LLComboBox* ctrl_shadow = getChild("ShadowDetail"); enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); - + + ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred")); + ctrl_ssao->setEnabled(enabled); ctrl_dof->setEnabled(enabled); -- cgit v1.2.3 From 76c2a85661389469df77547e1732620755a1a729 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Thu, 9 May 2013 15:04:07 -0700 Subject: NORSPEC-168 separate UI handlers for spec and normal textures to avoid cross-talk and fix handling of bumpy/shiny menu items --- indra/newview/llpanelface.cpp | 90 +++++++++++++++++++++++++++---------------- indra/newview/llpanelface.h | 13 ++++--- 2 files changed, 64 insertions(+), 39 deletions(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 877c7743fa..9c40ff06cc 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -158,9 +158,9 @@ BOOL LLPanelFace::postBuild() if(mShinyTextureCtrl) { mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" ))); - mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitMaterialTexture, this, _2) ); - mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelMaterialTexture, this, _2) ); - mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectMaterialTexture, this, _2) ); + mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) ); + mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) ); + mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) ); mShinyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2)); mShinyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1)); mShinyTextureCtrl->setFollowsTop(); @@ -173,9 +173,9 @@ BOOL LLPanelFace::postBuild() if(mBumpyTextureCtrl) { mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" ))); - mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitMaterialTexture, this, _2) ); - mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelMaterialTexture, this, _2) ); - mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectMaterialTexture, this, _2) ); + mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) ); + mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) ); + mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) ); mBumpyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2)); mBumpyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1)); mBumpyTextureCtrl->setFollowsTop(); @@ -303,14 +303,14 @@ void LLPanelFace::sendBump() LLTextureCtrl* bumpytexture_ctrl = getChild("bumpytexture control"); bumpytexture_ctrl->clear(); LLSD dummy_data; - onSelectMaterialTexture(dummy_data); + onSelectNormalTexture(dummy_data); } U8 bump = (U8) bumpiness & TEM_BUMP_MASK; LLSelectMgr::getInstance()->selectionSetBumpmap( bump ); //refresh material state (in case this change impacts material params) LLSD dummy_data; - onCommitMaterialTexture(dummy_data); + onCommitNormalTexture(dummy_data); } void LLPanelFace::sendTexGen() @@ -333,6 +333,10 @@ void LLPanelFace::sendShiny() } U8 shiny = (U8) shininess & TEM_SHINY_MASK; LLSelectMgr::getInstance()->selectionSetShiny( shiny ); + + //refresh material state (in case this change impacts material params) + LLSD dummy_data; + onCommitSpecularTexture(dummy_data); } void LLPanelFace::sendFullbright() @@ -1716,7 +1720,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate getChild("glossiness")->setValue(material->getSpecularLightExponent()); getChild("environment")->setValue(material->getEnvironmentIntensity()); } - updateShinyControls(combobox_shininess,this, true); + updateShinyControls(combobox_shininess,this, !material->getSpecularID().isNull(), true); // Assert desired colorswatch color to match material AFTER updateShinyControls // to avoid getting overwritten with the default on some UI state changes. @@ -1749,7 +1753,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate getChild("bumpyOffsetU")->setValue(offset_x); getChild("bumpyOffsetV")->setValue(offset_y); } - updateBumpyControls(combobox_bumpiness,this, true); + updateBumpyControls(combobox_bumpiness,this, !material->getNormalID().isNull(), true); } void LLPanelFace::updateMaterial() @@ -1820,7 +1824,7 @@ void LLPanelFace::updateMaterial() material_to_set->setAlphaMaskCutoff((U8)(getChild("maskcutoff")->getValue().asInteger())); LLUUID norm_map_id = getChild("bumpytexture control")->getImageAssetID(); - if (!norm_map_id.isNull()) + if (!norm_map_id.isNull() && (bumpiness == BUMPY_TEXTURE)) { LL_DEBUGS("Materials") << "Setting bumpy texture, bumpiness = " << bumpiness << LL_ENDL; material_to_set->setNormalID(norm_map_id); @@ -1850,7 +1854,7 @@ void LLPanelFace::updateMaterial() LLUUID spec_map_id = getChild("shinytexture control")->getImageAssetID(); - if (!spec_map_id.isNull()) + if (!spec_map_id.isNull() && (shininess == SHINY_TEXTURE)) { LL_DEBUGS("Materials") << "Setting shiny texture, shininess = " << shininess << LL_ENDL; material_to_set->setSpecularID(spec_map_id); @@ -2084,10 +2088,8 @@ void LLPanelFace::onCommitBump(LLUICtrl* ctrl, void* userdata) self->sendBump(); LLComboBox* combo_bumpy = self->getChild("combobox bumpiness"); - // Need 'true' here to insure that the 'Use Texture' choice is removed - // when we select something other than a normmap texture - // - updateBumpyControls(combo_bumpy,self, true); + + updateBumpyControls(combo_bumpy,self, false, true); self->updateMaterial(); } @@ -2099,7 +2101,7 @@ void LLPanelFace::onCommitTexGen(LLUICtrl* ctrl, void* userdata) } // static -void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool mess_with_shiny_combobox) +void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool is_setting_texture, bool mess_with_shiny_combobox) { LLPanelFace* self = (LLPanelFace*) userdata; LLTextureCtrl* texture_ctrl = self->getChild("shinytexture control"); @@ -2113,7 +2115,7 @@ void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool mess_ { return; } - if (!shiny_texture_ID.isNull()) + if (!shiny_texture_ID.isNull() && is_setting_texture) { if (!comboShiny->itemExists(USE_TEXTURE)) { @@ -2124,12 +2126,12 @@ void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool mess_ LLColorSwatchCtrl* mShinyColorSwatch = self->getChild("shinycolorswatch"); if(mShinyColorSwatch) { - // Doing sets in a getState func causes the 'blinking updates' of swatch colors....DON'T. - // LL_DEBUGS("Materials") << "Resetting specular color to default of white" << LL_ENDL; mShinyColorSwatch->setOriginal(LLColor4::white); mShinyColorSwatch->set(LLColor4::white, TRUE); } + self->getChild("glossiness")->setValue(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT); + self->getChild("environment")->setValue(0); } comboShiny->setSimple(USE_TEXTURE); } @@ -2161,7 +2163,7 @@ void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool mess_ } // static -void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_with_combobox) +void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool is_setting_texture, bool mess_with_combobox) { LLPanelFace* self = (LLPanelFace*) userdata; LLTextureCtrl* texture_ctrl = self->getChild("bumpytexture control"); @@ -2175,7 +2177,11 @@ void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_ if (mess_with_combobox) { - if (!bumpy_texture_ID.isNull()) + LLTextureCtrl* texture_ctrl = self->getChild("bumpytexture control"); + LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID(); + LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL; + + if (!bumpy_texture_ID.isNull() && is_setting_texture) { if (!comboBumpy->itemExists(USE_TEXTURE)) { @@ -2204,7 +2210,7 @@ void LLPanelFace::onCommitShiny(LLUICtrl* ctrl, void* userdata) // Need 'true' here to insure that the 'Use Texture' choice is removed // when we select something other than a spec texture // - updateShinyControls(combo_shiny,self, true); + updateShinyControls(combo_shiny,self, false, true); self->updateMaterial(); } @@ -2298,34 +2304,50 @@ void LLPanelFace::onSelectTexture(const LLSD& data) sendTexture(); } -void LLPanelFace::onCommitMaterialTexture( const LLSD& data ) +void LLPanelFace::onCommitSpecularTexture( const LLSD& data ) { LL_DEBUGS("Materials") << data << LL_ENDL; - updateMaterial(); LLComboBox* combo_shiny = getChild("combobox shininess"); - updateShinyControls(combo_shiny,this, true); + updateShinyControls(combo_shiny,this, true, true); + updateMaterial(); +} + +void LLPanelFace::onCommitNormalTexture( const LLSD& data ) +{ + LL_DEBUGS("Materials") << data << LL_ENDL; LLComboBox* combo_bumpy = getChild("combobox bumpiness"); - updateBumpyControls(combo_bumpy,this, true); + updateBumpyControls(combo_bumpy, this, true, true); + updateMaterial(); } -void LLPanelFace::onCancelMaterialTexture(const LLSD& data) +void LLPanelFace::onCancelSpecularTexture(const LLSD& data) { - // not sure what to do here other than updateMaterial(); LLComboBox* combo_shiny = getChild("combobox shininess"); - updateShinyControls(combo_shiny,this, true); + updateShinyControls(combo_shiny,this, false, true); +} + +void LLPanelFace::onCancelNormalTexture(const LLSD& data) +{ + updateMaterial(); LLComboBox* combo_bumpy = getChild("combobox bumpiness"); - updateBumpyControls(combo_bumpy,this, true); + updateBumpyControls(combo_bumpy,this, false, true); } -void LLPanelFace::onSelectMaterialTexture(const LLSD& data) +void LLPanelFace::onSelectSpecularTexture(const LLSD& data) { LL_DEBUGS("Materials") << data << LL_ENDL; updateMaterial(); LLComboBox* combo_shiny = getChild("combobox shininess"); - updateShinyControls(combo_shiny,this, true); + updateShinyControls(combo_shiny,this, true, true); +} + +void LLPanelFace::onSelectNormalTexture(const LLSD& data) +{ + LL_DEBUGS("Materials") << data << LL_ENDL; LLComboBox* combo_bumpy = getChild("combobox bumpiness"); - updateBumpyControls(combo_bumpy,this, true); + updateBumpyControls(combo_bumpy,this, true, true); + updateMaterial(); } //static diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2138319365..7fbeef223b 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -76,9 +76,12 @@ protected: void onCommitTexture(const LLSD& data); void onCancelTexture(const LLSD& data); void onSelectTexture(const LLSD& data); - void onCommitMaterialTexture(const LLSD& data); - void onCancelMaterialTexture(const LLSD& data); - void onSelectMaterialTexture(const LLSD& data); + void onCommitSpecularTexture(const LLSD& data); + void onCancelSpecularTexture(const LLSD& data); + void onSelectSpecularTexture(const LLSD& data); + void onCommitNormalTexture(const LLSD& data); + void onCancelNormalTexture(const LLSD& data); + void onSelectNormalTexture(const LLSD& data); void onCommitColor(const LLSD& data); void onCommitShinyColor(const LLSD& data); void onCommitAlpha(const LLSD& data); @@ -93,8 +96,8 @@ protected: static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata); static void onCommitBump( LLUICtrl* ctrl, void* userdata); static void onCommitTexGen( LLUICtrl* ctrl, void* userdata); - static void updateShinyControls( LLUICtrl* ctrl, void* userdata, bool mess_with_combobox = false); - static void updateBumpyControls( LLUICtrl* ctrl, void* userdata, bool mess_with_combobox = false); + static void updateShinyControls( LLUICtrl* ctrl, void* userdata, bool is_setting_texture = false, bool mess_with_combobox = false); + static void updateBumpyControls( LLUICtrl* ctrl, void* userdata, bool is_setting_texture = false, bool mess_with_combobox = false); static void onCommitShiny( LLUICtrl* ctrl, void* userdata); static void updateAlphaControls( LLUICtrl* ctrl, void* userdata); static void onCommitAlphaMode( LLUICtrl* ctrl, void* userdata); -- cgit v1.2.3 From 425f0128143b57bcb09e45488c6f20af8198584b Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Thu, 9 May 2013 15:41:07 -0700 Subject: NORSPEC-164 fix TE copy ctor and operator= to include material pointer in addition to ID --- indra/llprimitive/lltextureentry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 691216e035..53816266eb 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -85,7 +85,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; - + mMaterial = rhs.mMaterial; if (rhs.mMediaEntry != NULL) { // Make a copy mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry); @@ -107,6 +107,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; + mMaterial = rhs.mMaterial; if (mMediaEntry != NULL) { delete mMediaEntry; } -- cgit v1.2.3 From d2f71df15f14fe0f7e17f962d39d19dd571fc530 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 10 May 2013 11:24:19 -0500 Subject: Remove some unreachable code --- indra/newview/llvoavatar.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d19cdd9e4c..74aeefd893 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1908,8 +1908,6 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) LLViewerFetchedTexture *image = getBakedTextureImage(te,uuid); llassert(image); return setTETextureCore(te, image); - llassert(image); - return setTETextureCore(te, image); } static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Avatar Update"); -- cgit v1.2.3