diff options
-rwxr-xr-x | .hgtags | 1 | ||||
-rwxr-xr-x | autobuild.xml | 4 | ||||
-rwxr-xr-x | build.sh | 2 | ||||
-rwxr-xr-x | doc/contributions.txt | 1 | ||||
-rwxr-xr-x | indra/cmake/BuildVersion.cmake | 6 | ||||
-rwxr-xr-x | indra/llcommon/llstring.cpp | 17 | ||||
-rwxr-xr-x | indra/llcommon/llstring.h | 1 | ||||
-rwxr-xr-x | indra/llcommon/lluri.cpp | 29 | ||||
-rwxr-xr-x | indra/llui/lltextbase.cpp | 6 | ||||
-rwxr-xr-x | indra/newview/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 10 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llpanelface.cpp | 68 | ||||
-rwxr-xr-x | indra/newview/llselectmgr.cpp | 42 | ||||
-rwxr-xr-x | indra/newview/llvovolume.cpp | 22 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 8 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 6 |
18 files changed, 171 insertions, 63 deletions
@@ -455,3 +455,4 @@ a314f1c94374ab1f6633dd2983f7090a68663eb2 3.5.2-beta4 1cfa86d604909dfdb8b372069ff61f9afaa2aac1 MAINT-2647 895628bb5e162410cfdf4bca58f0a57d22ccfcde 3.5.2-beta5 9013c07bfe1c51107233f1924dccdcc5057dd909 3.5.2-beta6 +9b1b6f33aa5394b27bb652b31b5cb81ef6060370 3.5.2-release diff --git a/autobuild.xml b/autobuild.xml index f8138172b7..628d3f6883 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -522,9 +522,9 @@ <key>archive</key> <map> <key>hash</key> - <string>0980cdf98a322a780ba739e324d0b955</string> + <string>91752db72202807cffb33c1ec3fd90fc</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/274401/arch/CYGWIN/installer/fmodex-4.44-windows-20130419.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/276321/arch/CYGWIN/installer/fmodex-4.44-windows-20130521.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -357,7 +357,7 @@ then else upload_item installer "$package" binary/octet-stream upload_item quicklink "$package" binary/octet-stream - [ -f summary.json ] && upload_item installer summary.json text/plain + [ -f $build_dir/summary.json ] && upload_item installer $build_dir/summary.json text/plain case "$last_built_variant" in Release) diff --git a/doc/contributions.txt b/doc/contributions.txt index 5c445e9ed0..5b9a98ef80 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -901,6 +901,7 @@ Nicky Dasmijn VWR-29228 MAINT-873 SUN-72 + BUG-2432 Nicky Perian OPEN-1 STORM-1087 diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index c494355746..0094e313c7 100755 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -22,12 +22,12 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n OUTPUT_VARIABLE VIEWER_VERSION_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE ) - if (DEFINED VIEWER_VERSION_REVISION) + if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") message("Revision (from hg) ${VIEWER_VERSION_REVISION}") - else (DEFINED VIEWER_VERSION_REVISION) + else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") set(VIEWER_VERSION_REVISION 0 ) message("Revision not set, repository not found, using ${VIEWER_VERSION_REVISION}") - endif (DEFINED VIEWER_VERSION_REVISION) + endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") else (DEFINED MERCURIAL) set(VIEWER_VERSION_REVISION 0) message("Revision not set, 'hg' not found (${MERCURIAL}), using ${VIEWER_VERSION_REVISION}") diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 0c32679744..22c8681983 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -52,6 +52,23 @@ std::string ll_safe_string(const char* in, S32 maxlen) return std::string(); } +bool is_char_hex(char hex) +{ + if((hex >= '0') && (hex <= '9')) + { + return true; + } + else if((hex >= 'a') && (hex <='f')) + { + return true; + } + else if((hex >= 'A') && (hex <='F')) + { + return true; + } + return false; // uh - oh, not hex any more... +} + U8 hex_as_nybble(char hex) { if((hex >= '0') && (hex <= '9')) diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 119efc7957..f9702868c8 100755 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -470,6 +470,7 @@ inline std::string chop_tail_copy( * @brief This translates a nybble stored as a hex value from 0-f back * to a nybble in the low order bits of the return byte. */ +LL_COMMON_API bool is_char_hex(char hex); LL_COMMON_API U8 hex_as_nybble(char hex); /** diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 21456a599b..37f5b3d6a3 100755 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -129,11 +129,30 @@ std::string LLURI::unescape(const std::string& str) { ++it; if(it == end) break; - U8 c = hex_as_nybble(*it++); - c = c << 4; - if (it == end) break; - c |= hex_as_nybble(*it); - ostr.put((char)c); + + if(is_char_hex(*it)) + { + U8 c = hex_as_nybble(*it++); + + c = c << 4; + if (it == end) break; + + if(is_char_hex(*it)) + { + c |= hex_as_nybble(*it); + ostr.put((char)c); + } + else + { + ostr.put((char)c); + ostr.put(*it); + } + } + else + { + ostr.put('%'); + ostr.put(*it); + } } else { diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e70992129a..a45c4ced2e 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3206,14 +3206,14 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin LLWString offsetString(text.c_str() + segment_offset + mStart); if(getLength() < segment_offset + mStart) - { - llerrs << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" + { + llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl; } if(offsetString.length() + 1 < max_chars) { - llerrs << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() + llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl; } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4c535a952f..d06cee5ee6 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1252,8 +1252,12 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) +# the viewer_version.txt file created here is for passing to viewer_manifest +# the summary.json file is created for the benefit of the TeamCity builds, where +# it is used to provide descriptive information to the build results page add_custom_target(generate_viewer_version ALL - COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"}' > ${CMAKE_BINARY_DIR}/summary.json COMMENT Generating viewer_version.txt for manifest processing ) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e9b36ee5b1..9104ad8512 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12504,16 +12504,16 @@ <key>Value</key> <string>update</string> </map> - <key>UpdaterServiceProtocolVersion</key> + <key>UpdaterWillingToTest</key> <map> <key>Comment</key> - <string>The update protocol version to use.</string> + <string>Whether or not the updater should offer test candidate upgrades.</string> <key>Persist</key> - <integer>0</integer> + <integer>1</integer> <key>Type</key> - <string>String</string> + <string>Boolean</string> <key>Value</key> - <string>v1.0</string> + <string>1</string> </map> <key>UploadBakedTexOld</key> <map> diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 17311dd75e..b47fe9d4b1 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1215,8 +1215,8 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat mLODReqQ.push(req); LLMeshRepository::sLODProcessing++; } + mPendingLOD.erase(iter); } - mPendingLOD.erase(iter); } return true; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index d0eea6eb9b..49750c8c19 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -318,16 +318,18 @@ void LLPanelFace::sendTexGen() void LLPanelFace::sendShiny(U32 shininess) { + LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control"); + if (shininess < SHINY_TEXTURE) - { - LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control"); + { texture_ctrl->clear(); texture_ctrl->setImageAssetID(LLUUID()); + + U8 shiny = (U8) shininess & TEM_SHINY_MASK; + LLSelectMgr::getInstance()->selectionSetShiny( shiny ); } - U8 shiny = (U8) shininess & TEM_SHINY_MASK; - LLSelectMgr::getInstance()->selectionSetShiny( shiny ); - updateShinyControls(shininess == SHINY_TEXTURE, true); + updateShinyControls(!texture_ctrl->getImageAssetID().isNull(), true); updateMaterial(); } @@ -686,6 +688,25 @@ void LLPanelFace::updateUI() getChildView("ColorTrans")->setEnabled(editable); } + // Specular map + struct spec_get : public LLSelectedTEGetFunctor<LLUUID> + { + LLUUID get(LLViewerObject* object, S32 te_index) + { + LLUUID id; + + LLMaterial* mat = object->getTE(te_index)->getMaterialParams().get(); + + if (mat) + { + id = mat->getSpecularID(); + } + + return id; + } + } spec_get_func; + identical_spec = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &spec_get_func, specmap_id ); + U8 shiny = 0; // Shiny @@ -701,6 +722,9 @@ void LLPanelFace::updateUI() LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess"); + + shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE; + if (combobox_shininess) { combobox_shininess->selectNthItem((S32)shiny); @@ -813,28 +837,6 @@ void LLPanelFace::updateUI() if (bumpy != BUMPY_TEXTURE) normmap_id = LLUUID::null; - // Specular map - struct spec_get : public LLSelectedTEGetFunctor<LLUUID> - { - LLUUID get(LLViewerObject* object, S32 te_index) - { - LLUUID id; - - LLMaterial* mat = object->getTE(te_index)->getMaterialParams().get(); - - if (mat) - { - id = mat->getSpecularID(); - } - - return id; - } - } spec_get_func; - identical_spec = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &spec_get_func, specmap_id ); - - if (shiny != SHINY_TEXTURE) - specmap_id = LLUUID::null; - mIsAlpha = FALSE; LLGLenum image_format; struct f2 : public LLSelectedTEGetFunctor<LLGLenum> @@ -960,7 +962,9 @@ void LLPanelFace::updateUI() if (shinytexture_ctrl && !shinytexture_ctrl->isPickerShown()) { - if (identical_spec && (shiny == SHINY_TEXTURE)) + // Can't use this test as we can't actually store SHINY_TEXTURE in the TEs *sigh* + // + if (identical_spec /*&& (shiny == SHINY_TEXTURE)*/) { shinytexture_ctrl->setTentative( FALSE ); shinytexture_ctrl->setEnabled( editable ); @@ -1534,7 +1538,7 @@ void LLPanelFace::updateUI() BOOL identical = true; F32 repeats = 1.0f; - U32 material_type = combobox_mattype->getCurrentIndex(); + U32 material_type = (combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? combobox_mattype->getCurrentIndex() : MATTYPE_DIFFUSE; switch (material_type) { default: @@ -1850,7 +1854,7 @@ void LLPanelFace::updateMaterial() LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID(); - if (!spec_map_id.isNull() && (shininess == SHINY_TEXTURE)) + if (!spec_map_id.isNull() && (shininess == SHINY_TEXTURE)) { LL_DEBUGS("Materials") << "Setting shiny texture, shininess = " << shininess << LL_ENDL; material->setSpecularID(spec_map_id); @@ -2276,6 +2280,7 @@ void LLPanelFace::onCommitNormalTexture( const LLSD& data ) void LLPanelFace::onCancelSpecularTexture(const LLSD& data) { + U8 shiny = 0; struct get_shiny : public LLSelectedTEGetFunctor<U8> { @@ -2285,6 +2290,9 @@ void LLPanelFace::onCancelSpecularTexture(const LLSD& data) } } func; LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, shiny ); + + LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID(); + shiny = spec_map_id.isNull() ? shiny : SHINY_TEXTURE; sendShiny(shiny); } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e42d29f7e3..1bb12e495d 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2507,8 +2507,46 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch) // Apply new scale to face if (planar) { - object->setTEScale(te_num, 1.f/object_scale.mV[s_axis]*scale_ratio.mV[s_axis], - 1.f/object_scale.mV[t_axis]*scale_ratio.mV[t_axis]); + F32 scale_s = scale_ratio.mV[s_axis]/object_scale.mV[s_axis]; + F32 scale_t = scale_ratio.mV[t_axis]/object_scale.mV[t_axis]; + + switch (mTextureChannel) + { + case LLRender::DIFFUSE_MAP: + { + object->setTEScale(te_num, scale_s, scale_t); + } + break; + + case LLRender::NORMAL_MAP: + { + LLTextureEntry* tep = object->getTE(te_num); + if (tep && !tep->getMaterialParams().isNull()) + { + LLMaterialPtr orig = tep->getMaterialParams(); + LLMaterialPtr p = new LLMaterial(orig->asLLSD()); + p->setNormalRepeat(scale_s * 0.5f, scale_t * 0.5f); + selectionSetMaterial( p ); + } + } + break; + + case LLRender::SPECULAR_MAP: + { + LLTextureEntry* tep = object->getTE(te_num); + if (tep && !tep->getMaterialParams().isNull()) + { + LLMaterialPtr orig = tep->getMaterialParams(); + LLMaterialPtr p = new LLMaterial(orig->asLLSD()); + p->setSpecularRepeat(scale_s * 0.5f, scale_t * 0.5f); + selectionSetMaterial( p ); + } + } + break; + default: + break; + } + } else { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 7fa3865675..3aef88ed94 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5392,6 +5392,28 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: registerFace(group, facep, pass[mask]); } } + else if (mat) + { + if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK : LLRenderPass::PASS_ALPHA_MASK); + } + else if (is_alpha || (te->getColor().mV[3] < 0.999f)) + { + registerFace(group, facep, LLRenderPass::PASS_ALPHA); + } + else if (gPipeline.canUseVertexShaders() + && LLPipeline::sRenderBump + && te->getShiny() + && can_be_shiny) + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT_SHINY : LLRenderPass::PASS_SHINY); + } + else + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT : LLRenderPass::PASS_SIMPLE); + } + } else if (is_alpha) { // can we safely treat this as an alpha mask? diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 2fb6a9fd40..dd4533ae74 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -237,8 +237,7 @@ enabled="true" follows="left|top" height="14" - initial_value="true" - control_name="UpdateWillingToTest" + control_name="UpdaterWillingToTest" label="Willing to update to release candidates" left_delta="0" mouse_opaque="true" diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 626115bd5d..d3a9437063 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -644,8 +644,8 @@ layout="topleft" label_width="205" left="10" - max_val="9999" - min_val="-9999" + max_val="360" + min_val="0" name="bumpyRot" width="265" /> @@ -707,8 +707,8 @@ layout="topleft" label_width="205" left="10" - max_val="9999" - min_val="-9999" + max_val="360" + min_val="0" name="shinyRot" width="265" /> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 179ebdbe00..35451c9621 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -154,10 +154,8 @@ class ViewerManifest(LLManifest): # Files in the newview/ directory self.path("gpu_table.txt") - - # The summary.json file gets left in the base checkout dir by - # build.sh. It's only created for a build.sh build. - if not self.path2basename(os.path.join(os.pardir, os.pardir), "summary.json"): + # The summary.json file gets left in the build directory by newview/CMakeLists.txt. + if not self.path2basename(os.pardir, "summary.json"): print "No summary.json file" def grid(self): |