diff options
Diffstat (limited to 'indra/newview')
-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 |
9 files changed, 118 insertions, 49 deletions
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): |