summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/integration_tests/llui_libtest/llwidgetreg.cpp2
-rw-r--r--indra/llcharacter/llcharacter.cpp25
-rw-r--r--indra/llcharacter/llcharacter.h1
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp73
-rw-r--r--indra/llcharacter/llkeyframemotion.h2
-rw-r--r--indra/llcommon/llaccountingquota.h26
-rw-r--r--indra/llcommon/llfoldertype.cpp2
-rw-r--r--indra/llcommon/llfoldertype.h5
-rw-r--r--indra/llcommon/llsdserialize.cpp4
-rw-r--r--indra/llcommon/llstat.cpp2
-rw-r--r--indra/llcommon/llversionviewer.h4
-rw-r--r--indra/llinventory/llparcel.cpp27
-rw-r--r--indra/llinventory/llparcel.h21
-rw-r--r--indra/llinventory/llparcelflags.h2
-rw-r--r--indra/llmath/lloctree.h11
-rw-r--r--indra/llmath/llvolume.cpp373
-rw-r--r--indra/llmath/llvolume.h8
-rw-r--r--indra/llmessage/lliosocket.cpp26
-rw-r--r--indra/llmessage/lliosocket.h11
-rw-r--r--indra/llmessage/message_prehash.cpp4
-rw-r--r--indra/llmessage/message_prehash.h4
-rw-r--r--indra/llmessage/tests/test_llsdmessage_peer.py9
-rw-r--r--indra/llmessage/tests/testrunner.py100
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2860
-rw-r--r--indra/llplugin/llpluginclassmedia.h851
-rw-r--r--indra/llprimitive/llmodel.cpp199
-rw-r--r--indra/llprimitive/llmodel.h2
-rw-r--r--indra/llrender/llgl.cpp172
-rw-r--r--indra/llrender/llgl.h10
-rw-r--r--indra/llrender/llglheaders.h66
-rw-r--r--indra/llrender/llglslshader.cpp55
-rw-r--r--indra/llrender/llglslshader.h4
-rw-r--r--indra/llrender/llimagegl.cpp15
-rw-r--r--indra/llrender/llimagegl.h2
-rw-r--r--indra/llrender/llrender.cpp19
-rw-r--r--indra/llrender/llrender.h1
-rw-r--r--indra/llrender/llrendertarget.cpp423
-rw-r--r--indra/llrender/llrendertarget.h26
-rw-r--r--indra/llrender/llshadermgr.cpp258
-rw-r--r--indra/llrender/llshadermgr.h5
-rw-r--r--indra/llrender/llvertexbuffer.cpp416
-rw-r--r--indra/llrender/llvertexbuffer.h58
-rw-r--r--indra/llui/CMakeLists.txt22
-rw-r--r--indra/llui/llaccordionctrltab.cpp2
-rw-r--r--indra/llui/llbadge.cpp274
-rw-r--r--indra/llui/llbadge.h159
-rw-r--r--indra/llui/llbadgeowner.cpp126
-rw-r--r--indra/llui/llbadgeowner.h (renamed from indra/newview/lldrawpoolclouds.h)57
-rw-r--r--indra/llui/llbutton.cpp71
-rw-r--r--indra/llui/llbutton.h16
-rw-r--r--indra/llui/llconsole.cpp13
-rw-r--r--indra/llui/lllayoutstack.cpp138
-rw-r--r--indra/llui/lllayoutstack.h36
-rw-r--r--indra/llui/lllineeditor.cpp123
-rw-r--r--indra/llui/lllineeditor.h10
-rw-r--r--indra/llui/llloadingindicator.h2
-rw-r--r--indra/llui/llmultislider.cpp2
-rw-r--r--indra/llui/llpanel.cpp8
-rw-r--r--indra/llui/llpanel.h5
-rw-r--r--indra/llui/llresmgr.cpp2
-rw-r--r--indra/llui/llspinctrl.cpp2
-rw-r--r--indra/llui/llspinctrl.h1
-rw-r--r--indra/llui/lltextvalidate.cpp33
-rw-r--r--indra/llui/lltextvalidate.h1
-rw-r--r--indra/llui/lltimectrl.cpp432
-rw-r--r--indra/llui/lltimectrl.h131
-rw-r--r--indra/llui/lluictrl.cpp36
-rw-r--r--indra/llui/lluictrl.h8
-rw-r--r--indra/llui/llview.cpp15
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp2
-rw-r--r--indra/llvfs/CMakeLists.txt34
-rw-r--r--indra/llvfs/lldiriterator.cpp21
-rw-r--r--indra/llvfs/tests/lldiriterator_test.cpp65
-rw-r--r--indra/llxuixml/llinitparam.cpp2
-rw-r--r--indra/llxuixml/llinitparam.h7
-rw-r--r--indra/lscript/lscript_compile/indra.l2
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp36
-rw-r--r--indra/newview/CMakeLists.txt139
-rw-r--r--indra/newview/app_settings/keys.xml2
-rw-r--r--indra/newview/app_settings/keywords.ini1
-rw-r--r--indra/newview/app_settings/logcontrol.xml2
-rw-r--r--indra/newview/app_settings/settings.xml364
-rw-r--r--indra/newview/app_settings/settings_minimal.xml13
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl67
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl113
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl79
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl165
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/giF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/giV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl137
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl232
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl108
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl133
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl140
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl318
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl234
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsF.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsV.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl123
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/transportF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl125
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl74
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl244
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl307
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl245
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl202
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl241
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/extractF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/simpleF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/shinyV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/simpleV.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/treeF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl2
-rw-r--r--indra/newview/app_settings/windlight/days/Colder%20Tones.xml28
-rw-r--r--indra/newview/app_settings/windlight/days/Dynamic%20Richness.xml32
-rw-r--r--indra/newview/app_settings/windlight/days/Pirate%27s%20Dream.xml44
-rw-r--r--indra/newview/app_settings/windlight/days/Psycho%20Strobe%21.xml72
-rw-r--r--indra/newview/app_settings/windlight/days/Tropicalia.xml32
-rw-r--r--indra/newview/app_settings/windlight/days/Weird-O.xml56
-rw-r--r--indra/newview/app_settings/windlight/skies/Midday.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Midnight.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Sunrise.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Sunset.xml142
-rw-r--r--indra/newview/featuretable.txt19
-rw-r--r--indra/newview/featuretable_linux.txt17
-rw-r--r--indra/newview/featuretable_mac.txt42
-rw-r--r--indra/newview/featuretable_xp.txt19
-rw-r--r--indra/newview/llaccountingquotamanager.cpp98
-rw-r--r--indra/newview/llagent.cpp18
-rw-r--r--indra/newview/llagentcamera.cpp6
-rw-r--r--indra/newview/llagentwearables.cpp2
-rw-r--r--indra/newview/llappviewer.cpp10
-rw-r--r--indra/newview/llassetuploadresponders.cpp12
-rwxr-xr-xindra/newview/llavataractions.cpp73
-rw-r--r--indra/newview/llavataractions.h3
-rw-r--r--indra/newview/llbottomtray.cpp3
-rw-r--r--indra/newview/llcloud.cpp538
-rw-r--r--indra/newview/llcloud.h199
-rw-r--r--indra/newview/llcofwearables.cpp5
-rw-r--r--indra/newview/lldaycyclemanager.cpp230
-rw-r--r--indra/newview/lldaycyclemanager.h84
-rw-r--r--indra/newview/lldebugview.cpp3
-rw-r--r--indra/newview/lldrawable.cpp17
-rw-r--r--indra/newview/lldrawable.h1
-rw-r--r--indra/newview/lldrawpool.cpp54
-rw-r--r--indra/newview/lldrawpool.h4
-rw-r--r--indra/newview/lldrawpoolalpha.cpp173
-rw-r--r--indra/newview/lldrawpoolavatar.cpp38
-rw-r--r--indra/newview/lldrawpoolbump.cpp102
-rw-r--r--indra/newview/lldrawpoolbump.h2
-rw-r--r--indra/newview/lldrawpoolclouds.cpp97
-rw-r--r--indra/newview/lldrawpoolsimple.cpp114
-rw-r--r--indra/newview/lldrawpoolsimple.h14
-rw-r--r--indra/newview/lldrawpoolterrain.cpp6
-rw-r--r--indra/newview/lldrawpooltree.cpp4
-rw-r--r--indra/newview/lldrawpoolwater.cpp4
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp99
-rw-r--r--indra/newview/lldrawpoolwlsky.h8
-rw-r--r--indra/newview/llenvmanager.cpp684
-rw-r--r--indra/newview/llenvmanager.h283
-rw-r--r--indra/newview/llface.cpp185
-rw-r--r--indra/newview/llface.h3
-rw-r--r--indra/newview/llfilteredwearablelist.cpp1
-rw-r--r--indra/newview/llfloaterauction.cpp3
-rw-r--r--indra/newview/llfloaterdaycycle.cpp531
-rw-r--r--indra/newview/llfloaterdaycycle.h120
-rw-r--r--indra/newview/llfloaterdeleteenvpreset.cpp285
-rw-r--r--indra/newview/llfloaterdeleteenvpreset.h62
-rw-r--r--indra/newview/llfloatereditdaycycle.cpp825
-rw-r--r--indra/newview/llfloatereditdaycycle.h137
-rw-r--r--indra/newview/llfloatereditsky.cpp923
-rw-r--r--indra/newview/llfloatereditsky.h113
-rw-r--r--indra/newview/llfloatereditwater.cpp772
-rw-r--r--indra/newview/llfloatereditwater.h (renamed from indra/newview/llfloaterwater.h)112
-rw-r--r--indra/newview/llfloaterenvironmentsettings.cpp282
-rw-r--r--indra/newview/llfloaterenvironmentsettings.h71
-rw-r--r--indra/newview/llfloaterenvsettings.cpp268
-rw-r--r--indra/newview/llfloaterenvsettings.h83
-rw-r--r--indra/newview/llfloaterhelpbrowser.cpp9
-rw-r--r--indra/newview/llfloaterhelpbrowser.h1
-rw-r--r--indra/newview/llfloaterland.cpp17
-rw-r--r--indra/newview/llfloaterland.h1
-rw-r--r--indra/newview/llfloatermodelpreview.cpp511
-rw-r--r--indra/newview/llfloatermodelpreview.h18
-rw-r--r--indra/newview/llfloatermodelwizard.cpp37
-rwxr-xr-xindra/newview/llfloaterpreference.cpp9
-rw-r--r--indra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/llfloaterregioninfo.cpp1029
-rw-r--r--indra/newview/llfloaterregioninfo.h120
-rw-r--r--indra/newview/llfloatersellland.cpp3
-rw-r--r--indra/newview/llfloatertools.cpp8
-rw-r--r--indra/newview/llfloaterwater.cpp625
-rw-r--r--indra/newview/llfloaterwebcontent.cpp18
-rw-r--r--indra/newview/llfloaterwebcontent.h2
-rw-r--r--indra/newview/llfloaterwindlight.cpp875
-rw-r--r--indra/newview/llfloaterwindlight.h112
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp21
-rw-r--r--indra/newview/llfolderview.cpp96
-rw-r--r--indra/newview/llfolderview.h26
-rw-r--r--indra/newview/llfolderviewitem.cpp202
-rw-r--r--indra/newview/llfolderviewitem.h36
-rw-r--r--indra/newview/llinventorybridge.cpp48
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfilter.cpp123
-rw-r--r--indra/newview/llinventoryfilter.h6
-rw-r--r--indra/newview/llinventoryfunctions.h24
-rw-r--r--indra/newview/llinventorymodel.cpp4
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp2
-rw-r--r--indra/newview/llinventoryobserver.cpp28
-rw-r--r--indra/newview/llinventoryobserver.h22
-rw-r--r--indra/newview/llinventorypanel.cpp477
-rw-r--r--indra/newview/llinventorypanel.h50
-rw-r--r--indra/newview/lllocationinputctrl.cpp13
-rw-r--r--indra/newview/lllocationinputctrl.h16
-rw-r--r--indra/newview/lllogchat.cpp2
-rw-r--r--indra/newview/llmanipscale.cpp6
-rw-r--r--indra/newview/llmediactrl.cpp18
-rw-r--r--indra/newview/llmeshrepository.cpp858
-rw-r--r--indra/newview/llmeshrepository.h27
-rw-r--r--indra/newview/llnearbychathandler.cpp37
-rw-r--r--indra/newview/lloutfitslist.cpp2
-rw-r--r--indra/newview/llpanelappearancetab.cpp1
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp95
-rw-r--r--indra/newview/llpanelimcontrolpanel.h8
-rw-r--r--indra/newview/llpanellandaudio.cpp22
-rw-r--r--indra/newview/llpanellandaudio.h2
-rw-r--r--indra/newview/llpanellandmarks.cpp9
-rw-r--r--indra/newview/llpanellogin.cpp13
-rw-r--r--indra/newview/llpanelmaininventory.cpp32
-rw-r--r--indra/newview/llpanelmaininventory.h4
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp248
-rw-r--r--indra/newview/llpanelmarketplaceinbox.h78
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp167
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.h77
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp209
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.h82
-rw-r--r--indra/newview/llpanelobject.cpp15
-rw-r--r--indra/newview/llpanelobjectinventory.cpp62
-rw-r--r--indra/newview/llpaneloutfitedit.cpp2
-rw-r--r--indra/newview/llpanelplaceprofile.cpp19
-rw-r--r--indra/newview/llpanelplaceprofile.h2
-rw-r--r--indra/newview/llpanelplaces.cpp7
-rw-r--r--indra/newview/llpaneltopinfobar.cpp8
-rw-r--r--indra/newview/llpaneltopinfobar.h13
-rw-r--r--indra/newview/llpanelvolume.cpp15
-rw-r--r--indra/newview/llpanelwearing.cpp2
-rw-r--r--indra/newview/llplacesinventorypanel.cpp85
-rw-r--r--indra/newview/llplacesinventorypanel.h2
-rw-r--r--indra/newview/llpreviewgesture.cpp1
-rw-r--r--indra/newview/llpreviewnotecard.cpp25
-rw-r--r--indra/newview/llprogressview.cpp88
-rw-r--r--indra/newview/llprogressview.h20
-rw-r--r--indra/newview/llregioninfomodel.cpp217
-rw-r--r--indra/newview/llregioninfomodel.h99
-rw-r--r--indra/newview/llsidepanelappearance.cpp1
-rw-r--r--indra/newview/llsidepanelinventory.cpp454
-rw-r--r--indra/newview/llsidepanelinventory.h31
-rw-r--r--indra/newview/llsidepanelinventorysubpanel.cpp4
-rw-r--r--indra/newview/llsidepanelinventorysubpanel.h2
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp7
-rw-r--r--indra/newview/llsidepaneliteminfo.h2
-rw-r--r--indra/newview/llsidetray.cpp177
-rw-r--r--indra/newview/llsidetray.h13
-rw-r--r--indra/newview/llspatialpartition.cpp146
-rw-r--r--indra/newview/llspatialpartition.h15
-rw-r--r--indra/newview/llstartup.cpp23
-rw-r--r--indra/newview/lltexturectrl.cpp5
-rw-r--r--indra/newview/lltoolpie.cpp1
-rw-r--r--indra/newview/llviewercontrol.cpp34
-rw-r--r--indra/newview/llviewerdisplay.cpp11
-rw-r--r--indra/newview/llviewerfloaterreg.cpp18
-rw-r--r--indra/newview/llviewerfoldertype.cpp4
-rw-r--r--indra/newview/llviewerhelp.cpp16
-rw-r--r--indra/newview/llviewerinventory.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp62
-rw-r--r--indra/newview/llviewermenu.cpp108
-rw-r--r--indra/newview/llviewermenufile.cpp76
-rw-r--r--indra/newview/llviewermenufile.h17
-rw-r--r--indra/newview/llviewermessage.cpp160
-rw-r--r--indra/newview/llviewermessage.h2
-rw-r--r--indra/newview/llviewerobject.cpp31
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp25
-rw-r--r--indra/newview/llviewerobjectlist.h3
-rw-r--r--indra/newview/llviewerprecompiledheaders.h6
-rw-r--r--indra/newview/llviewerregion.cpp100
-rw-r--r--indra/newview/llviewerregion.h15
-rw-r--r--indra/newview/llviewershadermgr.cpp496
-rw-r--r--indra/newview/llviewershadermgr.h31
-rw-r--r--indra/newview/llviewertexture.cpp19
-rw-r--r--indra/newview/llviewertexture.h3
-rw-r--r--indra/newview/llviewertexturelist.cpp36
-rw-r--r--indra/newview/llviewertexturelist.h7
-rw-r--r--indra/newview/llviewerwindow.cpp13
-rw-r--r--indra/newview/llviewerwindow.h1
-rw-r--r--indra/newview/llvlmanager.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp114
-rw-r--r--indra/newview/llvoavatar.h8
-rw-r--r--indra/newview/llvocache.cpp4
-rw-r--r--indra/newview/llvoclouds.cpp293
-rw-r--r--indra/newview/llvoclouds.h79
-rw-r--r--indra/newview/llvoicevivox.cpp303
-rw-r--r--indra/newview/llvoicevivox.h15
-rw-r--r--indra/newview/llvopartgroup.cpp13
-rw-r--r--indra/newview/llvosky.cpp44
-rw-r--r--indra/newview/llvosurfacepatch.cpp2
-rw-r--r--indra/newview/llvotree.cpp5
-rw-r--r--indra/newview/llvovolume.cpp315
-rw-r--r--indra/newview/llvowlsky.cpp4
-rw-r--r--indra/newview/llwaterparammanager.cpp332
-rw-r--r--indra/newview/llwaterparammanager.h76
-rw-r--r--indra/newview/llwaterparamset.cpp44
-rw-r--r--indra/newview/llwaterparamset.h1
-rw-r--r--indra/newview/llwlanimator.cpp202
-rw-r--r--indra/newview/llwlanimator.h86
-rw-r--r--indra/newview/llwldaycycle.cpp240
-rw-r--r--indra/newview/llwldaycycle.h54
-rw-r--r--indra/newview/llwlhandlers.cpp203
-rw-r--r--indra/newview/llwlhandlers.h106
-rw-r--r--indra/newview/llwlparammanager.cpp574
-rw-r--r--indra/newview/llwlparammanager.h210
-rw-r--r--indra/newview/llwlparamset.cpp60
-rw-r--r--indra/newview/llwlparamset.h3
-rw-r--r--indra/newview/llworld.cpp94
-rw-r--r--indra/newview/pipeline.cpp287
-rw-r--r--indra/newview/pipeline.h24
-rw-r--r--indra/newview/skins/default/colors.xml21
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gift.pngbin0 -> 1335 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Disabled.pngbin0 -> 1848 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Off.pngbin0 -> 1835 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On.pngbin0 -> 1851 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On_Over.pngbin0 -> 1863 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.pngbin0 -> 1912 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Over.pngbin0 -> 1826 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Press.pngbin0 -> 1891 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.pngbin0 -> 1848 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.pngbin0 -> 1807 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.pngbin0 -> 1819 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.pngbin0 -> 1894 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.pngbin0 -> 1921 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.pngbin0 -> 1853 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected.pngbin0 -> 1894 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.pngbin0 -> 1840 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.pngbin0 -> 1870 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.pngbin0 -> 1912 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.pngbin0 -> 3194 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.pngbin0 -> 3189 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.pngbin0 -> 3011 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.pngbin0 -> 3011 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Disabled.pngbin0 -> 1187 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Enabled.pngbin0 -> 1168 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_1.pngbin0 -> 1149 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_2.pngbin0 -> 1147 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_3.pngbin0 -> 1211 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_4.pngbin0 -> 1205 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_5.pngbin0 -> 1137 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_6.pngbin0 -> 1164 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml41
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Background.pngbin0 -> 1352 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Border.pngbin0 -> 1565 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.pngbin0 -> 1067 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.pngbin0 -> 1086 bytes
-rw-r--r--indra/newview/skins/default/xui/da/floater_about.xml40
-rw-r--r--indra/newview/skins/default/xui/da/floater_beacons.xml1
-rw-r--r--indra/newview/skins/default/xui/da/floater_buy_contents.xml2
-rw-r--r--indra/newview/skins/default/xui/da/floater_day_cycle_options.xml96
-rw-r--r--indra/newview/skins/default/xui/da/floater_env_settings.xml31
-rw-r--r--indra/newview/skins/default/xui/da/floater_import_collada.xml23
-rw-r--r--indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml39
-rw-r--r--indra/newview/skins/default/xui/da/floater_model_preview.xml231
-rw-r--r--indra/newview/skins/default/xui/da/floater_model_wizard.xml241
-rw-r--r--indra/newview/skins/default/xui/da/floater_price_for_listing.xml18
-rw-r--r--indra/newview/skins/default/xui/da/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/da/floater_sound_devices.xml7
-rw-r--r--indra/newview/skins/default/xui/da/floater_tools.xml48
-rw-r--r--indra/newview/skins/default/xui/da/floater_water.xml103
-rw-r--r--indra/newview/skins/default/xui/da/floater_windlight_options.xml228
-rw-r--r--indra/newview/skins/default/xui/da/menu_avatar_self.xml1
-rw-r--r--indra/newview/skins/default/xui/da/menu_bottomtray.xml2
-rw-r--r--indra/newview/skins/default/xui/da/menu_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/da/menu_inventory_add.xml3
-rw-r--r--indra/newview/skins/default/xui/da/menu_media_ctrl.xml6
-rw-r--r--indra/newview/skins/default/xui/da/menu_model_import_gear_default.xml8
-rw-r--r--indra/newview/skins/default/xui/da/menu_outfit_gear.xml5
-rw-r--r--indra/newview/skins/default/xui/da/menu_viewer.xml17
-rw-r--r--indra/newview/skins/default/xui/da/notifications.xml59
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_physics.xml14
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_wearable.xml6
-rw-r--r--indra/newview/skins/default/xui/da/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_chat.xml4
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_colors.xml17
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml18
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_region_general.xml1
-rw-r--r--indra/newview/skins/default/xui/da/panel_scrolling_param_base.xml4
-rw-r--r--indra/newview/skins/default/xui/da/panel_sound_devices.xml19
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml273
-rw-r--r--indra/newview/skins/default/xui/de/floater_about.xml26
-rw-r--r--indra/newview/skins/default/xui/de/floater_about_land.xml26
-rw-r--r--indra/newview/skins/default/xui/de/floater_buy_contents.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/de/floater_env_settings.xml26
-rw-r--r--indra/newview/skins/default/xui/de/floater_import_collada.xml23
-rw-r--r--indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml1
-rw-r--r--indra/newview/skins/default/xui/de/floater_model_preview.xml231
-rw-r--r--indra/newview/skins/default/xui/de/floater_model_wizard.xml241
-rw-r--r--indra/newview/skins/default/xui/de/floater_perm_prefs.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_preview_gesture.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_price_for_listing.xml18
-rw-r--r--indra/newview/skins/default/xui/de/floater_snapshot.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_sound_devices.xml7
-rw-r--r--indra/newview/skins/default/xui/de/floater_tools.xml54
-rw-r--r--indra/newview/skins/default/xui/de/floater_water.xml72
-rw-r--r--indra/newview/skins/default/xui/de/floater_windlight_options.xml189
-rw-r--r--indra/newview/skins/default/xui/de/menu_inventory_add.xml2
-rw-r--r--indra/newview/skins/default/xui/de/menu_model_import_gear_default.xml8
-rw-r--r--indra/newview/skins/default/xui/de/menu_viewer.xml13
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml45
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_colors.xml3
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml14
-rw-r--r--indra/newview/skins/default/xui/de/panel_region_general.xml1
-rw-r--r--indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_sound_devices.xml19
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml149
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml96
-rw-r--r--indra/newview/skins/default/xui/en/floater_day_cycle_options.xml558
-rw-r--r--indra/newview/skins/default/xui/en/floater_delete_env_preset.xml59
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml485
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_sky_preset.xml953
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_water_preset.xml448
-rw-r--r--indra/newview/skins/default/xui/en/floater_env_settings.xml164
-rw-r--r--indra/newview/skins/default/xui/en/floater_environment_settings.xml162
-rw-r--r--indra/newview/skins/default/xui/en/floater_help_browser.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_media_browser.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_wizard.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml12
-rw-r--r--indra/newview/skins/default/xui/en/floater_region_info.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_snapshot.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml13
-rw-r--r--indra/newview/skins/default/xui/en/floater_water.xml503
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml11
-rw-r--r--indra/newview/skins/default/xui/en/floater_windlight_options.xml1288
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml15
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml139
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml122
-rw-r--r--indra/newview/skins/default/xui/en/panel_cof_wearables.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_inbox_inventory.xml17
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_media.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_outbox_inventory.xml17
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_list.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml79
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml35
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml29
-rw-r--r--indra/newview/skins/default/xui/en/panel_progress.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_environment.xml149
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_estate.xml324
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_terrain.xml349
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_texture.xml327
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_sound_devices.xml170
-rw-r--r--indra/newview/skins/default/xui/en/panel_topinfo_bar.xml10
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml230
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml25
-rw-r--r--indra/newview/skins/default/xui/en/widgets/badge.xml17
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml10
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inventory_panel.xml10
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/panel.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/time.xml16
-rw-r--r--indra/newview/skins/default/xui/es/floater_buy_currency.xml2
-rw-r--r--indra/newview/skins/default/xui/es/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/es/floater_env_settings.xml28
-rw-r--r--indra/newview/skins/default/xui/es/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/es/floater_water.xml88
-rw-r--r--indra/newview/skins/default/xui/es/floater_windlight_options.xml190
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_navigation_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_colors.xml4
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml10
-rw-r--r--indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/fr/floater_env_settings.xml29
-rw-r--r--indra/newview/skins/default/xui/fr/floater_water.xml70
-rw-r--r--indra/newview/skins/default/xui/fr/floater_windlight_options.xml189
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/it/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/it/floater_env_settings.xml29
-rw-r--r--indra/newview/skins/default/xui/it/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/it/floater_water.xml95
-rw-r--r--indra/newview/skins/default/xui/it/floater_windlight_options.xml190
-rw-r--r--indra/newview/skins/default/xui/it/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/ja/floater_env_settings.xml25
-rw-r--r--indra/newview/skins/default/xui/ja/floater_tools.xml40
-rw-r--r--indra/newview/skins/default/xui/ja/floater_water.xml70
-rw-r--r--indra/newview/skins/default/xui/ja/floater_windlight_options.xml189
-rw-r--r--indra/newview/skins/default/xui/ja/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml5
-rw-r--r--indra/newview/skins/default/xui/nl/floater_day_cycle_options.xml94
-rw-r--r--indra/newview/skins/default/xui/nl/floater_env_settings.xml24
-rw-r--r--indra/newview/skins/default/xui/nl/floater_preview_gesture.xml2
-rw-r--r--indra/newview/skins/default/xui/nl/floater_water.xml89
-rw-r--r--indra/newview/skins/default/xui/nl/floater_windlight_options.xml190
-rw-r--r--indra/newview/skins/default/xui/nl/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml96
-rw-r--r--indra/newview/skins/default/xui/pl/floater_env_settings.xml28
-rw-r--r--indra/newview/skins/default/xui/pl/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/pl/floater_water.xml103
-rw-r--r--indra/newview/skins/default/xui/pl/floater_windlight_options.xml228
-rw-r--r--indra/newview/skins/default/xui/pl/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/pl/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml67
-rw-r--r--indra/newview/skins/default/xui/pt/floater_env_settings.xml27
-rw-r--r--indra/newview/skins/default/xui/pt/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/pt/floater_water.xml86
-rw-r--r--indra/newview/skins/default/xui/pt/floater_windlight_options.xml187
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/zh/floater_about.xml10
-rw-r--r--indra/newview/skins/default/xui/zh/floater_about_land.xml26
-rw-r--r--indra/newview/skins/default/xui/zh/floater_animation_preview.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/floater_avatar_picker.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/floater_avatar_textures.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/floater_buy_currency.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_buy_land.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml95
-rw-r--r--indra/newview/skins/default/xui/zh/floater_env_settings.xml25
-rw-r--r--indra/newview/skins/default/xui/zh/floater_gesture.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/floater_god_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_image_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_incoming_call.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/floater_media_browser.xml18
-rw-r--r--indra/newview/skins/default/xui/zh/floater_mem_leaking.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_nearby_chat.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_pay.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/floater_pay_object.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/floater_preview_animation.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/floater_preview_gesture.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/floater_script_debug.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_sell_land.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_snapshot.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_stats.xml28
-rw-r--r--indra/newview/skins/default/xui/zh/floater_tools.xml204
-rw-r--r--indra/newview/skins/default/xui/zh/floater_top_objects.xml16
-rw-r--r--indra/newview/skins/default/xui/zh/floater_url_entry.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_voice_effect.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_water.xml70
-rw-r--r--indra/newview/skins/default/xui/zh/floater_web_content.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/floater_windlight_options.xml167
-rw-r--r--indra/newview/skins/default/xui/zh/floater_window_size.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_world_map.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/inspect_group.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/inspect_object.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_attachment_other.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_avatar_icon.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_avatar_other.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_gesture_gear.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/menu_inventory.xml24
-rw-r--r--indra/newview/skins/default/xui/zh/menu_inventory_gear_default.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/menu_landmark.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_login.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/menu_outfit_gear.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/menu_participant_list.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_people_groups_view_sort.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_people_nearby.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_people_nearby_multiselect.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_picks_plus.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_place.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_places_gear_landmark.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_profile_overflow.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_viewer.xml52
-rw-r--r--indra/newview/skins/default/xui/zh/mime_types.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/notifications.xml36
-rw-r--r--indra/newview/skins/default/xui/zh/panel_adhoc_control_panel.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_hair.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_pick.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_shape.xml22
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/panel_edit_wearable.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/panel_group_general.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/panel_group_invite.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_group_land_money.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/panel_group_notices.xml16
-rw-r--r--indra/newview/skins/default/xui/zh/panel_group_roles.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_im_control_panel.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_me.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_media_settings_general.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml10
-rw-r--r--indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/panel_nearby_media.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/panel_notify_textbox.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/panel_outfit_edit.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/panel_people.xml8
-rw-r--r--indra/newview/skins/default/xui/zh/panel_pick_info.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_picks.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/panel_place_profile.xml12
-rw-r--r--indra/newview/skins/default/xui/zh/panel_preferences_chat.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_preferences_general.xml34
-rw-r--r--indra/newview/skins/default/xui/zh/panel_preferences_move.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/panel_preferences_sound.xml32
-rw-r--r--indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile.xml4
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile_view.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_region_covenant.xml10
-rw-r--r--indra/newview/skins/default/xui/zh/panel_region_debug.xml14
-rw-r--r--indra/newview/skins/default/xui/zh/panel_region_estate.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_region_general.xml12
-rw-r--r--indra/newview/skins/default/xui/zh/panel_side_tray.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_teleport_history.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/sidepanel_appearance.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/sidepanel_task_info.xml20
-rw-r--r--indra/newview/skins/default/xui/zh/strings.xml183
-rw-r--r--indra/newview/skins/default/xui/zh/teleport_strings.xml2
-rw-r--r--indra/newview/skins/minimal/xui/da/floater_media_browser.xml21
-rw-r--r--indra/newview/skins/minimal/xui/da/floater_web_content.xml8
-rw-r--r--indra/newview/skins/minimal/xui/da/menu_people_nearby.xml8
-rw-r--r--indra/newview/skins/minimal/xui/da/notifications.xml18
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_adhoc_control_panel.xml2
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_bottomtray.xml26
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_group_control_panel.xml4
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_im_control_panel.xml2
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_login.xml2
-rw-r--r--indra/newview/skins/minimal/xui/da/panel_people.xml2
-rw-r--r--indra/newview/skins/minimal/xui/de/menu_inspect_avatar_gear.xml1
-rw-r--r--indra/newview/skins/minimal/xui/de/panel_adhoc_control_panel.xml11
-rw-r--r--indra/newview/skins/minimal/xui/de/panel_bottomtray.xml24
-rw-r--r--indra/newview/skins/minimal/xui/de/panel_im_control_panel.xml2
-rw-r--r--indra/newview/skins/minimal/xui/de/panel_people.xml3
-rw-r--r--indra/newview/skins/minimal/xui/en/floater_help_browser.xml11
-rw-r--r--indra/newview/skins/minimal/xui/en/floater_web_content.xml11
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml242
-rw-r--r--indra/newview/skins/minimal/xui/en/widgets/location_input.xml8
-rw-r--r--indra/newview/tests/lldir_stub.cpp45
-rw-r--r--indra/newview/tests/llglslshader_stub.cpp22
-rw-r--r--indra/newview/tests/llpipeline_stub.cpp15
-rw-r--r--indra/newview/tests/llsky_stub.cpp20
-rw-r--r--indra/newview/tests/llviewershadermgr_stub.cpp33
-rw-r--r--indra/newview/tests/llwlanimator_stub.cpp12
-rw-r--r--indra/newview/tests/llwldaycycle_stub.cpp35
-rw-r--r--indra/newview/tests/llwlparammanager_test.cpp254
-rw-r--r--indra/newview/tests/llwlparamset_stub.cpp24
853 files changed, 31123 insertions, 18957 deletions
diff --git a/indra/integration_tests/llui_libtest/llwidgetreg.cpp b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
index 0d0d9fbff6..cbf6021119 100644
--- a/indra/integration_tests/llui_libtest/llwidgetreg.cpp
+++ b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
@@ -49,6 +49,7 @@
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lltexteditor.h"
+#include "lltimectrl.h"
#include "llflyoutbutton.h"
#include "llfiltereditor.h"
#include "lllayoutstack.h"
@@ -92,6 +93,7 @@ void LLWidgetReg::initClass(bool register_widgets)
//LLDefaultChildRegistry::Register<LLPlaceHolderPanel> placeholder("placeholder");
LLDefaultChildRegistry::Register<LLTabContainer> tab_container("tab_container");
LLDefaultChildRegistry::Register<LLTextBox> text("text");
+ LLDefaultChildRegistry::Register<LLTimeCtrl> time("time");
LLDefaultChildRegistry::Register<LLTextEditor> simple_text_editor("simple_text_editor");
LLDefaultChildRegistry::Register<LLUICtrl> ui_ctrl("ui_ctrl");
LLDefaultChildRegistry::Register<LLStatView> stat_view("stat_view");
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 5f84be2c5d..c9fb8534f1 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -38,7 +38,7 @@
LLStringTable LLCharacter::sVisualParamNames(1024);
std::vector< LLCharacter* > LLCharacter::sInstances;
-
+BOOL LLCharacter::sAllowInstancesChange = TRUE ;
//-----------------------------------------------------------------------------
// LLCharacter()
@@ -51,8 +51,10 @@ LLCharacter::LLCharacter()
mAppearanceSerialNum( 0 ),
mSkeletonSerialNum( 0 )
{
- mMotionController.setCharacter( this );
+ llassert_always(sAllowInstancesChange) ;
sInstances.push_back(this);
+
+ mMotionController.setCharacter( this );
mPauseRequest = new LLPauseRequestHandle();
}
@@ -62,18 +64,29 @@ LLCharacter::LLCharacter()
// Class Destructor
//-----------------------------------------------------------------------------
LLCharacter::~LLCharacter()
-{
+{
for (LLVisualParam *param = getFirstVisualParam();
param;
param = getNextVisualParam())
{
delete param;
}
- std::vector<LLCharacter*>::iterator iter = std::find(sInstances.begin(), sInstances.end(), this);
- if (iter != sInstances.end())
+
+ U32 i ;
+ U32 size = sInstances.size() ;
+ for(i = 0 ; i < size ; i++)
{
- sInstances.erase(iter);
+ if(sInstances[i] == this)
+ {
+ break ;
+ }
}
+
+ llassert_always(i < size) ;
+
+ llassert_always(sAllowInstancesChange) ;
+ sInstances[i] = sInstances[size - 1] ;
+ sInstances.pop_back() ;
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index a6347fcc3c..e81a27c2bc 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -266,6 +266,7 @@ public:
void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
static std::vector< LLCharacter* > sInstances;
+ static BOOL sAllowInstancesChange ; //debug use
protected:
LLMotionController mMotionController;
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 9df033a4ca..c6f45bffa2 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -467,13 +467,15 @@ LLPointer<LLJointState>& LLKeyframeMotion::getJointState(U32 index)
}
//-----------------------------------------------------------------------------
-// getJoin()
+// getJoint()
//-----------------------------------------------------------------------------
LLJoint* LLKeyframeMotion::getJoint(U32 index)
{
llassert_always (index < mJointStates.size());
LLJoint* joint = mJointStates[index]->getJoint();
- llassert_always (joint);
+
+ //Commented out 06-28-11 by Aura.
+ //llassert_always (joint);
return joint;
}
@@ -821,7 +823,11 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint)
S32 joint_num;
LLVector3 source_pos = mCharacter->getVolumePos(shared_data->mSourceConstraintVolume, shared_data->mSourceConstraintOffset);
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[0]);
-
+ if ( !cur_joint )
+ {
+ return;
+ }
+
F32 source_pos_offset = dist_vec(source_pos, cur_joint->getWorldPosition());
constraint->mTotalLength = constraint->mJointLengths[0] = dist_vec(cur_joint->getParent()->getWorldPosition(), source_pos);
@@ -872,6 +878,10 @@ void LLKeyframeMotion::activateConstraint(JointConstraint* constraint)
for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++)
{
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
+ if ( !cur_joint )
+ {
+ return;
+ }
constraint->mPositions[joint_num] = (cur_joint->getWorldPosition() - mPelvisp->getWorldPosition()) * ~mPelvisp->getWorldRotation();
}
@@ -932,6 +942,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
}
LLJoint* root_joint = getJoint(shared_data->mJointStateIndices[shared_data->mChainLength]);
+ if (! root_joint)
+ {
+ return;
+ }
+
LLVector3 root_pos = root_joint->getWorldPosition();
// LLQuaternion root_rot =
root_joint->getParent()->getWorldRotation();
@@ -943,6 +958,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++)
{
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
+ if (!cur_joint)
+ {
+ return;
+ }
+
if (joint_mask[cur_joint->getJointNum()] >= (0xff >> (7 - getPriority())))
{
// skip constraint
@@ -1033,7 +1053,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
if (shared_data->mChainLength)
{
- LLQuaternion end_rot = getJoint(shared_data->mJointStateIndices[0])->getWorldRotation();
+ LLJoint* end_joint = getJoint(shared_data->mJointStateIndices[0]);
+
+ if (!end_joint)
+ {
+ return;
+ }
+
+ LLQuaternion end_rot = end_joint->getWorldRotation();
// slam start and end of chain to the proper positions (rest of chain stays put)
positions[0] = lerp(keyframe_source_pos, target_pos, weight);
@@ -1042,7 +1069,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// grab keyframe-specified positions of joints
for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++)
{
- LLVector3 kinematic_position = getJoint(shared_data->mJointStateIndices[joint_num])->getWorldPosition() +
+ LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
+
+ if (!cur_joint)
+ {
+ return;
+ }
+
+ LLVector3 kinematic_position = cur_joint->getWorldPosition() +
(source_to_target * constraint->mJointLengthFractions[joint_num]);
// convert intermediate joint positions to world coordinates
@@ -1088,7 +1122,17 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
for (joint_num = shared_data->mChainLength; joint_num > 0; joint_num--)
{
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
+
+ if (!cur_joint)
+ {
+ return;
+ }
LLJoint* child_joint = getJoint(shared_data->mJointStateIndices[joint_num - 1]);
+ if (!child_joint)
+ {
+ return;
+ }
+
LLQuaternion parent_rot = cur_joint->getParent()->getWorldRotation();
LLQuaternion cur_rot = cur_joint->getWorldRotation();
@@ -1122,7 +1166,6 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
cur_joint->setRotation(target_rot);
}
- LLJoint* end_joint = getJoint(shared_data->mJointStateIndices[0]);
LLQuaternion end_local_rot = end_rot * ~end_joint->getParent()->getWorldRotation();
if (weight == 1.f)
@@ -1150,7 +1193,13 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
//reset old joint rots
for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++)
{
- getJoint(shared_data->mJointStateIndices[joint_num])->setRotation(old_rots[joint_num]);
+ LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
+ if (!cur_joint)
+ {
+ return;
+ }
+
+ cur_joint->setRotation(old_rots[joint_num]);
}
}
// simple positional constraint (pelvis only)
@@ -1775,7 +1824,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
constraintp->mJointStateIndices[i] = -1;
for (U32 j = 0; j < mJointMotionList->getNumJointMotions(); j++)
{
- if(getJoint(j) == joint)
+ LLJoint* constraint_joint = getJoint(j);
+
+ if ( !constraint_joint )
+ {
+ llwarns << "Invalid joint " << j << llendl;
+ return FALSE;
+ }
+
+ if(constraint_joint == joint)
{
constraintp->mJointStateIndices[i] = (S32)j;
break;
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 1fe9af40b3..b1422b2b90 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -70,7 +70,7 @@ public:
private:
// private helper functions to wrap some asserts
LLPointer<LLJointState>& getJointState(U32 index);
- LLJoint* getJoint(U32 index);
+ LLJoint* getJoint(U32 index );
public:
//-------------------------------------------------------------------------
diff --git a/indra/llcommon/llaccountingquota.h b/indra/llcommon/llaccountingquota.h
index 3401cb57b6..140333de07 100644
--- a/indra/llcommon/llaccountingquota.h
+++ b/indra/llcommon/llaccountingquota.h
@@ -29,30 +29,38 @@
struct ParcelQuota
{
- ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost,
- F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost,
- F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost,
- F32 totalRenderCost, F32 totalPhysicsCost, F32 totalNetworkCost, F32 totalSimulationCost)
+ ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost,
+ F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost,
+ F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost,
+ F32 tempRenderCost, F32 tempPhysicsCost, F32 tempNetworkCost, F32 tempSimulationCost,
+ F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost,
+ F32 parcelCapacity )
: mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost )
, mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost )
, mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost )
, mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost )
, mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost )
, mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost )
- , mTotalRenderCost( totalRenderCost ), mTotalPhysicsCost( totalPhysicsCost )
- , mTotalNetworkCost( totalNetworkCost ), mTotalSimulationCost( totalSimulationCost )
+ , mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost )
+ , mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost )
+ , mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost )
+ , mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost )
+ , mParcelCapacity( parcelCapacity )
{
}
+
ParcelQuota(){}
F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost;
F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost;
F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost;
- F32 mTotalRenderCost, mTotalPhysicsCost, mTotalNetworkCost, mTotalSimulationCost;
+ F32 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost;
+ F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost;
+ F32 mParcelCapacity;
};
struct SelectionQuota
{
- SelectionQuota( S32 localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost )
+ SelectionQuota( LLUUID localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost )
: mLocalId( localId)
, mRenderCost( renderCost )
, mPhysicsCost( physicsCost )
@@ -63,7 +71,7 @@ struct SelectionQuota
SelectionQuota() {}
F32 mRenderCost, mPhysicsCost, mNetworkCost, mSimulationCost;
- S32 mLocalId;
+ LLUUID mLocalId;
};
#endif
diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp
index c2cfb7286e..f6d0f5bce8 100644
--- a/indra/llcommon/llfoldertype.cpp
+++ b/indra/llcommon/llfoldertype.cpp
@@ -93,6 +93,8 @@ LLFolderDictionary::LLFolderDictionary()
addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE));
addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE));
+ addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE));
+ addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE));
addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE));
};
diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h
index cb32cb075b..a0c847914f 100644
--- a/indra/llcommon/llfoldertype.h
+++ b/indra/llcommon/llfoldertype.h
@@ -83,8 +83,11 @@ public:
FT_MESH = 49,
FT_INBOX = 50,
+ FT_OUTBOX = 51,
- FT_COUNT = 51,
+ FT_BASIC_ROOT = 52,
+
+ FT_COUNT,
FT_NONE = -1
};
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 5be5ecc492..bf62600514 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -2036,7 +2036,9 @@ std::string zip_llsd(LLSD& data)
{ //copy result into output
if (strm.avail_out >= CHUNK)
{
- llerrs << "WTF?" << llendl;
+ free(output);
+ llwarns << "Failed to compress LLSD block." << llendl;
+ return std::string();
}
have = CHUNK-strm.avail_out;
diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp
index 8ba97d7730..b2c495d093 100644
--- a/indra/llcommon/llstat.cpp
+++ b/indra/llcommon/llstat.cpp
@@ -737,7 +737,7 @@ void LLPerfBlock::addStatsToLLSDandReset( LLSD & stats,
}
}
else
- { // WTF? Shouldn't have a NULL pointer in the map.
+ { // Shouldn't have a NULL pointer in the map.
llwarns << "Unexpected NULL dynamic stat at '" << stats_full_path << "'" << llendl;
}
}
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index cfafbf0470..0018b8e844 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -28,8 +28,8 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
-const S32 LL_VERSION_MINOR = 7;
-const S32 LL_VERSION_PATCH = 4;
+const S32 LL_VERSION_MINOR = 8;
+const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index e8cd871157..c95f922301 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -226,6 +226,11 @@ void LLParcel::init(const LLUUID &owner_id,
setPreviousOwnerID(LLUUID::null);
setPreviouslyGroupOwned(FALSE);
+
+ setSeeAVs(TRUE);
+ setAllowGroupAVSounds(TRUE);
+ setAllowAnyAVSounds(TRUE);
+ setHaveNewParcelLimitData(FALSE);
}
void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned)
@@ -702,7 +707,9 @@ void LLParcel::packMessage(LLSD& msg)
msg["user_location"] = ll_sd_from_vector3(mUserLocation);
msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt);
msg["landing_type"] = (U8)mLandingType;
-
+ msg["see_avs"] = (LLSD::Boolean) getSeeAVs();
+ msg["group_av_sounds"] = (LLSD::Boolean) getAllowGroupAVSounds();
+ msg["any_av_sounds"] = (LLSD::Boolean) getAllowAnyAVSounds();
}
@@ -721,6 +728,24 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
setMediaURL(buffer);
+ BOOL see_avs = TRUE; // All default to true for legacy server behavior
+ BOOL any_av_sounds = TRUE;
+ BOOL group_av_sounds = TRUE;
+ bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values
+ have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0);
+ have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0);
+ if (have_new_parcel_limit_data)
+ {
+ msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_SeeAVs, see_avs);
+ msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds, any_av_sounds);
+ msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds, group_av_sounds);
+ }
+ setSeeAVs((bool) see_avs);
+ setAllowAnyAVSounds((bool) any_av_sounds);
+ setAllowGroupAVSounds((bool) group_av_sounds);
+
+ setHaveNewParcelLimitData(have_new_parcel_limit_data);
+
// non-optimized version
msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 4893337967..ff35caab4c 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -75,7 +75,7 @@ const U8 PARCEL_AUCTION = 0x05;
// unused 0x06
// unused 0x07
// flag, unused 0x08
-// flag, unused 0x10
+const U8 PARCEL_HIDDENAVS = 0x10; // avatars not visible outside of parcel. Used for 'see avs' feature, but must be off for compatibility
const U8 PARCEL_SOUND_LOCAL = 0x20;
const U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge
const U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge
@@ -130,6 +130,12 @@ class LLSD;
class LLAccessEntry
{
public:
+ LLAccessEntry()
+ : mID(),
+ mTime(0),
+ mFlags(0)
+ {}
+
LLUUID mID; // Agent ID
S32 mTime; // Time (unix seconds) when entry expires
U32 mFlags; // Not used - currently should always be zero
@@ -265,6 +271,8 @@ public:
void setUserLocation(const LLVector3& pos) { mUserLocation = pos; }
void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; }
void setLandingType(const ELandingType type) { mLandingType = type; }
+ void setSeeAVs(BOOL see_avs) { mSeeAVs = see_avs; }
+ void setHaveNewParcelLimitData(bool have_new_parcel_data) { mHaveNewParcelLimitData = have_new_parcel_data; } // Remove this once hidden AV feature is fully available grid-wide
void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
@@ -291,6 +299,8 @@ public:
void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); }
void setDenyAgeUnverified(BOOL b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); }
void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); }
+ void setAllowGroupAVSounds(BOOL b) { mAllowGroupAVSounds = b; }
+ void setAllowAnyAVSounds(BOOL b) { mAllowAnyAVSounds = b; }
void setDrawDistance(F32 dist) { mDrawDistance = dist; }
void setSalePrice(S32 price) { mSalePrice = price; }
@@ -367,6 +377,8 @@ public:
const LLVector3& getUserLocation() const { return mUserLocation; }
const LLVector3& getUserLookAt() const { return mUserLookAt; }
ELandingType getLandingType() const { return mLandingType; }
+ BOOL getSeeAVs() const { return mSeeAVs; }
+ BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
// User-specified snapshot
const LLUUID& getSnapshotID() const { return mSnapshotID; }
@@ -496,6 +508,9 @@ public:
BOOL getRegionDenyAgeUnverifiedOverride() const
{ return mRegionDenyAgeUnverifiedOverride; }
+ BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; }
+ BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; }
+
F32 getDrawDistance() const { return mDrawDistance; }
S32 getSalePrice() const { return mSalePrice; }
time_t getClaimDate() const { return mClaimDate; }
@@ -606,6 +621,8 @@ protected:
LLVector3 mUserLocation;
LLVector3 mUserLookAt;
ELandingType mLandingType;
+ BOOL mSeeAVs; // Avatars on this parcel are visible from outside it
+ BOOL mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide
LLTimer mSaleTimerExpires;
LLTimer mMediaResetTimer;
@@ -661,6 +678,8 @@ protected:
BOOL mRegionPushOverride;
BOOL mRegionDenyAnonymousOverride;
BOOL mRegionDenyAgeUnverifiedOverride;
+ BOOL mAllowGroupAVSounds;
+ BOOL mAllowAnyAVSounds;
ParcelQuota mQuota;
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index a61130132a..b1a917df73 100644
--- a/indra/llinventory/llparcelflags.h
+++ b/indra/llinventory/llparcelflags.h
@@ -126,5 +126,7 @@ const S32 PARCEL_DETAILS_DESC = 1;
const S32 PARCEL_DETAILS_OWNER = 2;
const S32 PARCEL_DETAILS_GROUP = 3;
const S32 PARCEL_DETAILS_AREA = 4;
+const S32 PARCEL_DETAILS_ID = 5;
+const S32 PARCEL_DETAILS_SEE_AVATARS = 6;
#endif
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index fdfc24f8b7..e5ca47da69 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -35,12 +35,14 @@
#define OCT_ERRS LL_WARNS("OctreeErrors")
-#define LL_OCTREE_PARANOIA_CHECK 0
+
+extern U32 gOctreeMaxCapacity;
+/*#define LL_OCTREE_PARANOIA_CHECK 0
#if LL_DARWIN
#define LL_OCTREE_MAX_CAPACITY 32
#else
#define LL_OCTREE_MAX_CAPACITY 128
-#endif
+#endif*/
template <class T> class LLOctreeNode;
@@ -74,6 +76,7 @@ template <class T>
class LLOctreeNode : public LLTreeNode<T>
{
public:
+
typedef LLOctreeTraveler<T> oct_traveler;
typedef LLTreeTraveler<T> tree_traveler;
typedef typename std::set<LLPointer<T> > element_list;
@@ -294,8 +297,8 @@ public:
//is it here?
if (isInside(data->getPositionGroup()))
{
- if ((getElementCount() < LL_OCTREE_MAX_CAPACITY && contains(data->getBinRadius()) ||
- (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY)))
+ if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) ||
+ (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{ //it belongs here
#if LL_OCTREE_PARANOIA_CHECK
//if this is a redundant insertion, error out (should never happen)
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index c504215ee5..21cc9b22f2 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -100,7 +100,7 @@ void assert_aligned(void* ptr, uintptr_t alignment)
uintptr_t t = (uintptr_t) ptr;
if (t%alignment != 0)
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Alignment check failed." << llendl;
}
#endif
}
@@ -361,7 +361,7 @@ public:
}
else
{
- llerrs << "WTF? Empty leaf" << llendl;
+ llerrs << "Empty leaf" << llendl;
}
for (S32 i = 0; i < branch->getChildCount(); ++i)
@@ -416,6 +416,70 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO
return face;
}
+//static
+S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
+{ // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points
+ LLMemType m1(LLMemType::MTYPE_VOLUME);
+ S32 np = 0;
+
+ // Generate an n-sided "circular" path.
+ // 0 is (1,0), and we go counter-clockwise along a circular path from there.
+ F32 t, t_step, t_first, t_fraction;
+
+ F32 begin = params.getBegin();
+ F32 end = params.getEnd();
+
+ t_step = 1.0f / sides;
+
+ t_first = floor(begin * sides) / (F32)sides;
+
+ // pt1 is the first point on the fractional face.
+ // Starting t and ang values for the first face
+ t = t_first;
+
+ // Increment to the next point.
+ // pt2 is the end point on the fractional face
+ t += t_step;
+
+ t_fraction = (begin - t_first)*sides;
+
+ // Only use if it's not almost exactly on an edge.
+ if (t_fraction < 0.9999f)
+ {
+ np++;
+ }
+
+ // There's lots of potential here for floating point error to generate unneeded extra points - DJS 04/05/02
+ while (t < end)
+ {
+ // Iterate through all the integer steps of t.
+ np++;
+
+ t += t_step;
+ }
+
+ t_fraction = (end - (t - t_step))*sides;
+
+ // Find the fraction that we need to add to the end point.
+ t_fraction = (end - (t - t_step))*sides;
+ if (t_fraction > 0.0001f)
+ {
+ np++;
+ }
+
+ // If we're sliced, the profile is open.
+ if ((end - begin)*ang_scale < 0.99f)
+ {
+ if (params.getHollow() <= 0)
+ {
+ // put center point if not hollow.
+ np++;
+ }
+ }
+
+ return np;
+}
+
// What is the bevel parameter used for? - DJS 04/05/02
// Bevel parameter is currently unused but presumedly would support
// filleted and chamfered corners
@@ -672,6 +736,117 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3
return face;
}
+//static
+S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
+ BOOL is_sculpted, S32 sculpt_size)
+{ // this is basically LLProfile::generate stripped down to only operations that influence the number of points
+ LLMemType m1(LLMemType::MTYPE_VOLUME);
+
+ if (detail < MIN_LOD)
+ {
+ detail = MIN_LOD;
+ }
+
+ // Generate the face data
+ F32 hollow = params.getHollow();
+
+ S32 np = 0;
+
+ switch (params.getCurveType() & LL_PCODE_PROFILE_MASK)
+ {
+ case LL_PCODE_PROFILE_SQUARE:
+ {
+ np = getNumNGonPoints(params, 4,-0.375, 0, 1, split);
+
+ if (hollow)
+ {
+ np *= 2;
+ }
+ }
+ break;
+ case LL_PCODE_PROFILE_ISOTRI:
+ case LL_PCODE_PROFILE_RIGHTTRI:
+ case LL_PCODE_PROFILE_EQUALTRI:
+ {
+ np = getNumNGonPoints(params, 3,0, 0, 1, split);
+
+ if (hollow)
+ {
+ np *= 2;
+ }
+ }
+ break;
+ case LL_PCODE_PROFILE_CIRCLE:
+ {
+ // If this has a square hollow, we should adjust the
+ // number of faces a bit so that the geometry lines up.
+ U8 hole_type=0;
+ F32 circle_detail = MIN_DETAIL_FACES * detail;
+ if (hollow)
+ {
+ hole_type = params.getCurveType() & LL_PCODE_HOLE_MASK;
+ if (hole_type == LL_PCODE_HOLE_SQUARE)
+ {
+ // Snap to the next multiple of four sides,
+ // so that corners line up.
+ circle_detail = llceil(circle_detail / 4.0f) * 4.0f;
+ }
+ }
+
+ S32 sides = (S32)circle_detail;
+
+ if (is_sculpted)
+ sides = sculpt_size;
+
+ np = getNumNGonPoints(params, sides);
+
+ if (hollow)
+ {
+ np *= 2;
+ }
+ }
+ break;
+ case LL_PCODE_PROFILE_CIRCLE_HALF:
+ {
+ // If this has a square hollow, we should adjust the
+ // number of faces a bit so that the geometry lines up.
+ U8 hole_type=0;
+ // Number of faces is cut in half because it's only a half-circle.
+ F32 circle_detail = MIN_DETAIL_FACES * detail * 0.5f;
+ if (hollow)
+ {
+ hole_type = params.getCurveType() & LL_PCODE_HOLE_MASK;
+ if (hole_type == LL_PCODE_HOLE_SQUARE)
+ {
+ // Snap to the next multiple of four sides (div 2),
+ // so that corners line up.
+ circle_detail = llceil(circle_detail / 2.0f) * 2.0f;
+ }
+ }
+ np = getNumNGonPoints(params, llfloor(circle_detail), 0.5f, 0.f, 0.5f);
+
+ if (hollow)
+ {
+ np *= 2;
+ }
+
+ // Special case for openness of sphere
+ if ((params.getEnd() - params.getBegin()) < 1.f)
+ {
+ }
+ else if (!hollow)
+ {
+ np++;
+ }
+ }
+ break;
+ default:
+ break;
+ };
+
+
+ return np;
+}
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
@@ -1133,6 +1308,32 @@ LLPath::~LLPath()
{
}
+S32 LLPath::getNumNGonPoints(const LLPathParams& params, S32 sides, F32 startOff, F32 end_scale, F32 twist_scale)
+{ //this is basically LLPath::genNGon stripped down to only operations that influence the number of points added
+ S32 ret = 0;
+
+ F32 step= 1.0f / sides;
+ F32 t = params.getBegin();
+ ret = 1;
+
+ t+=step;
+
+ // Snap to a quantized parameter, so that cut does not
+ // affect most sample points.
+ t = ((S32)(t * sides)) / (F32)sides;
+
+ // Run through the non-cut dependent points.
+ while (t < params.getEnd())
+ {
+ ret++;
+ t+=step;
+ }
+
+ ret++;
+
+ return ret;
+}
+
void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 end_scale, F32 twist_scale)
{
// Generates a circular path, starting at (1, 0, 0), counterclockwise along the xz plane.
@@ -1310,6 +1511,56 @@ const LLVector2 LLPathParams::getEndScale() const
return end_scale;
}
+S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
+{ // this is basically LLPath::generate stripped down to only the operations that influence the number of points
+ LLMemType m1(LLMemType::MTYPE_VOLUME);
+
+ if (detail < MIN_LOD)
+ {
+ detail = MIN_LOD;
+ }
+
+ S32 np = 2; // hardcode for line
+
+ // Is this 0xf0 mask really necessary? DK 03/02/05
+
+ switch (params.getCurveType() & 0xf0)
+ {
+ default:
+ case LL_PCODE_PATH_LINE:
+ {
+ // Take the begin/end twist into account for detail.
+ np = llfloor(fabs(params.getTwistBegin() - params.getTwist()) * 3.5f * (detail-0.5f)) + 2;
+ }
+ break;
+
+ case LL_PCODE_PATH_CIRCLE:
+ {
+ // Increase the detail as the revolutions and twist increase.
+ F32 twist_mag = fabs(params.getTwistBegin() - params.getTwist());
+
+ S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * params.getRevolutions());
+
+ np = sides;
+ }
+ break;
+
+ case LL_PCODE_PATH_CIRCLE2:
+ {
+ //genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f);
+ np = getNumNGonPoints(params, llfloor(MIN_DETAIL_FACES * detail));
+ }
+ break;
+
+ case LL_PCODE_PATH_TEST:
+
+ np = 5;
+ break;
+ };
+
+ return np;
+}
+
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
@@ -2159,27 +2410,41 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
U32 face_count = mdl.size();
if (face_count == 0)
- {
- llerrs << "WTF?" << llendl;
+ { //no faces unpacked, treat as failed decode
+ llwarns << "found no faces!" << llendl;
+ return false;
}
mVolumeFaces.resize(face_count);
for (U32 i = 0; i < face_count; ++i)
{
+ LLVolumeFace& face = mVolumeFaces[i];
+
+ if (mdl[i].has("NoGeometry"))
+ { //face has no geometry, continue
+ face.resizeIndices(3);
+ face.resizeVertices(1);
+ memset(face.mPositions, 0, sizeof(LLVector4a));
+ memset(face.mNormals, 0, sizeof(LLVector4a));
+ memset(face.mTexCoords, 0, sizeof(LLVector2));
+ memset(face.mIndices, 0, sizeof(U16)*3);
+ continue;
+ }
+
LLSD::Binary pos = mdl[i]["Position"];
LLSD::Binary norm = mdl[i]["Normal"];
LLSD::Binary tc = mdl[i]["TexCoord0"];
LLSD::Binary idx = mdl[i]["TriangleList"];
- LLVolumeFace& face = mVolumeFaces[i];
+
//copy out indices
face.resizeIndices(idx.size()/2);
if (idx.empty() || face.mNumIndices < 3)
{ //why is there an empty index list?
- llerrs <<"WTF?" << llendl;
+ llwarns <<"Empty face present!" << llendl;
continue;
}
@@ -2235,37 +2500,43 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
{
U16* n = (U16*) &(norm[0]);
- for (U32 j = 0; j < num_verts; ++j)
+ if(n)
{
- norm_out->set((F32) n[0], (F32) n[1], (F32) n[2]);
- norm_out->div(65535.f);
- norm_out->mul(2.f);
- norm_out->sub(1.f);
- norm_out++;
- n += 3;
+ for (U32 j = 0; j < num_verts; ++j)
+ {
+ norm_out->set((F32) n[0], (F32) n[1], (F32) n[2]);
+ norm_out->div(65535.f);
+ norm_out->mul(2.f);
+ norm_out->sub(1.f);
+ norm_out++;
+ n += 3;
+ }
}
}
{
U16* t = (U16*) &(tc[0]);
- for (U32 j = 0; j < num_verts; j+=2)
+ if(t)
{
- if (j < num_verts-1)
+ for (U32 j = 0; j < num_verts; j+=2)
{
- tc_out->set((F32) t[0], (F32) t[1], (F32) t[2], (F32) t[3]);
- }
- else
- {
- tc_out->set((F32) t[0], (F32) t[1], 0.f, 0.f);
- }
+ if (j < num_verts-1)
+ {
+ tc_out->set((F32) t[0], (F32) t[1], (F32) t[2], (F32) t[3]);
+ }
+ else
+ {
+ tc_out->set((F32) t[0], (F32) t[1], 0.f, 0.f);
+ }
- t += 4;
+ t += 4;
- tc_out->div(65535.f);
- tc_out->mul(tc_range);
- tc_out->add(min_tc4);
+ tc_out->div(65535.f);
+ tc_out->mul(tc_range);
+ tc_out->add(min_tc4);
- tc_out++;
+ tc_out++;
+ }
}
}
@@ -2377,14 +2648,20 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
LLVector4a& min = face.mExtents[0];
LLVector4a& max = face.mExtents[1];
- min.clear();
- max.clear();
- min = max = face.mPositions[0];
-
- for (S32 i = 1; i < face.mNumVertices; ++i)
+ if (face.mNumVertices < 3)
+ { //empty face, use a dummy 1cm (at 1m scale) bounding box
+ min.splat(-0.005f);
+ max.splat(0.005f);
+ }
+ else
{
- min.setMin(min, face.mPositions[i]);
- max.setMax(max, face.mPositions[i]);
+ min = max = face.mPositions[0];
+
+ for (S32 i = 1; i < face.mNumVertices; ++i)
+ {
+ min.setMin(min, face.mPositions[i]);
+ max.setMax(max, face.mPositions[i]);
+ }
}
}
}
@@ -2980,7 +3257,11 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
// don't test lowest LOD to support legacy content DEV-33670
if (mDetail > SCULPT_MIN_AREA_DETAIL)
{
- if (sculptGetSurfaceArea() < SCULPT_MIN_AREA)
+ F32 area = sculptGetSurfaceArea();
+
+ const F32 SCULPT_MAX_AREA = 384.f;
+
+ if (area < SCULPT_MIN_AREA || area > SCULPT_MAX_AREA)
{
data_is_empty = TRUE;
}
@@ -4064,6 +4345,23 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const
return index;
}
+void LLVolume::getLoDTriangleCounts(const LLVolumeParams& params, S32* counts)
+{ //attempt to approximate the number of triangles that will result from generating a volume LoD set for the
+ //supplied LLVolumeParams -- inaccurate, but a close enough approximation for determining streaming cost
+ F32 detail[] = {1.f, 1.5f, 2.5f, 4.f};
+ for (S32 i = 0; i < 4; i++)
+ {
+ S32 count = 0;
+ S32 path_points = LLPath::getNumPoints(params.getPathParams(), detail[i]);
+ S32 profile_points = LLProfile::getNumPoints(params.getProfileParams(), false, detail[i]);
+
+ count = (profile_points-1)*2*(path_points-1);
+ count += profile_points*2;
+
+ counts[i] = count;
+ }
+}
+
S32 LLVolume::getNumTriangleIndices() const
{
BOOL profile_open = getProfile().isOpen();
@@ -5220,6 +5518,8 @@ LLVolumeFace::LLVolumeFace() :
mOctree(NULL)
{
mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3);
+ mExtents[0].splat(-0.5f);
+ mExtents[1].splat(0.5f);
mCenter = mExtents+2;
}
@@ -5741,6 +6041,11 @@ void LLVolumeFace::cacheOptimize()
LLVCacheLRU cache;
+ if (mNumVertices < 3)
+ { //nothing to do
+ return;
+ }
+
//mapping of vertices to triangles and indices
std::vector<LLVCacheVertexData> vertex_data;
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 01bfbd858b..f67f8f644d 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -690,6 +690,9 @@ public:
BOOL isFlat(S32 face) const { return (mFaces[face].mCount == 2); }
BOOL isOpen() const { return mOpen; }
void setDirty() { mDirty = TRUE; }
+
+ static S32 getNumPoints(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
+ BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
BOOL generate(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
BOOL isConcave() const { return mConcave; }
@@ -714,6 +717,7 @@ public:
protected:
void genNormals(const LLProfileParams& params);
+ static S32 getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset=0.0f, F32 bevel = 0.0f, F32 ang_scale = 1.f, S32 split = 0);
void genNGon(const LLProfileParams& params, S32 sides, F32 offset=0.0f, F32 bevel = 0.0f, F32 ang_scale = 1.f, S32 split = 0);
Face* addHole(const LLProfileParams& params, BOOL flat, F32 sides, F32 offset, F32 box_hollow, F32 ang_scale, S32 split = 0);
@@ -756,6 +760,9 @@ public:
virtual ~LLPath();
+ static S32 getNumPoints(const LLPathParams& params, F32 detail);
+ static S32 getNumNGonPoints(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
+
void genNGon(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
virtual BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
@@ -981,6 +988,7 @@ public:
// returns number of triangle indeces required for path/profile mesh
S32 getNumTriangleIndices() const;
+ static void getLoDTriangleCounts(const LLVolumeParams& params, S32* counts);
S32 getNumTriangles() const;
diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp
index ca84fa8bb8..8c752fbe30 100644
--- a/indra/llmessage/lliosocket.cpp
+++ b/indra/llmessage/lliosocket.cpp
@@ -191,7 +191,7 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
port = PORT_EPHEMERAL;
}
rv->mPort = port;
- rv->setOptions();
+ rv->setNonBlocking();
return rv;
}
@@ -206,7 +206,7 @@ LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool)
}
rv = ptr_t(new LLSocket(socket, pool));
rv->mPort = PORT_EPHEMERAL;
- rv->setOptions();
+ rv->setNonBlocking();
return rv;
}
@@ -227,10 +227,10 @@ bool LLSocket::blockingConnect(const LLHost& host)
{
return false;
}
- apr_socket_timeout_set(mSocket, 1000);
+ setBlocking(1000);
ll_debug_socket("Blocking connect", mSocket);
if(ll_apr_warn_status(apr_socket_connect(mSocket, sa))) return false;
- setOptions();
+ setNonBlocking();
return true;
}
@@ -258,11 +258,27 @@ LLSocket::~LLSocket()
}
}
-void LLSocket::setOptions()
+// See http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial-13.html#ss13.4
+// for an explanation of how to get non-blocking sockets and timeouts with
+// consistent behavior across platforms.
+
+void LLSocket::setBlocking(S32 timeout)
+{
+ LLMemType m1(LLMemType::MTYPE_IO_TCP);
+ // set up the socket options
+ ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_SNDBUF, LL_SEND_BUFFER_SIZE));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_RCVBUF, LL_RECV_BUFFER_SIZE));
+
+}
+
+void LLSocket::setNonBlocking()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_SNDBUF, LL_SEND_BUFFER_SIZE));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_RCVBUF, LL_RECV_BUFFER_SIZE));
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index 6806e5084a..e0f6c1e34d 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -153,9 +153,16 @@ protected:
LLSocket(apr_socket_t* socket, apr_pool_t* pool);
/**
- * @brief Set default socket options.
+ * @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
+ * @param timeout Number of microseconds to wait on this socket. Any
+ * negative number means block-forever. TIMEOUT OF 0 IS NON-PORTABLE.
*/
- void setOptions();
+ void setBlocking(S32 timeout);
+
+ /**
+ * @brief Set default socket options, with SO_NONBLOCK = 1 and timeout = 0.
+ */
+ void setNonBlocking();
public:
/**
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index 5d03615e53..e71fb96540 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -742,6 +742,7 @@ char const* const _PREHASH_MoneyData = LLMessageStringTable::getInstance()->getS
char const* const _PREHASH_ObjectDeselect = LLMessageStringTable::getInstance()->getString("ObjectDeselect");
char const* const _PREHASH_NewAssetID = LLMessageStringTable::getInstance()->getString("NewAssetID");
char const* const _PREHASH_ObjectAdd = LLMessageStringTable::getInstance()->getString("ObjectAdd");
+char const* const _PREHASH_SimulatorFeatures = LLMessageStringTable::getInstance()->getString("SimulatorFeatures");
char const* const _PREHASH_RayEndIsIntersection = LLMessageStringTable::getInstance()->getString("RayEndIsIntersection");
char const* const _PREHASH_CompleteAuction = LLMessageStringTable::getInstance()->getString("CompleteAuction");
char const* const _PREHASH_CircuitCode = LLMessageStringTable::getInstance()->getString("CircuitCode");
@@ -1375,3 +1376,6 @@ char const* const _PREHASH_VCoord = LLMessageStringTable::getInstance()->getStri
char const* const _PREHASH_FaceIndex = LLMessageStringTable::getInstance()->getString("FaceIndex");
char const* const _PREHASH_StatusData = LLMessageStringTable::getInstance()->getString("StatusData");
char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->getString("ProductSKU");
+char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs");
+char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds");
+char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds");
diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h
index 8dc86601e6..dd2c2dbd64 100644
--- a/indra/llmessage/message_prehash.h
+++ b/indra/llmessage/message_prehash.h
@@ -742,6 +742,7 @@ extern char const* const _PREHASH_MoneyData;
extern char const* const _PREHASH_ObjectDeselect;
extern char const* const _PREHASH_NewAssetID;
extern char const* const _PREHASH_ObjectAdd;
+extern char const* const _PREHASH_SimulatorFeatures;
extern char const* const _PREHASH_RayEndIsIntersection;
extern char const* const _PREHASH_CompleteAuction;
extern char const* const _PREHASH_CircuitCode;
@@ -1375,4 +1376,7 @@ extern char const* const _PREHASH_VCoord;
extern char const* const _PREHASH_FaceIndex;
extern char const* const _PREHASH_StatusData;
extern char const* const _PREHASH_ProductSKU;
+extern char const* const _PREHASH_SeeAVs;
+extern char const* const _PREHASH_AnyAVSounds;
+extern char const* const _PREHASH_GroupAVSounds;
#endif
diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py
index 9886d49ccc..22edd9dad8 100644
--- a/indra/llmessage/tests/test_llsdmessage_peer.py
+++ b/indra/llmessage/tests/test_llsdmessage_peer.py
@@ -124,14 +124,19 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler):
# Suppress error output as well
pass
+class Server(HTTPServer):
+ # This pernicious flag is on by default in HTTPServer. But proper
+ # operation of freeport() absolutely depends on it being off.
+ allow_reuse_address = False
+
if __name__ == "__main__":
- # Instantiate an HTTPServer(TestHTTPRequestHandler) on the first free port
+ # Instantiate a Server(TestHTTPRequestHandler) on the first free port
# in the specified port range. Doing this inline is better than in a
# daemon thread: if it blows up here, we'll get a traceback. If it blew up
# in some other thread, the traceback would get eaten and we'd run the
# subject test program anyway.
httpd, port = freeport(xrange(8000, 8020),
- lambda port: HTTPServer(('127.0.0.1', port), TestHTTPRequestHandler))
+ lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler))
# Pass the selected port number to the subject test program via the
# environment. We don't want to impose requirements on the test program's
# command-line parsing -- and anyway, for C++ integration tests, that's
diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py
index f329ec2a0e..f2c841532a 100644
--- a/indra/llmessage/tests/testrunner.py
+++ b/indra/llmessage/tests/testrunner.py
@@ -27,6 +27,8 @@ Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
$/LicenseInfo$
"""
+from __future__ import with_statement
+
import os
import sys
import re
@@ -79,9 +81,14 @@ def freeport(portlist, expr):
Example:
+ class Server(HTTPServer):
+ # If you use BaseHTTPServer.HTTPServer, turning off this flag is
+ # essential for proper operation of freeport()!
+ allow_reuse_address = False
+ # ...
server, port = freeport(xrange(8000, 8010),
- lambda port: HTTPServer(("localhost", port),
- MyRequestHandler))
+ lambda port: Server(("localhost", port),
+ MyRequestHandler))
# pass 'port' to client code
# call server.serve_forever()
"""
@@ -164,3 +171,92 @@ def run(*args, **kwds):
rc = os.spawnv(os.P_WAIT, args[0], args)
debug("%s returned %s", args[0], rc)
return rc
+
+# ****************************************************************************
+# test code -- manual at this point, see SWAT-564
+# ****************************************************************************
+def test_freeport():
+ # ------------------------------- Helpers --------------------------------
+ from contextlib import contextmanager
+ # helper Context Manager for expecting an exception
+ # with exc(SomeError):
+ # raise SomeError()
+ # raises AssertionError otherwise.
+ @contextmanager
+ def exc(exception_class, *args):
+ try:
+ yield
+ except exception_class, err:
+ for i, expected_arg in enumerate(args):
+ assert expected_arg == err.args[i], \
+ "Raised %s, but args[%s] is %r instead of %r" % \
+ (err.__class__.__name__, i, err.args[i], expected_arg)
+ print "Caught expected exception %s(%s)" % \
+ (err.__class__.__name__, ', '.join(repr(arg) for arg in err.args))
+ else:
+ assert False, "Failed to raise " + exception_class.__class__.__name__
+
+ # helper to raise specified exception
+ def raiser(exception):
+ raise exception
+
+ # the usual
+ def assert_equals(a, b):
+ assert a == b, "%r != %r" % (a, b)
+
+ # ------------------------ Sanity check the above ------------------------
+ class SomeError(Exception): pass
+ # Without extra args, accept any err.args value
+ with exc(SomeError):
+ raiser(SomeError("abc"))
+ # With extra args, accept only the specified value
+ with exc(SomeError, "abc"):
+ raiser(SomeError("abc"))
+ with exc(AssertionError):
+ with exc(SomeError, "abc"):
+ raiser(SomeError("def"))
+ with exc(AssertionError):
+ with exc(socket.error, errno.EADDRINUSE):
+ raiser(socket.error(errno.ECONNREFUSED, 'Connection refused'))
+
+ # ----------- freeport() without engaging socket functionality -----------
+ # If portlist is empty, freeport() raises StopIteration.
+ with exc(StopIteration):
+ freeport([], None)
+
+ assert_equals(freeport([17], str), ("17", 17))
+
+ # This is the magic exception that should prompt us to retry
+ inuse = socket.error(errno.EADDRINUSE, 'Address already in use')
+ # Get the iterator to our ports list so we can check later if we've used all
+ ports = iter(xrange(5))
+ with exc(socket.error, errno.EADDRINUSE):
+ freeport(ports, lambda port: raiser(inuse))
+ # did we entirely exhaust 'ports'?
+ with exc(StopIteration):
+ ports.next()
+
+ ports = iter(xrange(2))
+ # Any exception but EADDRINUSE should quit immediately
+ with exc(SomeError):
+ freeport(ports, lambda port: raiser(SomeError()))
+ assert_equals(ports.next(), 1)
+
+ # ----------- freeport() with platform-dependent socket stuff ------------
+ # This is what we should've had unit tests to begin with (see CHOP-661).
+ def newbind(port):
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ sock.bind(('127.0.0.1', port))
+ return sock
+
+ bound0, port0 = freeport(xrange(7777, 7780), newbind)
+ assert_equals(port0, 7777)
+ bound1, port1 = freeport(xrange(7777, 7780), newbind)
+ assert_equals(port1, 7778)
+ bound2, port2 = freeport(xrange(7777, 7780), newbind)
+ assert_equals(port2, 7779)
+ with exc(socket.error, errno.EADDRINUSE):
+ bound3, port3 = freeport(xrange(7777, 7780), newbind)
+
+if __name__ == "__main__":
+ test_freeport()
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 9f666369d4..d3d0403bbb 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1,1436 +1,1424 @@
-/**
- * @file llpluginclassmedia.cpp
- * @brief LLPluginClassMedia handles a plugin which knows about the "media" message class.
- *
- * @cond
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- * @endcond
- */
-
-#include "linden_common.h"
-#include "indra_constants.h"
-
-#include "llpluginclassmedia.h"
-#include "llpluginmessageclasses.h"
-
-#include "llqtwebkit.h"
-
-static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256;
-
-static int nextPowerOf2( int value )
-{
- int next_power_of_2 = 1;
- while ( next_power_of_2 < value )
- {
- next_power_of_2 <<= 1;
- }
-
- return next_power_of_2;
-}
-
-LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
-{
- mOwner = owner;
- mPlugin = NULL;
- reset();
-
- //debug use
- mDeleteOK = true ;
-}
-
-
-LLPluginClassMedia::~LLPluginClassMedia()
-{
- llassert_always(mDeleteOK) ;
- reset();
-}
-
-bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_dir, const std::string &plugin_filename, bool debug)
-{
- LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
- LL_DEBUGS("Plugin") << "dir: " << plugin_dir << LL_ENDL;
- LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
-
- mPlugin = new LLPluginProcessParent(this);
- mPlugin->setSleepTime(mSleepTime);
-
- // Queue up the media init message -- it will be sent after all the currently queued messages.
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "init");
- message.setValue("target", mTarget);
- sendMessage(message);
-
- mPlugin->init(launcher_filename, plugin_dir, plugin_filename, debug);
-
- return true;
-}
-
-
-void LLPluginClassMedia::reset()
-{
- if(mPlugin != NULL)
- {
- delete mPlugin;
- mPlugin = NULL;
- }
-
- mTextureParamsReceived = false;
- mRequestedTextureDepth = 0;
- mRequestedTextureInternalFormat = 0;
- mRequestedTextureFormat = 0;
- mRequestedTextureType = 0;
- mRequestedTextureSwapBytes = false;
- mRequestedTextureCoordsOpenGL = false;
- mTextureSharedMemorySize = 0;
- mTextureSharedMemoryName.clear();
- mDefaultMediaWidth = 0;
- mDefaultMediaHeight = 0;
- mNaturalMediaWidth = 0;
- mNaturalMediaHeight = 0;
- mSetMediaWidth = -1;
- mSetMediaHeight = -1;
- mRequestedMediaWidth = 0;
- mRequestedMediaHeight = 0;
- mRequestedTextureWidth = 0;
- mRequestedTextureHeight = 0;
- mFullMediaWidth = 0;
- mFullMediaHeight = 0;
- mTextureWidth = 0;
- mTextureHeight = 0;
- mMediaWidth = 0;
- mMediaHeight = 0;
- mDirtyRect = LLRect::null;
- mAutoScaleMedia = false;
- mRequestedVolume = 1.0f;
- mPriority = PRIORITY_NORMAL;
- mLowPrioritySizeLimit = LOW_PRIORITY_TEXTURE_SIZE_DEFAULT;
- mAllowDownsample = false;
- mPadding = 0;
- mLastMouseX = 0;
- mLastMouseY = 0;
- mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
- mSleepTime = 1.0f / 100.0f;
- mCanCut = false;
- mCanCopy = false;
- mCanPaste = false;
- mMediaName.clear();
- mMediaDescription.clear();
- mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
-
- // media_browser class
- mNavigateURI.clear();
- mNavigateResultCode = -1;
- mNavigateResultString.clear();
- mHistoryBackAvailable = false;
- mHistoryForwardAvailable = false;
- mStatusText.clear();
- mProgressPercent = 0;
- mClickURL.clear();
- mClickNavType.clear();
- mClickTarget.clear();
- mClickUUID.clear();
- mStatusCode = 0;
-
- // media_time class
- mCurrentTime = 0.0f;
- mDuration = 0.0f;
- mCurrentRate = 0.0f;
- mLoadedDuration = 0.0f;
-}
-
-void LLPluginClassMedia::idle(void)
-{
- if(mPlugin)
- {
- mPlugin->idle();
- }
-
- if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL))
- {
- // Can't process a size change at this time
- }
- else if((mRequestedMediaWidth != mMediaWidth) || (mRequestedMediaHeight != mMediaHeight))
- {
- // Calculate the correct size for the media texture
- mRequestedTextureHeight = mRequestedMediaHeight;
- if(mPadding < 0)
- {
- // negative values indicate the plugin wants a power of 2
- mRequestedTextureWidth = nextPowerOf2(mRequestedMediaWidth);
- }
- else
- {
- mRequestedTextureWidth = mRequestedMediaWidth;
-
- if(mPadding > 1)
- {
- // Pad up to a multiple of the specified number of bytes per row
- int rowbytes = mRequestedTextureWidth * mRequestedTextureDepth;
- int pad = rowbytes % mPadding;
- if(pad != 0)
- {
- rowbytes += mPadding - pad;
- }
-
- if(rowbytes % mRequestedTextureDepth == 0)
- {
- mRequestedTextureWidth = rowbytes / mRequestedTextureDepth;
- }
- else
- {
- LL_WARNS("Plugin") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL;
- }
- }
- }
-
-
- // Size change has been requested but not initiated yet.
- size_t newsize = mRequestedTextureWidth * mRequestedTextureHeight * mRequestedTextureDepth;
-
- // Add an extra line for padding, just in case.
- newsize += mRequestedTextureWidth * mRequestedTextureDepth;
-
- if(newsize != mTextureSharedMemorySize)
- {
- if(!mTextureSharedMemoryName.empty())
- {
- // Tell the plugin to remove the old memory segment
- mPlugin->removeSharedMemory(mTextureSharedMemoryName);
- mTextureSharedMemoryName.clear();
- }
-
- mTextureSharedMemorySize = newsize;
- mTextureSharedMemoryName = mPlugin->addSharedMemory(mTextureSharedMemorySize);
- if(!mTextureSharedMemoryName.empty())
- {
- void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
-
- // clear texture memory to avoid random screen visual fuzz from uninitialized texture data
- memset( addr, 0x00, newsize );
-
- // We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
- // so it may not be worthwhile.
- // mDirtyRect.setOriginAndSize(0, 0, mRequestedMediaWidth, mRequestedMediaHeight);
- }
- }
-
- // This is our local indicator that a change is in progress.
- mTextureWidth = -1;
- mTextureHeight = -1;
- mMediaWidth = -1;
- mMediaHeight = -1;
-
- // This invalidates any existing dirty rect.
- resetDirty();
-
- // Send a size change message to the plugin
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change");
- message.setValue("name", mTextureSharedMemoryName);
- message.setValueS32("width", mRequestedMediaWidth);
- message.setValueS32("height", mRequestedMediaHeight);
- message.setValueS32("texture_width", mRequestedTextureWidth);
- message.setValueS32("texture_height", mRequestedTextureHeight);
- message.setValueReal("background_r", mBackgroundColor.mV[VX]);
- message.setValueReal("background_g", mBackgroundColor.mV[VY]);
- message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
- message.setValueReal("background_a", mBackgroundColor.mV[VW]);
- mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
-
- LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL;
- }
- }
-
- if(mPlugin && mPlugin->isRunning())
- {
- // Send queued messages
- while(!mSendQueue.empty())
- {
- LLPluginMessage message = mSendQueue.front();
- mSendQueue.pop();
- mPlugin->sendMessage(message);
- }
- }
-}
-
-int LLPluginClassMedia::getTextureWidth() const
-{
- return nextPowerOf2(mTextureWidth);
-}
-
-int LLPluginClassMedia::getTextureHeight() const
-{
- return nextPowerOf2(mTextureHeight);
-}
-
-unsigned char* LLPluginClassMedia::getBitsData()
-{
- unsigned char *result = NULL;
- if((mPlugin != NULL) && !mTextureSharedMemoryName.empty())
- {
- result = (unsigned char*)mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
- }
- return result;
-}
-
-void LLPluginClassMedia::setSize(int width, int height)
-{
- if((width > 0) && (height > 0))
- {
- mSetMediaWidth = width;
- mSetMediaHeight = height;
- }
- else
- {
- mSetMediaWidth = -1;
- mSetMediaHeight = -1;
- }
-
- setSizeInternal();
-}
-
-void LLPluginClassMedia::setSizeInternal(void)
-{
- if((mSetMediaWidth > 0) && (mSetMediaHeight > 0))
- {
- mRequestedMediaWidth = mSetMediaWidth;
- mRequestedMediaHeight = mSetMediaHeight;
- }
- else if((mNaturalMediaWidth > 0) && (mNaturalMediaHeight > 0))
- {
- mRequestedMediaWidth = mNaturalMediaWidth;
- mRequestedMediaHeight = mNaturalMediaHeight;
- }
- else
- {
- mRequestedMediaWidth = mDefaultMediaWidth;
- mRequestedMediaHeight = mDefaultMediaHeight;
- }
-
- // Save these for size/interest calculations
- mFullMediaWidth = mRequestedMediaWidth;
- mFullMediaHeight = mRequestedMediaHeight;
-
- if(mAllowDownsample)
- {
- switch(mPriority)
- {
- case PRIORITY_SLIDESHOW:
- case PRIORITY_LOW:
- // Reduce maximum texture dimension to (or below) mLowPrioritySizeLimit
- while((mRequestedMediaWidth > mLowPrioritySizeLimit) || (mRequestedMediaHeight > mLowPrioritySizeLimit))
- {
- mRequestedMediaWidth /= 2;
- mRequestedMediaHeight /= 2;
- }
- break;
-
- default:
- // Don't adjust texture size
- break;
- }
- }
-
- if(mAutoScaleMedia)
- {
- mRequestedMediaWidth = nextPowerOf2(mRequestedMediaWidth);
- mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
- }
-
- if(mRequestedMediaWidth > 2048)
- mRequestedMediaWidth = 2048;
-
- if(mRequestedMediaHeight > 2048)
- mRequestedMediaHeight = 2048;
-}
-
-void LLPluginClassMedia::setAutoScale(bool auto_scale)
-{
- if(auto_scale != mAutoScaleMedia)
- {
- mAutoScaleMedia = auto_scale;
- setSizeInternal();
- }
-}
-
-bool LLPluginClassMedia::textureValid(void)
-{
- if(
- !mTextureParamsReceived ||
- mTextureWidth <= 0 ||
- mTextureHeight <= 0 ||
- mMediaWidth <= 0 ||
- mMediaHeight <= 0 ||
- mRequestedMediaWidth != mMediaWidth ||
- mRequestedMediaHeight != mMediaHeight ||
- getBitsData() == NULL
- )
- return false;
-
- return true;
-}
-
-bool LLPluginClassMedia::getDirty(LLRect *dirty_rect)
-{
- bool result = !mDirtyRect.isEmpty();
-
- if(dirty_rect != NULL)
- {
- *dirty_rect = mDirtyRect;
- }
-
- return result;
-}
-
-void LLPluginClassMedia::resetDirty(void)
-{
- mDirtyRect = LLRect::null;
-}
-
-std::string LLPluginClassMedia::translateModifiers(MASK modifiers)
-{
- std::string result;
-
-
- if(modifiers & MASK_CONTROL)
- {
- result += "control|";
- }
-
- if(modifiers & MASK_ALT)
- {
- result += "alt|";
- }
-
- if(modifiers & MASK_SHIFT)
- {
- result += "shift|";
- }
-
- // TODO: should I deal with platform differences here or in callers?
- // TODO: how do we deal with the Mac "command" key?
-/*
- if(modifiers & MASK_SOMETHING)
- {
- result += "meta|";
- }
-*/
- return result;
-}
-
-void LLPluginClassMedia::jsExposeObjectEvent( bool expose )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_expose_object");
- message.setValueBoolean( "expose", expose );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsValuesValidEvent( bool valid )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_values_valid");
- message.setValueBoolean( "valid", valid );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentLocationEvent( double x, double y, double z )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_location");
- message.setValueReal( "x", x );
- message.setValueReal( "y", y );
- message.setValueReal( "z", z );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentGlobalLocationEvent( double x, double y, double z )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_global_location");
- message.setValueReal( "x", x );
- message.setValueReal( "y", y );
- message.setValueReal( "z", z );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentOrientationEvent( double angle )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_orientation");
- message.setValueReal( "angle", angle );
-
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentLanguageEvent( const std::string& language )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_language");
- message.setValue( "language", language );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentRegionEvent( const std::string& region )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_region");
- message.setValue( "region", region );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentMaturityEvent( const std::string& maturity )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_maturity");
- message.setValue( "maturity", maturity );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers)
-{
- if(type == MOUSE_EVENT_MOVE)
- {
- if(!mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked())
- {
- // Don't queue up mouse move events that can't be delivered.
- return;
- }
-
- if((x == mLastMouseX) && (y == mLastMouseY))
- {
- // Don't spam unnecessary mouse move events.
- return;
- }
-
- mLastMouseX = x;
- mLastMouseY = y;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "mouse_event");
- std::string temp;
- switch(type)
- {
- case MOUSE_EVENT_DOWN: temp = "down"; break;
- case MOUSE_EVENT_UP: temp = "up"; break;
- case MOUSE_EVENT_MOVE: temp = "move"; break;
- case MOUSE_EVENT_DOUBLE_CLICK: temp = "double_click"; break;
- }
- message.setValue("event", temp);
-
- message.setValueS32("button", button);
-
- message.setValueS32("x", x);
-
- // Incoming coordinates are OpenGL-style ((0,0) = lower left), so flip them here if the plugin has requested it.
- if(!mRequestedTextureCoordsOpenGL)
- {
- // TODO: Should I use mMediaHeight or mRequestedMediaHeight here?
- y = mMediaHeight - y;
- }
- message.setValueS32("y", y);
-
- message.setValue("modifiers", translateModifiers(modifiers));
-
- sendMessage(message);
-}
-
-bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data)
-{
- bool result = true;
-
- // FIXME:
- // HACK: we don't have an easy way to tell if the plugin is going to handle a particular keycode.
- // For now, return false for the ones the webkit plugin won't handle properly.
-
- switch(key_code)
- {
- case KEY_BACKSPACE:
- case KEY_TAB:
- case KEY_RETURN:
- case KEY_PAD_RETURN:
- case KEY_SHIFT:
- case KEY_CONTROL:
- case KEY_ALT:
- case KEY_CAPSLOCK:
- case KEY_ESCAPE:
- case KEY_PAGE_UP:
- case KEY_PAGE_DOWN:
- case KEY_END:
- case KEY_HOME:
- case KEY_LEFT:
- case KEY_UP:
- case KEY_RIGHT:
- case KEY_DOWN:
- case KEY_INSERT:
- case KEY_DELETE:
- // These will be handled
- break;
-
- default:
- // regular ASCII characters will also be handled
- if(key_code >= KEY_SPECIAL)
- {
- // Other "special" codes will not work properly.
- result = false;
- }
- break;
- }
-
-#if LL_DARWIN
- if(modifiers & MASK_ALT)
- {
- // Option-key modified characters should be handled by the unicode input path instead of this one.
- result = false;
- }
-#endif
-
- if(result)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "key_event");
- std::string temp;
- switch(type)
- {
- case KEY_EVENT_DOWN: temp = "down"; break;
- case KEY_EVENT_UP: temp = "up"; break;
- case KEY_EVENT_REPEAT: temp = "repeat"; break;
- }
- message.setValue("event", temp);
-
- message.setValueS32("key", key_code);
-
- message.setValue("modifiers", translateModifiers(modifiers));
- message.setValueLLSD("native_key_data", native_key_data);
-
- sendMessage(message);
- }
-
- return result;
-}
-
-void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
-
- message.setValueS32("x", x);
- message.setValueS32("y", y);
- message.setValue("modifiers", translateModifiers(modifiers));
-
- sendMessage(message);
-}
-
-bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD native_key_data)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event");
-
- message.setValue("text", text);
- message.setValue("modifiers", translateModifiers(modifiers));
- message.setValueLLSD("native_key_data", native_key_data);
-
- sendMessage(message);
-
- return true;
-}
-
-void LLPluginClassMedia::loadURI(const std::string &uri)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "load_uri");
-
- message.setValue("uri", uri);
-
- sendMessage(message);
-}
-
-const char* LLPluginClassMedia::priorityToString(EPriority priority)
-{
- const char* result = "UNKNOWN";
- switch(priority)
- {
- case PRIORITY_UNLOADED: result = "unloaded"; break;
- case PRIORITY_STOPPED: result = "stopped"; break;
- case PRIORITY_HIDDEN: result = "hidden"; break;
- case PRIORITY_SLIDESHOW: result = "slideshow"; break;
- case PRIORITY_LOW: result = "low"; break;
- case PRIORITY_NORMAL: result = "normal"; break;
- case PRIORITY_HIGH: result = "high"; break;
- }
-
- return result;
-}
-
-void LLPluginClassMedia::setPriority(EPriority priority)
-{
- if(mPriority != priority)
- {
- mPriority = priority;
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_priority");
-
- std::string priority_string = priorityToString(priority);
- switch(priority)
- {
- case PRIORITY_UNLOADED:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_STOPPED:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_HIDDEN:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_SLIDESHOW:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_LOW:
- mSleepTime = 1.0f / 25.0f;
- break;
- case PRIORITY_NORMAL:
- mSleepTime = 1.0f / 50.0f;
- break;
- case PRIORITY_HIGH:
- mSleepTime = 1.0f / 100.0f;
- break;
- }
-
- message.setValue("priority", priority_string);
-
- sendMessage(message);
-
- if(mPlugin)
- {
- mPlugin->setSleepTime(mSleepTime);
- }
-
- LL_DEBUGS("PluginPriority") << this << ": setting priority to " << priority_string << LL_ENDL;
-
- // This may affect the calculated size, so recalculate it here.
- setSizeInternal();
- }
-}
-
-void LLPluginClassMedia::setLowPrioritySizeLimit(int size)
-{
- int power = nextPowerOf2(size);
- if(mLowPrioritySizeLimit != power)
- {
- mLowPrioritySizeLimit = power;
-
- // This may affect the calculated size, so recalculate it here.
- setSizeInternal();
- }
-}
-
-F64 LLPluginClassMedia::getCPUUsage()
-{
- F64 result = 0.0f;
-
- if(mPlugin)
- {
- result = mPlugin->getCPUUsage();
- }
-
- return result;
-}
-
-void LLPluginClassMedia::sendPickFileResponse(const std::string &file)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response");
- message.setValue("file", file);
- if(mPlugin && mPlugin->isBlocked())
- {
- // If the plugin sent a blocking pick-file request, the response should unblock it.
- message.setValueBoolean("blocking_response", true);
- }
- sendMessage(message);
-}
-
-void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response");
- message.setValueBoolean("ok", ok);
- message.setValue("username", username);
- message.setValue("password", password);
- if(mPlugin && mPlugin->isBlocked())
- {
- // If the plugin sent a blocking pick-file request, the response should unblock it.
- message.setValueBoolean("blocking_response", true);
- }
- sendMessage(message);
-}
-
-void LLPluginClassMedia::cut()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::copy()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_copy");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::paste()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_paste");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
- message.setValue("path", user_data_path);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_language_code");
- message.setValue("language", language_code);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
- message.setValueBoolean("enable", enabled);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
- message.setValueBoolean("enable", enabled);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setTarget(const std::string &target)
-{
- mTarget = target;
-}
-
-/* virtual */
-void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
-{
- std::string message_class = message.getClass();
-
- if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
- {
- std::string message_name = message.getName();
- if(message_name == "texture_params")
- {
- mRequestedTextureDepth = message.getValueS32("depth");
- mRequestedTextureInternalFormat = message.getValueU32("internalformat");
- mRequestedTextureFormat = message.getValueU32("format");
- mRequestedTextureType = message.getValueU32("type");
- mRequestedTextureSwapBytes = message.getValueBoolean("swap_bytes");
- mRequestedTextureCoordsOpenGL = message.getValueBoolean("coords_opengl");
-
- // These two are optional, and will default to 0 if they're not specified.
- mDefaultMediaWidth = message.getValueS32("default_width");
- mDefaultMediaHeight = message.getValueS32("default_height");
-
- mAllowDownsample = message.getValueBoolean("allow_downsample");
- mPadding = message.getValueS32("padding");
-
- setSizeInternal();
-
- mTextureParamsReceived = true;
- }
- else if(message_name == "updated")
- {
- if(message.hasValue("left"))
- {
- LLRect newDirtyRect;
- newDirtyRect.mLeft = message.getValueS32("left");
- newDirtyRect.mTop = message.getValueS32("top");
- newDirtyRect.mRight = message.getValueS32("right");
- newDirtyRect.mBottom = message.getValueS32("bottom");
-
- // The plugin is likely to have top and bottom switched, due to vertical flip and OpenGL coordinate confusion.
- // If they're backwards, swap them.
- if(newDirtyRect.mTop < newDirtyRect.mBottom)
- {
- S32 temp = newDirtyRect.mTop;
- newDirtyRect.mTop = newDirtyRect.mBottom;
- newDirtyRect.mBottom = temp;
- }
-
- if(mDirtyRect.isEmpty())
- {
- mDirtyRect = newDirtyRect;
- }
- else
- {
- mDirtyRect.unionWith(newDirtyRect);
- }
-
- LL_DEBUGS("Plugin") << "adjusted incoming rect is: ("
- << newDirtyRect.mLeft << ", "
- << newDirtyRect.mTop << ", "
- << newDirtyRect.mRight << ", "
- << newDirtyRect.mBottom << "), new dirty rect is: ("
- << mDirtyRect.mLeft << ", "
- << mDirtyRect.mTop << ", "
- << mDirtyRect.mRight << ", "
- << mDirtyRect.mBottom << ")"
- << LL_ENDL;
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CONTENT_UPDATED);
- }
-
-
- bool time_duration_updated = false;
- int previous_percent = mProgressPercent;
-
- if(message.hasValue("current_time"))
- {
- mCurrentTime = message.getValueReal("current_time");
- time_duration_updated = true;
- }
- if(message.hasValue("duration"))
- {
- mDuration = message.getValueReal("duration");
- time_duration_updated = true;
- }
-
- if(message.hasValue("current_rate"))
- {
- mCurrentRate = message.getValueReal("current_rate");
- }
-
- if(message.hasValue("loaded_duration"))
- {
- mLoadedDuration = message.getValueReal("loaded_duration");
- time_duration_updated = true;
- }
- else
- {
- // If the message doesn't contain a loaded_duration param, assume it's equal to duration
- mLoadedDuration = mDuration;
- }
-
- // Calculate a percentage based on the loaded duration and total duration.
- if(mDuration != 0.0f) // Don't divide by zero.
- {
- mProgressPercent = (int)((mLoadedDuration * 100.0f)/mDuration);
- }
-
- if(time_duration_updated)
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_TIME_DURATION_UPDATED);
- }
-
- if(previous_percent != mProgressPercent)
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
- }
- }
- else if(message_name == "media_status")
- {
- std::string status = message.getValue("status");
-
- LL_DEBUGS("Plugin") << "Status changed to: " << status << LL_ENDL;
-
- if(status == "loading")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_LOADING;
- }
- else if(status == "loaded")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_LOADED;
- }
- else if(status == "error")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_ERROR;
- }
- else if(status == "playing")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_PLAYING;
- }
- else if(status == "paused")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_PAUSED;
- }
- else if(status == "done")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_DONE;
- }
- else
- {
- // empty string or any unknown string
- mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
- }
- }
- else if(message_name == "size_change_request")
- {
- S32 width = message.getValueS32("width");
- S32 height = message.getValueS32("height");
- std::string name = message.getValue("name");
-
- // TODO: check that name matches?
- mNaturalMediaWidth = width;
- mNaturalMediaHeight = height;
-
- setSizeInternal();
- }
- else if(message_name == "size_change_response")
- {
- std::string name = message.getValue("name");
-
- // TODO: check that name matches?
-
- mTextureWidth = message.getValueS32("texture_width");
- mTextureHeight = message.getValueS32("texture_height");
- mMediaWidth = message.getValueS32("width");
- mMediaHeight = message.getValueS32("height");
-
- // This invalidates any existing dirty rect.
- resetDirty();
-
- // TODO: should we verify that the plugin sent back the right values?
- // Two size changes in a row may cause them to not match, due to queueing, etc.
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_SIZE_CHANGED);
- }
- else if(message_name == "cursor_changed")
- {
- mCursorName = message.getValue("name");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CURSOR_CHANGED);
- }
- else if(message_name == "edit_state")
- {
- if(message.hasValue("cut"))
- {
- mCanCut = message.getValueBoolean("cut");
- }
- if(message.hasValue("copy"))
- {
- mCanCopy = message.getValueBoolean("copy");
- }
- if(message.hasValue("paste"))
- {
- mCanPaste = message.getValueBoolean("paste");
- }
- }
- else if(message_name == "name_text")
- {
- mMediaName = message.getValue("name");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
- }
- else if(message_name == "pick_file")
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);
- }
- else if(message_name == "auth_request")
- {
- mAuthURL = message.getValue("url");
- mAuthRealm = message.getValue("realm");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
- }
- else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
- {
- std::string message_name = message.getName();
- if(message_name == "navigate_begin")
- {
- mNavigateURI = message.getValue("uri");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_BEGIN);
- }
- else if(message_name == "navigate_complete")
- {
- mNavigateURI = message.getValue("uri");
- mNavigateResultCode = message.getValueS32("result_code");
- mNavigateResultString = message.getValue("result_string");
- mHistoryBackAvailable = message.getValueBoolean("history_back_available");
- mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE);
- }
- else if(message_name == "progress")
- {
- mProgressPercent = message.getValueS32("percent");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
- }
- else if(message_name == "status_text")
- {
- mStatusText = message.getValue("status");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_STATUS_TEXT_CHANGED);
- }
- else if(message_name == "location_changed")
- {
- mLocation = message.getValue("uri");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LOCATION_CHANGED);
- }
- else if(message_name == "click_href")
- {
- mClickURL = message.getValue("uri");
- mClickTarget = message.getValue("target");
- mClickUUID = message.getValue("uuid");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
- }
- else if(message_name == "click_nofollow")
- {
- mClickURL = message.getValue("uri");
- mClickNavType = message.getValue("nav_type");
- mClickTarget.clear();
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW);
- }
- else if(message_name == "navigate_error_page")
- {
- mStatusCode = message.getValueS32("status_code");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_ERROR_PAGE);
- }
- else if(message_name == "cookie_set")
- {
- if(mOwner)
- {
- mOwner->handleCookieSet(this, message.getValue("cookie"));
- }
- }
- else if(message_name == "close_request")
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLOSE_REQUEST);
- }
- else if(message_name == "geometry_change")
- {
- mClickUUID = message.getValue("uuid");
- mGeometryX = message.getValueS32("x");
- mGeometryY = message.getValueS32("y");
- mGeometryWidth = message.getValueS32("width");
- mGeometryHeight = message.getValueS32("height");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_GEOMETRY_CHANGE);
- }
- else if(message_name == "link_hovered")
- {
- // text is not currently used -- the tooltip hover text is taken from the "title".
- mHoverLink = message.getValue("link");
- mHoverText = message.getValue("title");
- // message.getValue("text");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LINK_HOVERED);
- }
- else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
- {
- std::string message_name = message.getName();
-
- // This class hasn't defined any incoming messages yet.
-// if(message_name == "message_name")
-// {
-// }
-// else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
-
-}
-
-/* virtual */
-void LLPluginClassMedia::pluginLaunchFailed()
-{
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED_LAUNCH);
-}
-
-/* virtual */
-void LLPluginClassMedia::pluginDied()
-{
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED);
-}
-
-void LLPluginClassMedia::mediaEvent(LLPluginClassMediaOwner::EMediaEvent event)
-{
- if(mOwner)
- {
- mOwner->handleMediaEvent(this, event);
- }
-}
-
-void LLPluginClassMedia::sendMessage(const LLPluginMessage &message)
-{
- if(mPlugin && mPlugin->isRunning())
- {
- mPlugin->sendMessage(message);
- }
- else
- {
- // The plugin isn't set up yet -- queue this message to be sent after initialization.
- mSendQueue.push(message);
- }
-}
-
-////////////////////////////////////////////////////////////
-// MARK: media_browser class functions
-bool LLPluginClassMedia::pluginSupportsMediaBrowser(void)
-{
- std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER);
- return !version.empty();
-}
-
-void LLPluginClassMedia::focus(bool focused)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "focus");
-
- message.setValueBoolean("focused", focused);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::clear_cache()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::clear_cookies()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cookies");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::set_cookies(const std::string &cookies)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_cookies");
- message.setValue("cookies", cookies);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::enable_cookies(bool enable)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "enable_cookies");
- message.setValueBoolean("enable", enable);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxy_setup(bool enable, const std::string &host, int port)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_setup");
-
- message.setValueBoolean("enable", enable);
- message.setValue("host", host);
- message.setValueS32("port", port);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_stop()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_stop");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_reload(bool ignore_cache)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_reload");
-
- message.setValueBoolean("ignore_cache", ignore_cache);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_forward()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_forward");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_back()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_back");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_user_agent");
-
- message.setValue("user_agent", user_agent);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxyWindowOpened(const std::string &target, const std::string &uuid)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_opened");
-
- message.setValue("target", target);
- message.setValue("uuid", uuid);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxyWindowClosed(const std::string &uuid)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_closed");
-
- message.setValue("uuid", uuid);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::ignore_ssl_cert_errors(bool ignore)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "ignore_ssl_cert_errors");
- message.setValueBoolean("ignore", ignore);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::addCertificateFilePath(const std::string& path)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "add_certificate_file_path");
- message.setValue("path", path);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::crashPlugin()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash");
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::hangPlugin()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "hang");
-
- sendMessage(message);
-}
-
-
-////////////////////////////////////////////////////////////
-// MARK: media_time class functions
-bool LLPluginClassMedia::pluginSupportsMediaTime(void)
-{
- std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME);
- return !version.empty();
-}
-
-void LLPluginClassMedia::stop()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "stop");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::start(float rate)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "start");
-
- message.setValueReal("rate", rate);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::pause()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "pause");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::seek(float time)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "seek");
-
- message.setValueReal("time", time);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setLoop(bool loop)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_loop");
-
- message.setValueBoolean("loop", loop);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setVolume(float volume)
-{
- if(volume != mRequestedVolume)
- {
- mRequestedVolume = volume;
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_volume");
-
- message.setValueReal("volume", volume);
-
- sendMessage(message);
- }
-}
-
-float LLPluginClassMedia::getVolume()
-{
- return mRequestedVolume;
-}
-
-void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
-{
- // Send URL history to plugin
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "init_history");
- message.setValueLLSD("history", url_history);
- sendMessage(message);
-
- LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL;
-}
-
+/**
+ * @file llpluginclassmedia.cpp
+ * @brief LLPluginClassMedia handles a plugin which knows about the "media" message class.
+ *
+ * @cond
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ * @endcond
+ */
+
+#include "linden_common.h"
+#include "indra_constants.h"
+
+#include "llpluginclassmedia.h"
+#include "llpluginmessageclasses.h"
+
+#include "llqtwebkit.h"
+
+static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256;
+
+static int nextPowerOf2( int value )
+{
+ int next_power_of_2 = 1;
+ while ( next_power_of_2 < value )
+ {
+ next_power_of_2 <<= 1;
+ }
+
+ return next_power_of_2;
+}
+
+LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
+{
+ mOwner = owner;
+ mPlugin = NULL;
+ reset();
+
+ //debug use
+ mDeleteOK = true ;
+}
+
+
+LLPluginClassMedia::~LLPluginClassMedia()
+{
+ llassert_always(mDeleteOK) ;
+ reset();
+}
+
+bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_dir, const std::string &plugin_filename, bool debug)
+{
+ LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
+ LL_DEBUGS("Plugin") << "dir: " << plugin_dir << LL_ENDL;
+ LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
+
+ mPlugin = new LLPluginProcessParent(this);
+ mPlugin->setSleepTime(mSleepTime);
+
+ // Queue up the media init message -- it will be sent after all the currently queued messages.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "init");
+ message.setValue("target", mTarget);
+ sendMessage(message);
+
+ mPlugin->init(launcher_filename, plugin_dir, plugin_filename, debug);
+
+ return true;
+}
+
+
+void LLPluginClassMedia::reset()
+{
+ if(mPlugin != NULL)
+ {
+ delete mPlugin;
+ mPlugin = NULL;
+ }
+
+ mTextureParamsReceived = false;
+ mRequestedTextureDepth = 0;
+ mRequestedTextureInternalFormat = 0;
+ mRequestedTextureFormat = 0;
+ mRequestedTextureType = 0;
+ mRequestedTextureSwapBytes = false;
+ mRequestedTextureCoordsOpenGL = false;
+ mTextureSharedMemorySize = 0;
+ mTextureSharedMemoryName.clear();
+ mDefaultMediaWidth = 0;
+ mDefaultMediaHeight = 0;
+ mNaturalMediaWidth = 0;
+ mNaturalMediaHeight = 0;
+ mSetMediaWidth = -1;
+ mSetMediaHeight = -1;
+ mRequestedMediaWidth = 0;
+ mRequestedMediaHeight = 0;
+ mRequestedTextureWidth = 0;
+ mRequestedTextureHeight = 0;
+ mFullMediaWidth = 0;
+ mFullMediaHeight = 0;
+ mTextureWidth = 0;
+ mTextureHeight = 0;
+ mMediaWidth = 0;
+ mMediaHeight = 0;
+ mDirtyRect = LLRect::null;
+ mAutoScaleMedia = false;
+ mRequestedVolume = 1.0f;
+ mPriority = PRIORITY_NORMAL;
+ mLowPrioritySizeLimit = LOW_PRIORITY_TEXTURE_SIZE_DEFAULT;
+ mAllowDownsample = false;
+ mPadding = 0;
+ mLastMouseX = 0;
+ mLastMouseY = 0;
+ mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
+ mSleepTime = 1.0f / 100.0f;
+ mCanCut = false;
+ mCanCopy = false;
+ mCanPaste = false;
+ mMediaName.clear();
+ mMediaDescription.clear();
+ mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
+
+ // media_browser class
+ mNavigateURI.clear();
+ mNavigateResultCode = -1;
+ mNavigateResultString.clear();
+ mHistoryBackAvailable = false;
+ mHistoryForwardAvailable = false;
+ mStatusText.clear();
+ mProgressPercent = 0;
+ mClickURL.clear();
+ mClickNavType.clear();
+ mClickTarget.clear();
+ mClickUUID.clear();
+ mStatusCode = 0;
+
+ // media_time class
+ mCurrentTime = 0.0f;
+ mDuration = 0.0f;
+ mCurrentRate = 0.0f;
+ mLoadedDuration = 0.0f;
+}
+
+void LLPluginClassMedia::idle(void)
+{
+ if(mPlugin)
+ {
+ mPlugin->idle();
+ }
+
+ if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL))
+ {
+ // Can't process a size change at this time
+ }
+ else if((mRequestedMediaWidth != mMediaWidth) || (mRequestedMediaHeight != mMediaHeight))
+ {
+ // Calculate the correct size for the media texture
+ mRequestedTextureHeight = mRequestedMediaHeight;
+ if(mPadding < 0)
+ {
+ // negative values indicate the plugin wants a power of 2
+ mRequestedTextureWidth = nextPowerOf2(mRequestedMediaWidth);
+ }
+ else
+ {
+ mRequestedTextureWidth = mRequestedMediaWidth;
+
+ if(mPadding > 1)
+ {
+ // Pad up to a multiple of the specified number of bytes per row
+ int rowbytes = mRequestedTextureWidth * mRequestedTextureDepth;
+ int pad = rowbytes % mPadding;
+ if(pad != 0)
+ {
+ rowbytes += mPadding - pad;
+ }
+
+ if(rowbytes % mRequestedTextureDepth == 0)
+ {
+ mRequestedTextureWidth = rowbytes / mRequestedTextureDepth;
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL;
+ }
+ }
+ }
+
+
+ // Size change has been requested but not initiated yet.
+ size_t newsize = mRequestedTextureWidth * mRequestedTextureHeight * mRequestedTextureDepth;
+
+ // Add an extra line for padding, just in case.
+ newsize += mRequestedTextureWidth * mRequestedTextureDepth;
+
+ if(newsize != mTextureSharedMemorySize)
+ {
+ if(!mTextureSharedMemoryName.empty())
+ {
+ // Tell the plugin to remove the old memory segment
+ mPlugin->removeSharedMemory(mTextureSharedMemoryName);
+ mTextureSharedMemoryName.clear();
+ }
+
+ mTextureSharedMemorySize = newsize;
+ mTextureSharedMemoryName = mPlugin->addSharedMemory(mTextureSharedMemorySize);
+ if(!mTextureSharedMemoryName.empty())
+ {
+ void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
+
+ // clear texture memory to avoid random screen visual fuzz from uninitialized texture data
+ memset( addr, 0x00, newsize );
+
+ // We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
+ // so it may not be worthwhile.
+ // mDirtyRect.setOriginAndSize(0, 0, mRequestedMediaWidth, mRequestedMediaHeight);
+ }
+ }
+
+ // This is our local indicator that a change is in progress.
+ mTextureWidth = -1;
+ mTextureHeight = -1;
+ mMediaWidth = -1;
+ mMediaHeight = -1;
+
+ // This invalidates any existing dirty rect.
+ resetDirty();
+
+ // Send a size change message to the plugin
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change");
+ message.setValue("name", mTextureSharedMemoryName);
+ message.setValueS32("width", mRequestedMediaWidth);
+ message.setValueS32("height", mRequestedMediaHeight);
+ message.setValueS32("texture_width", mRequestedTextureWidth);
+ message.setValueS32("texture_height", mRequestedTextureHeight);
+ message.setValueReal("background_r", mBackgroundColor.mV[VX]);
+ message.setValueReal("background_g", mBackgroundColor.mV[VY]);
+ message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
+ message.setValueReal("background_a", mBackgroundColor.mV[VW]);
+ mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
+
+ LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL;
+ }
+ }
+
+ if(mPlugin && mPlugin->isRunning())
+ {
+ // Send queued messages
+ while(!mSendQueue.empty())
+ {
+ LLPluginMessage message = mSendQueue.front();
+ mSendQueue.pop();
+ mPlugin->sendMessage(message);
+ }
+ }
+}
+
+int LLPluginClassMedia::getTextureWidth() const
+{
+ return nextPowerOf2(mTextureWidth);
+}
+
+int LLPluginClassMedia::getTextureHeight() const
+{
+ return nextPowerOf2(mTextureHeight);
+}
+
+unsigned char* LLPluginClassMedia::getBitsData()
+{
+ unsigned char *result = NULL;
+ if((mPlugin != NULL) && !mTextureSharedMemoryName.empty())
+ {
+ result = (unsigned char*)mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
+ }
+ return result;
+}
+
+void LLPluginClassMedia::setSize(int width, int height)
+{
+ if((width > 0) && (height > 0))
+ {
+ mSetMediaWidth = width;
+ mSetMediaHeight = height;
+ }
+ else
+ {
+ mSetMediaWidth = -1;
+ mSetMediaHeight = -1;
+ }
+
+ setSizeInternal();
+}
+
+void LLPluginClassMedia::setSizeInternal(void)
+{
+ if((mSetMediaWidth > 0) && (mSetMediaHeight > 0))
+ {
+ mRequestedMediaWidth = mSetMediaWidth;
+ mRequestedMediaHeight = mSetMediaHeight;
+ }
+ else if((mNaturalMediaWidth > 0) && (mNaturalMediaHeight > 0))
+ {
+ mRequestedMediaWidth = mNaturalMediaWidth;
+ mRequestedMediaHeight = mNaturalMediaHeight;
+ }
+ else
+ {
+ mRequestedMediaWidth = mDefaultMediaWidth;
+ mRequestedMediaHeight = mDefaultMediaHeight;
+ }
+
+ // Save these for size/interest calculations
+ mFullMediaWidth = mRequestedMediaWidth;
+ mFullMediaHeight = mRequestedMediaHeight;
+
+ if(mAllowDownsample)
+ {
+ switch(mPriority)
+ {
+ case PRIORITY_SLIDESHOW:
+ case PRIORITY_LOW:
+ // Reduce maximum texture dimension to (or below) mLowPrioritySizeLimit
+ while((mRequestedMediaWidth > mLowPrioritySizeLimit) || (mRequestedMediaHeight > mLowPrioritySizeLimit))
+ {
+ mRequestedMediaWidth /= 2;
+ mRequestedMediaHeight /= 2;
+ }
+ break;
+
+ default:
+ // Don't adjust texture size
+ break;
+ }
+ }
+
+ if(mAutoScaleMedia)
+ {
+ mRequestedMediaWidth = nextPowerOf2(mRequestedMediaWidth);
+ mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
+ }
+
+ if(mRequestedMediaWidth > 2048)
+ mRequestedMediaWidth = 2048;
+
+ if(mRequestedMediaHeight > 2048)
+ mRequestedMediaHeight = 2048;
+}
+
+void LLPluginClassMedia::setAutoScale(bool auto_scale)
+{
+ if(auto_scale != mAutoScaleMedia)
+ {
+ mAutoScaleMedia = auto_scale;
+ setSizeInternal();
+ }
+}
+
+bool LLPluginClassMedia::textureValid(void)
+{
+ if(
+ !mTextureParamsReceived ||
+ mTextureWidth <= 0 ||
+ mTextureHeight <= 0 ||
+ mMediaWidth <= 0 ||
+ mMediaHeight <= 0 ||
+ mRequestedMediaWidth != mMediaWidth ||
+ mRequestedMediaHeight != mMediaHeight ||
+ getBitsData() == NULL
+ )
+ return false;
+
+ return true;
+}
+
+bool LLPluginClassMedia::getDirty(LLRect *dirty_rect)
+{
+ bool result = !mDirtyRect.isEmpty();
+
+ if(dirty_rect != NULL)
+ {
+ *dirty_rect = mDirtyRect;
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::resetDirty(void)
+{
+ mDirtyRect = LLRect::null;
+}
+
+std::string LLPluginClassMedia::translateModifiers(MASK modifiers)
+{
+ std::string result;
+
+
+ if(modifiers & MASK_CONTROL)
+ {
+ result += "control|";
+ }
+
+ if(modifiers & MASK_ALT)
+ {
+ result += "alt|";
+ }
+
+ if(modifiers & MASK_SHIFT)
+ {
+ result += "shift|";
+ }
+
+ // TODO: should I deal with platform differences here or in callers?
+ // TODO: how do we deal with the Mac "command" key?
+/*
+ if(modifiers & MASK_SOMETHING)
+ {
+ result += "meta|";
+ }
+*/
+ return result;
+}
+
+void LLPluginClassMedia::jsEnableObject( bool enable )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_enable_object");
+ message.setValueBoolean( "enable", enable );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentLocationEvent( double x, double y, double z )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_location");
+ message.setValueReal( "x", x );
+ message.setValueReal( "y", y );
+ message.setValueReal( "z", z );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentGlobalLocationEvent( double x, double y, double z )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_global_location");
+ message.setValueReal( "x", x );
+ message.setValueReal( "y", y );
+ message.setValueReal( "z", z );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentOrientationEvent( double angle )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_orientation");
+ message.setValueReal( "angle", angle );
+
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentLanguageEvent( const std::string& language )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_language");
+ message.setValue( "language", language );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentRegionEvent( const std::string& region )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_region");
+ message.setValue( "region", region );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentMaturityEvent( const std::string& maturity )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_maturity");
+ message.setValue( "maturity", maturity );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers)
+{
+ if(type == MOUSE_EVENT_MOVE)
+ {
+ if(!mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked())
+ {
+ // Don't queue up mouse move events that can't be delivered.
+ return;
+ }
+
+ if((x == mLastMouseX) && (y == mLastMouseY))
+ {
+ // Don't spam unnecessary mouse move events.
+ return;
+ }
+
+ mLastMouseX = x;
+ mLastMouseY = y;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "mouse_event");
+ std::string temp;
+ switch(type)
+ {
+ case MOUSE_EVENT_DOWN: temp = "down"; break;
+ case MOUSE_EVENT_UP: temp = "up"; break;
+ case MOUSE_EVENT_MOVE: temp = "move"; break;
+ case MOUSE_EVENT_DOUBLE_CLICK: temp = "double_click"; break;
+ }
+ message.setValue("event", temp);
+
+ message.setValueS32("button", button);
+
+ message.setValueS32("x", x);
+
+ // Incoming coordinates are OpenGL-style ((0,0) = lower left), so flip them here if the plugin has requested it.
+ if(!mRequestedTextureCoordsOpenGL)
+ {
+ // TODO: Should I use mMediaHeight or mRequestedMediaHeight here?
+ y = mMediaHeight - y;
+ }
+ message.setValueS32("y", y);
+
+ message.setValue("modifiers", translateModifiers(modifiers));
+
+ sendMessage(message);
+}
+
+bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data)
+{
+ bool result = true;
+
+ // FIXME:
+ // HACK: we don't have an easy way to tell if the plugin is going to handle a particular keycode.
+ // For now, return false for the ones the webkit plugin won't handle properly.
+
+ switch(key_code)
+ {
+ case KEY_BACKSPACE:
+ case KEY_TAB:
+ case KEY_RETURN:
+ case KEY_PAD_RETURN:
+ case KEY_SHIFT:
+ case KEY_CONTROL:
+ case KEY_ALT:
+ case KEY_CAPSLOCK:
+ case KEY_ESCAPE:
+ case KEY_PAGE_UP:
+ case KEY_PAGE_DOWN:
+ case KEY_END:
+ case KEY_HOME:
+ case KEY_LEFT:
+ case KEY_UP:
+ case KEY_RIGHT:
+ case KEY_DOWN:
+ case KEY_INSERT:
+ case KEY_DELETE:
+ // These will be handled
+ break;
+
+ default:
+ // regular ASCII characters will also be handled
+ if(key_code >= KEY_SPECIAL)
+ {
+ // Other "special" codes will not work properly.
+ result = false;
+ }
+ break;
+ }
+
+#if LL_DARWIN
+ if(modifiers & MASK_ALT)
+ {
+ // Option-key modified characters should be handled by the unicode input path instead of this one.
+ result = false;
+ }
+#endif
+
+ if(result)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "key_event");
+ std::string temp;
+ switch(type)
+ {
+ case KEY_EVENT_DOWN: temp = "down"; break;
+ case KEY_EVENT_UP: temp = "up"; break;
+ case KEY_EVENT_REPEAT: temp = "repeat"; break;
+ }
+ message.setValue("event", temp);
+
+ message.setValueS32("key", key_code);
+
+ message.setValue("modifiers", translateModifiers(modifiers));
+ message.setValueLLSD("native_key_data", native_key_data);
+
+ sendMessage(message);
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
+
+ message.setValueS32("x", x);
+ message.setValueS32("y", y);
+ message.setValue("modifiers", translateModifiers(modifiers));
+
+ sendMessage(message);
+}
+
+bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD native_key_data)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event");
+
+ message.setValue("text", text);
+ message.setValue("modifiers", translateModifiers(modifiers));
+ message.setValueLLSD("native_key_data", native_key_data);
+
+ sendMessage(message);
+
+ return true;
+}
+
+void LLPluginClassMedia::loadURI(const std::string &uri)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "load_uri");
+
+ message.setValue("uri", uri);
+
+ sendMessage(message);
+}
+
+const char* LLPluginClassMedia::priorityToString(EPriority priority)
+{
+ const char* result = "UNKNOWN";
+ switch(priority)
+ {
+ case PRIORITY_UNLOADED: result = "unloaded"; break;
+ case PRIORITY_STOPPED: result = "stopped"; break;
+ case PRIORITY_HIDDEN: result = "hidden"; break;
+ case PRIORITY_SLIDESHOW: result = "slideshow"; break;
+ case PRIORITY_LOW: result = "low"; break;
+ case PRIORITY_NORMAL: result = "normal"; break;
+ case PRIORITY_HIGH: result = "high"; break;
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::setPriority(EPriority priority)
+{
+ if(mPriority != priority)
+ {
+ mPriority = priority;
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_priority");
+
+ std::string priority_string = priorityToString(priority);
+ switch(priority)
+ {
+ case PRIORITY_UNLOADED:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_STOPPED:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_HIDDEN:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_SLIDESHOW:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_LOW:
+ mSleepTime = 1.0f / 25.0f;
+ break;
+ case PRIORITY_NORMAL:
+ mSleepTime = 1.0f / 50.0f;
+ break;
+ case PRIORITY_HIGH:
+ mSleepTime = 1.0f / 100.0f;
+ break;
+ }
+
+ message.setValue("priority", priority_string);
+
+ sendMessage(message);
+
+ if(mPlugin)
+ {
+ mPlugin->setSleepTime(mSleepTime);
+ }
+
+ LL_DEBUGS("PluginPriority") << this << ": setting priority to " << priority_string << LL_ENDL;
+
+ // This may affect the calculated size, so recalculate it here.
+ setSizeInternal();
+ }
+}
+
+void LLPluginClassMedia::setLowPrioritySizeLimit(int size)
+{
+ int power = nextPowerOf2(size);
+ if(mLowPrioritySizeLimit != power)
+ {
+ mLowPrioritySizeLimit = power;
+
+ // This may affect the calculated size, so recalculate it here.
+ setSizeInternal();
+ }
+}
+
+F64 LLPluginClassMedia::getCPUUsage()
+{
+ F64 result = 0.0f;
+
+ if(mPlugin)
+ {
+ result = mPlugin->getCPUUsage();
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::sendPickFileResponse(const std::string &file)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response");
+ message.setValue("file", file);
+ if(mPlugin && mPlugin->isBlocked())
+ {
+ // If the plugin sent a blocking pick-file request, the response should unblock it.
+ message.setValueBoolean("blocking_response", true);
+ }
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response");
+ message.setValueBoolean("ok", ok);
+ message.setValue("username", username);
+ message.setValue("password", password);
+ if(mPlugin && mPlugin->isBlocked())
+ {
+ // If the plugin sent a blocking pick-file request, the response should unblock it.
+ message.setValueBoolean("blocking_response", true);
+ }
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::cut()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::copy()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_copy");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::paste()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_paste");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
+ message.setValue("path", user_data_path);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_language_code");
+ message.setValue("language", language_code);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setTarget(const std::string &target)
+{
+ mTarget = target;
+}
+
+/* virtual */
+void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
+{
+ std::string message_class = message.getClass();
+
+ if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
+ {
+ std::string message_name = message.getName();
+ if(message_name == "texture_params")
+ {
+ mRequestedTextureDepth = message.getValueS32("depth");
+ mRequestedTextureInternalFormat = message.getValueU32("internalformat");
+ mRequestedTextureFormat = message.getValueU32("format");
+ mRequestedTextureType = message.getValueU32("type");
+ mRequestedTextureSwapBytes = message.getValueBoolean("swap_bytes");
+ mRequestedTextureCoordsOpenGL = message.getValueBoolean("coords_opengl");
+
+ // These two are optional, and will default to 0 if they're not specified.
+ mDefaultMediaWidth = message.getValueS32("default_width");
+ mDefaultMediaHeight = message.getValueS32("default_height");
+
+ mAllowDownsample = message.getValueBoolean("allow_downsample");
+ mPadding = message.getValueS32("padding");
+
+ setSizeInternal();
+
+ mTextureParamsReceived = true;
+ }
+ else if(message_name == "updated")
+ {
+ if(message.hasValue("left"))
+ {
+ LLRect newDirtyRect;
+ newDirtyRect.mLeft = message.getValueS32("left");
+ newDirtyRect.mTop = message.getValueS32("top");
+ newDirtyRect.mRight = message.getValueS32("right");
+ newDirtyRect.mBottom = message.getValueS32("bottom");
+
+ // The plugin is likely to have top and bottom switched, due to vertical flip and OpenGL coordinate confusion.
+ // If they're backwards, swap them.
+ if(newDirtyRect.mTop < newDirtyRect.mBottom)
+ {
+ S32 temp = newDirtyRect.mTop;
+ newDirtyRect.mTop = newDirtyRect.mBottom;
+ newDirtyRect.mBottom = temp;
+ }
+
+ if(mDirtyRect.isEmpty())
+ {
+ mDirtyRect = newDirtyRect;
+ }
+ else
+ {
+ mDirtyRect.unionWith(newDirtyRect);
+ }
+
+ LL_DEBUGS("Plugin") << "adjusted incoming rect is: ("
+ << newDirtyRect.mLeft << ", "
+ << newDirtyRect.mTop << ", "
+ << newDirtyRect.mRight << ", "
+ << newDirtyRect.mBottom << "), new dirty rect is: ("
+ << mDirtyRect.mLeft << ", "
+ << mDirtyRect.mTop << ", "
+ << mDirtyRect.mRight << ", "
+ << mDirtyRect.mBottom << ")"
+ << LL_ENDL;
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CONTENT_UPDATED);
+ }
+
+
+ bool time_duration_updated = false;
+ int previous_percent = mProgressPercent;
+
+ if(message.hasValue("current_time"))
+ {
+ mCurrentTime = message.getValueReal("current_time");
+ time_duration_updated = true;
+ }
+ if(message.hasValue("duration"))
+ {
+ mDuration = message.getValueReal("duration");
+ time_duration_updated = true;
+ }
+
+ if(message.hasValue("current_rate"))
+ {
+ mCurrentRate = message.getValueReal("current_rate");
+ }
+
+ if(message.hasValue("loaded_duration"))
+ {
+ mLoadedDuration = message.getValueReal("loaded_duration");
+ time_duration_updated = true;
+ }
+ else
+ {
+ // If the message doesn't contain a loaded_duration param, assume it's equal to duration
+ mLoadedDuration = mDuration;
+ }
+
+ // Calculate a percentage based on the loaded duration and total duration.
+ if(mDuration != 0.0f) // Don't divide by zero.
+ {
+ mProgressPercent = (int)((mLoadedDuration * 100.0f)/mDuration);
+ }
+
+ if(time_duration_updated)
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_TIME_DURATION_UPDATED);
+ }
+
+ if(previous_percent != mProgressPercent)
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
+ }
+ }
+ else if(message_name == "media_status")
+ {
+ std::string status = message.getValue("status");
+
+ LL_DEBUGS("Plugin") << "Status changed to: " << status << LL_ENDL;
+
+ if(status == "loading")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_LOADING;
+ }
+ else if(status == "loaded")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_LOADED;
+ }
+ else if(status == "error")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_ERROR;
+ }
+ else if(status == "playing")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_PLAYING;
+ }
+ else if(status == "paused")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_PAUSED;
+ }
+ else if(status == "done")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_DONE;
+ }
+ else
+ {
+ // empty string or any unknown string
+ mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
+ }
+ }
+ else if(message_name == "size_change_request")
+ {
+ S32 width = message.getValueS32("width");
+ S32 height = message.getValueS32("height");
+ std::string name = message.getValue("name");
+
+ // TODO: check that name matches?
+ mNaturalMediaWidth = width;
+ mNaturalMediaHeight = height;
+
+ setSizeInternal();
+ }
+ else if(message_name == "size_change_response")
+ {
+ std::string name = message.getValue("name");
+
+ // TODO: check that name matches?
+
+ mTextureWidth = message.getValueS32("texture_width");
+ mTextureHeight = message.getValueS32("texture_height");
+ mMediaWidth = message.getValueS32("width");
+ mMediaHeight = message.getValueS32("height");
+
+ // This invalidates any existing dirty rect.
+ resetDirty();
+
+ // TODO: should we verify that the plugin sent back the right values?
+ // Two size changes in a row may cause them to not match, due to queueing, etc.
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_SIZE_CHANGED);
+ }
+ else if(message_name == "cursor_changed")
+ {
+ mCursorName = message.getValue("name");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CURSOR_CHANGED);
+ }
+ else if(message_name == "edit_state")
+ {
+ if(message.hasValue("cut"))
+ {
+ mCanCut = message.getValueBoolean("cut");
+ }
+ if(message.hasValue("copy"))
+ {
+ mCanCopy = message.getValueBoolean("copy");
+ }
+ if(message.hasValue("paste"))
+ {
+ mCanPaste = message.getValueBoolean("paste");
+ }
+ }
+ else if(message_name == "name_text")
+ {
+ mMediaName = message.getValue("name");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
+ }
+ else if(message_name == "pick_file")
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);
+ }
+ else if(message_name == "auth_request")
+ {
+ mAuthURL = message.getValue("url");
+ mAuthRealm = message.getValue("realm");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
+ {
+ std::string message_name = message.getName();
+ if(message_name == "navigate_begin")
+ {
+ mNavigateURI = message.getValue("uri");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_BEGIN);
+ }
+ else if(message_name == "navigate_complete")
+ {
+ mNavigateURI = message.getValue("uri");
+ mNavigateResultCode = message.getValueS32("result_code");
+ mNavigateResultString = message.getValue("result_string");
+ mHistoryBackAvailable = message.getValueBoolean("history_back_available");
+ mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE);
+ }
+ else if(message_name == "progress")
+ {
+ mProgressPercent = message.getValueS32("percent");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
+ }
+ else if(message_name == "status_text")
+ {
+ mStatusText = message.getValue("status");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_STATUS_TEXT_CHANGED);
+ }
+ else if(message_name == "location_changed")
+ {
+ mLocation = message.getValue("uri");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LOCATION_CHANGED);
+ }
+ else if(message_name == "click_href")
+ {
+ mClickURL = message.getValue("uri");
+ mClickTarget = message.getValue("target");
+ mClickUUID = message.getValue("uuid");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
+ }
+ else if(message_name == "click_nofollow")
+ {
+ mClickURL = message.getValue("uri");
+ mClickNavType = message.getValue("nav_type");
+ mClickTarget.clear();
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW);
+ }
+ else if(message_name == "navigate_error_page")
+ {
+ mStatusCode = message.getValueS32("status_code");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_ERROR_PAGE);
+ }
+ else if(message_name == "cookie_set")
+ {
+ if(mOwner)
+ {
+ mOwner->handleCookieSet(this, message.getValue("cookie"));
+ }
+ }
+ else if(message_name == "close_request")
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLOSE_REQUEST);
+ }
+ else if(message_name == "geometry_change")
+ {
+ mClickUUID = message.getValue("uuid");
+ mGeometryX = message.getValueS32("x");
+ mGeometryY = message.getValueS32("y");
+ mGeometryWidth = message.getValueS32("width");
+ mGeometryHeight = message.getValueS32("height");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_GEOMETRY_CHANGE);
+ }
+ else if(message_name == "link_hovered")
+ {
+ // text is not currently used -- the tooltip hover text is taken from the "title".
+ mHoverLink = message.getValue("link");
+ mHoverText = message.getValue("title");
+ // message.getValue("text");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LINK_HOVERED);
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
+ {
+ std::string message_name = message.getName();
+
+ // This class hasn't defined any incoming messages yet.
+// if(message_name == "message_name")
+// {
+// }
+// else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+
+}
+
+/* virtual */
+void LLPluginClassMedia::pluginLaunchFailed()
+{
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED_LAUNCH);
+}
+
+/* virtual */
+void LLPluginClassMedia::pluginDied()
+{
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED);
+}
+
+void LLPluginClassMedia::mediaEvent(LLPluginClassMediaOwner::EMediaEvent event)
+{
+ if(mOwner)
+ {
+ mOwner->handleMediaEvent(this, event);
+ }
+}
+
+void LLPluginClassMedia::sendMessage(const LLPluginMessage &message)
+{
+ if(mPlugin && mPlugin->isRunning())
+ {
+ mPlugin->sendMessage(message);
+ }
+ else
+ {
+ // The plugin isn't set up yet -- queue this message to be sent after initialization.
+ mSendQueue.push(message);
+ }
+}
+
+////////////////////////////////////////////////////////////
+// MARK: media_browser class functions
+bool LLPluginClassMedia::pluginSupportsMediaBrowser(void)
+{
+ std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER);
+ return !version.empty();
+}
+
+void LLPluginClassMedia::focus(bool focused)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "focus");
+
+ message.setValueBoolean("focused", focused);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::clear_cache()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::clear_cookies()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cookies");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::set_cookies(const std::string &cookies)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_cookies");
+ message.setValue("cookies", cookies);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::enable_cookies(bool enable)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "enable_cookies");
+ message.setValueBoolean("enable", enable);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxy_setup(bool enable, const std::string &host, int port)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_setup");
+
+ message.setValueBoolean("enable", enable);
+ message.setValue("host", host);
+ message.setValueS32("port", port);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_stop()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_stop");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_reload(bool ignore_cache)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_reload");
+
+ message.setValueBoolean("ignore_cache", ignore_cache);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_forward()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_forward");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_back()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_back");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_user_agent");
+
+ message.setValue("user_agent", user_agent);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxyWindowOpened(const std::string &target, const std::string &uuid)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_opened");
+
+ message.setValue("target", target);
+ message.setValue("uuid", uuid);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxyWindowClosed(const std::string &uuid)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_closed");
+
+ message.setValue("uuid", uuid);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::ignore_ssl_cert_errors(bool ignore)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "ignore_ssl_cert_errors");
+ message.setValueBoolean("ignore", ignore);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::addCertificateFilePath(const std::string& path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "add_certificate_file_path");
+ message.setValue("path", path);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::crashPlugin()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash");
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::hangPlugin()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "hang");
+
+ sendMessage(message);
+}
+
+
+////////////////////////////////////////////////////////////
+// MARK: media_time class functions
+bool LLPluginClassMedia::pluginSupportsMediaTime(void)
+{
+ std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME);
+ return !version.empty();
+}
+
+void LLPluginClassMedia::stop()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "stop");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::start(float rate)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "start");
+
+ message.setValueReal("rate", rate);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::pause()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "pause");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::seek(float time)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "seek");
+
+ message.setValueReal("time", time);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setLoop(bool loop)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_loop");
+
+ message.setValueBoolean("loop", loop);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setVolume(float volume)
+{
+ if(volume != mRequestedVolume)
+ {
+ mRequestedVolume = volume;
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_volume");
+
+ message.setValueReal("volume", volume);
+
+ sendMessage(message);
+ }
+}
+
+float LLPluginClassMedia::getVolume()
+{
+ return mRequestedVolume;
+}
+
+void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
+{
+ // Send URL history to plugin
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "init_history");
+ message.setValueLLSD("history", url_history);
+ sendMessage(message);
+
+ LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL;
+}
+
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index fea836aa68..f8ed89f644 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -1,426 +1,425 @@
-/**
- * @file llpluginclassmedia.h
- * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
- *
- * @cond
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- * @endcond
- */
-
-#ifndef LL_LLPLUGINCLASSMEDIA_H
-#define LL_LLPLUGINCLASSMEDIA_H
-
-#include "llgltypes.h"
-#include "llpluginprocessparent.h"
-#include "llrect.h"
-#include "llpluginclassmediaowner.h"
-#include <queue>
-#include "v4color.h"
-
-class LLPluginClassMedia : public LLPluginProcessParentOwner
-{
- LOG_CLASS(LLPluginClassMedia);
-public:
- LLPluginClassMedia(LLPluginClassMediaOwner *owner);
- virtual ~LLPluginClassMedia();
-
- // local initialization, called by the media manager when creating a source
- virtual bool init(const std::string &launcher_filename,
- const std::string &plugin_dir,
- const std::string &plugin_filename,
- bool debug);
-
- // undoes everything init() didm called by the media manager when destroying a source
- virtual void reset();
-
- void idle(void);
-
- // All of these may return 0 or an actual valid value.
- // Callers need to check the return for 0, and not use the values in that case.
- int getWidth() const { return (mMediaWidth > 0) ? mMediaWidth : 0; };
- int getHeight() const { return (mMediaHeight > 0) ? mMediaHeight : 0; };
- int getNaturalWidth() const { return mNaturalMediaWidth; };
- int getNaturalHeight() const { return mNaturalMediaHeight; };
- int getSetWidth() const { return mSetMediaWidth; };
- int getSetHeight() const { return mSetMediaHeight; };
- int getBitsWidth() const { return (mTextureWidth > 0) ? mTextureWidth : 0; };
- int getBitsHeight() const { return (mTextureHeight > 0) ? mTextureHeight : 0; };
- int getTextureWidth() const;
- int getTextureHeight() const;
- int getFullWidth() const { return mFullMediaWidth; };
- int getFullHeight() const { return mFullMediaHeight; };
-
- // This may return NULL. Callers need to check for and handle this case.
- unsigned char* getBitsData();
-
- // gets the format details of the texture data
- // These may return 0 if they haven't been set up yet. The caller needs to detect this case.
- int getTextureDepth() const { return mRequestedTextureDepth; };
- int getTextureFormatInternal() const { return mRequestedTextureInternalFormat; };
- int getTextureFormatPrimary() const { return mRequestedTextureFormat; };
- int getTextureFormatType() const { return mRequestedTextureType; };
- bool getTextureFormatSwapBytes() const { return mRequestedTextureSwapBytes; };
- bool getTextureCoordsOpenGL() const { return mRequestedTextureCoordsOpenGL; };
-
- void setSize(int width, int height);
- void setAutoScale(bool auto_scale);
-
- void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
-
- void setOwner(LLPluginClassMediaOwner *owner) { mOwner = owner; };
-
- // Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
- // This will initially be false, and will also be false for some time after setSize while the resize is processed.
- // Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
- // until you call idle() again.
- bool textureValid(void);
-
- bool getDirty(LLRect *dirty_rect = NULL);
- void resetDirty(void);
-
- typedef enum
- {
- MOUSE_EVENT_DOWN,
- MOUSE_EVENT_UP,
- MOUSE_EVENT_MOVE,
- MOUSE_EVENT_DOUBLE_CLICK
- }EMouseEventType;
-
- void mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers);
-
- typedef enum
- {
- KEY_EVENT_DOWN,
- KEY_EVENT_UP,
- KEY_EVENT_REPEAT
- }EKeyEventType;
-
- bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
-
- void scrollEvent(int x, int y, MASK modifiers);
-
- // Javascript <-> viewer events
- void jsExposeObjectEvent( bool expose );
- void jsValuesValidEvent( bool valid );
- void jsAgentLocationEvent( double x, double y, double z );
- void jsAgentGlobalLocationEvent( double x, double y, double z );
- void jsAgentOrientationEvent( double angle );
- void jsAgentLanguageEvent( const std::string& language );
- void jsAgentRegionEvent( const std::string& region_name );
- void jsAgentMaturityEvent( const std::string& maturity );
-
- // Text may be unicode (utf8 encoded)
- bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
-
- void loadURI(const std::string &uri);
-
- // "Loading" means uninitialized or any state prior to fully running (processing commands)
- bool isPluginLoading(void) { return mPlugin?mPlugin->isLoading():false; };
-
- // "Running" means the steady state -- i.e. processing messages
- bool isPluginRunning(void) { return mPlugin?mPlugin->isRunning():false; };
-
- // "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally)
- bool isPluginExited(void) { return mPlugin?mPlugin->isDone():false; };
-
- std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(""); };
-
- bool getDisableTimeout() { return mPlugin?mPlugin->getDisableTimeout():false; };
- void setDisableTimeout(bool disable) { if(mPlugin) mPlugin->setDisableTimeout(disable); };
-
- // Inherited from LLPluginProcessParentOwner
- /* virtual */ void receivePluginMessage(const LLPluginMessage &message);
- /* virtual */ void pluginLaunchFailed();
- /* virtual */ void pluginDied();
-
-
- typedef enum
- {
- PRIORITY_UNLOADED, // media plugin isn't even loaded.
- PRIORITY_STOPPED, // media is not playing, shouldn't need to update at all.
- PRIORITY_HIDDEN, // media is not being displayed or is out of view, don't need to do graphic updates, but may still update audio, playhead, etc.
- PRIORITY_SLIDESHOW, // media is in the far distance, updates very infrequently
- PRIORITY_LOW, // media is in the distance, may be rendered at reduced size
- PRIORITY_NORMAL, // normal (default) priority
- PRIORITY_HIGH // media has user focus and/or is taking up most of the screen
- }EPriority;
-
- static const char* priorityToString(EPriority priority);
- void setPriority(EPriority priority);
- void setLowPrioritySizeLimit(int size);
-
- F64 getCPUUsage();
-
- void sendPickFileResponse(const std::string &file);
-
- void sendAuthResponse(bool ok, const std::string &username, const std::string &password);
-
- // Valid after a MEDIA_EVENT_CURSOR_CHANGED event
- std::string getCursorName() const { return mCursorName; };
-
- LLPluginClassMediaOwner::EMediaStatus getStatus() const { return mStatus; }
-
- void cut();
- bool canCut() const { return mCanCut; };
-
- void copy();
- bool canCopy() const { return mCanCopy; };
-
- void paste();
- bool canPaste() const { return mCanPaste; };
-
- // These can be called before init(), and they will be queued and sent before the media init message.
- void setUserDataPath(const std::string &user_data_path);
- void setLanguageCode(const std::string &language_code);
- void setPluginsEnabled(const bool enabled);
- void setJavascriptEnabled(const bool enabled);
- void setTarget(const std::string &target);
-
- ///////////////////////////////////
- // media browser class functions
- bool pluginSupportsMediaBrowser(void);
-
- void focus(bool focused);
- void clear_cache();
- void clear_cookies();
- void set_cookies(const std::string &cookies);
- void enable_cookies(bool enable);
- void proxy_setup(bool enable, const std::string &host = LLStringUtil::null, int port = 0);
- void browse_stop();
- void browse_reload(bool ignore_cache = false);
- void browse_forward();
- void browse_back();
- void setBrowserUserAgent(const std::string& user_agent);
- void proxyWindowOpened(const std::string &target, const std::string &uuid);
- void proxyWindowClosed(const std::string &uuid);
- void ignore_ssl_cert_errors(bool ignore);
- void addCertificateFilePath(const std::string& path);
-
- // This is valid after MEDIA_EVENT_NAVIGATE_BEGIN or MEDIA_EVENT_NAVIGATE_COMPLETE
- std::string getNavigateURI() const { return mNavigateURI; };
-
- // These are valid after MEDIA_EVENT_NAVIGATE_COMPLETE
- S32 getNavigateResultCode() const { return mNavigateResultCode; };
- std::string getNavigateResultString() const { return mNavigateResultString; };
- bool getHistoryBackAvailable() const { return mHistoryBackAvailable; };
- bool getHistoryForwardAvailable() const { return mHistoryForwardAvailable; };
-
- // This is valid after MEDIA_EVENT_PROGRESS_UPDATED
- int getProgressPercent() const { return mProgressPercent; };
-
- // This is valid after MEDIA_EVENT_STATUS_TEXT_CHANGED
- std::string getStatusText() const { return mStatusText; };
-
- // This is valid after MEDIA_EVENT_LOCATION_CHANGED
- std::string getLocation() const { return mLocation; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_HREF or MEDIA_EVENT_CLICK_LINK_NOFOLLOW
- std::string getClickURL() const { return mClickURL; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_NOFOLLOW
- std::string getClickNavType() const { return mClickNavType; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_HREF
- std::string getClickTarget() const { return mClickTarget; };
-
- // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE
- std::string getClickUUID() const { return mClickUUID; };
-
- // This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE
- S32 getStatusCode() const { return mStatusCode; };
-
- // These are valid during MEDIA_EVENT_GEOMETRY_CHANGE
- S32 getGeometryX() const { return mGeometryX; };
- S32 getGeometryY() const { return mGeometryY; };
- S32 getGeometryWidth() const { return mGeometryWidth; };
- S32 getGeometryHeight() const { return mGeometryHeight; };
-
- // These are valid during MEDIA_EVENT_AUTH_REQUEST
- std::string getAuthURL() const { return mAuthURL; };
- std::string getAuthRealm() const { return mAuthRealm; };
-
- // These are valid during MEDIA_EVENT_LINK_HOVERED
- std::string getHoverText() const { return mHoverText; };
- std::string getHoverLink() const { return mHoverLink; };
-
- std::string getMediaName() const { return mMediaName; };
- std::string getMediaDescription() const { return mMediaDescription; };
-
- // Crash the plugin. If you use this outside of a testbed, you will be punished.
- void crashPlugin();
-
- // Hang the plugin. If you use this outside of a testbed, you will be punished.
- void hangPlugin();
-
- ///////////////////////////////////
- // media time class functions
- bool pluginSupportsMediaTime(void);
- void stop();
- void start(float rate = 0.0f);
- void pause();
- void seek(float time);
- void setLoop(bool loop);
- void setVolume(float volume);
- float getVolume();
-
- F64 getCurrentTime(void) const { return mCurrentTime; };
- F64 getDuration(void) const { return mDuration; };
- F64 getCurrentPlayRate(void) { return mCurrentRate; };
- F64 getLoadedDuration(void) const { return mLoadedDuration; };
-
- // Initialize the URL history of the plugin by sending
- // "init_history" message
- void initializeUrlHistory(const LLSD& url_history);
-
-protected:
-
- LLPluginClassMediaOwner *mOwner;
-
- // Notify this object's owner that an event has occurred.
- void mediaEvent(LLPluginClassMediaOwner::EMediaEvent event);
-
- void sendMessage(const LLPluginMessage &message); // Send message internally, either queueing or sending directly.
- std::queue<LLPluginMessage> mSendQueue; // Used to queue messages while the plugin initializes.
-
- void setSizeInternal(void);
-
- bool mTextureParamsReceived; // the mRequestedTexture* fields are only valid when this is true
- S32 mRequestedTextureDepth;
- LLGLenum mRequestedTextureInternalFormat;
- LLGLenum mRequestedTextureFormat;
- LLGLenum mRequestedTextureType;
- bool mRequestedTextureSwapBytes;
- bool mRequestedTextureCoordsOpenGL;
-
- std::string mTextureSharedMemoryName;
- size_t mTextureSharedMemorySize;
-
- // True to scale requested media up to the full size of the texture (i.e. next power of two)
- bool mAutoScaleMedia;
-
- // default media size for the plugin, from the texture_params message.
- int mDefaultMediaWidth;
- int mDefaultMediaHeight;
-
- // Size that has been requested by the plugin itself
- int mNaturalMediaWidth;
- int mNaturalMediaHeight;
-
- // Size that has been requested with setSize()
- int mSetMediaWidth;
- int mSetMediaHeight;
-
- // Full calculated media size (before auto-scale and downsample calculations)
- int mFullMediaWidth;
- int mFullMediaHeight;
-
- // Actual media size being set (after auto-scale)
- int mRequestedMediaWidth;
- int mRequestedMediaHeight;
-
- // Texture size calculated from actual media size
- int mRequestedTextureWidth;
- int mRequestedTextureHeight;
-
- // Size that the plugin has acknowledged
- int mTextureWidth;
- int mTextureHeight;
- int mMediaWidth;
- int mMediaHeight;
-
- float mRequestedVolume;
-
- // Priority of this media stream
- EPriority mPriority;
- int mLowPrioritySizeLimit;
-
- bool mAllowDownsample;
- int mPadding;
-
-
- LLPluginProcessParent *mPlugin;
-
- LLRect mDirtyRect;
-
- std::string translateModifiers(MASK modifiers);
-
- std::string mCursorName;
- int mLastMouseX;
- int mLastMouseY;
-
- LLPluginClassMediaOwner::EMediaStatus mStatus;
-
- F64 mSleepTime;
-
- bool mCanCut;
- bool mCanCopy;
- bool mCanPaste;
-
- std::string mMediaName;
- std::string mMediaDescription;
-
- LLColor4 mBackgroundColor;
-
- std::string mTarget;
-
- /////////////////////////////////////////
- // media_browser class
- std::string mNavigateURI;
- S32 mNavigateResultCode;
- std::string mNavigateResultString;
- bool mHistoryBackAvailable;
- bool mHistoryForwardAvailable;
- std::string mStatusText;
- int mProgressPercent;
- std::string mLocation;
- std::string mClickURL;
- std::string mClickNavType;
- std::string mClickTarget;
- std::string mClickUUID;
- S32 mGeometryX;
- S32 mGeometryY;
- S32 mGeometryWidth;
- S32 mGeometryHeight;
- S32 mStatusCode;
- std::string mAuthURL;
- std::string mAuthRealm;
- std::string mHoverText;
- std::string mHoverLink;
-
- /////////////////////////////////////////
- // media_time class
- F64 mCurrentTime;
- F64 mDuration;
- F64 mCurrentRate;
- F64 mLoadedDuration;
-
-//--------------------------------------
- //debug use only
- //
-private:
- bool mDeleteOK ;
-public:
- void setDeleteOK(bool flag) { mDeleteOK = flag ;}
-//--------------------------------------
-};
-
-#endif // LL_LLPLUGINCLASSMEDIA_H
+/**
+ * @file llpluginclassmedia.h
+ * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
+ *
+ * @cond
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ * @endcond
+ */
+
+#ifndef LL_LLPLUGINCLASSMEDIA_H
+#define LL_LLPLUGINCLASSMEDIA_H
+
+#include "llgltypes.h"
+#include "llpluginprocessparent.h"
+#include "llrect.h"
+#include "llpluginclassmediaowner.h"
+#include <queue>
+#include "v4color.h"
+
+class LLPluginClassMedia : public LLPluginProcessParentOwner
+{
+ LOG_CLASS(LLPluginClassMedia);
+public:
+ LLPluginClassMedia(LLPluginClassMediaOwner *owner);
+ virtual ~LLPluginClassMedia();
+
+ // local initialization, called by the media manager when creating a source
+ virtual bool init(const std::string &launcher_filename,
+ const std::string &plugin_dir,
+ const std::string &plugin_filename,
+ bool debug);
+
+ // undoes everything init() didm called by the media manager when destroying a source
+ virtual void reset();
+
+ void idle(void);
+
+ // All of these may return 0 or an actual valid value.
+ // Callers need to check the return for 0, and not use the values in that case.
+ int getWidth() const { return (mMediaWidth > 0) ? mMediaWidth : 0; };
+ int getHeight() const { return (mMediaHeight > 0) ? mMediaHeight : 0; };
+ int getNaturalWidth() const { return mNaturalMediaWidth; };
+ int getNaturalHeight() const { return mNaturalMediaHeight; };
+ int getSetWidth() const { return mSetMediaWidth; };
+ int getSetHeight() const { return mSetMediaHeight; };
+ int getBitsWidth() const { return (mTextureWidth > 0) ? mTextureWidth : 0; };
+ int getBitsHeight() const { return (mTextureHeight > 0) ? mTextureHeight : 0; };
+ int getTextureWidth() const;
+ int getTextureHeight() const;
+ int getFullWidth() const { return mFullMediaWidth; };
+ int getFullHeight() const { return mFullMediaHeight; };
+
+ // This may return NULL. Callers need to check for and handle this case.
+ unsigned char* getBitsData();
+
+ // gets the format details of the texture data
+ // These may return 0 if they haven't been set up yet. The caller needs to detect this case.
+ int getTextureDepth() const { return mRequestedTextureDepth; };
+ int getTextureFormatInternal() const { return mRequestedTextureInternalFormat; };
+ int getTextureFormatPrimary() const { return mRequestedTextureFormat; };
+ int getTextureFormatType() const { return mRequestedTextureType; };
+ bool getTextureFormatSwapBytes() const { return mRequestedTextureSwapBytes; };
+ bool getTextureCoordsOpenGL() const { return mRequestedTextureCoordsOpenGL; };
+
+ void setSize(int width, int height);
+ void setAutoScale(bool auto_scale);
+
+ void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
+
+ void setOwner(LLPluginClassMediaOwner *owner) { mOwner = owner; };
+
+ // Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
+ // This will initially be false, and will also be false for some time after setSize while the resize is processed.
+ // Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
+ // until you call idle() again.
+ bool textureValid(void);
+
+ bool getDirty(LLRect *dirty_rect = NULL);
+ void resetDirty(void);
+
+ typedef enum
+ {
+ MOUSE_EVENT_DOWN,
+ MOUSE_EVENT_UP,
+ MOUSE_EVENT_MOVE,
+ MOUSE_EVENT_DOUBLE_CLICK
+ }EMouseEventType;
+
+ void mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers);
+
+ typedef enum
+ {
+ KEY_EVENT_DOWN,
+ KEY_EVENT_UP,
+ KEY_EVENT_REPEAT
+ }EKeyEventType;
+
+ bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
+
+ void scrollEvent(int x, int y, MASK modifiers);
+
+ // Javascript <-> viewer events
+ void jsEnableObject( bool enable );
+ void jsAgentLocationEvent( double x, double y, double z );
+ void jsAgentGlobalLocationEvent( double x, double y, double z );
+ void jsAgentOrientationEvent( double angle );
+ void jsAgentLanguageEvent( const std::string& language );
+ void jsAgentRegionEvent( const std::string& region_name );
+ void jsAgentMaturityEvent( const std::string& maturity );
+
+ // Text may be unicode (utf8 encoded)
+ bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
+
+ void loadURI(const std::string &uri);
+
+ // "Loading" means uninitialized or any state prior to fully running (processing commands)
+ bool isPluginLoading(void) { return mPlugin?mPlugin->isLoading():false; };
+
+ // "Running" means the steady state -- i.e. processing messages
+ bool isPluginRunning(void) { return mPlugin?mPlugin->isRunning():false; };
+
+ // "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally)
+ bool isPluginExited(void) { return mPlugin?mPlugin->isDone():false; };
+
+ std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(""); };
+
+ bool getDisableTimeout() { return mPlugin?mPlugin->getDisableTimeout():false; };
+ void setDisableTimeout(bool disable) { if(mPlugin) mPlugin->setDisableTimeout(disable); };
+
+ // Inherited from LLPluginProcessParentOwner
+ /* virtual */ void receivePluginMessage(const LLPluginMessage &message);
+ /* virtual */ void pluginLaunchFailed();
+ /* virtual */ void pluginDied();
+
+
+ typedef enum
+ {
+ PRIORITY_UNLOADED, // media plugin isn't even loaded.
+ PRIORITY_STOPPED, // media is not playing, shouldn't need to update at all.
+ PRIORITY_HIDDEN, // media is not being displayed or is out of view, don't need to do graphic updates, but may still update audio, playhead, etc.
+ PRIORITY_SLIDESHOW, // media is in the far distance, updates very infrequently
+ PRIORITY_LOW, // media is in the distance, may be rendered at reduced size
+ PRIORITY_NORMAL, // normal (default) priority
+ PRIORITY_HIGH // media has user focus and/or is taking up most of the screen
+ }EPriority;
+
+ static const char* priorityToString(EPriority priority);
+ void setPriority(EPriority priority);
+ void setLowPrioritySizeLimit(int size);
+
+ F64 getCPUUsage();
+
+ void sendPickFileResponse(const std::string &file);
+
+ void sendAuthResponse(bool ok, const std::string &username, const std::string &password);
+
+ // Valid after a MEDIA_EVENT_CURSOR_CHANGED event
+ std::string getCursorName() const { return mCursorName; };
+
+ LLPluginClassMediaOwner::EMediaStatus getStatus() const { return mStatus; }
+
+ void cut();
+ bool canCut() const { return mCanCut; };
+
+ void copy();
+ bool canCopy() const { return mCanCopy; };
+
+ void paste();
+ bool canPaste() const { return mCanPaste; };
+
+ // These can be called before init(), and they will be queued and sent before the media init message.
+ void setUserDataPath(const std::string &user_data_path);
+ void setLanguageCode(const std::string &language_code);
+ void setPluginsEnabled(const bool enabled);
+ void setJavascriptEnabled(const bool enabled);
+ void setTarget(const std::string &target);
+
+ ///////////////////////////////////
+ // media browser class functions
+ bool pluginSupportsMediaBrowser(void);
+
+ void focus(bool focused);
+ void clear_cache();
+ void clear_cookies();
+ void set_cookies(const std::string &cookies);
+ void enable_cookies(bool enable);
+ void proxy_setup(bool enable, const std::string &host = LLStringUtil::null, int port = 0);
+ void browse_stop();
+ void browse_reload(bool ignore_cache = false);
+ void browse_forward();
+ void browse_back();
+ void setBrowserUserAgent(const std::string& user_agent);
+ void proxyWindowOpened(const std::string &target, const std::string &uuid);
+ void proxyWindowClosed(const std::string &uuid);
+ void ignore_ssl_cert_errors(bool ignore);
+ void addCertificateFilePath(const std::string& path);
+
+ // This is valid after MEDIA_EVENT_NAVIGATE_BEGIN or MEDIA_EVENT_NAVIGATE_COMPLETE
+ std::string getNavigateURI() const { return mNavigateURI; };
+
+ // These are valid after MEDIA_EVENT_NAVIGATE_COMPLETE
+ S32 getNavigateResultCode() const { return mNavigateResultCode; };
+ std::string getNavigateResultString() const { return mNavigateResultString; };
+ bool getHistoryBackAvailable() const { return mHistoryBackAvailable; };
+ bool getHistoryForwardAvailable() const { return mHistoryForwardAvailable; };
+
+ // This is valid after MEDIA_EVENT_PROGRESS_UPDATED
+ int getProgressPercent() const { return mProgressPercent; };
+
+ // This is valid after MEDIA_EVENT_STATUS_TEXT_CHANGED
+ std::string getStatusText() const { return mStatusText; };
+
+ // This is valid after MEDIA_EVENT_LOCATION_CHANGED
+ std::string getLocation() const { return mLocation; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_HREF or MEDIA_EVENT_CLICK_LINK_NOFOLLOW
+ std::string getClickURL() const { return mClickURL; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_NOFOLLOW
+ std::string getClickNavType() const { return mClickNavType; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_HREF
+ std::string getClickTarget() const { return mClickTarget; };
+
+ // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE
+ std::string getClickUUID() const { return mClickUUID; };
+
+ // This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE
+ S32 getStatusCode() const { return mStatusCode; };
+
+ // These are valid during MEDIA_EVENT_GEOMETRY_CHANGE
+ S32 getGeometryX() const { return mGeometryX; };
+ S32 getGeometryY() const { return mGeometryY; };
+ S32 getGeometryWidth() const { return mGeometryWidth; };
+ S32 getGeometryHeight() const { return mGeometryHeight; };
+
+ // These are valid during MEDIA_EVENT_AUTH_REQUEST
+ std::string getAuthURL() const { return mAuthURL; };
+ std::string getAuthRealm() const { return mAuthRealm; };
+
+ // These are valid during MEDIA_EVENT_LINK_HOVERED
+ std::string getHoverText() const { return mHoverText; };
+ std::string getHoverLink() const { return mHoverLink; };
+
+ std::string getMediaName() const { return mMediaName; };
+ std::string getMediaDescription() const { return mMediaDescription; };
+
+ // Crash the plugin. If you use this outside of a testbed, you will be punished.
+ void crashPlugin();
+
+ // Hang the plugin. If you use this outside of a testbed, you will be punished.
+ void hangPlugin();
+
+ ///////////////////////////////////
+ // media time class functions
+ bool pluginSupportsMediaTime(void);
+ void stop();
+ void start(float rate = 0.0f);
+ void pause();
+ void seek(float time);
+ void setLoop(bool loop);
+ void setVolume(float volume);
+ float getVolume();
+
+ F64 getCurrentTime(void) const { return mCurrentTime; };
+ F64 getDuration(void) const { return mDuration; };
+ F64 getCurrentPlayRate(void) { return mCurrentRate; };
+ F64 getLoadedDuration(void) const { return mLoadedDuration; };
+
+ // Initialize the URL history of the plugin by sending
+ // "init_history" message
+ void initializeUrlHistory(const LLSD& url_history);
+
+protected:
+
+ LLPluginClassMediaOwner *mOwner;
+
+ // Notify this object's owner that an event has occurred.
+ void mediaEvent(LLPluginClassMediaOwner::EMediaEvent event);
+
+ void sendMessage(const LLPluginMessage &message); // Send message internally, either queueing or sending directly.
+ std::queue<LLPluginMessage> mSendQueue; // Used to queue messages while the plugin initializes.
+
+ void setSizeInternal(void);
+
+ bool mTextureParamsReceived; // the mRequestedTexture* fields are only valid when this is true
+ S32 mRequestedTextureDepth;
+ LLGLenum mRequestedTextureInternalFormat;
+ LLGLenum mRequestedTextureFormat;
+ LLGLenum mRequestedTextureType;
+ bool mRequestedTextureSwapBytes;
+ bool mRequestedTextureCoordsOpenGL;
+
+ std::string mTextureSharedMemoryName;
+ size_t mTextureSharedMemorySize;
+
+ // True to scale requested media up to the full size of the texture (i.e. next power of two)
+ bool mAutoScaleMedia;
+
+ // default media size for the plugin, from the texture_params message.
+ int mDefaultMediaWidth;
+ int mDefaultMediaHeight;
+
+ // Size that has been requested by the plugin itself
+ int mNaturalMediaWidth;
+ int mNaturalMediaHeight;
+
+ // Size that has been requested with setSize()
+ int mSetMediaWidth;
+ int mSetMediaHeight;
+
+ // Full calculated media size (before auto-scale and downsample calculations)
+ int mFullMediaWidth;
+ int mFullMediaHeight;
+
+ // Actual media size being set (after auto-scale)
+ int mRequestedMediaWidth;
+ int mRequestedMediaHeight;
+
+ // Texture size calculated from actual media size
+ int mRequestedTextureWidth;
+ int mRequestedTextureHeight;
+
+ // Size that the plugin has acknowledged
+ int mTextureWidth;
+ int mTextureHeight;
+ int mMediaWidth;
+ int mMediaHeight;
+
+ float mRequestedVolume;
+
+ // Priority of this media stream
+ EPriority mPriority;
+ int mLowPrioritySizeLimit;
+
+ bool mAllowDownsample;
+ int mPadding;
+
+
+ LLPluginProcessParent *mPlugin;
+
+ LLRect mDirtyRect;
+
+ std::string translateModifiers(MASK modifiers);
+
+ std::string mCursorName;
+ int mLastMouseX;
+ int mLastMouseY;
+
+ LLPluginClassMediaOwner::EMediaStatus mStatus;
+
+ F64 mSleepTime;
+
+ bool mCanCut;
+ bool mCanCopy;
+ bool mCanPaste;
+
+ std::string mMediaName;
+ std::string mMediaDescription;
+
+ LLColor4 mBackgroundColor;
+
+ std::string mTarget;
+
+ /////////////////////////////////////////
+ // media_browser class
+ std::string mNavigateURI;
+ S32 mNavigateResultCode;
+ std::string mNavigateResultString;
+ bool mHistoryBackAvailable;
+ bool mHistoryForwardAvailable;
+ std::string mStatusText;
+ int mProgressPercent;
+ std::string mLocation;
+ std::string mClickURL;
+ std::string mClickNavType;
+ std::string mClickTarget;
+ std::string mClickUUID;
+ S32 mGeometryX;
+ S32 mGeometryY;
+ S32 mGeometryWidth;
+ S32 mGeometryHeight;
+ S32 mStatusCode;
+ std::string mAuthURL;
+ std::string mAuthRealm;
+ std::string mHoverText;
+ std::string mHoverLink;
+
+ /////////////////////////////////////////
+ // media_time class
+ F64 mCurrentTime;
+ F64 mDuration;
+ F64 mCurrentRate;
+ F64 mLoadedDuration;
+
+//--------------------------------------
+ //debug use only
+ //
+private:
+ bool mDeleteOK ;
+public:
+ void setDeleteOK(bool flag) { mDeleteOK = flag ;}
+//--------------------------------------
+};
+
+#endif // LL_LLPLUGINCLASSMEDIA_H
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 57ac7a143f..0463d5364b 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -50,7 +50,7 @@ std::string model_names[] =
"low_lod",
"medium_lod",
"high_lod",
- "physics_shape"
+ "physics_mesh"
};
const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
@@ -84,7 +84,7 @@ void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Arr
domInputLocal_Array& v_inp = vertices->getInput_array();
if (inputs[j]->getOffset() != 0)
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Vertex array offset MUST be zero." << llendl;
}
for (U32 k = 0; k < v_inp.getCount(); ++k)
@@ -98,7 +98,7 @@ void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Arr
if (src->getTechnique_common()->getAccessor()->getStride() != 3)
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Vertex array stride MUST be three." << llendl;
}
domListOfFloats& v = src->getFloat_array()->getValue();
@@ -149,9 +149,10 @@ void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Arr
}
}
-void get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S32& tc_offset, S32& norm_offset, S32 &idx_stride,
+bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S32& tc_offset, S32& norm_offset, S32 &idx_stride,
domSource* &pos_source, domSource* &tc_source, domSource* &norm_source)
{
+
idx_stride = 0;
for (U32 j = 0; j < inputs.getCount(); ++j)
@@ -163,7 +164,11 @@ void get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
const domURIFragmentType& uri = inputs[j]->getSource();
daeElementRef elem = uri.getElement();
domVertices* vertices = (domVertices*) elem.cast();
-
+ if ( !vertices )
+ {
+ return false;
+ }
+
domInputLocal_Array& v_inp = vertices->getInput_array();
@@ -207,6 +212,8 @@ void get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
}
idx_stride += 1;
+
+ return true;
}
LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& face_list, std::vector<std::string>& materials, domTrianglesRef& tri)
@@ -227,8 +234,12 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
S32 idx_stride = 0;
- get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source);
+ if ( !get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source) || !pos_source )
+ {
+ return LLModel::BAD_ELEMENT;
+ }
+
domPRef p = tri->getP();
domListOfUInts& idx = p->getValue();
@@ -367,7 +378,10 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
S32 idx_stride = 0;
- get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source);
+ if (!get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source))
+ {
+ return LLModel::BAD_ELEMENT;
+ }
LLVolumeFace face;
@@ -564,7 +578,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domURIFragmentType& uri = inputs[i]->getSource();
daeElementRef elem = uri.getElement();
domVertices* vertices = (domVertices*) elem.cast();
-
+ if (!vertices)
+ {
+ return LLModel::BAD_ELEMENT;
+ }
domInputLocal_Array& v_inp = vertices->getInput_array();
for (U32 k = 0; k < v_inp.getCount(); ++k)
@@ -574,6 +591,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domURIFragmentType& uri = v_inp[k]->getSource();
daeElementRef elem = uri.getElement();
domSource* src = (domSource*) elem.cast();
+ if (!src)
+ {
+ return LLModel::BAD_ELEMENT;
+ }
v = &(src->getFloat_array()->getValue());
}
}
@@ -585,6 +606,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domURIFragmentType& uri = inputs[i]->getSource();
daeElementRef elem = uri.getElement();
domSource* src = (domSource*) elem.cast();
+ if (!src)
+ {
+ return LLModel::BAD_ELEMENT;
+ }
n = &(src->getFloat_array()->getValue());
}
else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[i]->getSemantic()) == 0 && inputs[i]->getSet() == 0)
@@ -593,6 +618,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domURIFragmentType& uri = inputs[i]->getSource();
daeElementRef elem = uri.getElement();
domSource* src = (domSource*) elem.cast();
+ if (!src)
+ {
+ return LLModel::BAD_ELEMENT;
+ }
t = &(src->getFloat_array()->getValue());
}
}
@@ -667,11 +696,6 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
}
}
- if (cur_idx != vert_idx.size())
- {
- llerrs << "WTF?" << llendl;
- }
-
//build vertex array from map
std::vector<LLVolumeFace::VertexData> new_verts;
new_verts.resize(vert_idx.size());
@@ -717,7 +741,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
//static
std::string LLModel::getStatusString(U32 status)
{
- const static std::string status_strings[(S32)INVALID_STATUS] = {"status_no_error", "status_vertex_number_overflow"};
+ const static std::string status_strings[(S32)INVALID_STATUS] = {"status_no_error", "status_vertex_number_overflow","bad_element"};
if(status < INVALID_STATUS)
{
@@ -755,7 +779,6 @@ void LLModel::addVolumeFacesFromDomMesh(domMesh* mesh)
for (U32 i = 0; i < polys.getCount(); ++i)
{
domPolylistRef& poly = polys.get(i);
-
mStatus = load_face_from_dom_polylist(mVolumeFaces, mMaterialList, poly);
if(mStatus != NO_ERRORS)
@@ -765,12 +788,12 @@ void LLModel::addVolumeFacesFromDomMesh(domMesh* mesh)
return ; //abort
}
}
-
+
domPolygons_Array& polygons = mesh->getPolygons_array();
+
for (U32 i = 0; i < polygons.getCount(); ++i)
{
domPolygonsRef& poly = polygons.get(i);
-
mStatus = load_face_from_dom_polygons(mVolumeFaces, mMaterialList, poly);
if(mStatus != NO_ERRORS)
@@ -780,7 +803,7 @@ void LLModel::addVolumeFacesFromDomMesh(domMesh* mesh)
return ; //abort
}
}
-
+
}
BOOL LLModel::createVolumeFacesFromDomMesh(domMesh* mesh)
@@ -926,11 +949,6 @@ void LLModel::normalizeVolumeFaces()
{
LLVector4a min, max;
- if (mVolumeFaces[0].mNumVertices <= 0)
- {
- llerrs << "WTF?" << llendl;
- }
-
// For all of the volume faces
// in the model, loop over
// them and see what the extents
@@ -942,11 +960,6 @@ void LLModel::normalizeVolumeFaces()
{
LLVolumeFace& face = mVolumeFaces[i];
- if (face.mNumVertices <= 0)
- {
- llerrs << "WTF?" << llendl;
- }
-
update_min_max(min, max, face.mExtents[0]);
update_min_max(min, max, face.mExtents[1]);
}
@@ -1289,11 +1302,6 @@ void LLModel::generateNormals(F32 angle_cutoff)
{
LLVector4a& n = iter->second[k].getNormal();
- if (!iter->second[k].getPosition().equals3(new_face.mPositions[i]))
- {
- llerrs << "WTF?" << llendl;
- }
-
F32 cur = n.dot3(ref_norm).getF32();
if (cur > best)
@@ -1410,7 +1418,11 @@ LLSD LLModel::writeModel(
if (!decomp.mBaseHull.empty() ||
!decomp.mHull.empty())
{
- mdl["decomposition"] = decomp.asLLSD();
+ mdl["physics_convex"] = decomp.asLLSD();
+ if (!decomp.mHull.empty())
+ { //convex decomposition exists, physics mesh will not be used
+ model[LLModel::LOD_PHYSICS] = NULL;
+ }
}
for (U32 idx = 0; idx < MODEL_NAMES_LENGTH; ++idx)
@@ -1435,8 +1447,9 @@ LLSD LLModel::writeModel(
for (S32 i = 0; i < model[idx]->getNumVolumeFaces(); ++i)
{ //for each face
const LLVolumeFace& face = model[idx]->getVolumeFace(i);
- if (!face.mNumVertices)
+ if (face.mNumVertices < 3)
{ //don't export an empty face
+ mdl[model_names[idx]][i]["NoGeometry"] = true;
continue;
}
LLSD::Binary verts(face.mNumVertices*3*2);
@@ -1469,7 +1482,6 @@ LLSD LLModel::writeModel(
//position + normal
for (U32 k = 0; k < 3; ++k)
{ //for each component
-
//convert to 16-bit normalized across domain
U16 val = (U16) (((pos[k]-min_pos.mV[k])/pos_range.mV[k])*65535);
@@ -1513,7 +1525,6 @@ LLSD LLModel::writeModel(
//write out face data
mdl[model_names[idx]][i]["PositionDomain"]["Min"] = min_pos.getValue();
mdl[model_names[idx]][i]["PositionDomain"]["Max"] = max_pos.getValue();
-
mdl[model_names[idx]][i]["TexCoord0Domain"]["Min"] = min_tc.getValue();
mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
@@ -1539,11 +1550,6 @@ LLSD LLModel::writeModel(
weight_list& weights = high->getJointInfluences(pos);
- if (weights.size() > 4)
- {
- llerrs << "WTF?" << llendl;
- }
-
S32 count = 0;
for (weight_list::iterator iter = weights.begin(); iter != weights.end(); ++iter)
{
@@ -1607,23 +1613,19 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
cur_offset += size;
bytes += size;
}
- else
- {
- llerrs << "WTF?" << llendl;
- }
}
std::string decomposition;
- if (mdl.has("decomposition"))
+ if (mdl.has("physics_convex"))
{ //write out convex decomposition
- decomposition = zip_llsd(mdl["decomposition"]);
+ decomposition = zip_llsd(mdl["physics_convex"]);
U32 size = decomposition.size();
if (size > 0)
{
- header["decomposition"]["offset"] = (LLSD::Integer) cur_offset;
- header["decomposition"]["size"] = (LLSD::Integer) size;
+ header["physics_convex"]["offset"] = (LLSD::Integer) cur_offset;
+ header["physics_convex"]["size"] = (LLSD::Integer) size;
cur_offset += size;
bytes += size;
}
@@ -1644,11 +1646,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
cur_offset += size;
bytes += size;
}
- else
- {
- header[model_names[i]]["offset"] = -1;
- header[model_names[i]]["size"] = 0;
- }
}
if (!nowrite)
@@ -1662,7 +1659,7 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
if (!decomposition.empty())
{ //write decomposition block
- ostr.write((const char*) decomposition.data(), header["decomposition"]["size"].asInteger());
+ ostr.write((const char*) decomposition.data(), header["physics_convex"]["size"].asInteger());
}
for (S32 i = 0; i < MODEL_NAMES_LENGTH; i++)
@@ -1685,7 +1682,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
{
if ((iter->first - pos).magVec() > 0.1f)
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Couldn't find weight list." << llendl;
}
return iter->second;
@@ -1778,7 +1775,7 @@ void LLModel::updateHullCenters()
if (mHullPoints > 0)
{
mCenterOfHullCenters *= 1.f / mHullPoints;
- llassert(mPhysics.asLLSD().has("HullList"));
+ llassert(mPhysics.hasHullList());
}
}
@@ -1801,7 +1798,7 @@ bool LLModel::loadModel(std::istream& is)
"low_lod",
"medium_lod",
"high_lod",
- "physics_shape",
+ "physics_mesh",
};
const S32 MODEL_LODS = 5;
@@ -1900,8 +1897,8 @@ bool LLModel::loadSkinInfo(LLSD& header, std::istream &is)
bool LLModel::loadDecomposition(LLSD& header, std::istream& is)
{
- S32 offset = header["decomposition"]["offset"].asInteger();
- S32 size = header["decomposition"]["size"].asInteger();
+ S32 offset = header["physics_convex"]["offset"].asInteger();
+ S32 size = header["physics_convex"]["size"].asInteger();
if (offset >= 0 && size > 0)
{
@@ -2041,7 +2038,7 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)
{
// updated for const-correctness. gcc is picky about this type of thing - Nyx
const LLSD::Binary& hulls = decomp["HullList"].asBinary();
- const LLSD::Binary& position = decomp["Position"].asBinary();
+ const LLSD::Binary& position = decomp["Positions"].asBinary();
U16* p = (U16*) &position[0];
@@ -2051,11 +2048,19 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)
LLVector3 max;
LLVector3 range;
- min.setValue(decomp["Min"]);
- max.setValue(decomp["Max"]);
+ if (decomp.has("Min"))
+ {
+ min.setValue(decomp["Min"]);
+ max.setValue(decomp["Max"]);
+ }
+ else
+ {
+ min.set(-0.5f, -0.5f, -0.5f);
+ max.set(0.5f, 0.5f, 0.5f);
+ }
+
range = max-min;
-
for (U32 i = 0; i < hulls.size(); ++i)
{
U16 count = (hulls[i] == 0) ? 256 : hulls[i];
@@ -2071,6 +2076,7 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)
//point must be unique
//llassert(valid.find(test) == valid.end());
valid.insert(test);
+
mHull[i].push_back(LLVector3(
(F32) p[0]/65535.f*range.mV[0]+min.mV[0],
(F32) p[1]/65535.f*range.mV[1]+min.mV[1],
@@ -2085,9 +2091,9 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)
}
}
- if (decomp.has("Hull"))
+ if (decomp.has("BoundingVerts"))
{
- const LLSD::Binary& position = decomp["Hull"].asBinary();
+ const LLSD::Binary& position = decomp["BoundingVerts"].asBinary();
U16* p = (U16*) &position[0];
@@ -2123,10 +2129,15 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)
{
//empty base hull mesh to indicate decomposition has been loaded
//but contains no base hull
- mBaseHullMesh.clear();;
+ mBaseHullMesh.clear();
}
}
+bool LLModel::Decomposition::hasHullList() const
+{
+ return !mHull.empty() ;
+}
+
LLSD LLModel::Decomposition::asLLSD() const
{
LLSD ret;
@@ -2137,11 +2148,9 @@ LLSD LLModel::Decomposition::asLLSD() const
}
//write decomposition block
- // ["decomposition"]["HullList"] -- list of 8 bit integers, each entry represents a hull with specified number of points
- // ["decomposition"]["PositionDomain"]["Min"/"Max"]
- // ["decomposition"]["Position"] -- list of 16-bit integers to be decoded to given domain, encoded 3D points
- // ["decomposition"]["Hull"] -- list of 16-bit integers to be decoded to given domain, encoded 3D points representing a single hull approximation of given shape
-
+ // ["physics_convex"]["HullList"] -- list of 8 bit integers, each entry represents a hull with specified number of points
+ // ["physics_convex"]["Position"] -- list of 16-bit integers to be decoded to given domain, encoded 3D points
+ // ["physics_convex"]["BoundingVerts"] -- list of 16-bit integers to be decoded to given domain, encoded 3D points representing a single hull approximation of given shape
//get minimum and maximum
LLVector3 min;
@@ -2190,6 +2199,8 @@ LLSD LLModel::Decomposition::asLLSD() const
{
LLSD::Binary p(total*3*2);
+ LLVector3 min(-0.5f, -0.5f, -0.5f);
+ LLVector3 max(0.5f, 0.5f, 0.5f);
LLVector3 range = max-min;
U32 vert_idx = 0;
@@ -2205,17 +2216,24 @@ LLSD LLModel::Decomposition::asLLSD() const
U64 test = 0;
for (U32 k = 0; k < 3; k++)
{
+ F32* src = (F32*) (mHull[i][j].mV);
+
+ llassert(src[k] <= 0.501f && src[k] >= -0.501f);
+
//convert to 16-bit normalized across domain
- U16 val = (U16) (((mHull[i][j].mV[k]-min.mV[k])/range.mV[k])*65535);
+ U16 val = (U16) (((src[k]-min.mV[k])/range.mV[k])*65535);
- switch (k)
+ if(valid.size() < 3)
{
- case 0: test = test | (U64) val; break;
- case 1: test = test | ((U64) val << 16); break;
- case 2: test = test | ((U64) val << 32); break;
- };
+ switch (k)
+ {
+ case 0: test = test | (U64) val; break;
+ case 1: test = test | ((U64) val << 16); break;
+ case 2: test = test | ((U64) val << 32); break;
+ };
- valid.insert(test);
+ valid.insert(test);
+ }
U8* buff = (U8*) &val;
//write to binary buffer
@@ -2227,17 +2245,21 @@ LLSD LLModel::Decomposition::asLLSD() const
}
}
- //must have at least 4 unique points
- llassert(valid.size() > 3);
+ //must have at least 3 unique points
+ llassert(valid.size() > 2);
}
- ret["Position"] = p;
+ ret["Positions"] = p;
}
+ //llassert(!mBaseHull.empty());
+
if (!mBaseHull.empty())
{
LLSD::Binary p(mBaseHull.size()*3*2);
+ LLVector3 min(-0.5f, -0.5f, -0.5f);
+ LLVector3 max(0.5f, 0.5f, 0.5f);
LLVector3 range = max-min;
U32 vert_idx = 0;
@@ -2245,6 +2267,8 @@ LLSD LLModel::Decomposition::asLLSD() const
{
for (U32 k = 0; k < 3; k++)
{
+ llassert(mBaseHull[j].mV[k] <= 0.51f && mBaseHull[j].mV[k] >= -0.51f);
+
//convert to 16-bit normalized across domain
U16 val = (U16) (((mBaseHull[j].mV[k]-min.mV[k])/range.mV[k])*65535);
@@ -2255,12 +2279,12 @@ LLSD LLModel::Decomposition::asLLSD() const
if (vert_idx > p.size())
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Index out of bounds" << llendl;
}
}
}
- ret["Hull"] = p;
+ ret["BoundingVerts"] = p;
}
return ret;
@@ -2290,10 +2314,5 @@ void LLModel::Decomposition::merge(const LLModel::Decomposition* rhs)
{ //take physics shape mesh from rhs
mPhysicsShapeMesh = rhs->mPhysicsShapeMesh;
}
-
- if (!mHull.empty())
- { //verify
- llassert(asLLSD().has("HullList"));
- }
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 23f4b5cb42..cd9f76fcb7 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -73,6 +73,7 @@ public:
{
NO_ERRORS = 0,
VERTEX_NUMBER_OVERFLOW, //vertex number is >= 65535.
+ BAD_ELEMENT,
INVALID_STATUS
} ;
@@ -106,6 +107,7 @@ public:
Decomposition(LLSD& data);
void fromLLSD(LLSD& data);
LLSD asLLSD() const;
+ bool hasHullList() const;
void merge(const Decomposition* rhs);
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index a460912e70..c224ab0e9b 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -127,6 +127,11 @@ PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB = NULL;
PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB = NULL;
PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB = NULL;
+// GL_ARB_map_buffer_range
+PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
+PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+
+
// vertex object prototypes
PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI = NULL;
PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI = NULL;
@@ -178,6 +183,12 @@ PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = NULL;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = NULL;
PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer = NULL;
+//GL_ARB_texture_multisample
+PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
+PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
+PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
+PFNGLSAMPLEMASKIPROC glSampleMaski;
+
// GL_EXT_blend_func_separate
PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT = NULL;
@@ -321,9 +332,11 @@ LLGLManager::LLGLManager() :
mHasMipMapGeneration(FALSE),
mHasCompressedTextures(FALSE),
mHasFramebufferObject(FALSE),
+ mMaxSamples(0),
mHasBlendFuncSeparate(FALSE),
mHasVertexBufferObject(FALSE),
+ mHasMapBufferRange(FALSE),
mHasPBuffer(FALSE),
mHasShaderObjects(FALSE),
mHasVertexShader(FALSE),
@@ -334,6 +347,11 @@ LLGLManager::LLGLManager() :
mHasPointParameters(FALSE),
mHasDrawBuffers(FALSE),
mHasTextureRectangle(FALSE),
+ mHasTextureMultisample(FALSE),
+ mMaxSampleMaskWords(0),
+ mMaxColorTextureSamples(0),
+ mMaxDepthTextureSamples(0),
+ mMaxIntegerSamples(0),
mHasAnisotropic(FALSE),
mHasARBEnvCombine(FALSE),
@@ -539,7 +557,27 @@ bool LLGLManager::initGL()
{
GLint num_tex_image_units;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
- mNumTextureImageUnits = num_tex_image_units;
+ mNumTextureImageUnits = llmin(num_tex_image_units, 32);
+ }
+
+ if (mHasTextureMultisample)
+ {
+ glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &mMaxColorTextureSamples);
+ glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &mMaxDepthTextureSamples);
+ glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &mMaxIntegerSamples);
+ glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords);
+ }
+
+#if LL_WINDOWS
+ if (mIsATI)
+ { //using multisample textures on ATI results in black screen for some reason
+ mHasTextureMultisample = FALSE;
+ }
+#endif
+
+ if (mHasFramebufferObject)
+ {
+ glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
}
setToDebugGPU();
@@ -648,6 +686,14 @@ std::string LLGLManager::getRawGLString()
return gl_string;
}
+U32 LLGLManager::getNumFBOFSAASamples(U32 samples)
+{
+ samples = llmin(samples, (U32) mMaxColorTextureSamples);
+ samples = llmin(samples, (U32) mMaxDepthTextureSamples);
+ samples = llmin(samples, (U32) 4);
+ return samples;
+}
+
void LLGLManager::shutdownGL()
{
if (mInited)
@@ -728,6 +774,7 @@ void LLGLManager::initExtensions()
mHasOcclusionQuery = ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts);
mHasOcclusionQuery2 = ExtensionExists("GL_ARB_occlusion_query2", gGLHExts.mSysExts);
mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts);
+ mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts);
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
#ifdef GL_ARB_framebuffer_object
@@ -742,6 +789,7 @@ void LLGLManager::initExtensions()
mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts);
mHasBlendFuncSeparate = ExtensionExists("GL_EXT_blend_func_separate", gGLHExts.mSysExts);
mHasTextureRectangle = ExtensionExists("GL_ARB_texture_rectangle", gGLHExts.mSysExts);
+ mHasTextureMultisample = ExtensionExists("GL_ARB_texture_multisample", gGLHExts.mSysExts);
#if !LL_DARWIN
mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts);
#endif
@@ -921,6 +969,11 @@ void LLGLManager::initExtensions()
mHasVertexBufferObject = FALSE;
}
}
+ if (mHasMapBufferRange)
+ {
+ glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glMapBufferRange");
+ glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glFlushMappedBufferRange");
+ }
if (mHasFramebufferObject)
{
llinfos << "initExtensions() FramebufferObject-related procs..." << llendl;
@@ -953,6 +1006,13 @@ void LLGLManager::initExtensions()
{
glBlendFuncSeparateEXT = (PFNGLBLENDFUNCSEPARATEEXTPROC) GLH_EXT_GET_PROC_ADDRESS("glBlendFuncSeparateEXT");
}
+ if (mHasTextureMultisample)
+ {
+ glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage2DMultisample");
+ glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage3DMultisample");
+ glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetMultisamplefv");
+ glSampleMaski = (PFNGLSAMPLEMASKIPROC) GLH_EXT_GET_PROC_ADDRESS("glSampleMaski");
+ }
#if (!LL_LINUX && !LL_SOLARIS) || LL_LINUX_NV_GL_HEADERS
// This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements");
@@ -1370,10 +1430,6 @@ void LLGLState::checkTextureChannels(const std::string& msg)
}
}
- GLint maxTextureUnits = 0;
- glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxTextureUnits);
- stop_glerror();
-
static const char* label[] =
{
"GL_TEXTURE_2D",
@@ -1384,7 +1440,8 @@ void LLGLState::checkTextureChannels(const std::string& msg)
"GL_TEXTURE_GEN_T",
"GL_TEXTURE_GEN_Q",
"GL_TEXTURE_GEN_R",
- "GL_TEXTURE_RECTANGLE_ARB"
+ "GL_TEXTURE_RECTANGLE_ARB",
+ "GL_TEXTURE_2D_MULTISAMPLE"
};
static GLint value[] =
@@ -1397,7 +1454,8 @@ void LLGLState::checkTextureChannels(const std::string& msg)
GL_TEXTURE_GEN_T,
GL_TEXTURE_GEN_Q,
GL_TEXTURE_GEN_R,
- GL_TEXTURE_RECTANGLE_ARB
+ GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_2D_MULTISAMPLE
};
GLint stackDepth = 0;
@@ -1406,68 +1464,96 @@ void LLGLState::checkTextureChannels(const std::string& msg)
glh::matrix4f identity;
identity.identity();
- for (GLint i = 1; i < maxTextureUnits; i++)
+ for (GLint i = 1; i < gGLManager.mNumTextureUnits; i++)
{
gGL.getTexUnit(i)->activate();
- glClientActiveTextureARB(GL_TEXTURE0_ARB+i);
- stop_glerror();
- glGetIntegerv(GL_TEXTURE_STACK_DEPTH, &stackDepth);
- stop_glerror();
- if (stackDepth != 1)
+ if (i < gGLManager.mNumTextureUnits)
{
- error = TRUE;
- LL_WARNS("RenderState") << "Texture matrix stack corrupted." << LL_ENDL;
+ glClientActiveTextureARB(GL_TEXTURE0_ARB+i);
+ stop_glerror();
+ glGetIntegerv(GL_TEXTURE_STACK_DEPTH, &stackDepth);
+ stop_glerror();
- if (gDebugSession)
+ if (stackDepth != 1)
{
- gFailLog << "Texture matrix stack corrupted." << std::endl;
+ error = TRUE;
+ LL_WARNS("RenderState") << "Texture matrix stack corrupted." << LL_ENDL;
+
+ if (gDebugSession)
+ {
+ gFailLog << "Texture matrix stack corrupted." << std::endl;
+ }
}
- }
- glGetFloatv(GL_TEXTURE_MATRIX, (GLfloat*) mat.m);
- stop_glerror();
+ glGetFloatv(GL_TEXTURE_MATRIX, (GLfloat*) mat.m);
+ stop_glerror();
- if (mat != identity)
- {
- error = TRUE;
- LL_WARNS("RenderState") << "Texture matrix in channel " << i << " corrupt." << LL_ENDL;
- if (gDebugSession)
+ if (mat != identity)
{
- gFailLog << "Texture matrix in channel " << i << " corrupt." << std::endl;
+ error = TRUE;
+ LL_WARNS("RenderState") << "Texture matrix in channel " << i << " corrupt." << LL_ENDL;
+ if (gDebugSession)
+ {
+ gFailLog << "Texture matrix in channel " << i << " corrupt." << std::endl;
+ }
+ }
+
+ for (S32 j = (i == 0 ? 1 : 0);
+ j < 9; j++)
+ {
+ if (j == 8 && !gGLManager.mHasTextureRectangle ||
+ j == 9 && !gGLManager.mHasTextureMultisample)
+ {
+ continue;
+ }
+
+ if (glIsEnabled(value[j]))
+ {
+ error = TRUE;
+ LL_WARNS("RenderState") << "Texture channel " << i << " still has " << label[j] << " enabled." << LL_ENDL;
+ if (gDebugSession)
+ {
+ gFailLog << "Texture channel " << i << " still has " << label[j] << " enabled." << std::endl;
+ }
+ }
+ stop_glerror();
}
- }
-
- for (S32 j = (i == 0 ? 1 : 0);
- j < (gGLManager.mHasTextureRectangle ? 9 : 8); j++)
- {
- if (glIsEnabled(value[j]))
+ glGetFloatv(GL_TEXTURE_MATRIX, mat.m);
+ stop_glerror();
+
+ if (mat != identity)
{
error = TRUE;
- LL_WARNS("RenderState") << "Texture channel " << i << " still has " << label[j] << " enabled." << LL_ENDL;
+ LL_WARNS("RenderState") << "Texture matrix " << i << " is not identity." << LL_ENDL;
if (gDebugSession)
{
- gFailLog << "Texture channel " << i << " still has " << label[j] << " enabled." << std::endl;
+ gFailLog << "Texture matrix " << i << " is not identity." << std::endl;
}
}
- stop_glerror();
}
- glGetFloatv(GL_TEXTURE_MATRIX, mat.m);
- stop_glerror();
-
- if (mat != identity)
{
- error = TRUE;
- LL_WARNS("RenderState") << "Texture matrix " << i << " is not identity." << LL_ENDL;
- if (gDebugSession)
+ GLint tex = 0;
+ stop_glerror();
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);
+ stop_glerror();
+
+ if (tex != 0)
{
- gFailLog << "Texture matrix " << i << " is not identity." << std::endl;
+ error = TRUE;
+ LL_WARNS("RenderState") << "Texture channel " << i << " still has texture " << tex << " bound." << llendl;
+
+ if (gDebugSession)
+ {
+ gFailLog << "Texture channel " << i << " still has texture " << tex << " bound." << std::endl;
+ }
}
}
}
+ stop_glerror();
gGL.getTexUnit(0)->activate();
glClientActiveTextureARB(GL_TEXTURE0_ARB);
stop_glerror();
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 1d7ab188fc..d1bee00161 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -83,10 +83,12 @@ public:
BOOL mHasMipMapGeneration;
BOOL mHasCompressedTextures;
BOOL mHasFramebufferObject;
+ S32 mMaxSamples;
BOOL mHasBlendFuncSeparate;
-
+
// ARB Extensions
BOOL mHasVertexBufferObject;
+ BOOL mHasMapBufferRange;
BOOL mHasPBuffer;
BOOL mHasShaderObjects;
BOOL mHasVertexShader;
@@ -98,6 +100,11 @@ public:
BOOL mHasDrawBuffers;
BOOL mHasDepthClamp;
BOOL mHasTextureRectangle;
+ BOOL mHasTextureMultisample;
+ S32 mMaxSampleMaskWords;
+ S32 mMaxColorTextureSamples;
+ S32 mMaxDepthTextureSamples;
+ S32 mMaxIntegerSamples;
// Other extensions.
BOOL mHasAnisotropic;
@@ -139,6 +146,7 @@ public:
void printGLInfoString();
void getGLInfo(LLSD& info);
+ U32 getNumFBOFSAASamples(U32 desired_samples = 32);
// In ALL CAPS
std::string mGLVendor;
std::string mGLVendorShort;
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index d8140a124d..f35f329f00 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -68,6 +68,10 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_map_buffer_range
+extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+
// GL_ATI_vertex_array_object
extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
@@ -306,6 +310,10 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_map_buffer_range
+extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+
// GL_ATI_vertex_array_object
extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
@@ -474,6 +482,11 @@ extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer;
//GL_ARB_draw_buffers
extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB;
+//GL_ARB_texture_multisample
+extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
+extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
+extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
+extern PFNGLSAMPLEMASKIPROC glSampleMaski;
#elif LL_WINDOWS
//----------------------------------------------------------------------------
@@ -506,6 +519,10 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_map_buffer_range
+extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+
// GL_ATI_vertex_array_object
extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
@@ -673,6 +690,11 @@ extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer;
//GL_ARB_draw_buffers
extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB;
+//GL_ARB_texture_multisample
+extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
+extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
+extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
+extern PFNGLSAMPLEMASKIPROC glSampleMaski;
#elif LL_DARWIN
//----------------------------------------------------------------------------
@@ -714,13 +736,55 @@ extern void glGenerateMipmapEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_A
#ifndef GL_ARB_framebuffer_object
#define glGenerateMipmap glGenerateMipmapEXT
+#define GL_MAX_SAMPLES 0x8D57
#endif
+
// GL_ARB_draw_buffers
extern void glDrawBuffersARB(GLsizei n, const GLenum* bufs) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
#ifdef __cplusplus
extern "C" {
#endif
+
+//
+// Define map buffer range headers on Mac
+//
+#ifndef GL_ARB_map_buffer_range
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
+#endif
+
+//
+// Define multisample headers on Mac
+//
+#ifndef GL_ARB_texture_multisample
+#define GL_SAMPLE_POSITION 0x8E50
+#define GL_SAMPLE_MASK 0x8E51
+#define GL_SAMPLE_MASK_VALUE 0x8E52
+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_SAMPLES 0x9106
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
+#define GL_MAX_INTEGER_SAMPLES 0x9110
+#endif
+
//
// Define vertex buffer object headers on Mac
//
@@ -757,7 +821,7 @@ extern "C" {
#define GL_DYNAMIC_READ_ARB 0x88E9
#define GL_DYNAMIC_COPY_ARB 0x88EA
#endif
-
+
#ifndef GL_ARB_vertex_buffer_object
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 257bcd9380..ad2c662dfc 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -48,6 +48,8 @@ using std::pair;
using std::make_pair;
using std::string;
+GLhandleARB LLGLSLShader::sCurBoundShader = 0;
+
BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
{
return v1 != v2;
@@ -56,7 +58,7 @@ BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
LLShaderFeatures::LLShaderFeatures()
: calculatesLighting(false), isShiny(false), isFullbright(false), hasWaterFog(false),
hasTransport(false), hasSkinning(false), hasObjectSkinning(false), hasAtmospherics(false), isSpecular(false),
-hasGamma(false), hasLighting(false), calculatesAtmospherics(false)
+hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedTextureChannels(0), disableTextureIndex(false)
{
}
@@ -107,16 +109,16 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
// Create program
mProgramObject = glCreateProgramObjectARB();
- // Attach existing objects
- if (!LLShaderMgr::instance()->attachShaderFeatures(this))
- {
- return FALSE;
+ if (gGLManager.mGLVersion < 3.1f)
+ { //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support)
+ mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1);
}
+ //compile new source
vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin();
for ( ; fileIter != mShaderFiles.end(); fileIter++ )
{
- GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second);
+ GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, mFeatures.mIndexedTextureChannels);
LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL;
if (shaderhandle > 0)
{
@@ -128,6 +130,17 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
}
}
+ // Attach existing objects
+ if (!LLShaderMgr::instance()->attachShaderFeatures(this))
+ {
+ return FALSE;
+ }
+
+ if (gGLManager.mGLVersion < 3.1f)
+ { //attachShaderFeatures may have set the number of indexed texture channels, so set to 1 again
+ mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1);
+ }
+
// Map attributes and uniforms
if (success)
{
@@ -149,6 +162,29 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
return createShader(attributes,uniforms);
}
}
+ else if (mFeatures.mIndexedTextureChannels > 0)
+ { //override texture channels for indexed texture rendering
+ bind();
+ S32 channel_count = mFeatures.mIndexedTextureChannels;
+
+ for (S32 i = 0; i < channel_count; i++)
+ {
+ uniform1i(llformat("tex%d", i), i);
+ }
+
+ S32 cur_tex = channel_count; //adjust any texture channels that might have been overwritten
+ for (U32 i = 0; i < mTexture.size(); i++)
+ {
+ if (mTexture[i] > -1 && mTexture[i] < channel_count)
+ {
+ llassert(cur_tex < gGLManager.mNumTextureImageUnits);
+ uniform1i(i, cur_tex);
+ mTexture[i] = cur_tex++;
+ }
+ }
+ unbind();
+ }
+
return success;
}
@@ -293,7 +329,8 @@ void LLGLSLShader::mapUniform(GLint index, const vector<string> * uniforms)
GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type)
{
- if (type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB)
+ if (type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB ||
+ type == GL_SAMPLER_2D_MULTISAMPLE)
{ //this here is a texture
glUniform1iARB(location, mActiveTextureChannels);
LL_DEBUGS("ShaderLoading") << "Assigned to texture channel " << mActiveTextureChannels << LL_ENDL;
@@ -342,7 +379,7 @@ void LLGLSLShader::bind()
if (gGLManager.mHasShaderObjects)
{
glUseProgramObjectARB(mProgramObject);
-
+ sCurBoundShader = mProgramObject;
if (mUniformsDirty)
{
LLShaderMgr::instance()->updateShaderUniforms(this);
@@ -365,6 +402,7 @@ void LLGLSLShader::unbind()
}
}
glUseProgramObjectARB(0);
+ sCurBoundShader = 0;
stop_glerror();
}
}
@@ -372,6 +410,7 @@ void LLGLSLShader::unbind()
void LLGLSLShader::bindNoShader(void)
{
glUseProgramObjectARB(0);
+ sCurBoundShader = 0;
}
S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode)
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index d46ddbbe18..4922eb6d67 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -45,6 +45,8 @@ public:
bool hasObjectSkinning;
bool hasAtmospherics;
bool hasGamma;
+ S32 mIndexedTextureChannels;
+ bool disableTextureIndex;
// char numLights;
@@ -64,6 +66,8 @@ public:
LLGLSLShader();
+ static GLhandleARB sCurBoundShader;
+
void unload();
BOOL createShader(std::vector<std::string> * attributes,
std::vector<std::string> * uniforms);
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index d408077c68..60a5962234 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1083,12 +1083,17 @@ void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
}
// static
-void LLImageGL::deleteTextures(S32 numTextures, U32 *textures)
+void LLImageGL::deleteTextures(S32 numTextures, U32 *textures, bool immediate)
{
for (S32 i = 0; i < numTextures; i++)
{
sDeadTextureList.push_back(textures[i]);
}
+
+ if (immediate)
+ {
+ LLImageGL::deleteDeadTextures();
+ }
}
// static
@@ -1413,11 +1418,13 @@ void LLImageGL::deleteDeadTextures()
{
GLuint tex = sDeadTextureList.front();
sDeadTextureList.pop_front();
- for (int i = 0; i < gGLManager.mNumTextureUnits; i++)
+ for (int i = 0; i < gGLManager.mNumTextureImageUnits; i++)
{
- if (sCurrentBoundTextures[i] == tex)
+ LLTexUnit* tex_unit = gGL.getTexUnit(i);
+
+ if (tex_unit->getCurrTexture() == tex)
{
- gGL.getTexUnit(i)->unbind(LLTexUnit::TT_TEXTURE);
+ tex_unit->unbind(tex_unit->getCurrType());
stop_glerror();
}
}
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 6c980984c0..2cfb15b0d9 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -98,7 +98,7 @@ public:
// These 3 functions currently wrap glGenTextures(), glDeleteTextures(), and glTexImage2D()
// for tracking purposes and will be deprecated in the future
static void generateTextures(S32 numTextures, U32 *textures);
- static void deleteTextures(S32 numTextures, U32 *textures);
+ static void deleteTextures(S32 numTextures, U32 *textures, bool immediate = false);
static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels);
BOOL createGLTexture() ;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index c37139ac4c..1d82dda30f 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -30,6 +30,7 @@
#include "llvertexbuffer.h"
#include "llcubemap.h"
+#include "llglslshader.h"
#include "llimagegl.h"
#include "llrendertarget.h"
#include "lltexture.h"
@@ -46,14 +47,15 @@ S32 gGLViewport[4];
U32 LLRender::sUICalls = 0;
U32 LLRender::sUIVerts = 0;
-static const U32 LL_NUM_TEXTURE_LAYERS = 16;
+static const U32 LL_NUM_TEXTURE_LAYERS = 32;
static const U32 LL_NUM_LIGHT_UNITS = 8;
static GLenum sGLTextureType[] =
{
GL_TEXTURE_2D,
GL_TEXTURE_RECTANGLE_ARB,
- GL_TEXTURE_CUBE_MAP_ARB
+ GL_TEXTURE_CUBE_MAP_ARB,
+ GL_TEXTURE_2D_MULTISAMPLE
};
static GLint sGLAddressMode[] =
@@ -124,7 +126,7 @@ void LLTexUnit::refreshState(void)
// Per apple spec, don't call glEnable/glDisable when index exceeds max texture units
// http://www.mailinglistarchive.com/html/mac-opengl@lists.apple.com/2008-07/msg00653.html
//
- bool enableDisable = (mIndex < gGLManager.mNumTextureUnits);
+ bool enableDisable = (mIndex < gGLManager.mNumTextureUnits) && mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE;
if (mCurrTexType != TT_NONE)
{
@@ -182,8 +184,8 @@ void LLTexUnit::enable(eTextureType type)
mCurrTexType = type;
gGL.flush();
-
- if (mIndex < gGLManager.mNumTextureUnits)
+ if (type != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
+ mIndex < gGLManager.mNumTextureUnits)
{
glEnable(sGLTextureType[type]);
}
@@ -199,8 +201,8 @@ void LLTexUnit::disable(void)
activate();
unbind(mCurrTexType);
gGL.flush();
-
- if (mIndex < gGLManager.mNumTextureUnits)
+ if (mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
+ mIndex < gGLManager.mNumTextureUnits)
{
glDisable(sGLTextureType[mCurrTexType]);
}
@@ -402,6 +404,7 @@ void LLTexUnit::unbind(eTextureType type)
activate();
mCurrTexture = 0;
glBindTexture(sGLTextureType[type], 0);
+ stop_glerror();
}
}
@@ -423,7 +426,7 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode)
void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions option)
{
- if (mIndex < 0 || mCurrTexture == 0) return;
+ if (mIndex < 0 || mCurrTexture == 0 || mCurrTexType == LLTexUnit::TT_MULTISAMPLE_TEXTURE) return;
gGL.flush();
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 7ba14f7b40..41e7b35341 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -57,6 +57,7 @@ public:
TT_TEXTURE = 0, // Standard 2D Texture
TT_RECT_TEXTURE, // Non power of 2 texture
TT_CUBE_MAP, // 6-sided cube map texture
+ TT_MULTISAMPLE_TEXTURE, // see GL_ARB_texture_multisample
TT_NONE // No texture type is currently enabled
} eTextureType;
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index da1e94df64..b6463309e1 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -63,8 +63,7 @@ LLRenderTarget::LLRenderTarget() :
mUseDepth(false),
mRenderDepth(false),
mUsage(LLTexUnit::TT_TEXTURE),
- mSamples(0),
- mSampleBuffer(NULL)
+ mSamples(0)
{
}
@@ -73,23 +72,32 @@ LLRenderTarget::~LLRenderTarget()
release();
}
-
-void LLRenderTarget::setSampleBuffer(LLMultisampleBuffer* buffer)
-{
- mSampleBuffer = buffer;
-}
-
-void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo)
+void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
{
stop_glerror();
+
+ release();
+
mResX = resx;
mResY = resy;
mStencil = stencil;
mUsage = usage;
mUseDepth = depth;
+ mSamples = samples;
- release();
+ mSamples = gGLManager.getNumFBOFSAASamples(mSamples);
+
+ if (mSamples > 1 && gGLManager.mHasTextureMultisample)
+ {
+ mUsage = LLTexUnit::TT_MULTISAMPLE_TEXTURE;
+ //no support for multisampled stencil targets yet
+ mStencil = false;
+ }
+ else
+ {
+ mSamples = 0;
+ }
if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)
{
@@ -146,29 +154,51 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt)
stop_glerror();
- LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
- stop_glerror();
- if (offset == 0)
+#ifdef GL_ARB_texture_multisample
+ if (mSamples > 1)
{
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, color_fmt, mResX, mResY, GL_TRUE);
}
else
- { //don't filter data attachments
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
- if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
+#else
+ llassert_always(mSamples <= 1);
+#endif
{
- gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
+ LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
}
- else
- {
- // ATI doesn't support mirrored repeat for rectangular textures.
- gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+
+ stop_glerror();
+
+ if (mSamples == 0)
+ {
+ if (offset == 0)
+ { //use bilinear filtering on single texture render targets that aren't multisampled
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ stop_glerror();
+ }
+ else
+ { //don't filter data attachments
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
+ stop_glerror();
+ }
+
+ if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
+ {
+ gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
+ stop_glerror();
+ }
+ else
+ {
+ // ATI doesn't support mirrored repeat for rectangular textures.
+ gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+ stop_glerror();
+ }
}
+
if (mFBO)
{
+ stop_glerror();
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset,
LLTexUnit::getInternalType(mUsage), tex, 0);
@@ -181,6 +211,12 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt)
mTex.push_back(tex);
+ if (gDebugGL)
+ { //bind and unbind to validate target
+ bindTarget();
+ flush();
+ }
+
}
void LLRenderTarget::allocateDepth()
@@ -197,9 +233,20 @@ void LLRenderTarget::allocateDepth()
{
LLImageGL::generateTextures(1, &mDepth);
gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
- U32 internal_type = LLTexUnit::getInternalType(mUsage);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT32, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+ if (mSamples == 0)
+ {
+ U32 internal_type = LLTexUnit::getInternalType(mUsage);
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
+ LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT32, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+ }
+#ifdef GL_ARB_texture_multisample
+ else
+ {
+ glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, GL_DEPTH_COMPONENT32, mResX, mResY, GL_TRUE);
+ }
+#else
+ llassert_always(mSamples <= 1);
+#endif
}
}
@@ -239,6 +286,9 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target)
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0);
stop_glerror();
}
+
+ check_framebuffer_status();
+
glBindFramebuffer(GL_FRAMEBUFFER, 0);
target.mUseDepth = true;
@@ -256,7 +306,7 @@ void LLRenderTarget::release()
}
else
{
- LLImageGL::deleteTextures(1, &mDepth);
+ LLImageGL::deleteTextures(1, &mDepth, true);
stop_glerror();
}
mDepth = 0;
@@ -285,11 +335,12 @@ void LLRenderTarget::release()
if (mTex.size() > 0)
{
- LLImageGL::deleteTextures(mTex.size(), &mTex[0]);
+ LLImageGL::deleteTextures(mTex.size(), &mTex[0], true);
mTex.clear();
}
+
+ mResX = mResY = 0;
- mSampleBuffer = NULL;
sBoundTarget = NULL;
}
@@ -298,34 +349,27 @@ void LLRenderTarget::bindTarget()
if (mFBO)
{
stop_glerror();
- if (mSampleBuffer)
- {
- mSampleBuffer->bindTarget(this);
- stop_glerror();
+
+ glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
+ stop_glerror();
+ if (gGLManager.mHasDrawBuffers)
+ { //setup multiple render targets
+ GLenum drawbuffers[] = {GL_COLOR_ATTACHMENT0,
+ GL_COLOR_ATTACHMENT1,
+ GL_COLOR_ATTACHMENT2,
+ GL_COLOR_ATTACHMENT3};
+ glDrawBuffersARB(mTex.size(), drawbuffers);
}
- else
- {
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- stop_glerror();
- if (gGLManager.mHasDrawBuffers)
- { //setup multiple render targets
- GLenum drawbuffers[] = {GL_COLOR_ATTACHMENT0,
- GL_COLOR_ATTACHMENT1,
- GL_COLOR_ATTACHMENT2,
- GL_COLOR_ATTACHMENT3};
- glDrawBuffersARB(mTex.size(), drawbuffers);
- }
- if (mTex.empty())
- { //no color buffer to draw to
- glDrawBuffer(GL_NONE);
- glReadBuffer(GL_NONE);
- }
+ if (mTex.empty())
+ { //no color buffer to draw to
+ glDrawBuffer(GL_NONE);
+ glReadBuffer(GL_NONE);
+ }
- check_framebuffer_status();
+ check_framebuffer_status();
- stop_glerror();
- }
+ stop_glerror();
}
glViewport(0, 0, mResX, mResY);
@@ -407,50 +451,8 @@ void LLRenderTarget::flush(bool fetch_depth)
else
{
stop_glerror();
-
glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
stop_glerror();
-
- if (mSampleBuffer)
- {
- LLGLEnable multisample(GL_MULTISAMPLE);
- stop_glerror();
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- stop_glerror();
- check_framebuffer_status();
- glBindFramebuffer(GL_READ_FRAMEBUFFER, mSampleBuffer->mFBO);
- check_framebuffer_status();
-
- stop_glerror();
- glBlitFramebuffer(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
- stop_glerror();
-
- if (mTex.size() > 1)
- {
- for (U32 i = 1; i < mTex.size(); ++i)
- {
- glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- LLTexUnit::getInternalType(mUsage), mTex[i], 0);
- stop_glerror();
- glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mSampleBuffer->mTex[i]);
- stop_glerror();
- glBlitFramebuffer(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT, GL_NEAREST);
- stop_glerror();
- }
-
- for (U32 i = 0; i < mTex.size(); ++i)
- {
- glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i,
- LLTexUnit::getInternalType(mUsage), mTex[i], 0);
- stop_glerror();
- glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, GL_RENDERBUFFER, mSampleBuffer->mTex[i]);
- stop_glerror();
- }
- }
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
}
@@ -467,37 +469,36 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
}
- if (mSampleBuffer)
+
+ if (mask == GL_DEPTH_BUFFER_BIT && source.mStencil != mStencil)
{
- mSampleBuffer->copyContents(source, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+ stop_glerror();
+
+ glBindFramebuffer(GL_FRAMEBUFFER, source.mFBO);
+ check_framebuffer_status();
+ gGL.getTexUnit(0)->bind(this, true);
+ stop_glerror();
+ glCopyTexSubImage2D(LLTexUnit::getInternalType(mUsage), 0, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1);
+ stop_glerror();
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ stop_glerror();
}
else
{
- if (mask == GL_DEPTH_BUFFER_BIT && source.mStencil != mStencil)
- {
- stop_glerror();
-
- glBindFramebuffer(GL_FRAMEBUFFER, source.mFBO);
- gGL.getTexUnit(0)->bind(this, true);
- stop_glerror();
- glCopyTexSubImage2D(LLTexUnit::getInternalType(mUsage), 0, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1);
- stop_glerror();
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- stop_glerror();
- }
- else
- {
- glBindFramebuffer(GL_READ_FRAMEBUFFER, source.mFBO);
- stop_glerror();
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFBO);
- stop_glerror();
- check_framebuffer_status();
- stop_glerror();
- glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
- stop_glerror();
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- stop_glerror();
- }
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, source.mFBO);
+ stop_glerror();
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFBO);
+ stop_glerror();
+ check_framebuffer_status();
+ stop_glerror();
+ glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+ stop_glerror();
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ stop_glerror();
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ stop_glerror();
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ stop_glerror();
}
}
@@ -540,179 +541,3 @@ void LLRenderTarget::getViewport(S32* viewport)
viewport[3] = mResY;
}
-//==================================================
-// LLMultisampleBuffer implementation
-//==================================================
-LLMultisampleBuffer::LLMultisampleBuffer()
-{
-
-}
-
-LLMultisampleBuffer::~LLMultisampleBuffer()
-{
- release();
-}
-
-void LLMultisampleBuffer::release()
-{
- if (mFBO)
- {
- glDeleteFramebuffers(1, (GLuint *) &mFBO);
- mFBO = 0;
- }
-
- if (mTex.size() > 0)
- {
- glDeleteRenderbuffers(mTex.size(), (GLuint *) &mTex[0]);
- mTex.clear();
- }
-
- if (mDepth)
- {
- glDeleteRenderbuffers(1, (GLuint *) &mDepth);
- mDepth = 0;
- }
-}
-
-void LLMultisampleBuffer::bindTarget()
-{
- bindTarget(this);
-}
-
-void LLMultisampleBuffer::bindTarget(LLRenderTarget* ref)
-{
- if (!ref)
- {
- ref = this;
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- if (gGLManager.mHasDrawBuffers)
- { //setup multiple render targets
- GLenum drawbuffers[] = {GL_COLOR_ATTACHMENT0,
- GL_COLOR_ATTACHMENT1,
- GL_COLOR_ATTACHMENT2,
- GL_COLOR_ATTACHMENT3};
- glDrawBuffersARB(ref->mTex.size(), drawbuffers);
- }
-
- check_framebuffer_status();
-
- glViewport(0, 0, mResX, mResY);
-
- sBoundTarget = this;
-}
-
-void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo )
-{
- allocate(resx,resy,color_fmt,depth,stencil,usage,use_fbo,2);
-}
-
-void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, U32 samples )
-{
- stop_glerror();
- mResX = resx;
- mResY = resy;
-
- mUsage = usage;
- mUseDepth = depth;
- mStencil = stencil;
-
- release();
-
- mSamples = samples;
-
- if (mSamples <= 1)
- {
- llerrs << "Cannot create a multisample buffer with less than 2 samples." << llendl;
- }
-
- stop_glerror();
-
- if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)
- {
-
- if (depth)
- {
- stop_glerror();
- allocateDepth();
- stop_glerror();
- }
-
- glGenFramebuffers(1, (GLuint *) &mFBO);
-
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
-
- if (mDepth)
- {
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth);
- if (mStencil)
- {
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth);
- }
- }
-
- stop_glerror();
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- stop_glerror();
- }
-
- addColorAttachment(color_fmt);
-}
-
-void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
-{
- if (color_fmt == 0)
- {
- return;
- }
-
- U32 offset = mTex.size();
- if (offset >= 4 ||
- (offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers)))
- {
- llerrs << "Too many color attachments!" << llendl;
- }
-
- U32 tex;
- glGenRenderbuffers(1, &tex);
-
- glBindRenderbuffer(GL_RENDERBUFFER, tex);
- glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, color_fmt, mResX, mResY);
- stop_glerror();
-
- if (mFBO)
- {
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset, GL_RENDERBUFFER, tex);
- stop_glerror();
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- switch (status)
- {
- case GL_FRAMEBUFFER_COMPLETE:
- break;
- default:
- llerrs << "WTF? " << std::hex << status << llendl;
- break;
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- }
-
- mTex.push_back(tex);
-}
-
-void LLMultisampleBuffer::allocateDepth()
-{
- glGenRenderbuffers(1, (GLuint* ) &mDepth);
- glBindRenderbuffer(GL_RENDERBUFFER, mDepth);
- if (mStencil)
- {
- glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, GL_DEPTH24_STENCIL8, mResX, mResY);
- }
- else
- {
- glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, GL_DEPTH_COMPONENT16, mResX, mResY);
- }
-}
-
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 12dd1c8b90..094b58b562 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -71,10 +71,7 @@ public:
//allocate resources for rendering
//must be called before use
//multiple calls will release previously allocated resources
- void allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = FALSE);
-
- //provide this render target with a multisample resource.
- void setSampleBuffer(LLMultisampleBuffer* buffer);
+ void allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
//add color buffer attachment
//limit of 4 color attachments per render target
@@ -141,7 +138,6 @@ public:
static LLRenderTarget* getCurrentBoundTarget() { return sBoundTarget; }
protected:
- friend class LLMultisampleBuffer;
U32 mResX;
U32 mResY;
std::vector<U32> mTex;
@@ -152,26 +148,8 @@ protected:
bool mRenderDepth;
LLTexUnit::eTextureType mUsage;
U32 mSamples;
- LLMultisampleBuffer* mSampleBuffer;
-
- static LLRenderTarget* sBoundTarget;
-};
-
-class LLMultisampleBuffer : public LLRenderTarget
-{
-public:
- LLMultisampleBuffer();
- virtual ~LLMultisampleBuffer();
-
- virtual void release();
-
- virtual void bindTarget();
- void bindTarget(LLRenderTarget* ref);
- virtual void allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo);
- void allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, U32 samples);
- virtual void addColorAttachment(U32 color_fmt);
- virtual void allocateDepth();
+ static LLRenderTarget* sBoundTarget;
};
#endif //!LL_MESA_HEADLESS
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 98a0a93084..751b250d96 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -209,17 +209,39 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (features->hasWaterFog)
{
- if (!shader->attachObject("lighting/lightWaterF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightWaterNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
else
{
- if (!shader->attachObject("lighting/lightF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
}
@@ -230,32 +252,76 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (features->isShiny && features->hasWaterFog)
{
- if (!shader->attachObject("lighting/lightFullbrightShinyWaterF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightShinyWaterNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightShinyWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
else if (features->hasWaterFog)
{
- if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightWaterNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
else if (features->isShiny)
{
- if (!shader->attachObject("lighting/lightFullbrightShinyF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightShinyNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightShinyF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
else
{
- if (!shader->attachObject("lighting/lightFullbrightF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
}
@@ -266,17 +332,39 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (features->hasWaterFog)
{
- if (!shader->attachObject("lighting/lightShinyWaterF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightShinyWaterNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightShinyWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
else
{
- if (!shader->attachObject("lighting/lightShinyF.glsl"))
+ if (features->disableTextureIndex)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightShinyNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightShinyF.glsl"))
+ {
+ return FALSE;
+ }
+ shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
}
}
}
@@ -315,12 +403,12 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns)
}
else
{
- LL_INFOS("ShaderLoading") << log << LL_ENDL;
+ LL_DEBUGS("ShaderLoading") << log << LL_ENDL;
}
}
}
-GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type)
+GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, S32 texture_index_channels)
{
GLenum error = GL_NO_ERROR;
if (gDebugGL)
@@ -374,6 +462,117 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
GLcharARB* text[1024];
GLuint count = 0;
+ if (gGLManager.mGLVersion < 2.1f)
+ {
+ text[count++] = strdup("#version 110\n");
+ }
+ else if (gGLManager.mGLVersion < 3.f)
+ {
+ //set version to 1.20
+ text[count++] = strdup("#version 120\n");
+ }
+ else
+ { //set version to 1.30
+ text[count++] = strdup("#version 130\n");
+ }
+
+ //copy preprocessor definitions into buffer
+ for (std::map<std::string,std::string>::iterator iter = mDefinitions.begin(); iter != mDefinitions.end(); ++iter)
+ {
+ std::string define = "#define " + iter->first + " " + iter->second + "\n";
+ text[count++] = (GLcharARB *) strdup(define.c_str());
+ }
+
+ if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB)
+ {
+ //use specified number of texture channels for indexed texture rendering
+
+ /* prepend shader code that looks like this:
+
+ uniform sampler2D tex0;
+ uniform sampler2D tex1;
+ uniform sampler2D tex2;
+ .
+ .
+ .
+ uniform sampler2D texN;
+
+ varying float vary_texture_index;
+
+ vec4 diffuseLookup(vec2 texcoord)
+ {
+ switch (int(vary_texture_index+0.25))
+ {
+ case 0: return texture2D(tex0, texcoord);
+ case 1: return texture2D(tex1, texcoord);
+ case 2: return texture2D(tex2, texcoord);
+ .
+ .
+ .
+ case N: return texture2D(texN, texcoord);
+ }
+
+ return vec4(0,0,0,0);
+ }
+ */
+
+ //uniform declartion
+ for (S32 i = 0; i < texture_index_channels; ++i)
+ {
+ std::string decl = llformat("uniform sampler2D tex%d;\n", i);
+ text[count++] = strdup(decl.c_str());
+ }
+
+ text[count++] = strdup("varying float vary_texture_index;\n");
+ text[count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
+ text[count++] = strdup("{\n");
+
+
+ if (texture_index_channels == 1)
+ { //don't use flow control, that's silly
+ text[count++] = strdup("return texture2D(tex0, texcoord);\n");
+ text[count++] = strdup("}\n");
+ }
+ else if (gGLManager.mGLVersion >= 3.f)
+ {
+ text[count++] = strdup("\tswitch (int(vary_texture_index+0.25))\n");
+ text[count++] = strdup("\t{\n");
+
+ //switch body
+ for (S32 i = 0; i < texture_index_channels; ++i)
+ {
+ std::string case_str = llformat("\t\tcase %d: return texture2D(tex%d, texcoord);\n", i, i);
+ text[count++] = strdup(case_str.c_str());
+ }
+
+ text[count++] = strdup("\t}\n");
+ text[count++] = strdup("\treturn vec4(0,0,0,0);\n");
+ text[count++] = strdup("}\n");
+ }
+ else
+ {
+ //switches aren't supported, make block that looks like:
+ /*
+ int ti = int(vary_texture_index+0.25);
+ if (ti == 0) return texture2D(tex0, texcoord);
+ if (ti == 1) return texture2D(tex1, texcoord);
+ .
+ .
+ .
+ if (ti == N) return texture2D(texN, texcoord);
+ */
+
+ text[count++] = strdup("int ti = int(vary_texture_index+0.25);\n");
+ for (S32 i = 0; i < texture_index_channels; ++i)
+ {
+ std::string if_str = llformat("if (ti == %d) return texture2D(tex%d, texcoord);\n", i, i);
+ text[count++] = strdup(if_str.c_str());
+ }
+
+ text[count++] = strdup("\treturn vec4(0,0,0,0);\n");
+ text[count++] = strdup("}\n");
+ }
+ }
//copy file into memory
while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(buff) )
@@ -417,11 +616,6 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
}
- //free memory
- for (GLuint i = 0; i < count; i++)
- {
- free(text[i]);
- }
if (error == GL_NO_ERROR)
{
//check for errors
@@ -435,6 +629,16 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error: (" << error << ") in " << filename << LL_ENDL;
dumpObjectLog(ret);
+
+ std::stringstream ostr;
+ //dump shader source for debugging
+ for (GLuint i = 0; i < count; i++)
+ {
+ ostr << i << ": " << text[i];
+ }
+
+ LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
+
ret = 0;
}
}
@@ -445,6 +649,12 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
stop_glerror();
+ //free memory
+ for (GLuint i = 0; i < count; i++)
+ {
+ free(text[i]);
+ }
+
//successfully loaded, save results
if (ret)
{
@@ -457,7 +667,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (shader_level > 1)
{
shader_level--;
- return loadShaderFile(filename,shader_level,type);
+ return loadShaderFile(filename,shader_level,type,texture_index_channels);
}
LL_WARNS("ShaderLoading") << "Failed to load " << filename << LL_ENDL;
}
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index c54c4608d7..2f30103811 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -43,7 +43,7 @@ public:
void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE);
BOOL linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE);
BOOL validateProgramObject(GLhandleARB obj);
- GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type);
+ GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, S32 texture_index_channels = -1);
// Implemented in the application to actually point to the shader directory.
virtual std::string getShaderDirPrefix(void) = 0; // Pure Virtual
@@ -60,6 +60,9 @@ public:
std::vector<std::string> mReservedUniforms;
+ //preprocessor definitions (name/value)
+ std::map<std::string, std::string> mDefinitions;
+
protected:
// our parameter manager singleton instance
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 8c9171ccf4..4a0b964e61 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -934,8 +934,26 @@ void LLVertexBuffer::allocateClientIndexBuffer()
}
}
+bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
+{
+ S32 end = index+count;
+ S32 region_end = region.mIndex+region.mCount;
+
+ if (end < region.mIndex ||
+ index > region_end)
+ { //gap exists, do not merge
+ return false;
+ }
+
+ S32 new_end = llmax(end, region_end);
+ S32 new_index = llmin(index, region.mIndex);
+ region.mIndex = new_index;
+ region.mCount = new_end-new_index;
+ return true;
+}
+
// Map for data access
-U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 access)
+U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal)
@@ -947,8 +965,45 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 access)
llerrs << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << llendl;
}
- if (!mVertexLocked && useVBOs())
+ if (useVBOs())
{
+
+ if (sDisableVBOMapping || gGLManager.mHasMapBufferRange)
+ {
+ if (count == -1)
+ {
+ count = mNumVerts-index;
+ }
+
+ bool mapped = false;
+ //see if range is already mapped
+ for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
+ {
+ MappedRegion& region = mMappedVertexRegions[i];
+ if (region.mType == type)
+ {
+ if (expand_region(region, index, count))
+ {
+ mapped = true;
+ break;
+ }
+ }
+ }
+
+ if (!mapped)
+ {
+ //not already mapped, map new region
+ MappedRegion region(type, !sDisableVBOMapping && map_range ? -1 : index, count);
+ mMappedVertexRegions.push_back(region);
+ }
+ }
+
+ if (mVertexLocked && map_range)
+ {
+ llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
+ }
+
+ if (!mVertexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
setBuffer(0, type);
@@ -957,61 +1012,95 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 access)
if(sDisableVBOMapping)
{
+ map_range = false;
allocateClientVertexBuffer() ;
}
else
{
- U8* src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ U8* src = NULL;
+#ifdef GL_ARB_map_buffer_range
+ if (gGLManager.mHasMapBufferRange)
+ {
+ if (map_range)
+ {
+ S32 offset = mOffsets[type] + sTypeSize[type]*index;
+ S32 length = (sTypeSize[type]*count+0xF) & ~0xF;
+ src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT);
+ }
+ else
+ {
+ src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT);
+ }
+ }
+ else
+#else
+ llassert_always(!gGLManager.mHasMapBufferRange);
+#endif
+ {
+ map_range = false;
+ src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ }
+
mMappedData = LL_NEXT_ALIGNED_ADDRESS<U8>(src);
mAlignedOffset = mMappedData - src;
stop_glerror();
}
- }
-
-
- if (!mMappedData)
- {
- log_glerror();
-
- //check the availability of memory
- U32 avail_phy_mem, avail_vir_mem;
- LLMemoryInfo::getAvailableMemoryKB(avail_phy_mem, avail_vir_mem) ;
- llinfos << "Available physical mwmory(KB): " << avail_phy_mem << llendl ;
- llinfos << "Available virtual memory(KB): " << avail_vir_mem << llendl;
-
- if(!sDisableVBOMapping)
- {
- //--------------------
- //print out more debug info before crash
- llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl ;
- GLint size ;
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size) ;
- llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl ;
- //--------------------
+
+ if (!mMappedData)
+ {
+ log_glerror();
+
+ //check the availability of memory
+ U32 avail_phy_mem, avail_vir_mem;
+ LLMemoryInfo::getAvailableMemoryKB(avail_phy_mem, avail_vir_mem) ;
+ llinfos << "Available physical mwmory(KB): " << avail_phy_mem << llendl ;
+ llinfos << "Available virtual memory(KB): " << avail_vir_mem << llendl;
+
+ if(!sDisableVBOMapping)
+ {
+ //--------------------
+ //print out more debug info before crash
+ llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl ;
+ GLint size ;
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size) ;
+ llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl ;
+ //--------------------
+
+ GLint buff;
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
+ if ((GLuint)buff != mGLBuffer)
+ {
+ llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ }
- GLint buff;
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
- if ((GLuint)buff != mGLBuffer)
+
+ llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl;
+ }
+ else
{
- llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ llerrs << "memory allocation for vertex data failed." << llendl ;
}
-
-
- llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl;
- }
- else
- {
- llerrs << "memory allocation for vertex data failed." << llendl ;
}
+ sMappedCount++;
}
- sMappedCount++;
+ }
+ else
+ {
+ map_range = false;
}
- return mMappedData;
+ if (map_range && !sDisableVBOMapping)
+ {
+ return mMappedData;
+ }
+ else
+ {
+ return mMappedData+mOffsets[type]+sTypeSize[type]*index;
+ }
}
-U8* LLVertexBuffer::mapIndexBuffer(S32 access)
+U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal)
@@ -1023,8 +1112,41 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 access)
llerrs << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << llendl;
}
- if (!mIndexLocked && useVBOs())
+ if (useVBOs())
{
+ if (sDisableVBOMapping || gGLManager.mHasMapBufferRange)
+ {
+ if (count == -1)
+ {
+ count = mNumIndices-index;
+ }
+
+ bool mapped = false;
+ //see if range is already mapped
+ for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
+ {
+ MappedRegion& region = mMappedIndexRegions[i];
+ if (expand_region(region, index, count))
+ {
+ mapped = true;
+ break;
+ }
+ }
+
+ if (!mapped)
+ {
+ //not already mapped, map new region
+ MappedRegion region(TYPE_INDEX, !sDisableVBOMapping && map_range ? -1 : index, count);
+ mMappedIndexRegions.push_back(region);
+ }
+ }
+
+ if (mIndexLocked && map_range)
+ {
+ llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
+ }
+
+ if (!mIndexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
@@ -1034,12 +1156,36 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 access)
if(sDisableVBOMapping)
{
+ map_range = false;
allocateClientIndexBuffer() ;
}
else
{
- U8* src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
- mMappedIndexData = LL_NEXT_ALIGNED_ADDRESS<U8>(src);
+ U8* src = NULL;
+#ifdef GL_ARB_map_buffer_range
+ if (gGLManager.mHasMapBufferRange)
+ {
+ if (map_range)
+ {
+ S32 offset = sizeof(U16)*index;
+ S32 length = sizeof(U16)*count;
+ src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT);
+ }
+ else
+ {
+ src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT);
+ }
+ }
+ else
+#else
+ llassert_always(!gGLManager.mHasMapBufferRange);
+#endif
+ {
+ map_range = false;
+ src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ }
+
+ mMappedIndexData = src; //LL_NEXT_ALIGNED_ADDRESS<U8>(src);
mAlignedIndexOffset = mMappedIndexData - src;
stop_glerror();
}
@@ -1068,31 +1214,81 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 access)
sMappedCount++;
}
+ else
+ {
+ map_range = false;
+ }
- return mMappedIndexData ;
+ if (map_range && !sDisableVBOMapping)
+ {
+ return mMappedIndexData;
+ }
+ else
+ {
+ return mMappedIndexData + sizeof(U16)*index;
+ }
}
void LLVertexBuffer::unmapBuffer(S32 type)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
- if (!useVBOs())
+ if (!useVBOs() || type == -2)
{
return ; //nothing to unmap
}
bool updated_all = false ;
+
if (mMappedData && mVertexLocked && type != TYPE_INDEX)
{
updated_all = (mIndexLocked && type < 0) ; //both vertex and index buffers done updating
if(sDisableVBOMapping)
{
- stop_glerror();
- glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, getSize(), mMappedData);
- stop_glerror();
+ if (!mMappedVertexRegions.empty())
+ {
+ stop_glerror();
+ for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
+ {
+ const MappedRegion& region = mMappedVertexRegions[i];
+ S32 offset = region.mIndex >= 0 ? mOffsets[region.mType]+sTypeSize[region.mType]*region.mIndex : 0;
+ S32 length = sTypeSize[region.mType]*region.mCount;
+ glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, offset, length, mMappedData+offset);
+ stop_glerror();
+ }
+
+ mMappedVertexRegions.clear();
+ }
+ else
+ {
+ stop_glerror();
+ glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, getSize(), mMappedData);
+ stop_glerror();
+ }
}
else
{
+#ifdef GL_ARB_map_buffer_range
+ if (gGLManager.mHasMapBufferRange)
+ {
+ if (!mMappedVertexRegions.empty())
+ {
+ stop_glerror();
+ for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
+ {
+ const MappedRegion& region = mMappedVertexRegions[i];
+ S32 offset = region.mIndex >= 0 ? mOffsets[region.mType]+sTypeSize[region.mType]*region.mIndex : 0;
+ S32 length = sTypeSize[region.mType]*region.mCount;
+ glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
+ stop_glerror();
+ }
+
+ mMappedVertexRegions.clear();
+ }
+ }
+#else
+ llassert_always(!gGLManager.mHasMapBufferRange);
+#endif
stop_glerror();
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
stop_glerror();
@@ -1103,17 +1299,53 @@ void LLVertexBuffer::unmapBuffer(S32 type)
mVertexLocked = FALSE ;
sMappedCount--;
}
-
- if(mMappedIndexData && mIndexLocked && (type < 0 || type == TYPE_INDEX))
+
+ if (mMappedIndexData && mIndexLocked && (type < 0 || type == TYPE_INDEX))
{
if(sDisableVBOMapping)
{
- stop_glerror();
- glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, getIndicesSize(), mMappedIndexData);
- stop_glerror();
+ if (!mMappedIndexRegions.empty())
+ {
+ for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
+ {
+ const MappedRegion& region = mMappedIndexRegions[i];
+ S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
+ S32 length = sizeof(U16)*region.mCount;
+ glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, mMappedIndexData+offset);
+ stop_glerror();
+ }
+
+ mMappedIndexRegions.clear();
+ }
+ else
+ {
+ stop_glerror();
+ glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, getIndicesSize(), mMappedIndexData);
+ stop_glerror();
+ }
}
else
{
+#ifdef GL_ARB_map_buffer_range
+ if (gGLManager.mHasMapBufferRange)
+ {
+ if (!mMappedIndexRegions.empty())
+ {
+ for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
+ {
+ const MappedRegion& region = mMappedIndexRegions[i];
+ S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
+ S32 length = sizeof(U16)*region.mCount;
+ glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
+ stop_glerror();
+ }
+
+ mMappedIndexRegions.clear();
+ }
+ }
+#else
+ llassert_always(!gGLManager.mHasMapBufferRange);
+#endif
stop_glerror();
glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB);
stop_glerror();
@@ -1152,19 +1384,19 @@ template <class T,S32 type> struct VertexBufferStrider
typedef LLStrider<T> strider_t;
static bool get(LLVertexBuffer& vbo,
strider_t& strider,
- S32 index)
+ S32 index, S32 count, bool map_range)
{
if (type == LLVertexBuffer::TYPE_INDEX)
{
- S32 stride = sizeof(T);
+ U8* ptr = vbo.mapIndexBuffer(index, count, map_range);
- if (vbo.mapIndexBuffer() == NULL)
+ if (ptr == NULL)
{
llwarns << "mapIndexBuffer failed!" << llendl;
return FALSE;
}
- strider = (T*)(vbo.getMappedIndices() + index*stride);
+ strider = (T*)ptr;
strider.setStride(0);
return TRUE;
}
@@ -1172,13 +1404,15 @@ template <class T,S32 type> struct VertexBufferStrider
{
S32 stride = LLVertexBuffer::sTypeSize[type];
- if (vbo.mapVertexBuffer(type) == NULL)
+ U8* ptr = vbo.mapVertexBuffer(type, index, count, map_range);
+
+ if (ptr == NULL)
{
llwarns << "mapVertexBuffer failed!" << llendl;
return FALSE;
}
- strider = (T*)(vbo.getMappedData() + vbo.getOffset(type)+index*stride);
+ strider = (T*)ptr;
strider.setStride(stride);
return TRUE;
}
@@ -1190,55 +1424,48 @@ template <class T,S32 type> struct VertexBufferStrider
}
};
-bool LLVertexBuffer::getVertexStrider(LLStrider<LLVector3>& strider, S32 index)
-{
- return VertexBufferStrider<LLVector3,TYPE_VERTEX>::get(*this, strider, index);
-}
-bool LLVertexBuffer::getIndexStrider(LLStrider<U16>& strider, S32 index)
+bool LLVertexBuffer::getVertexStrider(LLStrider<LLVector3>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<U16,TYPE_INDEX>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector3,TYPE_VERTEX>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getTexCoord0Strider(LLStrider<LLVector2>& strider, S32 index)
+bool LLVertexBuffer::getIndexStrider(LLStrider<U16>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector2,TYPE_TEXCOORD0>::get(*this, strider, index);
+ return VertexBufferStrider<U16,TYPE_INDEX>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getTexCoord1Strider(LLStrider<LLVector2>& strider, S32 index)
+bool LLVertexBuffer::getTexCoord0Strider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector2,TYPE_TEXCOORD1>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector2,TYPE_TEXCOORD0>::get(*this, strider, index, count, map_range);
}
-/*bool LLVertexBuffer::getTexCoord2Strider(LLStrider<LLVector2>& strider, S32 index)
+bool LLVertexBuffer::getTexCoord1Strider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector2,TYPE_TEXCOORD2>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector2,TYPE_TEXCOORD1>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getTexCoord3Strider(LLStrider<LLVector2>& strider, S32 index)
-{
- return VertexBufferStrider<LLVector2,TYPE_TEXCOORD3>::get(*this, strider, index);
-}*/
-bool LLVertexBuffer::getNormalStrider(LLStrider<LLVector3>& strider, S32 index)
+
+bool LLVertexBuffer::getNormalStrider(LLStrider<LLVector3>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector3,TYPE_NORMAL>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector3,TYPE_NORMAL>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getBinormalStrider(LLStrider<LLVector3>& strider, S32 index)
+bool LLVertexBuffer::getBinormalStrider(LLStrider<LLVector3>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector3,TYPE_BINORMAL>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector3,TYPE_BINORMAL>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getColorStrider(LLStrider<LLColor4U>& strider, S32 index)
+bool LLVertexBuffer::getColorStrider(LLStrider<LLColor4U>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLColor4U,TYPE_COLOR>::get(*this, strider, index);
+ return VertexBufferStrider<LLColor4U,TYPE_COLOR>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getWeightStrider(LLStrider<F32>& strider, S32 index)
+bool LLVertexBuffer::getWeightStrider(LLStrider<F32>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<F32,TYPE_WEIGHT>::get(*this, strider, index);
+ return VertexBufferStrider<F32,TYPE_WEIGHT>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getWeight4Strider(LLStrider<LLVector4>& strider, S32 index)
+bool LLVertexBuffer::getWeight4Strider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector4,TYPE_WEIGHT4>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector4,TYPE_WEIGHT4>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index)
+bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
{
- return VertexBufferStrider<LLVector4,TYPE_CLOTHWEIGHT>::get(*this, strider, index);
+ return VertexBufferStrider<LLVector4,TYPE_CLOTHWEIGHT>::get(*this, strider, index, count, map_range);
}
//----------------------------------------------------------------------------
@@ -1497,17 +1724,16 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const
}
if (data_mask & MAP_VERTEX)
{
- glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ if (data_mask & MAP_TEXTURE_INDEX)
+ {
+ glVertexPointer(4,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ }
+ else
+ {
+ glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ }
}
llglassertok();
}
-void LLVertexBuffer::markDirty(U32 vert_index, U32 vert_count, U32 indices_index, U32 indices_count)
-{
- // TODO: use GL_APPLE_flush_buffer_range here
- /*if (useVBOs() && !mFilthy)
- {
-
- }*/
-}
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index a9f22193f8..aa5df305a6 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -77,6 +77,18 @@ protected:
class LLVertexBuffer : public LLRefCount
{
public:
+ class MappedRegion
+ {
+ public:
+ S32 mType;
+ S32 mIndex;
+ S32 mCount;
+
+ MappedRegion(S32 type, S32 index, S32 count)
+ : mType(type), mIndex(index), mCount(count)
+ { }
+ };
+
LLVertexBuffer(const LLVertexBuffer& rhs)
{
*this = rhs;
@@ -130,6 +142,9 @@ public:
TYPE_CLOTHWEIGHT,
TYPE_MAX,
TYPE_INDEX,
+
+ //no actual additional data, but indicates position.w is texture index
+ TYPE_TEXTURE_INDEX,
};
enum {
MAP_VERTEX = (1<<TYPE_VERTEX),
@@ -144,6 +159,7 @@ public:
MAP_WEIGHT = (1<<TYPE_WEIGHT),
MAP_WEIGHT4 = (1<<TYPE_WEIGHT4),
MAP_CLOTHWEIGHT = (1<<TYPE_CLOTHWEIGHT),
+ MAP_TEXTURE_INDEX = (1<<TYPE_TEXTURE_INDEX),
};
protected:
@@ -173,8 +189,8 @@ public:
LLVertexBuffer(U32 typemask, S32 usage);
// map for data access
- U8* mapVertexBuffer(S32 type = -1, S32 access = -1);
- U8* mapIndexBuffer(S32 access = -1);
+ U8* mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range);
+ U8* mapIndexBuffer(S32 index, S32 count, bool map_range);
// set for rendering
virtual void setBuffer(U32 data_mask, S32 type = -1); // calls setupVertexBuffer() if data_mask is not 0
@@ -189,16 +205,16 @@ public:
// vb->getNormalStrider(norms);
// setVertsNorms(verts, norms);
// vb->unmapBuffer();
- bool getVertexStrider(LLStrider<LLVector3>& strider, S32 index=0);
- bool getIndexStrider(LLStrider<U16>& strider, S32 index=0);
- bool getTexCoord0Strider(LLStrider<LLVector2>& strider, S32 index=0);
- bool getTexCoord1Strider(LLStrider<LLVector2>& strider, S32 index=0);
- bool getNormalStrider(LLStrider<LLVector3>& strider, S32 index=0);
- bool getBinormalStrider(LLStrider<LLVector3>& strider, S32 index=0);
- bool getColorStrider(LLStrider<LLColor4U>& strider, S32 index=0);
- bool getWeightStrider(LLStrider<F32>& strider, S32 index=0);
- bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0);
- bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0);
+ bool getVertexStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getIndexStrider(LLStrider<U16>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getTexCoord0Strider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getTexCoord1Strider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getNormalStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getBinormalStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getColorStrider(LLStrider<LLColor4U>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getWeightStrider(LLStrider<F32>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
BOOL isEmpty() const { return mEmpty; }
BOOL isLocked() const { return mVertexLocked || mIndexLocked; }
@@ -218,8 +234,6 @@ public:
S32 getOffset(S32 type) const { return mOffsets[type]; }
S32 getUsage() const { return mUsage; }
- void markDirty(U32 vert_index, U32 vert_count, U32 indices_index, U32 indices_count);
-
void draw(U32 mode, U32 count, U32 indices_offset) const;
void drawArrays(U32 mode, U32 offset, U32 count) const;
void drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const;
@@ -253,20 +267,8 @@ protected:
BOOL mDynamicSize; // if TRUE, buffer has been resized at least once (and should be padded)
S32 mOffsets[TYPE_MAX];
- class DirtyRegion
- {
- public:
- U32 mIndex;
- U32 mCount;
- U32 mIndicesIndex;
- U32 mIndicesCount;
-
- DirtyRegion(U32 vi, U32 vc, U32 ii, U32 ic)
- : mIndex(vi), mCount(vc), mIndicesIndex(ii), mIndicesCount(ic)
- { }
- };
-
- std::vector<DirtyRegion> mDirtyRegions; //vector of dirty regions to rebuild
+ std::vector<MappedRegion> mMappedVertexRegions;
+ std::vector<MappedRegion> mMappedIndexRegions;
public:
static S32 sCount;
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 684e393cba..0bbdcfd6ff 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -28,6 +28,8 @@ include_directories(
set(llui_SOURCE_FILES
llaccordionctrl.cpp
llaccordionctrltab.cpp
+ llbadge.cpp
+ llbadgeowner.cpp
llbutton.cpp
llcheckboxctrl.cpp
llclipboard.cpp
@@ -93,6 +95,7 @@ set(llui_SOURCE_FILES
lltextparser.cpp
lltextutil.cpp
lltextvalidate.cpp
+ lltimectrl.cpp
lltransutil.cpp
lltoggleablemenu.cpp
lltooltip.cpp
@@ -119,6 +122,8 @@ set(llui_HEADER_FILES
llaccordionctrl.h
llaccordionctrltab.h
+ llbadge.h
+ llbadgeowner.h
llbutton.h
llcallbackmap.h
llcheckboxctrl.h
@@ -191,6 +196,7 @@ set(llui_HEADER_FILES
lltextparser.h
lltextutil.h
lltextvalidate.h
+ lltimectrl.h
lltoggleablemenu.h
lltooltip.h
lltransutil.h
@@ -245,11 +251,11 @@ target_link_libraries(llui
)
# Add tests
-if (LL_TESTS)
- include(LLAddBuildTest)
- SET(llui_TEST_SOURCE_FILES
- llurlmatch.cpp
- llurlentry.cpp
- )
- LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
-endif (LL_TESTS) \ No newline at end of file
+if(LL_TESTS)
+ include(LLAddBuildTest)
+ SET(llui_TEST_SOURCE_FILES
+ llurlmatch.cpp
+ llurlentry.cpp
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
+endif(LL_TESTS)
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 9e4849c58b..6afe276379 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -1022,7 +1022,7 @@ void LLAccordionCtrlTab::updateLayout ( const LLRect& child_rect )
S32 panel_width = child_rect.getWidth();
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
- if(mScrollbar->getVisible() != false)
+ if(mScrollbar && mScrollbar->getVisible() != false)
{
panel_top+=mScrollbar->getDocPos();
panel_width-=scrollbar_size;
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
new file mode 100644
index 0000000000..c28a947a7f
--- /dev/null
+++ b/indra/llui/llbadge.cpp
@@ -0,0 +1,274 @@
+/**
+ * @file llbadge.cpp
+ * @brief Implementation for badges
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#define LLBADGE_CPP
+#include "llbadge.h"
+
+#include "lluictrlfactory.h"
+
+
+static LLDefaultChildRegistry::Register<LLBadge> r("badge");
+
+// Compiler optimization, generate extern template
+template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const;
+
+
+LLBadge::Params::Params()
+ : image("image")
+ , border_image("border_image")
+ , border_color("border_color")
+ , image_color("image_color")
+ , label("label")
+ , label_color("label_color")
+ , location("location", LLRelPos::TOP_LEFT)
+ , location_percent_hcenter("location_percent_hcenter")
+ , location_percent_vcenter("location_percent_vcenter")
+ , padding_horiz("padding_horiz")
+ , padding_vert("padding_vert")
+{
+ // We set a name here so the name isn't necessary in any xml files that use badges
+ name = "badge";
+}
+
+bool LLBadge::Params::equals(const Params& a) const
+{
+ bool comp = true;
+
+ // skip owner in comparison on purpose
+
+ comp &= (border_image() == a.border_image());
+ comp &= (border_color() == a.border_color());
+ comp &= (image() == a.image());
+ comp &= (image_color() == a.image_color());
+ comp &= (label() == a.label());
+ comp &= (label_color() == a.label_color());
+ comp &= (location() == a.location());
+ comp &= (location_percent_hcenter() == a.location_percent_hcenter());
+ comp &= (location_percent_vcenter() == a.location_percent_vcenter());
+ comp &= (padding_horiz() == a.padding_horiz());
+ comp &= (padding_vert() == a.padding_vert());
+
+ return comp;
+}
+
+LLBadge::LLBadge(const LLBadge::Params& p)
+ : LLUICtrl(p)
+ , mOwner(p.owner)
+ , mBorderImage(p.border_image)
+ , mBorderColor(p.border_color)
+ , mGLFont(p.font)
+ , mImage(p.image)
+ , mImageColor(p.image_color)
+ , mLabel(p.label)
+ , mLabelColor(p.label_color)
+ , mLocation(p.location)
+ , mLocationPercentHCenter(0.5f)
+ , mLocationPercentVCenter(0.5f)
+ , mPaddingHoriz(p.padding_horiz)
+ , mPaddingVert(p.padding_vert)
+{
+ if (mImage.isNull())
+ {
+ llwarns << "Badge: " << getName() << " with no image!" << llendl;
+ }
+
+ //
+ // The following logic is to set the mLocationPercentHCenter and mLocationPercentVCenter
+ // based on the Location enum and our horizontal and vertical location percentages. The
+ // draw code then uses this on the owner rectangle to compute the screen location for
+ // the badge.
+ //
+
+ if (!LLRelPos::IsCenter(mLocation))
+ {
+ F32 h_center = p.location_percent_hcenter * 0.01f;
+ F32 v_center = p.location_percent_vcenter * 0.01f;
+
+ if (LLRelPos::IsRight(mLocation))
+ {
+ mLocationPercentHCenter = 0.5f * (1.0f + h_center);
+ }
+ else if (LLRelPos::IsLeft(mLocation))
+ {
+ mLocationPercentHCenter = 0.5f * (1.0f - h_center);
+ }
+
+ if (LLRelPos::IsTop(mLocation))
+ {
+ mLocationPercentVCenter = 0.5f * (1.0f + v_center);
+ }
+ else if (LLRelPos::IsBottom(mLocation))
+ {
+ mLocationPercentVCenter = 0.5f * (1.0f - v_center);
+ }
+ }
+}
+
+LLBadge::~LLBadge()
+{
+}
+
+void LLBadge::setLabel(const LLStringExplicit& label)
+{
+ mLabel = label;
+}
+
+//
+// This is a fallback function to render a rectangle for badges without a valid image
+//
+void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, const LLColor4U &color)
+{
+ gGL.pushUIMatrix();
+ gGL.loadUIIdentity();
+ gGL.setSceneBlendType(LLRender::BT_REPLACE);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ gGL.color4ubv(color.mV);
+ gGL.texCoord2i(0, 0);
+
+ F32 x = LLFontGL::sCurOrigin.mX + centerX - width * 0.5f;
+ F32 y = LLFontGL::sCurOrigin.mY + centerY - height * 0.5f;
+
+ LLRectf screen_rect(llround(x),
+ llround(y),
+ llround(x) + width,
+ llround(y) + height);
+
+ LLVector3 vertices[4];
+ vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
+ vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
+ vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
+ vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f);
+
+ gGL.begin(LLRender::QUADS);
+ {
+ gGL.vertexBatchPreTransformed(vertices, 4);
+ }
+ gGL.end();
+
+ gGL.popUIMatrix();
+}
+
+
+// virtual
+void LLBadge::draw()
+{
+ if (!mLabel.empty())
+ {
+ LLView* owner_view = mOwner.get();
+
+ if (owner_view)
+ {
+ //
+ // Calculate badge position based on owner
+ //
+
+ LLRect owner_rect;
+ owner_view->localRectToOtherView(owner_view->getLocalRect(), & owner_rect, this);
+
+ F32 badge_center_x = owner_rect.mLeft + owner_rect.getWidth() * mLocationPercentHCenter;
+ F32 badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
+
+ //
+ // Calculate badge size based on label text
+ //
+
+ LLWString badge_label_wstring = mLabel;
+
+ S32 badge_label_begin_offset = 0;
+ S32 badge_char_length = S32_MAX;
+ S32 badge_pixel_length = S32_MAX;
+ F32 *right_position_out = NULL;
+ BOOL do_not_use_ellipses = false;
+
+ F32 badge_width = (2.0f * mPaddingHoriz) +
+ mGLFont->getWidthF32(badge_label_wstring.c_str(), badge_label_begin_offset, badge_char_length);
+
+ F32 badge_height = (2.0f * mPaddingVert) + mGLFont->getLineHeight();
+
+ //
+ // Draw button image, if available.
+ // Otherwise draw basic rectangular button.
+ //
+
+ F32 alpha = getDrawContext().mAlpha;
+
+ if (!mImage.isNull())
+ {
+ F32 badge_x = badge_center_x - badge_width * 0.5f;
+ F32 badge_y = badge_center_y - badge_height * 0.5f;
+
+ mImage->drawSolid((S32) badge_x, (S32) badge_y, (S32) badge_width, (S32) badge_height, mImageColor % alpha);
+
+ if (!mBorderImage.isNull())
+ {
+ mBorderImage->drawSolid((S32) badge_x, (S32) badge_y, (S32) badge_width, (S32) badge_height, mBorderColor % alpha);
+ }
+ }
+ else
+ {
+ lldebugs << "No image for badge " << getName() << " on owner " << owner_view->getName() << llendl;
+
+ renderBadgeBackground(badge_center_x, badge_center_y,
+ badge_width, badge_height,
+ mImageColor % alpha);
+ }
+
+ //
+ // Draw the label
+ //
+
+ mGLFont->render(badge_label_wstring, badge_label_begin_offset,
+ badge_center_x, badge_center_y,
+ mLabelColor % alpha,
+ LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
+ LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
+ LLFontGL::DROP_SHADOW_SOFT,
+ badge_char_length, badge_pixel_length,
+ right_position_out, do_not_use_ellipses);
+ }
+ }
+}
+
+
+namespace LLInitParam
+{
+ void TypeValues<LLRelPos::Location>::declareValues()
+ {
+ declare("bottom", LLRelPos::BOTTOM);
+ declare("bottom_left", LLRelPos::BOTTOM_LEFT);
+ declare("bottom_right", LLRelPos::BOTTOM_RIGHT);
+ declare("center", LLRelPos::CENTER);
+ declare("left", LLRelPos::LEFT);
+ declare("right", LLRelPos::RIGHT);
+ declare("top", LLRelPos::TOP);
+ declare("top_left", LLRelPos::TOP_LEFT);
+ declare("top_right", LLRelPos::TOP_RIGHT);
+ }
+}
+
+
+// eof
diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h
new file mode 100644
index 0000000000..0f923ef01b
--- /dev/null
+++ b/indra/llui/llbadge.h
@@ -0,0 +1,159 @@
+/**
+ * @file llbadge.h
+ * @brief Header for badges
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLBADGE_H
+#define LL_LLBADGE_H
+
+#include <string>
+
+#include "lluicolor.h"
+#include "lluictrl.h"
+#include "llstring.h"
+#include "lluiimage.h"
+#include "llview.h"
+
+//
+// Declarations
+//
+
+class LLUICtrlFactory;
+class LLFontGL;
+
+//
+// Relative Position Alignment
+//
+
+namespace LLRelPos
+{
+ enum Location
+ {
+ CENTER = 0,
+
+ LEFT = (1 << 0),
+ RIGHT = (1 << 1),
+
+ TOP = (1 << 2),
+ BOTTOM = (1 << 3),
+
+ BOTTOM_LEFT = (BOTTOM | LEFT),
+ BOTTOM_RIGHT = (BOTTOM | RIGHT),
+
+ TOP_LEFT = (TOP | LEFT),
+ TOP_RIGHT = (TOP | RIGHT),
+ };
+
+ inline bool IsBottom(Location relPos) { return (relPos & BOTTOM) == BOTTOM; }
+ inline bool IsCenter(Location relPos) { return (relPos == CENTER); }
+ inline bool IsLeft(Location relPos) { return (relPos & LEFT) == LEFT; }
+ inline bool IsRight(Location relPos) { return (relPos & RIGHT) == RIGHT; }
+ inline bool IsTop(Location relPos) { return (relPos & TOP) == TOP; }
+}
+
+// NOTE: This needs to occur before Optional<LLRelPos::Location> declaration for proper compilation.
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<LLRelPos::Location> : public TypeValuesHelper<LLRelPos::Location>
+ {
+ static void declareValues();
+ };
+}
+
+//
+// Classes
+//
+
+class LLBadge
+: public LLUICtrl
+{
+public:
+ struct Params
+ : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional< LLHandle<LLView> > owner; // Mandatory in code but not in xml
+
+ Optional< LLUIImage* > border_image;
+ Optional< LLUIColor > border_color;
+
+ Optional< LLUIImage* > image;
+ Optional< LLUIColor > image_color;
+
+ Optional< std::string > label;
+ Optional< LLUIColor > label_color;
+
+ Optional< LLRelPos::Location > location;
+ Optional< U32 > location_percent_hcenter;
+ Optional< U32 > location_percent_vcenter;
+
+ Optional< F32 > padding_horiz;
+ Optional< F32 > padding_vert;
+
+ Params();
+
+ bool equals(const Params&) const;
+ };
+
+protected:
+ friend class LLUICtrlFactory;
+ LLBadge(const Params& p);
+
+public:
+
+ ~LLBadge();
+
+ virtual void draw();
+
+ const std::string getLabel() const { return wstring_to_utf8str(mLabel); }
+ void setLabel( const LLStringExplicit& label);
+
+private:
+ LLPointer< LLUIImage > mBorderImage;
+ LLUIColor mBorderColor;
+
+ const LLFontGL* mGLFont;
+
+ LLPointer< LLUIImage > mImage;
+ LLUIColor mImageColor;
+
+ LLUIString mLabel;
+ LLUIColor mLabelColor;
+
+ LLRelPos::Location mLocation;
+ F32 mLocationPercentHCenter;
+ F32 mLocationPercentVCenter;
+
+ LLHandle< LLView > mOwner;
+
+ F32 mPaddingHoriz;
+ F32 mPaddingVert;
+};
+
+// Build time optimization, generate once in .cpp file
+#ifndef LLBADGE_CPP
+extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const;
+#endif
+
+#endif // LL_LLBADGE_H
diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp
new file mode 100644
index 0000000000..77f15567bf
--- /dev/null
+++ b/indra/llui/llbadgeowner.cpp
@@ -0,0 +1,126 @@
+/**
+ * @file llbadgeowner.cpp
+ * @brief Class to manage badges attached to a UI control
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llbadgeowner.h"
+#include "llpanel.h"
+
+//
+// Classes
+//
+
+LLBadgeOwner::LLBadgeOwner(LLHandle< LLView > viewHandle)
+ : mBadge(NULL)
+ , mBadgeOwnerView(viewHandle)
+{
+}
+
+void LLBadgeOwner::initBadgeParams(const LLBadge::Params& p)
+{
+ if (!p.equals(LLUICtrlFactory::getDefaultParams<LLBadge>()))
+ {
+ mBadge = createBadge(p);
+ }
+}
+
+void LLBadgeOwner::setBadgeLabel(const LLStringExplicit& label)
+{
+ if (mBadge == NULL)
+ {
+ mBadge = createBadge(LLUICtrlFactory::getDefaultParams<LLBadge>());
+
+ addBadgeToParentPanel();
+ }
+
+ if (mBadge)
+ {
+ mBadge->setLabel(label);
+
+ //
+ // Push the badge to the front so it renders on top
+ //
+
+ LLView * parent = mBadge->getParent();
+
+ if (parent)
+ {
+ parent->sendChildToFront(mBadge);
+ }
+ }
+}
+
+void LLBadgeOwner::setBadgeVisibility(bool visible)
+{
+ if (mBadge)
+ {
+ mBadge->setVisible(visible);
+ }
+}
+
+void LLBadgeOwner::addBadgeToParentPanel()
+{
+ LLView * owner_view = mBadgeOwnerView.get();
+
+ if (mBadge && owner_view)
+ {
+ // Badge parent is badge owner by default
+ LLView * badge_parent = owner_view;
+
+ // Find the appropriate parent for the badge
+ LLView * parent = owner_view->getParent();
+
+ while (parent)
+ {
+ LLPanel * parent_panel = dynamic_cast<LLPanel *>(parent);
+
+ if (parent_panel && parent_panel->acceptsBadge())
+ {
+ badge_parent = parent;
+ break;
+ }
+
+ parent = parent->getParent();
+ }
+
+ if (badge_parent)
+ {
+ badge_parent->addChild(mBadge);
+ }
+ else
+ {
+ llwarns << "Unable to find parent panel for badge " << mBadge->getName() << " on " << owner_view->getName() << llendl;
+ }
+ }
+}
+
+LLBadge* LLBadgeOwner::createBadge(const LLBadge::Params& p)
+{
+ LLBadge::Params badge_params(p);
+ badge_params.owner = mBadgeOwnerView;
+
+ return LLUICtrlFactory::create<LLBadge>(badge_params);
+}
diff --git a/indra/newview/lldrawpoolclouds.h b/indra/llui/llbadgeowner.h
index 019f11a795..a2399189a5 100644
--- a/indra/newview/lldrawpoolclouds.h
+++ b/indra/llui/llbadgeowner.h
@@ -1,8 +1,8 @@
/**
- * @file lldrawpoolclouds.h
- * @brief LLDrawPoolClouds class definition
+ * @file llbadgeowner.h
+ * @brief Header for badge owners
*
- * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
@@ -24,31 +24,38 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLDRAWPOOLCLOUDS_H
-#define LL_LLDRAWPOOLCLOUDS_H
+#ifndef LL_LLBADGEOWNER_H
+#define LL_LLBADGEOWNER_H
-#include "lldrawpool.h"
+#include "llbadge.h"
+#include "llview.h"
-class LLDrawPoolClouds : public LLDrawPool
+//
+// Classes
+//
+
+class LLBadgeOwner
{
public:
- enum
- {
- VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
- LLVertexBuffer::MAP_NORMAL |
- LLVertexBuffer::MAP_TEXCOORD0
- };
-
- BOOL addFace(LLFace* face);
- virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; }
-
- LLDrawPoolClouds();
-
- /*virtual*/ void prerender();
- /*virtual*/ LLDrawPool *instancePool();
- /*virtual*/ void enqueue(LLFace *face);
- /*virtual*/ void beginRenderPass(S32 pass);
- /*virtual*/ void render(S32 pass = 0);
+
+ LLBadgeOwner(LLHandle< LLView > viewHandle);
+
+ void initBadgeParams(const LLBadge::Params& p);
+ void addBadgeToParentPanel();
+
+ bool badgeHasParent() const { return (mBadge && mBadge->getParent()); }
+
+ void setBadgeLabel(const LLStringExplicit& label);
+ void setBadgeVisibility(bool visible);
+
+private:
+
+ LLBadge* createBadge(const LLBadge::Params& p);
+
+private:
+
+ LLBadge* mBadge;
+ LLHandle< LLView > mBadgeOwnerView;
};
-#endif // LL_LLDRAWPOOLSKY_H
+#endif // LL_LLBADGEOWNER_H
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 45ceaff696..7b015bd576 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -99,7 +99,9 @@ LLButton::Params::Params()
scale_image("scale_image", true),
hover_glow_amount("hover_glow_amount"),
commit_on_return("commit_on_return", true),
- use_draw_context_alpha("use_draw_context_alpha", true)
+ use_draw_context_alpha("use_draw_context_alpha", true),
+ badge("badge"),
+ handle_right_mouse("handle_right_mouse")
{
addSynonym(is_toggle, "toggle");
held_down_delay.seconds = 0.5f;
@@ -109,6 +111,7 @@ LLButton::Params::Params()
LLButton::LLButton(const LLButton::Params& p)
: LLUICtrl(p),
+ LLBadgeOwner(LLView::getHandle()),
mMouseDownFrame(0),
mMouseHeldDownCount(0),
mBorderEnabled( FALSE ),
@@ -160,8 +163,8 @@ LLButton::LLButton(const LLButton::Params& p)
mMouseDownSignal(NULL),
mMouseUpSignal(NULL),
mHeldDownSignal(NULL),
- mUseDrawContextAlpha(p.use_draw_context_alpha)
-
+ mUseDrawContextAlpha(p.use_draw_context_alpha),
+ mHandleRightMouse(p.handle_right_mouse)
{
static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
static Params default_params(LLUICtrlFactory::getDefaultParams<LLButton>());
@@ -244,6 +247,11 @@ LLButton::LLButton(const LLButton::Params& p)
{
setHeldDownCallback(initCommitCallback(p.mouse_held_callback));
}
+
+ if (p.badge.isProvided())
+ {
+ LLBadgeOwner::initBadgeParams(p.badge());
+ }
}
LLButton::~LLButton()
@@ -327,8 +335,12 @@ boost::signals2::connection LLButton::setHeldDownCallback( button_callback_t cb,
BOOL LLButton::postBuild()
{
autoResize();
- return TRUE;
+
+ addBadgeToParentPanel();
+
+ return LLUICtrl::postBuild();
}
+
BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
{
BOOL handled = FALSE;
@@ -447,7 +459,7 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- if (!childrenHandleRightMouseDown(x, y, mask))
+ if (mHandleRightMouse && !childrenHandleRightMouseDown(x, y, mask))
{
// Route future Mouse messages here preemptively. (Release on mouse up.)
gFocusMgr.setMouseCapture( this );
@@ -460,37 +472,42 @@ BOOL LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
// if (pointInView(x, y))
// {
// }
+ // send the mouse down signal
+ LLUICtrl::handleRightMouseDown(x,y,mask);
+ // *TODO: Return result of LLUICtrl call above? Should defer to base class
+ // but this might change the mouse handling of existing buttons in a bad way
+ // if they are not mouse opaque.
}
- // send the mouse down signal
- LLUICtrl::handleRightMouseDown(x,y,mask);
- // *TODO: Return result of LLUICtrl call above? Should defer to base class
- // but this might change the mouse handling of existing buttons in a bad way
- // if they are not mouse opaque.
+
return TRUE;
}
BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
- // We only handle the click if the click both started and ended within us
- if( hasMouseCapture() )
+ if (mHandleRightMouse)
{
- // Always release the mouse
- gFocusMgr.setMouseCapture( NULL );
+ // We only handle the click if the click both started and ended within us
+ if( hasMouseCapture() )
+ {
+ // Always release the mouse
+ gFocusMgr.setMouseCapture( NULL );
-// if (pointInView(x, y))
-// {
-// mRightMouseUpSignal(this, x,y,mask);
-// }
- }
- else
- {
- childrenHandleRightMouseUp(x, y, mask);
+ // if (pointInView(x, y))
+ // {
+ // mRightMouseUpSignal(this, x,y,mask);
+ // }
+ }
+ else
+ {
+ childrenHandleRightMouseUp(x, y, mask);
+ }
+
+ // send the mouse up signal
+ LLUICtrl::handleRightMouseUp(x,y,mask);
+ // *TODO: Return result of LLUICtrl call above? Should defer to base class
+ // but this might change the mouse handling of existing buttons in a bad way.
+ // if they are not mouse opaque.
}
- // send the mouse up signal
- LLUICtrl::handleRightMouseUp(x,y,mask);
- // *TODO: Return result of LLUICtrl call above? Should defer to base class
- // but this might change the mouse handling of existing buttons in a bad way.
- // if they are not mouse opaque.
return TRUE;
}
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 0cfc393e05..5968916006 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -27,6 +27,8 @@
#ifndef LL_LLBUTTON_H
#define LL_LLBUTTON_H
+#include "lluuid.h"
+#include "llbadgeowner.h"
#include "llcontrol.h"
#include "lluictrl.h"
#include "v4color.h"
@@ -52,15 +54,13 @@ S32 round_up(S32 grid, S32 value);
class LLUICtrlFactory;
-class LLUIImage;
-class LLUUID;
//
// Classes
//
class LLButton
-: public LLUICtrl
+: public LLUICtrl, public LLBadgeOwner
{
public:
struct Params
@@ -125,7 +125,11 @@ public:
Optional<F32> hover_glow_amount;
Optional<TimeIntervalParam> held_down_delay;
- Optional<bool> use_draw_context_alpha;
+ Optional<bool> use_draw_context_alpha;
+
+ Optional<LLBadge::Params> badge;
+
+ Optional<bool> handle_right_mouse;
Params();
};
@@ -249,7 +253,7 @@ public:
void setImageDisabledSelected(LLPointer<LLUIImage> image);
void setImageFlash(LLPointer<LLUIImage> image);
void setImagePressed(LLPointer<LLUIImage> image);
-
+
void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; }
BOOL getCommitOnReturn() const { return mCommitOnReturn; }
@@ -357,6 +361,8 @@ private:
bool mForcePressedState;
LLFrameTimer mFlashingTimer;
+
+ bool mHandleRightMouse;
};
// Build time optimization, generate once in .cpp file
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 06bad1f371..04040200d0 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -132,6 +132,9 @@ void LLConsole::setFontSize(S32 size_index)
void LLConsole::draw()
{
+ // Units in pixels
+ static const F32 padding_horizontal = 10;
+ static const F32 padding_vertical = 3;
LLGLSUIDefault gls_ui;
// skip lines added more than mLinePersistTime ago
@@ -176,11 +179,9 @@ void LLConsole::draw()
// draw remaining lines
F32 y_pos = 0.f;
- LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square");
+ LLUIImagePtr imagep = LLUI::getUIImage("transparent");
-// F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
-// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
color.mV[VALPHA] *= console_opacity;
@@ -188,8 +189,8 @@ void LLConsole::draw()
for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++)
{
- S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + 8);
- S32 target_width = llfloor( (*paragraph_it).mMaxWidth +15);
+ S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + padding_vertical);
+ S32 target_width = llfloor( (*paragraph_it).mMaxWidth + padding_horizontal);
y_pos += ((*paragraph_it).mLines.size()) * line_height;
imagep->drawSolid(-14, (S32)(y_pos + line_height - target_height), target_width, target_height, color);
@@ -234,7 +235,7 @@ void LLConsole::draw()
y_off += line_height;
}
}
- y_pos += 8;
+ y_pos += padding_vertical;
}
}
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 9b6830a816..6a91ec56e4 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -49,6 +49,8 @@ void LLLayoutStack::OrientationNames::declareValues()
//
LLLayoutPanel::LLLayoutPanel(const Params& p)
: LLPanel(p),
+ mExpandedMinDimSpecified(false),
+ mExpandedMinDim(p.min_dim),
mMinDim(p.min_dim),
mMaxDim(p.max_dim),
mAutoResize(p.auto_resize),
@@ -58,6 +60,13 @@ LLLayoutPanel::LLLayoutPanel(const Params& p)
mVisibleAmt(1.f), // default to fully visible
mResizeBar(NULL)
{
+ // Set the expanded min dim if it is provided, otherwise it gets the p.min_dim value
+ if (p.expanded_min_dim.isProvided())
+ {
+ mExpandedMinDimSpecified = true;
+ mExpandedMinDim = p.expanded_min_dim();
+ }
+
// panels initialized as hidden should not start out partially visible
if (!getVisible())
{
@@ -78,20 +87,20 @@ LLLayoutPanel::~LLLayoutPanel()
delete mResizeBar;
mResizeBar = NULL;
}
-
+
F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation)
{
if (orientation == LLLayoutStack::HORIZONTAL)
{
F32 collapse_amt =
- clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth()));
+ clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)getRelevantMinDim() / (F32)llmax(1, getRect().getWidth()));
return mVisibleAmt * collapse_amt;
}
else
{
- F32 collapse_amt =
- clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinDim / (F32)llmax(1, getRect().getHeight())));
- return mVisibleAmt * collapse_amt;
+ F32 collapse_amt =
+ clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)getRelevantMinDim() / (F32)llmax(1, getRect().getHeight())));
+ return mVisibleAmt * collapse_amt;
}
}
@@ -182,14 +191,14 @@ BOOL LLLayoutStack::postBuild()
}
bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
- {
+{
LLLayoutPanel* panelp = dynamic_cast<LLLayoutPanel*>(child);
- if (panelp)
- {
+ if (panelp)
+ {
mPanels.push_back(panelp);
- }
+ }
return LLView::addChild(child, tab_group);
- }
+}
S32 LLLayoutStack::getDefaultHeight(S32 cur_height)
@@ -281,9 +290,9 @@ bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_dimp
{
LLLayoutPanel* panel = findEmbeddedPanelByName(panel_name);
- if (panel)
+ if (panel && min_dimp)
{
- if (min_dimp) *min_dimp = panel->mMinDim;
+ *min_dimp = panel->getRelevantMinDim();
}
return NULL != panel;
@@ -316,23 +325,23 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
e_panel_list_t::iterator panel_it;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
- LLPanel* panelp = (*panel_it);
+ LLLayoutPanel* panelp = (*panel_it);
if (panelp->getVisible())
{
if (mAnimate)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
- if ((*panel_it)->mVisibleAmt > 0.99f)
+ panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
+ if (panelp->mVisibleAmt > 0.99f)
{
- (*panel_it)->mVisibleAmt = 1.f;
+ panelp->mVisibleAmt = 1.f;
}
}
}
else
{
- (*panel_it)->mVisibleAmt = 1.f;
+ panelp->mVisibleAmt = 1.f;
}
}
else // not visible
@@ -341,36 +350,36 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
- if ((*panel_it)->mVisibleAmt < 0.001f)
+ panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ if (panelp->mVisibleAmt < 0.001f)
{
- (*panel_it)->mVisibleAmt = 0.f;
+ panelp->mVisibleAmt = 0.f;
}
}
}
else
{
- (*panel_it)->mVisibleAmt = 0.f;
+ panelp->mVisibleAmt = 0.f;
}
}
- if ((*panel_it)->mCollapsed)
+ if (panelp->mCollapsed)
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
else
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
if (mOrientation == HORIZONTAL)
{
// enforce minimize size constraint by default
- if (panelp->getRect().getWidth() < (*panel_it)->mMinDim)
+ if (panelp->getRect().getWidth() < panelp->getRelevantMinDim())
{
- panelp->reshape((*panel_it)->mMinDim, panelp->getRect().getHeight());
+ panelp->reshape(panelp->getRelevantMinDim(), panelp->getRect().getHeight());
}
- total_width += llround(panelp->getRect().getWidth() * (*panel_it)->getCollapseFactor(mOrientation));
+ total_width += llround(panelp->getRect().getWidth() * panelp->getCollapseFactor(mOrientation));
// want n-1 panel gaps for n panels
if (panel_it != mPanels.begin())
{
@@ -380,11 +389,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
else //VERTICAL
{
// enforce minimize size constraint by default
- if (panelp->getRect().getHeight() < (*panel_it)->mMinDim)
+ if (panelp->getRect().getHeight() < panelp->getRelevantMinDim())
{
- panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinDim);
+ panelp->reshape(panelp->getRect().getWidth(), panelp->getRelevantMinDim());
}
- total_height += llround(panelp->getRect().getHeight() * (*panel_it)->getCollapseFactor(mOrientation));
+ total_height += llround(panelp->getRect().getHeight() * panelp->getCollapseFactor(mOrientation));
if (panel_it != mPanels.begin())
{
total_height += mPanelSpacing;
@@ -403,34 +412,23 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
continue;
}
+ S32 relevant_dimension = (mOrientation == HORIZONTAL) ? (*panel_it)->getRect().getWidth() : (*panel_it)->getRect().getHeight();
+ S32 relevant_min = (*panel_it)->getRelevantMinDim();
+
// if currently resizing a panel or the panel is flagged as not automatically resizing
// only track total available headroom, but don't use it for automatic resize logic
if ((*panel_it)->mResizeBar->hasMouseCapture()
|| (!(*panel_it)->mAutoResize
&& !force_resize))
{
- if (mOrientation == HORIZONTAL)
- {
- shrink_headroom_total += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim;
- }
- else //VERTICAL
- {
- shrink_headroom_total += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim;
- }
+ shrink_headroom_total += relevant_dimension - relevant_min;
}
else
{
num_resizable_panels++;
- if (mOrientation == HORIZONTAL)
- {
- shrink_headroom_available += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim;
- shrink_headroom_total += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim;
- }
- else //VERTICAL
- {
- shrink_headroom_available += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim;
- shrink_headroom_total += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim;
- }
+
+ shrink_headroom_available += relevant_dimension - relevant_min;
+ shrink_headroom_total += relevant_dimension - relevant_min;
}
}
@@ -452,27 +450,28 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
- LLPanel* panelp = (*panel_it);
+ LLLayoutPanel* panelp = (*panel_it);
S32 cur_width = panelp->getRect().getWidth();
S32 cur_height = panelp->getRect().getHeight();
S32 new_width = cur_width;
- S32 new_height = cur_height;
+ S32 new_height = cur_height;
+ S32 relevant_min = panelp->getRelevantMinDim();
if (mOrientation == HORIZONTAL)
{
- new_width = llmax((*panel_it)->mMinDim, new_width);
+ new_width = llmax(relevant_min, new_width);
}
else
{
- new_height = llmax((*panel_it)->mMinDim, new_height);
+ new_height = llmax(relevant_min, new_height);
}
S32 delta_size = 0;
// if panel can automatically resize (not animating, and resize flag set)...
- if ((*panel_it)->getCollapseFactor(mOrientation) == 1.f
- && (force_resize || (*panel_it)->mAutoResize)
- && !(*panel_it)->mResizeBar->hasMouseCapture())
+ if (panelp->getCollapseFactor(mOrientation) == 1.f
+ && (force_resize || panelp->mAutoResize)
+ && !panelp->mResizeBar->hasMouseCapture())
{
if (mOrientation == HORIZONTAL)
{
@@ -481,8 +480,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
// shrink proportionally to amount over minimum
// so we can do this in one pass
- delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinDim) / (F32)shrink_headroom_available)) : 0;
- shrink_headroom_available -= (cur_width - (*panel_it)->mMinDim);
+ delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - relevant_min) / (F32)shrink_headroom_available)) : 0;
+ shrink_headroom_available -= (cur_width - relevant_min);
}
else
{
@@ -491,7 +490,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
num_resizable_panels--;
}
pixels_to_distribute -= delta_size;
- new_width = llmax((*panel_it)->mMinDim, cur_width + delta_size);
+ new_width = llmax(relevant_min, cur_width + delta_size);
}
else
{
@@ -504,8 +503,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
// shrink proportionally to amount over minimum
// so we can do this in one pass
- delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinDim) / (F32)shrink_headroom_available)) : 0;
- shrink_headroom_available -= (cur_height - (*panel_it)->mMinDim);
+ delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - relevant_min) / (F32)shrink_headroom_available)) : 0;
+ shrink_headroom_available -= (cur_height - relevant_min);
}
else
{
@@ -513,7 +512,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
num_resizable_panels--;
}
pixels_to_distribute -= delta_size;
- new_height = llmax((*panel_it)->mMinDim, cur_height + delta_size);
+ new_height = llmax(relevant_min, cur_height + delta_size);
}
else
{
@@ -566,19 +565,20 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
LLLayoutPanel* last_resizeable_panel = NULL;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
- LLPanel* panelp = (*panel_it);
+ LLLayoutPanel* panelp = (*panel_it);
+ S32 relevant_min = panelp->getRelevantMinDim();
if (mOrientation == HORIZONTAL)
{
(*panel_it)->mResizeBar->setResizeLimits(
- (*panel_it)->mMinDim,
- (*panel_it)->mMinDim + shrink_headroom_total);
+ relevant_min,
+ relevant_min + shrink_headroom_total);
}
else //VERTICAL
{
(*panel_it)->mResizeBar->setResizeLimits(
- (*panel_it)->mMinDim,
- (*panel_it)->mMinDim + shrink_headroom_total);
+ relevant_min,
+ relevant_min + shrink_headroom_total);
}
// toggle resize bars based on panel visibility, resizability, etc
@@ -658,7 +658,7 @@ void LLLayoutStack::calcMinExtents()
{
if (mOrientation == HORIZONTAL)
{
- mMinWidth += (*panel_it)->mMinDim;
+ mMinWidth += (*panel_it)->getRelevantMinDim();
if (panel_it != mPanels.begin())
{
mMinWidth += mPanelSpacing;
@@ -666,7 +666,7 @@ void LLLayoutStack::calcMinExtents()
}
else //VERTICAL
{
- mMinHeight += (*panel_it)->mMinDim;
+ mMinHeight += (*panel_it)->getRelevantMinDim();
if (panel_it != mPanels.begin())
{
mMinHeight += mPanelSpacing;
@@ -688,7 +688,7 @@ void LLLayoutStack::createResizeBars()
LLResizeBar::Params resize_params;
resize_params.name("resize");
resize_params.resizing_view(lp);
- resize_params.min_size(lp->mMinDim);
+ resize_params.min_size(lp->getRelevantMinDim());
resize_params.side(side);
resize_params.snapping_enabled(false);
LLResizeBar* resize_bar = LLUICtrlFactory::create<LLResizeBar>(resize_params);
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 4ac8ef0ee9..d8ef0aeaca 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -30,10 +30,10 @@
#include "llpanel.h"
-class LLPanel;
class LLLayoutPanel;
+
class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
{
public:
@@ -149,6 +149,7 @@ private:
F32 mCloseTimeConstant;
}; // end class LLLayoutStack
+
class LLLayoutPanel : public LLPanel
{
friend class LLLayoutStack;
@@ -156,13 +157,15 @@ friend class LLUICtrlFactory;
public:
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
{
- Optional<S32> min_dim,
+ Optional<S32> expanded_min_dim,
+ min_dim,
max_dim;
Optional<bool> user_resize,
auto_resize;
Params()
- : min_dim("min_dim", 0),
+ : expanded_min_dim("expanded_min_dim", 0),
+ min_dim("min_dim", 0),
max_dim("max_dim", 0),
user_resize("user_resize", true),
auto_resize("auto_resize", true)
@@ -177,15 +180,36 @@ public:
~LLLayoutPanel();
void initFromParams(const Params& p);
- void setMinDim(S32 value) { mMinDim = value; }
+
+ S32 getMinDim() const { return mMinDim; }
+ void setMinDim(S32 value) { mMinDim = value; if (!mExpandedMinDimSpecified) mExpandedMinDim = value; }
+
+ S32 getMaxDim() const { return mMaxDim; }
void setMaxDim(S32 value) { mMaxDim = value; }
-protected:
- LLLayoutPanel(const Params& p) ;
+ S32 getExpandedMinDim() const { return mExpandedMinDim; }
+ void setExpandedMinDim(S32 value) { mExpandedMinDim = value; mExpandedMinDimSpecified = true; }
+
+ S32 getRelevantMinDim() const
+ {
+ S32 min_dim = mMinDim;
+
+ if (!mCollapsed)
+ {
+ min_dim = mExpandedMinDim;
+ }
+
+ return min_dim;
+ }
+protected:
+ LLLayoutPanel(const Params& p);
F32 getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation);
+ bool mExpandedMinDimSpecified;
+ S32 mExpandedMinDim;
+
S32 mMinDim;
S32 mMaxDim;
BOOL mAutoResize;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 0196080d90..123997e5e9 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -81,6 +81,7 @@ LLLineEditor::Params::Params()
: max_length(""),
keystroke_callback("keystroke_callback"),
prevalidate_callback("prevalidate_callback"),
+ prevalidate_input_callback("prevalidate_input_callback"),
background_image("background_image"),
background_image_disabled("background_image_disabled"),
background_image_focused("background_image_focused"),
@@ -173,6 +174,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
updateTextPadding();
setCursor(mText.length());
+ setPrevalidateInput(p.prevalidate_input_callback());
setPrevalidate(p.prevalidate_callback());
LLContextMenu* menu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>
@@ -405,23 +407,15 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
// Picks a new cursor position based on the actual screen size of text being drawn.
void LLLineEditor::setCursorAtLocalPos( S32 local_mouse_x )
{
- const llwchar* wtext = mText.getWString().c_str();
- LLWString asterix_text;
- if (mDrawAsterixes)
- {
- for (S32 i = 0; i < mText.length(); i++)
- {
- asterix_text += utf8str_to_wstring(PASSWORD_ASTERISK);
- }
- wtext = asterix_text.c_str();
- }
+ S32 cursor_pos = calcCursorPos(local_mouse_x);
+
+ S32 left_pos = llmin( mSelectionStart, cursor_pos );
+ S32 length = llabs( mSelectionStart - cursor_pos );
+ const LLWString& substr = mText.getWString().substr(left_pos, length);
+
+ if (mIsSelecting && !prevalidateInput(substr))
+ return;
- S32 cursor_pos =
- mScrollHPos +
- mGLFont->charFromPixelOffset(
- wtext, mScrollHPos,
- (F32)(local_mouse_x - mTextLeftEdge),
- (F32)(mTextRightEdge - mTextLeftEdge + 1)); // min-max range is inclusive
setCursor(cursor_pos);
}
@@ -505,6 +499,11 @@ BOOL LLLineEditor::canSelectAll() const
void LLLineEditor::selectAll()
{
+ if (!prevalidateInput(mText.getWString()))
+ {
+ return;
+ }
+
mSelectionStart = mText.length();
mSelectionEnd = 0;
setCursor(mSelectionEnd);
@@ -590,6 +589,9 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
if (mask & MASK_SHIFT)
{
+ // assume we're starting a drag select
+ mIsSelecting = TRUE;
+
// Handle selection extension
S32 old_cursor_pos = getCursor();
setCursorAtLocalPos(x);
@@ -624,8 +626,6 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
mSelectionStart = old_cursor_pos;
mSelectionEnd = getCursor();
}
- // assume we're starting a drag select
- mIsSelecting = TRUE;
}
else
{
@@ -796,6 +796,9 @@ void LLLineEditor::removeChar()
{
if( getCursor() > 0 )
{
+ if (!prevalidateInput(mText.getWString().substr(getCursor()-1, 1)))
+ return;
+
mText.erase(getCursor() - 1, 1);
setCursor(getCursor() - 1);
@@ -816,6 +819,9 @@ void LLLineEditor::addChar(const llwchar uni_char)
}
else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode())
{
+ if (!prevalidateInput(mText.getWString().substr(getCursor(), 1)))
+ return;
+
mText.erase(getCursor(), 1);
}
@@ -864,6 +870,13 @@ void LLLineEditor::extendSelection( S32 new_cursor_pos )
startSelection();
}
+ S32 left_pos = llmin( mSelectionStart, new_cursor_pos );
+ S32 selection_length = llabs( mSelectionStart - new_cursor_pos );
+ const LLWString& selection = mText.getWString().substr(left_pos, selection_length);
+
+ if (!prevalidateInput(selection))
+ return;
+
setCursor(new_cursor_pos);
mSelectionEnd = getCursor();
}
@@ -994,8 +1007,12 @@ void LLLineEditor::deleteSelection()
{
if( !mReadOnly && hasSelection() )
{
- S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
- S32 selection_length = llabs( mSelectionStart - mSelectionEnd );
+ S32 left_pos, selection_length;
+ getSelectionRange(&left_pos, &selection_length);
+ const LLWString& selection = mText.getWString().substr(left_pos, selection_length);
+
+ if (!prevalidateInput(selection))
+ return;
mText.erase(left_pos, selection_length);
deselect();
@@ -1013,12 +1030,16 @@ void LLLineEditor::cut()
{
if( canCut() )
{
+ S32 left_pos, length;
+ getSelectionRange(&left_pos, &length);
+ const LLWString& selection = mText.getWString().substr(left_pos, length);
+
+ if (!prevalidateInput(selection))
+ return;
+
// Prepare for possible rollback
LLLineEditorRollback rollback( this );
-
- S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
- S32 length = llabs( mSelectionStart - mSelectionEnd );
gClipboard.copyFromSubstring( mText.getWString(), left_pos, length );
deleteSelection();
@@ -1098,6 +1119,9 @@ void LLLineEditor::pasteHelper(bool is_primary)
if (!paste.empty())
{
+ if (!prevalidateInput(paste))
+ return;
+
// Prepare for possible rollback
LLLineEditorRollback rollback(this);
@@ -1445,6 +1469,13 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
LLLineEditorRollback rollback( this );
+ {
+ LLWString u_char;
+ u_char.assign(1, uni_char);
+ if (!prevalidateInput(u_char))
+ return handled;
+ }
+
addChar(uni_char);
mKeystrokeTimer.reset();
@@ -1496,6 +1527,15 @@ void LLLineEditor::doDelete()
}
else if ( getCursor() < mText.length())
{
+ const LLWString& text_to_delete = mText.getWString().substr(getCursor(), 1);
+
+ if (!prevalidateInput(text_to_delete))
+ {
+ if( mKeystrokeCallback )
+ mKeystrokeCallback( this );
+
+ return;
+ }
setCursor(getCursor() + 1);
removeChar();
}
@@ -1843,6 +1883,27 @@ S32 LLLineEditor::findPixelNearestPos(const S32 cursor_offset) const
return result;
}
+S32 LLLineEditor::calcCursorPos(S32 mouse_x)
+{
+ const llwchar* wtext = mText.getWString().c_str();
+ LLWString asterix_text;
+ if (mDrawAsterixes)
+ {
+ for (S32 i = 0; i < mText.length(); i++)
+ {
+ asterix_text += utf8str_to_wstring(PASSWORD_ASTERISK);
+ }
+ wtext = asterix_text.c_str();
+ }
+
+ S32 cur_pos = mScrollHPos +
+ mGLFont->charFromPixelOffset(
+ wtext, mScrollHPos,
+ (F32)(mouse_x - mTextLeftEdge),
+ (F32)(mTextRightEdge - mTextLeftEdge + 1)); // min-max range is inclusive
+
+ return cur_pos;
+}
//virtual
void LLLineEditor::clear()
{
@@ -1936,6 +1997,22 @@ void LLLineEditor::setPrevalidate(LLTextValidate::validate_func_t func)
updateAllowingLanguageInput();
}
+void LLLineEditor::setPrevalidateInput(LLTextValidate::validate_func_t func)
+{
+ mPrevalidateInputFunc = func;
+ updateAllowingLanguageInput();
+}
+
+bool LLLineEditor::prevalidateInput(const LLWString& wstr)
+{
+ if (mPrevalidateInputFunc && !mPrevalidateInputFunc(wstr))
+ {
+ return false;
+ }
+
+ return true;
+}
+
// static
BOOL LLLineEditor::postvalidateFloat(const std::string &str)
{
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index fe191e5971..4b77708590 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -76,6 +76,7 @@ public:
Optional<keystroke_callback_t> keystroke_callback;
Optional<LLTextValidate::validate_func_t, LLTextValidate::ValidateTextNamedFuncs> prevalidate_callback;
+ Optional<LLTextValidate::validate_func_t, LLTextValidate::ValidateTextNamedFuncs> prevalidate_input_callback;
Optional<LLViewBorder::Params> border;
@@ -232,8 +233,15 @@ public:
// Prevalidation controls which keystrokes can affect the editor
void setPrevalidate( LLTextValidate::validate_func_t func );
+ // This method sets callback that prevents from:
+ // - deleting, selecting, typing, cutting, pasting characters that are not valid.
+ // Also callback that this method sets differs from setPrevalidate in a way that it validates just inputed
+ // symbols, before existing text is modified, but setPrevalidate validates line after it was modified.
+ void setPrevalidateInput(LLTextValidate::validate_func_t func);
static BOOL postvalidateFloat(const std::string &str);
+ bool prevalidateInput(const LLWString& wstr);
+
// line history support:
void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off
void updateHistory(); // stores current line in history
@@ -251,6 +259,7 @@ private:
void addChar(const llwchar c);
void setCursorAtLocalPos(S32 local_mouse_x);
S32 findPixelNearestPos(S32 cursor_offset = 0) const;
+ S32 calcCursorPos(S32 mouse_x);
BOOL handleSpecialKey(KEY key, MASK mask);
BOOL handleSelectionKey(KEY key, MASK mask);
BOOL handleControlKey(KEY key, MASK mask);
@@ -312,6 +321,7 @@ protected:
S32 mLastSelectionEnd;
LLTextValidate::validate_func_t mPrevalidateFunc;
+ LLTextValidate::validate_func_t mPrevalidateInputFunc;
LLFrameTimer mKeystrokeTimer;
LLTimer mTripleClickTimer;
diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h
index 4c47cc267c..7c44478848 100644
--- a/indra/llui/llloadingindicator.h
+++ b/indra/llui/llloadingindicator.h
@@ -86,6 +86,8 @@ public:
*/
void start();
+ void reset() { mCurImageIdx = 0; }
+
private:
LLLoadingIndicator(const Params&);
void initFromParams(const Params&);
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index f744e9db41..9052bc7d1d 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -511,7 +511,7 @@ void LLMultiSlider::draw()
mIt->second.mTop + extra_triangle_height,
mIt->second.mLeft + mIt->second.getWidth() / 2,
mIt->second.mBottom - extra_triangle_height,
- mTriangleColor.get(), TRUE);
+ mTriangleColor.get() % opacity, TRUE);
}
}
else if (!thumb_imagep)
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index b2383106a8..1dcdd79efa 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -87,7 +87,8 @@ LLPanel::Params::Params()
filename("filename"),
class_name("class"),
help_topic("help_topic"),
- visible_callback("visible_callback")
+ visible_callback("visible_callback"),
+ accepts_badge("accepts_badge")
{
name = "panel";
addSynonym(background_visible, "bg_visible");
@@ -113,7 +114,8 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mXMLFilename(p.filename),
- mVisibleSignal(NULL)
+ mVisibleSignal(NULL),
+ mAcceptsBadge(p.accepts_badge)
// *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
// many classes derived from LLPanel to retrofit them all to pass in params.
{
@@ -485,6 +487,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
mBgAlphaImage = p.bg_alpha_image();
mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
mBgAlphaImageOverlay = p.bg_alpha_image_overlay;
+
+ mAcceptsBadge = p.accepts_badge;
}
static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup");
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 7bbbeaf709..67674fab7e 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -89,6 +89,8 @@ public:
Multiple<LocalizedString> strings;
Optional<CommitCallbackParam> visible_callback;
+
+ Optional<bool> accepts_badge;
Params();
};
@@ -250,6 +252,8 @@ public:
boost::signals2::connection setVisibleCallback( const commit_signal_t::slot_type& cb );
+ bool acceptsBadge() const { return mAcceptsBadge; }
+
protected:
// Override to set not found list
LLButton* getDefaultButton() { return mDefaultBtn; }
@@ -264,6 +268,7 @@ protected:
static factory_stack_t sFactoryStack;
private:
+ bool mAcceptsBadge;
BOOL mBgVisible; // any background at all?
BOOL mBgOpaque; // use opaque color or image
LLUIColor mBgOpaqueColor;
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index 39385786bc..820e7cb26a 100644
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -337,7 +337,7 @@ LLLocale::LLLocale(const std::string& locale_string)
char* new_locale_string = setlocale( LC_ALL, locale_string.c_str());
if ( new_locale_string == NULL)
{
- llwarns << "Failed to set locale " << locale_string << llendl;
+ LL_WARNS_ONCE("LLLocale") << "Failed to set locale " << locale_string << LL_ENDL;
setlocale(LC_ALL, SYSTEM_LOCALE.c_str());
}
//else
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 6b4e9cf923..15a7438ec9 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -52,6 +52,7 @@ LLSpinCtrl::Params::Params()
: label_width("label_width"),
decimal_digits("decimal_digits"),
allow_text_entry("allow_text_entry", true),
+ label_wrap("label_wrap", false),
text_enabled_color("text_enabled_color"),
text_disabled_color("text_disabled_color"),
up_button("up_button"),
@@ -80,6 +81,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
{
LLRect label_rect( 0, centered_top, label_width, centered_bottom );
LLTextBox::Params params;
+ params.wrap(p.label_wrap);
params.name("SpinCtrl Label");
params.rect(label_rect);
params.initial_value(p.label());
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index 8960971594..d197084e38 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -44,6 +44,7 @@ public:
Optional<S32> label_width;
Optional<U32> decimal_digits;
Optional<bool> allow_text_entry;
+ Optional<bool> label_wrap;
Optional<LLUIColor> text_enabled_color;
Optional<LLUIColor> text_disabled_color;
diff --git a/indra/llui/lltextvalidate.cpp b/indra/llui/lltextvalidate.cpp
index 4b9faa0560..234e600ccd 100644
--- a/indra/llui/lltextvalidate.cpp
+++ b/indra/llui/lltextvalidate.cpp
@@ -188,6 +188,39 @@ namespace LLTextValidate
return success;
}
+ bool validateNonNegativeS32NoSpace(const LLWString &str)
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+
+ LLWString test_str = str;
+ S32 len = test_str.length();
+ bool success = TRUE;
+ if(0 < len)
+ {
+ if('-' == test_str[0])
+ {
+ success = FALSE;
+ }
+ S32 i = 0;
+ while(success && (i < len))
+ {
+ if(!LLStringOps::isDigit(test_str[i]) || LLStringOps::isSpace(test_str[i++]))
+ {
+ success = FALSE;
+ }
+ }
+ }
+ if (success)
+ {
+ S32 val = strtol(wstring_to_utf8str(test_str).c_str(), NULL, 10);
+ if (val < 0)
+ {
+ success = FALSE;
+ }
+ }
+ return success;
+ }
+
bool validateAlphaNum(const LLWString &str)
{
LLLocale locale(LLLocale::USER_LOCALE);
diff --git a/indra/llui/lltextvalidate.h b/indra/llui/lltextvalidate.h
index 84644be30c..5c830d7db3 100644
--- a/indra/llui/lltextvalidate.h
+++ b/indra/llui/lltextvalidate.h
@@ -46,6 +46,7 @@ namespace LLTextValidate
bool validateInt(const LLWString &str );
bool validatePositiveS32(const LLWString &str);
bool validateNonNegativeS32(const LLWString &str);
+ bool validateNonNegativeS32NoSpace(const LLWString &str);
bool validateAlphaNum(const LLWString &str );
bool validateAlphaNumSpace(const LLWString &str );
bool validateASCIIPrintableNoPipe(const LLWString &str);
diff --git a/indra/llui/lltimectrl.cpp b/indra/llui/lltimectrl.cpp
new file mode 100644
index 0000000000..9ea1e8815e
--- /dev/null
+++ b/indra/llui/lltimectrl.cpp
@@ -0,0 +1,432 @@
+/**
+ * @file lltimectrl.cpp
+ * @brief LLTimeCtrl base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "lltimectrl.h"
+
+#include "llui.h"
+#include "lluiconstants.h"
+
+#include "llbutton.h"
+#include "llfontgl.h"
+#include "lllineeditor.h"
+#include "llkeyboard.h"
+#include "llstring.h"
+#include "lltextbox.h"
+#include "lluictrlfactory.h"
+
+static LLDefaultChildRegistry::Register<LLTimeCtrl> time_r("time");
+
+const U32 AMPM_LEN = 3;
+const U32 MINUTES_MIN = 0;
+const U32 MINUTES_MAX = 59;
+const U32 HOURS_MIN = 1;
+const U32 HOURS_MAX = 12;
+const U32 MINUTES_PER_HOUR = 60;
+const U32 MINUTES_PER_DAY = 24 * MINUTES_PER_HOUR;
+
+
+LLTimeCtrl::Params::Params()
+: label_width("label_width"),
+ snap_to("snap_to"),
+ allow_text_entry("allow_text_entry", true),
+ text_enabled_color("text_enabled_color"),
+ text_disabled_color("text_disabled_color"),
+ up_button("up_button"),
+ down_button("down_button")
+{}
+
+LLTimeCtrl::LLTimeCtrl(const LLTimeCtrl::Params& p)
+: LLUICtrl(p),
+ mLabelBox(NULL),
+ mTextEnabledColor(p.text_enabled_color()),
+ mTextDisabledColor(p.text_disabled_color()),
+ mTime(0),
+ mSnapToMin(5)
+{
+ static LLUICachedControl<S32> spinctrl_spacing ("UISpinctrlSpacing", 0);
+ static LLUICachedControl<S32> spinctrl_btn_width ("UISpinctrlBtnWidth", 0);
+ static LLUICachedControl<S32> spinctrl_btn_height ("UISpinctrlBtnHeight", 0);
+ S32 centered_top = getRect().getHeight();
+ S32 centered_bottom = getRect().getHeight() - 2 * spinctrl_btn_height;
+ S32 label_width = llclamp(p.label_width(), 0, llmax(0, getRect().getWidth() - 40));
+ S32 editor_left = label_width + spinctrl_spacing;
+
+ //================= Label =================//
+ if( !p.label().empty() )
+ {
+ LLRect label_rect( 0, centered_top, label_width, centered_bottom );
+ LLTextBox::Params params;
+ params.name("TimeCtrl Label");
+ params.rect(label_rect);
+ params.initial_value(p.label());
+ if (p.font.isProvided())
+ {
+ params.font(p.font);
+ }
+ mLabelBox = LLUICtrlFactory::create<LLTextBox> (params);
+ addChild(mLabelBox);
+
+ editor_left = label_rect.mRight + spinctrl_spacing;
+ }
+
+ S32 editor_right = getRect().getWidth() - spinctrl_btn_width - spinctrl_spacing;
+
+ //================= Editor ================//
+ LLRect editor_rect( editor_left, centered_top, editor_right, centered_bottom );
+ LLLineEditor::Params params;
+ params.name("SpinCtrl Editor");
+ params.rect(editor_rect);
+ if (p.font.isProvided())
+ {
+ params.font(p.font);
+ }
+
+ params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+ params.max_length.chars(8);
+ params.keystroke_callback(boost::bind(&LLTimeCtrl::onTextEntry, this, _1));
+ mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
+ mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace);
+ mEditor->setPrevalidate(boost::bind(&LLTimeCtrl::isTimeStringValid, this, _1));
+ mEditor->setText(LLStringExplicit("12:00 AM"));
+ addChild(mEditor);
+
+ //================= Spin Buttons ==========//
+ LLButton::Params up_button_params(p.up_button);
+ up_button_params.rect = LLRect(editor_right + 1, getRect().getHeight(), editor_right + spinctrl_btn_width, getRect().getHeight() - spinctrl_btn_height);
+
+ up_button_params.click_callback.function(boost::bind(&LLTimeCtrl::onUpBtn, this));
+ up_button_params.mouse_held_callback.function(boost::bind(&LLTimeCtrl::onUpBtn, this));
+ mUpBtn = LLUICtrlFactory::create<LLButton>(up_button_params);
+ addChild(mUpBtn);
+
+ LLButton::Params down_button_params(p.down_button);
+ down_button_params.rect = LLRect(editor_right + 1, getRect().getHeight() - spinctrl_btn_height, editor_right + spinctrl_btn_width, getRect().getHeight() - 2 * spinctrl_btn_height);
+ down_button_params.click_callback.function(boost::bind(&LLTimeCtrl::onDownBtn, this));
+ down_button_params.mouse_held_callback.function(boost::bind(&LLTimeCtrl::onDownBtn, this));
+ mDownBtn = LLUICtrlFactory::create<LLButton>(down_button_params);
+ addChild(mDownBtn);
+
+ setUseBoundingRect( TRUE );
+}
+
+F32 LLTimeCtrl::getTime24() const
+{
+ // 0.0 - 23.99;
+ return mTime / 60.0f;
+}
+
+U32 LLTimeCtrl::getHours24() const
+{
+ return (U32) getTime24();
+}
+
+U32 LLTimeCtrl::getMinutes() const
+{
+ return mTime % MINUTES_PER_HOUR;
+}
+
+void LLTimeCtrl::setTime24(F32 time)
+{
+ time = llclamp(time, 0.0f, 23.99f); // fix out of range values
+ mTime = llround(time * MINUTES_PER_HOUR); // fixes values like 4.99999
+
+ updateText();
+}
+
+BOOL LLTimeCtrl::handleKeyHere(KEY key, MASK mask)
+{
+ if (mEditor->hasFocus())
+ {
+ if(key == KEY_UP)
+ {
+ onUpBtn();
+ return TRUE;
+ }
+ if(key == KEY_DOWN)
+ {
+ onDownBtn();
+ return TRUE;
+ }
+ if (key == KEY_RETURN)
+ {
+ onCommit();
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void LLTimeCtrl::onUpBtn()
+{
+ switch(getEditingPart())
+ {
+ case HOURS:
+ increaseHours();
+ break;
+ case MINUTES:
+ increaseMinutes();
+ break;
+ case DAYPART:
+ switchDayPeriod();
+ break;
+ default:
+ break;
+ }
+
+ updateText();
+ onCommit();
+}
+
+void LLTimeCtrl::onDownBtn()
+{
+ switch(getEditingPart())
+ {
+ case HOURS:
+ decreaseHours();
+ break;
+ case MINUTES:
+ decreaseMinutes();
+ break;
+ case DAYPART:
+ switchDayPeriod();
+ break;
+ default:
+ break;
+ }
+
+ updateText();
+ onCommit();
+}
+
+void LLTimeCtrl::onFocusLost()
+{
+ updateText();
+ onCommit();
+ LLUICtrl::onFocusLost();
+}
+
+void LLTimeCtrl::onTextEntry(LLLineEditor* line_editor)
+{
+ std::string time_str = line_editor->getText();
+ U32 h12 = parseHours(getHoursString(time_str));
+ U32 m = parseMinutes(getMinutesString(time_str));
+ bool pm = parseAMPM(getAMPMString(time_str));
+
+ if (h12 == 12)
+ {
+ h12 = 0;
+ }
+
+ U32 h24 = pm ? h12 + 12 : h12;
+
+ mTime = h24 * MINUTES_PER_HOUR + m;
+}
+
+bool LLTimeCtrl::isTimeStringValid(const LLWString &wstr)
+{
+ std::string str = wstring_to_utf8str(wstr);
+
+ return isHoursStringValid(getHoursString(str)) &&
+ isMinutesStringValid(getMinutesString(str)) &&
+ isPMAMStringValid(getAMPMString(str));
+}
+
+void LLTimeCtrl::increaseMinutes()
+{
+ mTime = (mTime + mSnapToMin) % MINUTES_PER_DAY - (mTime % mSnapToMin);
+}
+
+void LLTimeCtrl::increaseHours()
+{
+ mTime = (mTime + MINUTES_PER_HOUR) % MINUTES_PER_DAY;
+}
+
+void LLTimeCtrl::decreaseMinutes()
+{
+ if (mTime < mSnapToMin)
+ {
+ mTime = MINUTES_PER_DAY - mTime;
+ }
+
+ mTime -= (mTime % mSnapToMin) ? mTime % mSnapToMin : mSnapToMin;
+}
+
+void LLTimeCtrl::decreaseHours()
+{
+ if (mTime < MINUTES_PER_HOUR)
+ {
+ mTime = 23 * MINUTES_PER_HOUR + mTime;
+ }
+ else
+ {
+ mTime -= MINUTES_PER_HOUR;
+ }
+}
+
+bool LLTimeCtrl::isPM() const
+{
+ return mTime >= (MINUTES_PER_DAY / 2);
+}
+
+void LLTimeCtrl::switchDayPeriod()
+{
+ if (isPM())
+ {
+ mTime -= MINUTES_PER_DAY / 2;
+ }
+ else
+ {
+ mTime += MINUTES_PER_DAY / 2;
+ }
+}
+
+void LLTimeCtrl::updateText()
+{
+ U32 h24 = getHours24();
+ U32 m = getMinutes();
+ U32 h12 = h24 > 12 ? h24 - 12 : h24;
+
+ if (h12 == 0)
+ h12 = 12;
+
+ mEditor->setText(llformat("%d:%02d %s", h12, m, isPM() ? "PM":"AM"));
+}
+
+LLTimeCtrl::EEditingPart LLTimeCtrl::getEditingPart()
+{
+ S32 cur_pos = mEditor->getCursor();
+ std::string time_str = mEditor->getText();
+
+ S32 colon_index = time_str.find_first_of(':');
+
+ if (cur_pos <= colon_index)
+ {
+ return HOURS;
+ }
+ else if (cur_pos > colon_index && cur_pos <= (S32)(time_str.length() - AMPM_LEN))
+ {
+ return MINUTES;
+ }
+ else if (cur_pos > (S32)(time_str.length() - AMPM_LEN))
+ {
+ return DAYPART;
+ }
+
+ return NONE;
+}
+
+// static
+std::string LLTimeCtrl::getHoursString(const std::string& str)
+{
+ size_t colon_index = str.find_first_of(':');
+ std::string hours_str = str.substr(0, colon_index);
+
+ return hours_str;
+}
+
+// static
+std::string LLTimeCtrl::getMinutesString(const std::string& str)
+{
+ size_t colon_index = str.find_first_of(':');
+ ++colon_index;
+
+ int minutes_len = str.length() - colon_index - AMPM_LEN;
+ std::string minutes_str = str.substr(colon_index, minutes_len);
+
+ return minutes_str;
+}
+
+// static
+std::string LLTimeCtrl::getAMPMString(const std::string& str)
+{
+ return str.substr(str.size() - 2, 2); // returns last two characters
+}
+
+// static
+bool LLTimeCtrl::isHoursStringValid(const std::string& str)
+{
+ U32 hours;
+ if ((!LLStringUtil::convertToU32(str, hours) || (hours <= HOURS_MAX)) && str.length() < 3)
+ return true;
+
+ return false;
+}
+
+// static
+bool LLTimeCtrl::isMinutesStringValid(const std::string& str)
+{
+ U32 minutes;
+ if (!LLStringUtil::convertToU32(str, minutes) || (minutes <= MINUTES_MAX) && str.length() < 3)
+ return true;
+
+ return false;
+}
+
+// static
+bool LLTimeCtrl::isPMAMStringValid(const std::string& str)
+{
+ S32 len = str.length();
+
+ bool valid = (str[--len] == 'M') && (str[--len] == 'P' || str[len] == 'A');
+
+ return valid;
+}
+
+// static
+U32 LLTimeCtrl::parseHours(const std::string& str)
+{
+ U32 hours;
+ if (LLStringUtil::convertToU32(str, hours) && (hours >= HOURS_MIN) && (hours <= HOURS_MAX))
+ {
+ return hours;
+ }
+ else
+ {
+ return HOURS_MIN;
+ }
+}
+
+// static
+U32 LLTimeCtrl::parseMinutes(const std::string& str)
+{
+ U32 minutes;
+ if (LLStringUtil::convertToU32(str, minutes) && (minutes >= MINUTES_MIN) && (minutes <= MINUTES_MAX))
+ {
+ return minutes;
+ }
+ else
+ {
+ return MINUTES_MIN;
+ }
+}
+
+// static
+bool LLTimeCtrl::parseAMPM(const std::string& str)
+{
+ return str == "PM";
+}
diff --git a/indra/llui/lltimectrl.h b/indra/llui/lltimectrl.h
new file mode 100644
index 0000000000..b5f268c76a
--- /dev/null
+++ b/indra/llui/lltimectrl.h
@@ -0,0 +1,131 @@
+/**
+ * @file lltimectrl.h
+ * @brief Time control
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LLTIMECTRL_H_
+#define LLTIMECTRL_H_
+
+#include "stdtypes.h"
+#include "llbutton.h"
+#include "v4color.h"
+#include "llrect.h"
+
+class LLLineEditor;
+
+class LLTimeCtrl
+: public LLUICtrl
+{
+ LOG_CLASS(LLTimeCtrl);
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<S32> label_width;
+ Optional<S32> snap_to;
+ Optional<bool> allow_text_entry;
+
+ Optional<LLUIColor> text_enabled_color;
+ Optional<LLUIColor> text_disabled_color;
+
+ Optional<LLButton::Params> up_button;
+ Optional<LLButton::Params> down_button;
+
+ Params();
+ };
+
+ F32 getTime24() const; // 0.0 - 24.0
+ U32 getHours24() const; // 0 - 23
+ U32 getMinutes() const; // 0 - 59
+
+ void setTime24(F32 time); // 0.0 - 23.98(3)
+
+protected:
+ LLTimeCtrl(const Params&);
+ friend class LLUICtrlFactory;
+
+private:
+
+ enum EDayPeriod
+ {
+ AM,
+ PM
+ };
+
+ enum EEditingPart
+ {
+ HOURS,
+ MINUTES,
+ DAYPART,
+ NONE
+ };
+
+ virtual void onFocusLost();
+ virtual BOOL handleKeyHere(KEY key, MASK mask);
+
+ void onUpBtn();
+ void onDownBtn();
+ void onTextEntry(LLLineEditor* line_editor);
+
+ bool isTimeStringValid(const LLWString& wstr);
+
+ void increaseMinutes();
+ void increaseHours();
+
+ void decreaseMinutes();
+ void decreaseHours();
+
+ bool isPM() const;
+ void switchDayPeriod();
+
+ void updateText();
+
+ EEditingPart getEditingPart();
+
+ static std::string getHoursString(const std::string& str);
+ static std::string getMinutesString(const std::string& str);
+ static std::string getAMPMString(const std::string& str);
+
+ static bool isHoursStringValid(const std::string& str);
+ static bool isMinutesStringValid(const std::string& str);
+ static bool isPMAMStringValid(const std::string& str);
+
+ static U32 parseHours(const std::string& str);
+ static U32 parseMinutes(const std::string& str);
+ static bool parseAMPM(const std::string& str);
+
+ class LLTextBox* mLabelBox;
+
+ class LLLineEditor* mEditor;
+ LLUIColor mTextEnabledColor;
+ LLUIColor mTextDisabledColor;
+
+ class LLButton* mUpBtn;
+ class LLButton* mDownBtn;
+
+ U32 mTime; // minutes since midnight: 0 - 1439
+ U32 mSnapToMin; // interval in minutes to snap to
+
+ BOOL mAllowEdit;
+};
+#endif /* LLTIMECTRL_H_ */
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 0a06b5e74f..d58df5801b 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -68,6 +68,7 @@ LLUICtrl::ControlVisibility::ControlVisibility()
LLUICtrl::Params::Params()
: tab_stop("tab_stop", true),
chrome("chrome", false),
+ requests_front("requests_front", false),
label("label"),
initial_value("value"),
init_callback("init_callback"),
@@ -96,9 +97,10 @@ const LLUICtrl::Params& LLUICtrl::getDefaultParams()
LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
: LLView(p),
- mTentative(FALSE),
mIsChrome(FALSE),
+ mRequestsFront(p.requests_front),
mTabStop(FALSE),
+ mTentative(FALSE),
mViewModel(viewmodel),
mControlVariable(NULL),
mEnabledControlVariable(NULL),
@@ -123,6 +125,8 @@ void LLUICtrl::initFromParams(const Params& p)
{
LLView::initFromParams(p);
+ mRequestsFront = p.requests_front;
+
setIsChrome(p.chrome);
setControlName(p.control_name);
if(p.enabled_controls.isProvided())
@@ -403,6 +407,36 @@ LLViewModel* LLUICtrl::getViewModel() const
return mViewModel;
}
+//virtual
+BOOL LLUICtrl::postBuild()
+{
+ //
+ // Find all of the children that want to be in front and move them to the front
+ //
+
+ if (getChildCount() > 0)
+ {
+ std::vector<LLUICtrl*> childrenToMoveToFront;
+
+ for (LLView::child_list_const_iter_t child_it = beginChild(); child_it != endChild(); ++child_it)
+ {
+ LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(*child_it);
+
+ if (uictrl && uictrl->mRequestsFront)
+ {
+ childrenToMoveToFront.push_back(uictrl);
+ }
+ }
+
+ for (std::vector<LLUICtrl*>::iterator it = childrenToMoveToFront.begin(); it != childrenToMoveToFront.end(); ++it)
+ {
+ sendChildToFront(*it);
+ }
+ }
+
+ return LLView::postBuild();
+}
+
bool LLUICtrl::setControlValue(const LLSD& value)
{
if (mControlVariable)
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index b37e9f6b1b..09bed9b958 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -94,7 +94,8 @@ public:
{
Optional<std::string> label;
Optional<bool> tab_stop,
- chrome;
+ chrome,
+ requests_front;
Optional<LLSD> initial_value;
Optional<CommitCallbackParam> init_callback,
@@ -143,6 +144,8 @@ protected:
virtual LLViewModel* getViewModel() const;
// We shouldn't ever need to set this directly
//virtual void setViewModel(const LLViewModelPtr&);
+
+ virtual BOOL postBuild();
public:
// LLView interface
@@ -301,8 +304,9 @@ protected:
private:
- BOOL mTabStop;
BOOL mIsChrome;
+ BOOL mRequestsFront;
+ BOOL mTabStop;
BOOL mTentative;
LLRootHandle<LLUICtrl> mUICtrlHandle;
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 245126d178..8803d106ba 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1299,15 +1299,7 @@ void LLView::drawChildren()
{
if (!mChildList.empty())
{
- static const LLRect* rootRect = NULL;
-
- if (!mParentView)
- {
- rootRect = &mRect;
- }
-
- LLRect screenRect;
-
+ LLView* rootp = LLUI::getRootView();
++sDepth;
for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend();) // ++child_iter)
@@ -1317,9 +1309,8 @@ void LLView::drawChildren()
if (viewp->getVisible() && viewp->getRect().isValid())
{
- // Only draw views that are within the root view
- localRectToScreen(viewp->getRect(),&screenRect);
- if ( rootRect->overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect))
+ LLRect screen_rect = viewp->calcScreenRect();
+ if ( rootp->getLocalRect().overlaps(screen_rect) && LLUI::sDirtyRect.overlaps(screen_rect))
{
LLUI::pushMatrix();
{
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index e09ef33d49..3cd61e574e 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -95,7 +95,7 @@ namespace LLInitParam
{
const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
- mEnclosingBlockOffset = (U16)(my_addr - block_addr);
+ mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
}
bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; }
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index b6d1ce61e5..2c581cf8d6 100644
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -62,11 +62,15 @@ list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES})
add_library (llvfs ${llvfs_SOURCE_FILES})
-target_link_libraries(llvfs
+set(vfs_BOOST_LIBRARIES
${BOOST_FILESYSTEM_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
)
+target_link_libraries(llvfs
+ ${vfs_BOOST_LIBRARIES}
+ )
+
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
@@ -76,15 +80,21 @@ endif (DARWIN)
# Add tests
if (LL_TESTS)
- include(LLAddBuildTest)
- # UNIT TESTS
- SET(llvfs_TEST_SOURCE_FILES
- # none so far
- )
- LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
-
- # INTEGRATION TESTS
- set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
- # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
- LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
+ include(LLAddBuildTest)
+ # UNIT TESTS
+ SET(llvfs_TEST_SOURCE_FILES
+ lldiriterator.cpp
+ )
+
+ set_source_files_properties(lldiriterator.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}"
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
+
+ # INTEGRATION TESTS
+ set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+
+ # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
+ LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index 041436ed92..25550321f0 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -121,6 +121,14 @@ bool LLDirIterator::Impl::next(std::string &fname)
return found;
}
+/**
+Converts the incoming glob into a regex. This involves
+converting incoming glob expressions to regex equivilents and
+at the same time, escaping any regex meaningful characters which
+do not have glob meaning, i.e.
+ .()+|^$
+in the input.
+*/
std::string glob_to_regex(const std::string& glob)
{
std::string regex;
@@ -135,9 +143,6 @@ std::string glob_to_regex(const std::string& glob)
switch (c)
{
- case '.':
- regex+="\\.";
- break;
case '*':
if (glob.begin() == i)
{
@@ -170,8 +175,16 @@ std::string glob_to_regex(const std::string& glob)
case '!':
regex+= square_brace_open ? '^' : c;
break;
+ case '.': // This collection have different regex meaning
+ case '^': // and so need escaping.
+ case '(':
+ case ')':
+ case '+':
+ case '|':
+ case '$':
+ regex += '\\';
default:
- regex+=c;
+ regex += c;
break;
}
diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp
new file mode 100644
index 0000000000..505d86faa7
--- /dev/null
+++ b/indra/llvfs/tests/lldiriterator_test.cpp
@@ -0,0 +1,65 @@
+/**
+ * @file lldiriterator_test.cpp
+ * @date 2011-06
+ * @brief LLDirIterator test cases.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.,
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "lltut.h"
+#include "../lldiriterator.h"
+
+
+namespace tut
+{
+
+ struct LLDirIteratorFixture
+ {
+ LLDirIteratorFixture()
+ {
+ }
+ };
+ typedef test_group<LLDirIteratorFixture> LLDirIteratorTest_factory;
+ typedef LLDirIteratorTest_factory::object LLDirIteratorTest_t;
+ LLDirIteratorTest_factory tf("LLDirIterator");
+
+ /*
+ CHOP-662 was originally introduced to deal with crashes deleting files from
+ a directory (VWR-25500). However, this introduced a crash looking for
+ old chat logs as the glob_to_regex function in lldiriterator wasn't escaping lots of regexp characters
+ */
+ void test_chop_662(void)
+ {
+ // Check a selection of bad group names from the crash reports
+ LLDirIterator iter(".","+bad-group-name]+??-??.*");
+ LLDirIterator iter1(".","))--@---bad-group-name2((??-??.*\\.txt");
+ LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__??-??.*");
+ }
+
+ template<> template<>
+ void LLDirIteratorTest_t::test<1>()
+ {
+ test_chop_662();
+ }
+
+}
diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp
index b3312798dd..c024fd405e 100644
--- a/indra/llxuixml/llinitparam.cpp
+++ b/indra/llxuixml/llinitparam.cpp
@@ -40,7 +40,7 @@ namespace LLInitParam
{
const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
- mEnclosingBlockOffset = (U16)(my_addr - block_addr);
+ mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
}
//
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h
index a853999e94..35c889b69f 100644
--- a/indra/llxuixml/llinitparam.h
+++ b/indra/llxuixml/llinitparam.h
@@ -34,6 +34,8 @@
#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
+#include "llerror.h"
+
namespace LLInitParam
{
template<typename T> const T& defaultValue() { static T value; return value; }
@@ -302,8 +304,9 @@ namespace LLInitParam
private:
friend class BaseBlock;
- U16 mEnclosingBlockOffset;
- bool mIsProvided;
+ U32 mEnclosingBlockOffset:31;
+ U32 mIsProvided:1;
+
};
// various callbacks and constraints associated with an individual param
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 188c9e1950..4e103ae2ba 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -603,6 +603,8 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PARCEL_DETAILS_OWNER" { count(); yylval.ival = PARCEL_DETAILS_OWNER; return(INTEGER_CONSTANT); }
"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); }
"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); }
+"PARCEL_DETAILS_ID" { count(); yylval.ival = PARCEL_DETAILS_ID; return(INTEGER_CONSTANT); }
+"PARCEL_DETAILS_SEE_AVATARS" { count(); yylval.ival = PARCEL_DETAILS_SEE_AVATARS; return(INTEGER_CONSTANT); }
"STRING_TRIM_HEAD" { count(); yylval.ival = STRING_TRIM_HEAD; return(INTEGER_CONSTANT); }
"STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); }
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 27f3c7260e..fca071c628 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -1168,19 +1168,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
authResponse(message_in);
}
else
- if(message_name == "js_expose_object")
+ if(message_name == "js_enable_object")
{
#if LLQTWEBKIT_API_VERSION >= 9
- bool expose_object = message_in.getValueBoolean( "expose" );
- LLQtWebKit::getInstance()->setExposeObject( expose_object );
-#endif
- }
- else
- if(message_name == "js_values_valid")
- {
-#if LLQTWEBKIT_API_VERSION >= 9
- bool valid = message_in.getValueBoolean( "valid" );
- LLQtWebKit::getInstance()->setValuesValid( valid );
+ bool enable = message_in.getValueBoolean( "enable" );
+ LLQtWebKit::getInstance()->setSLObjectEnabled( enable );
#endif
}
else
@@ -1191,6 +1183,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
F32 y = message_in.getValueReal("y");
F32 z = message_in.getValueReal("z");
LLQtWebKit::getInstance()->setAgentLocation( x, y, z );
+ LLQtWebKit::getInstance()->emitLocation();
#endif
}
else
@@ -1201,6 +1194,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
F32 y = message_in.getValueReal("y");
F32 z = message_in.getValueReal("z");
LLQtWebKit::getInstance()->setAgentGlobalLocation( x, y, z );
+ LLQtWebKit::getInstance()->emitLocation();
#endif
}
else
@@ -1209,6 +1203,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
#if LLQTWEBKIT_API_VERSION >= 9
F32 angle = message_in.getValueReal("angle");
LLQtWebKit::getInstance()->setAgentOrientation( angle );
+ LLQtWebKit::getInstance()->emitLocation();
#endif
}
else
@@ -1217,14 +1212,25 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
#if LLQTWEBKIT_API_VERSION >= 9
const std::string& region = message_in.getValue("region");
LLQtWebKit::getInstance()->setAgentRegion( region );
+ LLQtWebKit::getInstance()->emitLocation();
#endif
}
else
- if(message_name == "js_agent_maturity")
+ if(message_name == "js_agent_maturity")
+ {
+#if LLQTWEBKIT_API_VERSION >= 9
+ const std::string& maturity = message_in.getValue("maturity");
+ LLQtWebKit::getInstance()->setAgentMaturity( maturity );
+ LLQtWebKit::getInstance()->emitMaturity();
+#endif
+ }
+ else
+ if(message_name == "js_agent_language")
{
#if LLQTWEBKIT_API_VERSION >= 9
- const std::string& maturity = message_in.getValue("maturity");
- LLQtWebKit::getInstance()->setAgentMaturity( maturity );
+ const std::string& language = message_in.getValue("language");
+ LLQtWebKit::getInstance()->setAgentLanguage( language );
+ LLQtWebKit::getInstance()->emitLanguage();
#endif
}
else
@@ -1384,3 +1390,5 @@ int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void
return 0;
}
+
+
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 523ea8a394..da9a145423 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -120,7 +120,6 @@ set(viewer_SOURCE_FILES
llchiclet.cpp
llclassifiedinfo.cpp
llclassifiedstatsresponder.cpp
- llcloud.cpp
llcofwearables.cpp
llcolorswatch.cpp
llcommanddispatcherlistener.cpp
@@ -131,6 +130,7 @@ set(viewer_SOURCE_FILES
llcurrencyuimanager.cpp
llcylinder.cpp
lldateutil.cpp
+ lldaycyclemanager.cpp
lldebugmessagebox.cpp
lldebugview.cpp
lldelayedgestureerror.cpp
@@ -150,6 +150,7 @@ set(viewer_SOURCE_FILES
lldrawpoolwlsky.cpp
lldriverparam.cpp
lldynamictexture.cpp
+ llenvmanager.cpp
llemote.cpp
lleventnotifier.cpp
lleventpoll.cpp
@@ -179,9 +180,12 @@ set(viewer_SOURCE_FILES
llfloaterbuyland.cpp
llfloatercamera.cpp
llfloatercolorpicker.cpp
- llfloaterdaycycle.cpp
+ llfloaterdeleteenvpreset.cpp
llfloaterdisplayname.cpp
- llfloaterenvsettings.cpp
+ llfloatereditdaycycle.cpp
+ llfloatereditsky.cpp
+ llfloatereditwater.cpp
+ llfloaterenvironmentsettings.cpp
llfloaterevent.cpp
llfloaterfonttest.cpp
llfloatergesture.cpp
@@ -234,10 +238,8 @@ set(viewer_SOURCE_FILES
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
- llfloaterwater.cpp
llfloaterwebcontent.cpp
llfloaterwhitelistentry.cpp
- llfloaterwindlight.cpp
llfloaterwindowsize.cpp
llfloaterworldmap.cpp
llfolderview.cpp
@@ -361,6 +363,9 @@ set(viewer_SOURCE_FILES
llpanellogin.cpp
llpanelloginlistener.cpp
llpanelmaininventory.cpp
+ llpanelmarketplaceinbox.cpp
+ llpanelmarketplaceinboxinventory.cpp
+ llpanelmarketplaceoutbox.cpp
llpanelmediasettingsgeneral.cpp
llpanelmediasettingspermissions.cpp
llpanelmediasettingssecurity.cpp
@@ -411,6 +416,7 @@ set(viewer_SOURCE_FILES
llproductinforequest.cpp
llprogressview.cpp
llrecentpeople.cpp
+ llregioninfomodel.cpp
llregionposition.cpp
llremoteparcelrequest.cpp
llsavedsettingsglue.cpp
@@ -519,7 +525,7 @@ set(viewer_SOURCE_FILES
llviewerfloaterreg.cpp
llviewerfoldertype.cpp
llviewergenericmessage.cpp
- llviewergesture.cpp
+ llviewergesture.cpp
llviewerhelp.cpp
llviewerhelputil.cpp
llviewerhome.cpp
@@ -566,7 +572,6 @@ set(viewer_SOURCE_FILES
llvoavatardefines.cpp
llvoavatarself.cpp
llvocache.cpp
- llvoclouds.cpp
llvograss.cpp
llvoground.cpp
llvoicecallhandler.cpp
@@ -595,6 +600,7 @@ set(viewer_SOURCE_FILES
llwind.cpp
llwlanimator.cpp
llwldaycycle.cpp
+ llwlhandlers.cpp
llwlparammanager.cpp
llwlparamset.cpp
llworld.cpp
@@ -673,7 +679,6 @@ set(viewer_HEADER_FILES
llchiclet.h
llclassifiedinfo.h
llclassifiedstatsresponder.h
- llcloud.h
llcofwearables.h
llcolorswatch.h
llcommanddispatcherlistener.h
@@ -684,6 +689,7 @@ set(viewer_HEADER_FILES
llcurrencyuimanager.h
llcylinder.h
lldateutil.h
+ lldaycyclemanager.h
lldebugmessagebox.h
lldebugview.h
lldelayedgestureerror.h
@@ -694,7 +700,6 @@ set(viewer_HEADER_FILES
lldrawpoolalpha.h
lldrawpoolavatar.h
lldrawpoolbump.h
- lldrawpoolclouds.h
lldrawpoolground.h
lldrawpoolsimple.h
lldrawpoolsky.h
@@ -705,6 +710,7 @@ set(viewer_HEADER_FILES
lldriverparam.h
lldynamictexture.h
llemote.h
+ llenvmanager.h
lleventnotifier.h
lleventpoll.h
llexpandabletextbox.h
@@ -733,9 +739,12 @@ set(viewer_HEADER_FILES
llfloaterbuyland.h
llfloatercamera.h
llfloatercolorpicker.h
- llfloaterdaycycle.h
+ llfloaterdeleteenvpreset.h
llfloaterdisplayname.h
- llfloaterenvsettings.h
+ llfloatereditdaycycle.h
+ llfloatereditsky.h
+ llfloatereditwater.h
+ llfloaterenvironmentsettings.h
llfloaterevent.h
llfloaterfonttest.h
llfloatergesture.h
@@ -788,10 +797,8 @@ set(viewer_HEADER_FILES
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
- llfloaterwater.h
llfloaterwebcontent.h
llfloaterwhitelistentry.h
- llfloaterwindlight.h
llfloaterwindowsize.h
llfloaterworldmap.h
llfolderview.h
@@ -909,6 +916,9 @@ set(viewer_HEADER_FILES
llpanellogin.h
llpanelloginlistener.h
llpanelmaininventory.h
+ llpanelmarketplaceinbox.h
+ llpanelmarketplaceinboxinventory.h
+ llpanelmarketplaceoutbox.h
llpanelmediasettingsgeneral.h
llpanelmediasettingspermissions.h
llpanelmediasettingssecurity.h
@@ -959,6 +969,7 @@ set(viewer_HEADER_FILES
llproductinforequest.h
llprogressview.h
llrecentpeople.h
+ llregioninfomodel.h
llregionposition.h
llremoteparcelrequest.h
llresourcedata.h
@@ -998,7 +1009,7 @@ set(viewer_HEADER_FILES
llsurface.h
llsurfacepatch.h
llsyswellitem.h
- llsyswellwindow.h
+ llsyswellwindow.h
lltable.h
llteleporthistory.h
llteleporthistorystorage.h
@@ -1070,7 +1081,7 @@ set(viewer_HEADER_FILES
llviewerfloaterreg.h
llviewerfoldertype.h
llviewergenericmessage.h
- llviewergesture.h
+ llviewergesture.h
llviewerhelp.h
llviewerhome.h
llviewerinventory.h
@@ -1114,7 +1125,6 @@ set(viewer_HEADER_FILES
llvoavatardefines.h
llvoavatarself.h
llvocache.h
- llvoclouds.h
llvograss.h
llvoground.h
llvoicechannel.h
@@ -1143,6 +1153,7 @@ set(viewer_HEADER_FILES
llwind.h
llwlanimator.h
llwldaycycle.h
+ llwlhandlers.h
llwlparammanager.h
llwlparamset.h
llworld.h
@@ -1225,7 +1236,7 @@ if (WINDOWS)
# precompiled header configuration
# llviewerprecompiledheaders.cpp generates
# the .pch file.
- # All sources added to viewer_SOURCE_FILES
+ # All sources added to viewer_SOURCE_FILES
# at this point use it.
if(USE_PRECOMPILED_HEADERS)
set_source_files_properties(llviewerprecompiledheaders.cpp
@@ -1234,7 +1245,7 @@ if (WINDOWS)
)
set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
endif(USE_PRECOMPILED_HEADERS)
-
+
# Add resource files to the project.
# viewerRes.rc is the only buildable file, but
# the rest are all dependencies of it.
@@ -1279,8 +1290,8 @@ if (WINDOWS)
set_source_files_properties(${viewer_RESOURCE_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
- set(viewer_RESOURCE_FILES
- res/viewerRes.rc
+ set(viewer_RESOURCE_FILES
+ res/viewerRes.rc
${viewer_RESOURCE_FILES}
)
@@ -1288,7 +1299,7 @@ if (WINDOWS)
if (NOT STANDALONE)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
- endif (NOT STANDALONE)
+ endif (NOT STANDALONE)
find_library(DINPUT_LIBRARY dinput8 ${DIRECTX_LIBRARY_DIR})
find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR})
@@ -1465,7 +1476,7 @@ set(PACKAGE ON CACHE BOOL
"Add a package target that builds an installer package.")
if (WINDOWS)
- set_target_properties(${VIEWER_BINARY_NAME}
+ set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
# *TODO -reenable this once we get server usage sorted out
#LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:\"__tcmalloc\""
@@ -1497,7 +1508,7 @@ if (WINDOWS)
${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll
)
endif(USE_GOOGLE_PERFTOOLS)
-
+
set(COPY_INPUT_DEPENDENCIES
# The following commented dependencies are determined at variably at build time. Can't do this here.
@@ -1595,24 +1606,24 @@ if (WINDOWS)
--grid=${GRID}
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
stage_third_party_libs
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
)
-
- add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat)
+
+ add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat)
add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
-
+
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
-
- add_dependencies(${VIEWER_BINARY_NAME}
- SLPlugin
- windows-updater
+
+ add_dependencies(${VIEWER_BINARY_NAME}
+ SLPlugin
+ windows-updater
windows-crash-logger
)
@@ -1622,7 +1633,7 @@ if (WINDOWS)
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
ARGS
- --solution
+ --solution
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
--workingdir
${VIEWER_BINARY_NAME}
@@ -1640,12 +1651,12 @@ if (WINDOWS)
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CFG_INTDIR}
- DEPENDS
- lleventhost
+ DEPENDS
+ lleventhost
${EVENT_HOST_SCRIPTS}
${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
)
-
+
add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
COMMAND ${PYTHON_EXECUTABLE}
@@ -1661,15 +1672,15 @@ if (WINDOWS)
--login_channel=${VIEWER_LOGIN_CHANNEL}
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
- DEPENDS
- ${VIEWER_BINARY_NAME}
+ DEPENDS
+ ${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
${COPY_INPUT_DEPENDENCIES}
)
- add_custom_target(package ALL DEPENDS
+ add_custom_target(package ALL DEPENDS
${CMAKE_CFG_INTDIR}/touched.bat
- windows-setup-build-all
+ windows-setup-build-all
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@@ -1737,7 +1748,7 @@ else (USE_KDU)
${LLIMAGEJ2COJ_LIBRARIES}
)
endif (USE_KDU)
-
+
build_version(viewer)
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
@@ -1796,13 +1807,13 @@ if (LINUX)
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
--source=${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
)
-
- add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
+
+ add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
if (PACKAGE)
add_custom_target(package ALL DEPENDS ${product}.tar.bz2)
@@ -1847,7 +1858,7 @@ if (DARWIN)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger)
if (PACKAGE)
- add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
+ add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
add_custom_command(
TARGET package POST_BUILD
@@ -1942,7 +1953,7 @@ if (LL_TESTS)
)
##################################################
- # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
+ # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
##################################################
# if(USE_PRECOMPILED_HEADERS)
# set_source_files_properties(
@@ -1956,33 +1967,33 @@ if (LL_TESTS)
#set(TEST_DEBUG on)
set(test_sources llcapabilitylistener.cpp)
##################################################
- # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
+ # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
##################################################
# if(USE_PRECOMPILED_HEADERS)
# set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp)
# endif(USE_PRECOMPILED_HEADERS)
- set(test_libs
- ${LLMESSAGE_LIBRARIES}
- ${WINDOWS_LIBRARIES}
+ set(test_libs
+ ${LLMESSAGE_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
${LLVFS_LIBRARIES}
${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
${GOOGLEMOCK_LIBRARIES}
)
- LL_ADD_INTEGRATION_TEST(llcapabilitylistener
- "${test_sources}"
+ LL_ADD_INTEGRATION_TEST(llcapabilitylistener
+ "${test_sources}"
"${test_libs}"
${PYTHON_EXECUTABLE}
"${CMAKE_SOURCE_DIR}/llmessage/tests/test_llsdmessage_peer.py"
)
- set(test_libs
- ${LLMESSAGE_LIBRARIES}
- ${WINDOWS_LIBRARIES}
+ set(test_libs
+ ${LLMESSAGE_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
${LLVFS_LIBRARIES}
${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
${GOOGLEMOCK_LIBRARIES}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
@@ -2030,6 +2041,22 @@ if (LL_TESTS)
#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer)
#ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer)
+include(LLAddBuildTest)
+SET(viewer_TEST_SOURCE_FILES
+ llagentaccess.cpp
+ llwlparammanager.cpp
+ # Not *actually* a unit test, it's an integration test.
+ # Because it won't work in the new unit test iface, i've commented out
+ # and notified Nat. Delete this when it's replaced!
+ # + poppy & brad 2009-06-05
+ # llcapabilitylistener.cpp
+ )
+set_source_files_properties(
+ ${viewer_TEST_SOURCE_FILES}
+ PROPERTIES
+ LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
+ )
+
endif (LL_TESTS)
check_message_template(${VIEWER_BINARY_NAME})
diff --git a/indra/newview/app_settings/keys.xml b/indra/newview/app_settings/keys.xml
index d085475c6c..6e3673e7d9 100644
--- a/indra/newview/app_settings/keys.xml
+++ b/indra/newview/app_settings/keys.xml
@@ -181,7 +181,7 @@
<binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
</third_person>
- # Basic editing camera control
+ <!-- Basic editing camera control -->
<edit>
<binding key="A" mask="NONE" command="spin_around_cw"/>
<binding key="D" mask="NONE" command="spin_around_ccw"/>
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 263b73ba23..9fa4046fdf 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -498,6 +498,7 @@ PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id.
PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id.
PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters.
PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id.
+PARCEL_DETAILS_SEE_AVATARS Used with llGetParcelDetails to get the avatars visibility setting.
STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string.
STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string.
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 937c4e4c6a..9f4e89691f 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -20,6 +20,7 @@
<key>tags</key>
<array>
<string>AppInit</string>
+ <string>Capabilities</string>
<string>SystemInfo</string>
<string>TextureCache</string>
<string>AppCache</string>
@@ -43,6 +44,7 @@
<array>
<!-- sample entry for debugging a specific item -->
<!-- <string>Voice</string> -->
+ <string>Capabilities</string>
</array>
</map>
</array>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9161519a10..4b62e376b5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3058,6 +3058,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>EnableGestureSounds</key>
+ <map>
+ <key>Comment</key>
+ <string>Play sounds from gestures</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>EnableMouselook</key>
<map>
<key>Comment</key>
@@ -3256,17 +3267,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>FirstLoginThisInstall</key>
- <map>
- <key>Comment</key>
- <string>Specifies that you have not successfully logged in since you installed the latest update</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>FirstName</key>
<map>
<key>Comment</key>
@@ -4180,6 +4180,28 @@
<key>Value</key>
<real>1.0</real>
</map>
+ <key>InventoryDisplayInbox</key>
+ <map>
+ <key>Comment</key>
+ <string>Override received items inventory inbox display</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>InventoryDisplayOutbox</key>
+ <map>
+ <key>Comment</key>
+ <string>Override merchant inventory outbox display</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>InventoryLinking</key>
<map>
<key>Comment</key>
@@ -4422,6 +4444,17 @@
<key>Value</key>
<real>2.0</real>
</map>
+ <key>LastInventoryInboxExpand</key>
+ <map>
+ <key>Comment</key>
+ <string>The last time the received items inbox was expanded.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>LCDDestination</key>
<map>
<key>Comment</key>
@@ -5576,7 +5609,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <real>1</real>
+ <real>0</real>
</map>
<key>MeshImportUseSLM</key>
<map>
@@ -5589,10 +5622,10 @@
<key>Value</key>
<real>0</real>
</map>
- <key>MeshUseWholeModelUpload</key>
+ <key>MeshUploadLogXML</key>
<map>
<key>Comment</key>
- <string>Upload model in its entirety instead of mesh-by-mesh (new caps)</string>
+ <string>Verbose XML logging on mesh upload</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -5600,6 +5633,17 @@
<key>Value</key>
<real>0</real>
</map>
+ <key>MeshUploadFakeErrors</key>
+ <map>
+ <key>Comment</key>
+ <string>Force upload errors (for testing)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>0</real>
+ </map>
<key>MigrateCacheDirectory</key>
<map>
<key>Comment</key>
@@ -6535,7 +6579,28 @@
<key>Value</key>
<integer>0</integer>
</map>
-
+ <key>PostFirstLoginIntroURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL of intro presenatation after first time users first login</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
+ <key>PostFirstLoginIntroViewed</key>
+ <map>
+ <key>Comment</key>
+ <string>Flag indicating if user has seen intro presenatation after first time users first login</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <string>0</string>
+ </map>
<key>PrecachingDelay</key>
<map>
<key>Comment</key>
@@ -7102,6 +7167,75 @@
<key>Value</key>
<integer>1</integer>
</map>
+
+ <key>OctreeMaxNodeCapacity</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum number of elements to store in a single octree node</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>128</integer>
+ </map>
+
+ <key>OctreeStaticObjectSizeFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Multiplier on static object size for determining octree node size </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>4</integer>
+ </map>
+
+ <key>OctreeAlphaDistanceFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Multiplier on alpha object distance for determining octree node size </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>0.1</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
+
+ <key>OctreeAttachmentSizeFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Multiplier on attachment size for determining octree node size </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>4</integer>
+ </map>
+
+ <key>OctreeDistanceFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Multiplier on distance for determining octree node size </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>0.01</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
+
<key>RenderAnisotropic</key>
<map>
<key>Comment</key>
@@ -7199,7 +7333,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>1.0</integer>
+ <real>1.0</real>
</map>
<key>RenderAvatarVP</key>
<map>
@@ -7455,6 +7589,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>RenderMaxTextureIndex</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum texture index to use for indexed texture rendering.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>6</integer>
+ </map>
<key>RenderDebugTextureBind</key>
<map>
<key>Comment</key>
@@ -8600,7 +8745,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>8192</integer>
+ <integer>65536</integer>
</map>
<key>RenderMaxVBOSize</key>
<map>
@@ -8878,17 +9023,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RenderUseTriStrips</key>
- <map>
- <key>Comment</key>
- <string>Use triangle strips for rendering prims.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>RenderUseFarClip</key>
<map>
<key>Comment</key>
@@ -8953,7 +9087,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>RenderUseStreamVBO</key>
<map>
@@ -9063,7 +9197,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>3.0</real>
+ <real>2.0</real>
</map>
<key>MeshThreadCount</key>
<map>
@@ -9547,7 +9681,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>ShowSnapshotButton</key>
<map>
@@ -9659,6 +9793,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>NearbyListShowMap</key>
+ <map>
+ <key>Comment</key>
+ <string>Show/hide map above nearby people list</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>NearbyListShowIcons</key>
<map>
<key>Comment</key>
@@ -10146,17 +10291,6 @@
<key>Value</key>
<real>0.300000011921</real>
</map>
- <key>SkyEditPresets</key>
- <map>
- <key>Comment</key>
- <string>Whether to be able to edit the sky defaults or not</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SkyNightColorShift</key>
<map>
<key>Comment</key>
@@ -10198,17 +10332,6 @@
<real>0.1</real>
</array>
</map>
- <key>SkyUseClassicClouds</key>
- <map>
- <key>Comment</key>
- <string>Whether to use the old Second Life particle clouds or not</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>SnapEnabled</key>
<map>
<key>Comment</key>
@@ -10823,7 +10946,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>-2</real>
+ <real>-1</real>
</map>
<key>UIExtraTriangleWidth</key>
<map>
@@ -10834,7 +10957,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>2</real>
+ <real>4</real>
</map>
<key>UIFloaterCloseBoxSize</key>
<map>
@@ -11826,6 +11949,61 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>UseEnvironmentFromRegion</key>
+ <map>
+ <key>Comment</key>
+ <string>Choose whether to use the region's environment settings, or override them with the local settings.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>UseDayCycle</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether to use use a day cycle or a fixed sky.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>WaterPresetName</key>
+ <map>
+ <key>Comment</key>
+ <string>Water preset to use. May be superseded by region settings.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>Default</string>
+ </map>
+ <key>SkyPresetName</key>
+ <map>
+ <key>Comment</key>
+ <string>Sky preset to use. May be superseded by region settings or by a day cycle (see DayCycleName).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>Default</string>
+ </map>
+ <key>DayCycleName</key>
+ <map>
+ <key>Comment</key>
+ <string>Day cycle to use. May be superseded by region settings.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>Default</string>
+ </map>
<key>UseExternalBrowser</key>
<map>
<key>Comment</key>
@@ -12408,44 +12586,6 @@
<key>Value</key>
<integer>20</integer>
</map>
- <key>WaterEditPresets</key>
- <map>
- <key>Comment</key>
- <string>Whether to be able to edit the water defaults or not</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>WaterFogColor</key>
- <map>
- <key>Comment</key>
- <string>Water fog color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0863</real>
- <real>0.168</real>
- <real>0.212</real>
- <real>0</real>
- </array>
- </map>
- <key>WaterFogDensity</key>
- <map>
- <key>Comment</key>
- <string>Water fog density</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>16.0</real>
- </map>
<key>WaterGLFogDensityScale</key>
<map>
<key>Comment</key>
@@ -13260,5 +13400,43 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>WebProfileRect</key>
+ <map>
+ <key>Comment</key>
+ <string>Web profile dimensions</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Rect</string>
+ <key>Value</key>
+ <array>
+ <integer>0</integer>
+ <integer>650</integer>
+ <integer>490</integer>
+ <integer>0</integer>
+ </array>
+ </map>
+ <key>HelpFloaterOpen</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Help Floater on login?</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowHelpOnFirstLogin</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Help Floater on first login</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 70a75cb4ca..29e52ab054 100644
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -459,5 +459,16 @@
<key>Value</key>
<integer>0</integer>
</map>
- </map>
+ <key>ShowHelpOnFirstLogin</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Help Floater on first login</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ </map>
</llsd>
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
index 3f6b8b3323..b0fa0ddd3e 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void default_lighting();
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index 1ad87badfe..d9f29ced4f 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
attribute vec4 weight; //1
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index a15846f192..2796222c68 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
index 05fe100372..d86ef19a04 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void default_lighting();
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
index 4b8a7604a1..2eb814bd91 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index ef823c28b1..7613e50dca 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
attribute vec4 object_weight;
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
index 27ac59a840..2638351e96 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
index f1aa549a47..86b189b282 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 3b12a07a27..4a0815a163 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -5,13 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
-uniform sampler2D diffuseMap;
uniform sampler2DRect depthMap;
+vec4 diffuseLookup(vec2 texcoord);
+
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform vec2 screen_res;
@@ -47,7 +48,7 @@ void main()
vec4 pos = vec4(vary_position, 1.0);
- vec4 diff= texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 diff= diffuseLookup(gl_TexCoord[0].xy);
vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
vec4 color = diff * col;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
new file mode 100644
index 0000000000..b0d029dbf4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
@@ -0,0 +1,67 @@
+/**
+ * @file alphaF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect depthMap;
+uniform sampler2D diffuseMap;
+
+
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform vec2 screen_res;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+varying vec3 vary_ambient;
+varying vec3 vary_directional;
+varying vec3 vary_fragcoord;
+varying vec3 vary_position;
+varying vec3 vary_pointlight_col;
+
+uniform mat4 inv_proj;
+
+vec4 getPosition(vec2 pos_screen)
+{
+ float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
+ frag *= screen_res;
+
+ vec4 pos = vec4(vary_position, 1.0);
+
+ vec4 diff= texture2D(diffuseMap,gl_TexCoord[0].xy);
+
+ vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
+ vec4 color = diff * col;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ color.rgb += diff.rgb * vary_pointlight_col.rgb;
+
+ gl_FragColor = color;
+ //gl_FragColor = vec4(1,0,1,1);
+ //gl_FragColor = vec4(1,0,1,1)*shadow;
+
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
index 65d9209983..ac3f7189c2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getObjectSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 2691fc8ded..44cb78e914 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -23,6 +23,7 @@ varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_light;
varying vec3 vary_pointlight_col;
+varying float vary_texture_index;
uniform float near_clip;
uniform float shadow_offset;
@@ -61,11 +62,13 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 vert = vec4(gl_Vertex.xyz, 1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix * vert;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+ vec4 pos = (gl_ModelViewMatrix * vert);
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
@@ -102,7 +105,7 @@ void main()
gl_FogFragCoord = pos.z;
- pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ pos = gl_ModelViewProjectionMatrix * vert;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
index 164322c3a7..870d593311 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
index 5ae41cb730..c7a4f86727 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
mat4 getObjectSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index a012cb5030..68e4055cf2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
new file mode 100644
index 0000000000..7bc78fe407
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
@@ -0,0 +1,21 @@
+/**
+ * @file avatarEyesV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+varying vec3 vary_normal;
+
+void main()
+{
+ //transform vertex
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+
+ vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+
+ gl_FrontColor = gl_Color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 9748727147..3268618093 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
index 1b7ae06888..78986ab12e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
@@ -5,14 +5,17 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
+varying vec4 post_pos;
void main()
{
//gl_FragColor = vec4(1,1,1,gl_Color.a * texture2D(diffuseMap, gl_TexCoord[0].xy).a);
gl_FragColor = vec4(1,1,1,1);
+
+ gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
index cf6579a40d..f177fcd8f1 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
@@ -5,12 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
+
mat4 getSkinnedTransform();
attribute vec4 weight;
+varying vec4 post_pos;
+
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
@@ -30,8 +32,9 @@ void main()
norm = normalize(norm);
pos = gl_ProjectionMatrix * pos;
- pos.z = max(pos.z, -pos.w+0.01);
- gl_Position = pos;
+ post_pos = pos;
+
+ gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index 69c93799b5..7eac11287a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
index d9f021b114..8c75c8045a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -26,7 +26,7 @@ uniform vec2 screen_res;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
@@ -39,7 +39,7 @@ vec4 getPosition(vec2 pos_screen)
void main()
{
- vec2 tc = vary_fragcoord.xy;
+ vec2 tc = vary_fragcoord.xy;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
vec3 pos = getPosition(tc).xyz;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl
new file mode 100644
index 0000000000..6ca51377c1
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl
@@ -0,0 +1,113 @@
+/**
+ * @file blurLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2DRect lightMap;
+
+uniform float dist_factor;
+uniform float blur_size;
+uniform vec2 delta;
+uniform vec3 kern[4];
+uniform float kern_scale;
+
+varying vec2 vary_fragcoord;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+vec3 texture2DMS3(sampler2DMS tex, ivec2 tc)
+{
+ vec3 ret = vec3(0,0,0);
+ for (int i = 0; i < samples; i++)
+ {
+ ret += texelFetch(tex, tc, i).rgb;
+ }
+
+ return ret/samples;
+}
+
+float texture2DMS1(sampler2DMS tex, ivec2 tc)
+{
+ float ret = 0;
+ for (int i = 0; i < samples; i++)
+ {
+ ret += texelFetch(tex, tc, i).r;
+ }
+
+ return ret/samples;
+}
+
+vec4 getPosition(ivec2 pos_screen)
+{
+ float depth = texture2DMS1(depthMap, pos_screen.xy);
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+ ivec2 itc = ivec2(tc);
+
+ vec3 norm = texture2DMS3(normalMap, itc).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ vec3 pos = getPosition(itc).xyz;
+ vec4 ccol = texture2DRect(lightMap, tc).rgba;
+
+ vec2 dlt = kern_scale * delta / (1.0+norm.xy*norm.xy);
+ dlt /= max(-pos.z*dist_factor, 1.0);
+
+ vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec4 col = defined_weight.xyxx * ccol;
+
+ // relax tolerance according to distance to avoid speckling artifacts, as angles and distances are a lot more abrupt within a small screen area at larger distances
+ float pointplanedist_tolerance_pow2 = pos.z*pos.z*0.00005;
+
+ // perturb sampling origin slightly in screen-space to hide edge-ghosting artifacts where smoothing radius is quite large
+ tc += ( (mod(tc.x+tc.y,2) - 0.5) * kern[1].z * dlt * 0.5 );
+
+ for (int i = 1; i < 4; i++)
+ {
+ vec2 samptc = tc + kern[i].z*dlt;
+ vec3 samppos = getPosition(ivec2(samptc)).xyz;
+ float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
+ if (d*d <= pointplanedist_tolerance_pow2)
+ {
+ col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
+ defined_weight += kern[i].xy;
+ }
+ }
+ for (int i = 1; i < 4; i++)
+ {
+ vec2 samptc = vec2(tc - kern[i].z*dlt);
+ vec3 samppos = getPosition(ivec2(samptc)).xyz;
+ float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
+ if (d*d <= pointplanedist_tolerance_pow2)
+ {
+ col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
+ defined_weight += kern[i].xy;
+ }
+ }
+
+ col /= defined_weight.xyxx;
+ col.y *= col.y;
+
+ gl_FragColor = col;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
index c2d05c601a..862f809de5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 37bfaac32c..75b4dc624a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
index d884f2e4a5..dc69519a85 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
varying vec3 vary_mat0;
varying vec3 vary_mat1;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
index 9b109b2db6..5b6726488b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_mat0;
varying vec3 vary_mat1;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
new file mode 100644
index 0000000000..ef300d5631
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -0,0 +1,79 @@
+/**
+ * @file WLCloudsF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+/////////////////////////////////////////////////////////////////////////
+// The fragment shader for the sky
+/////////////////////////////////////////////////////////////////////////
+
+varying vec4 vary_CloudColorSun;
+varying vec4 vary_CloudColorAmbient;
+varying float vary_CloudDensity;
+
+uniform sampler2D cloud_noise_texture;
+uniform vec4 cloud_pos_density1;
+uniform vec4 cloud_pos_density2;
+uniform vec4 gamma;
+
+/// Soft clips the light with a gamma correction
+vec3 scaleSoftClip(vec3 light) {
+ //soft clip effect:
+ light = 1. - clamp(light, vec3(0.), vec3(1.));
+ light = 1. - pow(light, gamma.xxx);
+
+ return light;
+}
+
+void main()
+{
+ // Set variables
+ vec2 uv1 = gl_TexCoord[0].xy;
+ vec2 uv2 = gl_TexCoord[1].xy;
+
+ vec4 cloudColorSun = vary_CloudColorSun;
+ vec4 cloudColorAmbient = vary_CloudColorAmbient;
+ float cloudDensity = vary_CloudDensity;
+ vec2 uv3 = gl_TexCoord[2].xy;
+ vec2 uv4 = gl_TexCoord[3].xy;
+
+ // Offset texture coords
+ uv1 += cloud_pos_density1.xy; //large texture, visible density
+ uv2 += cloud_pos_density1.xy; //large texture, self shadow
+ uv3 += cloud_pos_density2.xy; //small texture, visible density
+ uv4 += cloud_pos_density2.xy; //small texture, self shadow
+
+
+ // Compute alpha1, the main cloud opacity
+ float alpha1 = (texture2D(cloud_noise_texture, uv1).x - 0.5) + (texture2D(cloud_noise_texture, uv3).x - 0.5) * cloud_pos_density2.z;
+ alpha1 = min(max(alpha1 + cloudDensity, 0.) * 10. * cloud_pos_density1.z, 1.);
+
+ // And smooth
+ alpha1 = 1. - alpha1 * alpha1;
+ alpha1 = 1. - alpha1 * alpha1;
+
+
+ // Compute alpha2, for self shadowing effect
+ // (1 - alpha2) will later be used as percentage of incoming sunlight
+ float alpha2 = (texture2D(cloud_noise_texture, uv2).x - 0.5);
+ alpha2 = min(max(alpha2 + cloudDensity, 0.) * 2.5 * cloud_pos_density1.z, 1.);
+
+ // And smooth
+ alpha2 = 1. - alpha2;
+ alpha2 = 1. - alpha2 * alpha2;
+
+ // Combine
+ vec4 color;
+ color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
+ color *= 2.;
+
+ /// Gamma correct for WL (soft clip effect).
+ gl_FragData[0] = vec4(scaleSoftClip(color.rgb), alpha1);
+ gl_FragData[1] = vec4(0.0,0.0,0.0,0.0);
+ gl_FragData[2] = vec4(0,0,1,0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
new file mode 100644
index 0000000000..3eac63076c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -0,0 +1,165 @@
+/**
+ * @file WLCloudsV.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+//////////////////////////////////////////////////////////////////////////
+// The vertex shader for creating the atmospheric sky
+///////////////////////////////////////////////////////////////////////////////
+
+// Output parameters
+varying vec4 vary_CloudColorSun;
+varying vec4 vary_CloudColorAmbient;
+varying float vary_CloudDensity;
+
+// Inputs
+uniform vec3 camPosLocal;
+
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 max_y;
+
+uniform vec4 glow;
+
+uniform vec4 cloud_color;
+
+uniform vec4 cloud_scale;
+
+void main()
+{
+
+ // World / view / projection
+ gl_Position = ftransform();
+
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ // Get relative position
+ vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+
+ // Set altitude
+ if (P.y > 0.)
+ {
+ P *= (max_y.x / P.y);
+ }
+ else
+ {
+ P *= (-32000. / P.y);
+ }
+
+ // Can normalize then
+ vec3 Pn = normalize(P);
+ float Plen = length(P);
+
+ // Initialize temp variables
+ vec4 temp1 = vec4(0.);
+ vec4 temp2 = vec4(0.);
+ vec4 blue_weight;
+ vec4 haze_weight;
+ vec4 sunlight = sunlight_color;
+ vec4 light_atten;
+
+
+ // Sunlight attenuation effect (hue and brightness) due to atmosphere
+ // this is used later for sunlight modulation at various altitudes
+ light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+
+ // Calculate relative weights
+ temp1 = blue_density + haze_density.x;
+ blue_weight = blue_density / temp1;
+ haze_weight = haze_density.x / temp1;
+
+ // Compute sunlight from P & lightnorm (for long rays like sky)
+ temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // Distance
+ temp2.z = Plen * density_multiplier.x;
+
+ // Transparency (-> temp1)
+ // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
+ // compiler gets confused.
+ temp1 = exp(-temp1 * temp2.z);
+
+
+ // Compute haze glow
+ temp2.x = dot(Pn, lightnorm.xyz);
+ temp2.x = 1. - temp2.x;
+ // temp2.x is 0 at the sun and increases away from sun
+ temp2.x = max(temp2.x, .001);
+ // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ temp2.x *= glow.x;
+ // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ temp2.x = pow(temp2.x, glow.z);
+ // glow.z should be negative, so we're doing a sort of (1 / "angle") function
+
+ // Add "minimum anti-solar illumination"
+ temp2.x += .25;
+
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow.x);
+
+ // Haze color below cloud
+ vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ );
+
+ // CLOUDS
+
+ sunlight = sunlight_color;
+ temp2.y = max(0., lightnorm.y * 2.);
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // Cloud color out
+ vary_CloudColorSun = (sunlight * temp2.x) * cloud_color;
+ vary_CloudColorAmbient = tmpAmbient * cloud_color;
+
+ // Attenuate cloud color by atmosphere
+ temp1 = sqrt(temp1); //less atmos opacity (more transparency) below clouds
+ vary_CloudColorSun *= temp1;
+ vary_CloudColorAmbient *= temp1;
+ vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
+
+ // Make a nice cloud density based on the cloud_shadow value that was passed in.
+ vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
+
+
+ // Texture coords
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_TexCoord[0].xy -= 0.5;
+ gl_TexCoord[0].xy /= cloud_scale.x;
+ gl_TexCoord[0].xy += 0.5;
+
+ gl_TexCoord[1] = gl_TexCoord[0];
+ gl_TexCoord[1].x += lightnorm.x * 0.0125;
+ gl_TexCoord[1].y += lightnorm.z * 0.0125;
+
+ gl_TexCoord[2] = gl_TexCoord[0] * 16.;
+ gl_TexCoord[3] = gl_TexCoord[1] * 16.;
+
+ // Combine these to minimize register use
+ vary_CloudColorAmbient += oHazeColorBelowCloud;
+
+ // needs this to compile on mac
+ //vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
+
+ // END CLOUDS
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index 35cfb80c93..43af480c50 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
@@ -20,3 +20,4 @@ void main()
vec3 nvn = normalize(vary_normal);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
new file mode 100644
index 0000000000..e7b5dcce7f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
@@ -0,0 +1,19 @@
+/**
+ * @file diffuseIndexedF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+varying vec3 vary_normal;
+
+void main()
+{
+ vec3 col = gl_Color.rgb * diffuseLookup(gl_TexCoord[0].xy).rgb;
+
+ gl_FragData[0] = vec4(col, 0.0);
+ gl_FragData[1] = gl_Color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
+ vec3 nvn = normalize(vary_normal);
+ gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
index 9a45c03237..2c4caea109 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
varying vec3 vary_normal;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index 03d3322cb6..b56d1493c3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -5,16 +5,18 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_normal;
+varying float vary_texture_index;
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz, 1.0);
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texture_index = gl_Vertex.w;
vary_normal = normalize(gl_NormalMatrix * gl_Normal);
gl_FrontColor = gl_Color;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 3429877397..d781e08548 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -5,60 +5,24 @@
* $/LicenseInfo$
*/
-#version 120
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2D diffuseMap;
-uniform sampler2DRect depthMap;
-uniform sampler2D noiseMap;
-uniform vec4 shadow_clip;
-uniform vec2 screen_res;
+#extension GL_ARB_texture_rectangle : enable
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec4 vary_position;
-varying vec3 vary_normal;
-varying vec3 vary_fragcoord;
-
-uniform mat4 inv_proj;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
void main()
{
- vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
- frag *= screen_res;
-
- vec3 samp_pos = getPosition(frag).xyz;
-
float shadow = 1.0;
- vec4 pos = vary_position;
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy)*gl_Color;
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy)*gl_Color;
color.rgb = fullbrightAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- //gl_FragColor = gl_Color;
gl_FragColor = color;
- //gl_FragColor = vec4(1,0,1,1);
-
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
index 6c38d220e2..2eed044b7c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
@@ -14,30 +14,23 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_normal;
-varying vec3 vary_fragcoord;
-uniform float near_clip;
-varying vec4 vary_position;
+varying float vary_texture_index;
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 vert = vec4(gl_Vertex.xyz, 1.0);
+ vary_texture_index = gl_Vertex.w;
+
+ gl_Position = gl_ModelViewProjectionMatrix*vert;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
- vary_position = pos;
-
+ vec4 pos = (gl_ModelViewMatrix * vert);
+
calcAtmospherics(pos.xyz);
gl_FrontColor = gl_Color;
gl_FogFragCoord = pos.z;
-
- pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
-
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
index 75b555e8ae..41c149e774 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class1/deferred/giV.glsl b/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
index 8dc1410ea5..e86f2896da 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index e3c15a2ab2..fa811f0d55 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform sampler2D normalMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
index 37148b3f1a..723777bd3a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void main()
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
index 78df54d5dc..25e93ae266 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
index 0c820bfc6c..4baf1fc65a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 609fc4f14f..3c5c780d94 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -36,7 +36,7 @@ uniform mat4 inv_proj;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl
new file mode 100644
index 0000000000..6c43679acf
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl
@@ -0,0 +1,137 @@
+/**
+ * @file multiPointLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS normalMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+
+
+uniform vec3 env_mat[3];
+uniform float sun_wash;
+
+uniform int light_count;
+
+#define MAX_LIGHT_COUNT 16
+uniform vec4 light[MAX_LIGHT_COUNT];
+uniform vec4 light_col[MAX_LIGHT_COUNT];
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform float far_z;
+
+uniform mat4 inv_proj;
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
+ ivec2 itc = ivec2(frag);
+
+ int wght = 0;
+ vec3 fcol = vec3(0,0,0);
+
+ for (int s = 0; s < samples; ++s)
+ {
+ vec3 pos = getPosition(itc, s).xyz;
+ if (pos.z >= far_z)
+ {
+ vec3 norm = texelFetch(normalMap, itc, s).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ norm = normalize(norm);
+ vec4 spec = texelFetch(specularRect, itc, s);
+ vec3 diff = texelFetch(diffuseRect, itc, s).rgb;
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+ vec3 out_col = vec3(0,0,0);
+ vec3 npos = normalize(-pos);
+
+ // As of OSX 10.6.7 ATI Apple's crash when using a variable size loop
+ for (int i = 0; i < MAX_LIGHT_COUNT; ++i)
+ {
+ bool light_contrib = (i < light_count);
+
+ vec3 lv = light[i].xyz-pos;
+ float dist2 = dot(lv,lv);
+ dist2 /= light[i].w;
+ if (dist2 > 1.0)
+ {
+ light_contrib = false;
+ }
+
+ float da = dot(norm, lv);
+ if (da < 0.0)
+ {
+ light_contrib = false;
+ }
+
+ if (light_contrib)
+ {
+ lv = normalize(lv);
+ da = dot(norm, lv);
+
+ float fa = light_col[i].a+1.0;
+ float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
+ dist_atten *= noise;
+
+ float lit = da * dist_atten;
+
+ vec3 col = light_col[i].rgb*lit*diff;
+ //vec3 col = vec3(dist2, light_col[i].a, lit);
+
+ if (spec.a > 0.0)
+ {
+ //vec3 ref = dot(pos+lv, norm);
+
+ float sa = dot(normalize(lv+npos),norm);
+
+ if (sa > 0.0)
+ {
+ sa = texture2D(lightFunc,vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
+ sa *= noise;
+ col += da*sa*light_col[i].rgb*spec.rgb;
+ }
+ }
+
+ out_col += col;
+ }
+ }
+
+ fcol += out_col;
+ ++wght;
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
index 2e3e84dd15..434fb6f534 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec4 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index a9f03f7615..0d25d7792d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
//class 1 -- no shadows
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl
new file mode 100644
index 0000000000..c80a54346e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl
@@ -0,0 +1,232 @@
+/**
+ * @file multiSpotLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+//class 1 -- no shadows
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+uniform sampler2D projectionMap;
+
+uniform mat4 proj_mat; //screen space to light space
+uniform float proj_near; //near clip for projection
+uniform vec3 proj_p; //plane projection is emitting from (in screen space)
+uniform vec3 proj_n;
+uniform float proj_focus; //distance from plane to begin blurring
+uniform float proj_lod; //(number of mips in proj map)
+uniform float proj_range; //range between near clip and far clip plane of projection
+uniform float proj_ambient_lod;
+uniform float proj_ambiance;
+uniform float near_clip;
+uniform float far_clip;
+
+uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
+uniform float sun_wash;
+uniform float shadow_fade;
+
+varying vec4 vary_light;
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform mat4 inv_proj;
+
+vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
+
+ float det = min(lod/(proj_lod*0.5), 1.0);
+
+ float d = min(dist.x, dist.y);
+
+ float edge = 0.25*det;
+
+ ret *= clamp(d/edge, 0.0, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
+
+ return ret;
+}
+
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ int wght = 0;
+
+ vec3 fcol = vec3(0,0,0);
+
+ vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
+
+ ivec2 itc = ivec2(frag.xy);
+
+ for (int i = 0; i < samples; ++i)
+ {
+ vec3 pos = getPosition(itc, i).xyz;
+ vec3 lv = vary_light.xyz-pos.xyz;
+ float dist2 = dot(lv,lv);
+ dist2 /= vary_light.w;
+ if (dist2 <= 1.0)
+ {
+ vec3 norm = texelFetch(normalMap, itc, i).xyz*2.0-1.0;
+
+ norm = normalize(norm);
+ float l_dist = -dot(lv, proj_n);
+
+ vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
+ if (proj_tc.z >= 0.0)
+ {
+ proj_tc.xyz /= proj_tc.w;
+
+ float fa = gl_Color.a+1.0;
+ float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
+ if (dist_atten > 0.0)
+ {
+ lv = proj_origin-pos.xyz;
+ lv = normalize(lv);
+ float da = dot(norm, lv);
+
+ vec3 col = vec3(0,0,0);
+
+ vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
+
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+ if (proj_tc.z > 0.0 &&
+ proj_tc.x < 1.0 &&
+ proj_tc.y < 1.0 &&
+ proj_tc.x > 0.0 &&
+ proj_tc.y > 0.0)
+ {
+ float lit = 0.0;
+ float amb_da = proj_ambiance;
+
+ if (da > 0.0)
+ {
+ float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
+ float lod = diff * proj_lod;
+
+ vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
+
+ vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+
+ lit = da * dist_atten * noise;
+
+ col = lcol*lit*diff_tex;
+ amb_da += (da*0.5)*proj_ambiance;
+ }
+
+ //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
+ vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
+
+ amb_da += (da*da*0.5+0.5)*proj_ambiance;
+
+ amb_da *= dist_atten * noise;
+
+ amb_da = min(amb_da, 1.0-lit);
+
+ col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ }
+
+
+ vec4 spec = texelFetch(specularRect, itc, i);
+ if (spec.a > 0.0)
+ {
+ vec3 ref = reflect(normalize(pos), norm);
+
+ //project from point pos in direction ref to plane proj_p, proj_n
+ vec3 pdelta = proj_p-pos;
+ float ds = dot(ref, proj_n);
+
+ if (ds < 0.0)
+ {
+ vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
+
+ vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
+
+ if (stc.z > 0.0)
+ {
+ stc.xy /= stc.w;
+
+ float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
+
+ stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+
+ if (stc.x < 1.0 &&
+ stc.y < 1.0 &&
+ stc.x > 0.0 &&
+ stc.y > 0.0)
+ {
+ vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+ col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
+ }
+ }
+ }
+ }
+
+ fcol += col;
+ ++wght;
+ }
+ }
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 22ed9dcd40..5efa3200d4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
- #version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -30,7 +30,7 @@ uniform vec4 viewport;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = (pos_screen.xy-viewport.xy)*2.0;
sc /= viewport.zw;
sc -= vec2(1.0,1.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl
new file mode 100644
index 0000000000..feaf38115d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl
@@ -0,0 +1,108 @@
+/**
+ * @file pointLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS normalMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+
+
+uniform vec3 env_mat[3];
+uniform float sun_wash;
+
+varying vec4 vary_light;
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform mat4 inv_proj;
+uniform vec4 viewport;
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = (vec2(pos_screen.xy)-viewport.xy)*2.0;
+ sc /= viewport.zw;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec4 frag = vary_fragcoord;
+ frag.xyz /= frag.w;
+ frag.xyz = frag.xyz*0.5+0.5;
+ frag.xy *= screen_res;
+
+ ivec2 itc = ivec2(frag.xy);
+
+ int wght = 0;
+ vec3 fcol = vec3(0,0,0);
+
+ for (int s = 0; s < samples; ++s)
+ {
+ vec3 pos = getPosition(itc, s).xyz;
+ vec3 lv = vary_light.xyz-pos;
+ float dist2 = dot(lv,lv);
+ dist2 /= vary_light.w;
+ if (dist2 <= 1.0)
+ {
+ vec3 norm = texelFetch(normalMap, itc, s).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ float da = dot(norm, lv);
+ if (da >= 0.0)
+ {
+ norm = normalize(norm);
+ lv = normalize(lv);
+ da = dot(norm, lv);
+
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+
+ vec3 col = texelFetch(diffuseRect, itc, s).rgb;
+ float fa = gl_Color.a+1.0;
+ float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
+ float lit = da * dist_atten * noise;
+
+ col = gl_Color.rgb*lit*col;
+
+ vec4 spec = texelFetch(specularRect, itc, s);
+ if (spec.a > 0.0)
+ {
+ float sa = dot(normalize(lv-normalize(pos)),norm);
+ if (sa > 0.0)
+ {
+ sa = texture2D(lightFunc, vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
+ sa *= noise;
+ col += da*sa*gl_Color.rgb*spec.rgb;
+ }
+ }
+
+ fcol += col;
+ ++wght;
+ }
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
index 8e74feb615..c510d8ad77 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
@@ -5,19 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec4 vary_light;
varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-uniform float near_clip;
-
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
-
vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
vary_fragcoord = pos;
@@ -25,6 +20,8 @@ void main()
tex.w = 1.0;
vary_light = gl_MultiTexCoord0;
+
+ gl_Position = pos;
gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index 77f1b2224c..f6b0402bb9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -29,7 +29,7 @@ varying vec2 vary_fragcoord;
float getDepth(vec2 pos_screen)
{
- float z = texture2DRect(depthMap, pos_screen.xy).a;
+ float z = texture2DRect(depthMap, pos_screen.xy).r;
z = z*2.0-1.0;
vec4 ndc = vec4(0.0, 0.0, z, 1.0);
vec4 p = inv_proj*ndc;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl
new file mode 100644
index 0000000000..62ae5f917a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl
@@ -0,0 +1,133 @@
+/**
+ * @file postDeferredF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS edgeMap;
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2D bloomMap;
+
+uniform float depth_cutoff;
+uniform float norm_cutoff;
+uniform float focal_distance;
+uniform float blur_constant;
+uniform float tan_pixel_angle;
+uniform float magnification;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+varying vec2 vary_fragcoord;
+
+vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
+{
+ vec4 ret = vec4(0,0,0,0);
+ for (int i = 0; i < samples; ++i)
+ {
+ ret += texelFetch(tex, tc, i);
+ }
+
+ return ret/samples;
+}
+
+float getDepth(ivec2 pos_screen)
+{
+ float z = texture2DMS(depthMap, pos_screen.xy).r;
+ z = z*2.0-1.0;
+ vec4 ndc = vec4(0.0, 0.0, z, 1.0);
+ vec4 p = inv_proj*ndc;
+ return p.z/p.w;
+}
+
+float calc_cof(float depth)
+{
+ float sc = abs(depth-focal_distance)/-depth*blur_constant;
+
+ sc /= magnification;
+
+ // tan_pixel_angle = pixel_length/-depth;
+ float pixel_length = tan_pixel_angle*-focal_distance;
+
+ sc = sc/pixel_length;
+ sc *= 1.414;
+
+ return sc;
+}
+
+void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, ivec2 tc)
+{
+ float d = getDepth(tc);
+
+ float sc = calc_cof(d);
+
+ if (sc > min_sc //sampled pixel is more "out of focus" than current sample radius
+ || d < cur_depth) //sampled pixel is further away than current pixel
+ {
+ float wg = 0.25;
+
+ vec4 s = texture2DMS(diffuseRect, tc);
+ // de-weight dull areas to make highlights 'pop'
+ wg += s.r+s.g+s.b;
+
+ diff += wg*s;
+
+ w += wg;
+ }
+}
+
+
+void main()
+{
+ ivec2 itc = ivec2(vary_fragcoord.xy);
+
+ vec3 norm = texture2DMS(normalMap, itc).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+
+ float depth = getDepth(itc);
+
+ vec4 diff = texture2DMS(diffuseRect, itc);
+
+ {
+ float w = 1.0;
+
+ float sc = calc_cof(depth);
+ sc = min(abs(sc), 10.0);
+
+ float fd = depth*0.5f;
+
+ float PI = 3.14159265358979323846264;
+
+ int isc = int(sc);
+
+ // sample quite uniformly spaced points within a circle, for a circular 'bokeh'
+ //if (depth < focal_distance)
+ {
+ for (int x = -isc; x <= isc; x+=2)
+ {
+ for (int y = -isc; y <= isc; y+=2)
+ {
+ ivec2 cur_samp = ivec2(x,y);
+ float cur_sc = length(vec2(cur_samp));
+ if (cur_sc < sc)
+ {
+ dofSample(diff, w, cur_sc, depth, itc+cur_samp);
+ }
+ }
+ }
+ }
+
+ diff /= w;
+ }
+
+ vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
+ gl_FragColor = diff + bloom;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
index ab48d08bbb..bf829bfc56 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl
new file mode 100644
index 0000000000..bf35dfe11c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl
@@ -0,0 +1,37 @@
+/**
+ * @file postDeferredF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2D bloomMap;
+
+uniform vec2 screen_res;
+varying vec2 vary_fragcoord;
+
+vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
+{
+ vec4 ret = vec4(0,0,0,0);
+
+ for (int i = 0; i < samples; ++i)
+ {
+ ret += texelFetch(tex,tc,i);
+ }
+
+ return ret/samples;
+}
+
+void main()
+{
+ vec4 diff = texture2DMS(diffuseRect, ivec2(vary_fragcoord.xy));
+
+ vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
+ gl_FragColor = diff + bloom;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
index 12983baa94..876f65ee3a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
index 63b3c9f205..fa3f04bcc8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
index ae57227fe5..eebe930666 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
index 6674c4a5aa..e0c5406483 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
index db3bddc6be..9271a5115c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec4 post_pos;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
new file mode 100644
index 0000000000..820c82ffd7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -0,0 +1,44 @@
+/**
+ * @file WLSkyF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+/////////////////////////////////////////////////////////////////////////
+// The fragment shader for the sky
+/////////////////////////////////////////////////////////////////////////
+
+varying vec4 vary_HazeColor;
+
+uniform sampler2D cloud_noise_texture;
+uniform vec4 gamma;
+
+/// Soft clips the light with a gamma correction
+vec3 scaleSoftClip(vec3 light) {
+ //soft clip effect:
+ light = 1. - clamp(light, vec3(0.), vec3(1.));
+ light = 1. - pow(light, gamma.xxx);
+
+ return light;
+}
+
+void main()
+{
+ // Potential Fill-rate optimization. Add cloud calculation
+ // back in and output alpha of 0 (so that alpha culling kills
+ // the fragment) if the sky wouldn't show up because the clouds
+ // are fully opaque.
+
+ vec4 color;
+ color = vary_HazeColor;
+ color *= 2.;
+
+ /// Gamma correct for WL (soft clip effect).
+ gl_FragData[0] = vec4(scaleSoftClip(color.rgb), 1.0);
+ gl_FragData[1] = vec4(0.0,0.0,0.0,0.0);
+ gl_FragData[2] = vec4(0,0,1,0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
new file mode 100644
index 0000000000..1ea00f723a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -0,0 +1,140 @@
+/**
+ * @file WLSkyV.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+// SKY ////////////////////////////////////////////////////////////////////////
+// The vertex shader for creating the atmospheric sky
+///////////////////////////////////////////////////////////////////////////////
+
+// Output parameters
+varying vec4 vary_HazeColor;
+
+// Inputs
+uniform vec3 camPosLocal;
+
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 max_y;
+
+uniform vec4 glow;
+
+uniform vec4 cloud_color;
+
+uniform vec4 cloud_scale;
+
+void main()
+{
+
+ // World / view / projection
+ gl_Position = ftransform();
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ // Get relative position
+ vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+ //vec3 P = gl_Vertex.xyz + vec3(0,50,0);
+
+ // Set altitude
+ if (P.y > 0.)
+ {
+ P *= (max_y.x / P.y);
+ }
+ else
+ {
+ P *= (-32000. / P.y);
+ }
+
+ // Can normalize then
+ vec3 Pn = normalize(P);
+ float Plen = length(P);
+
+ // Initialize temp variables
+ vec4 temp1 = vec4(0.);
+ vec4 temp2 = vec4(0.);
+ vec4 blue_weight;
+ vec4 haze_weight;
+ vec4 sunlight = sunlight_color;
+ vec4 light_atten;
+
+
+ // Sunlight attenuation effect (hue and brightness) due to atmosphere
+ // this is used later for sunlight modulation at various altitudes
+ light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+
+ // Calculate relative weights
+ temp1 = blue_density + haze_density.x;
+ blue_weight = blue_density / temp1;
+ haze_weight = haze_density.x / temp1;
+
+ // Compute sunlight from P & lightnorm (for long rays like sky)
+ temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // Distance
+ temp2.z = Plen * density_multiplier.x;
+
+ // Transparency (-> temp1)
+ // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
+ // compiler gets confused.
+ temp1 = exp(-temp1 * temp2.z);
+
+
+ // Compute haze glow
+ temp2.x = dot(Pn, lightnorm.xyz);
+ temp2.x = 1. - temp2.x;
+ // temp2.x is 0 at the sun and increases away from sun
+ temp2.x = max(temp2.x, .001);
+ // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ temp2.x *= glow.x;
+ // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ temp2.x = pow(temp2.x, glow.z);
+ // glow.z should be negative, so we're doing a sort of (1 / "angle") function
+
+ // Add "minimum anti-solar illumination"
+ temp2.x += .25;
+
+
+ // Haze color above cloud
+ vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient)
+ + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient)
+ );
+
+
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow.x);
+
+ // Haze color below cloud
+ vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ );
+
+ // Final atmosphere additive
+ vary_HazeColor *= (1. - temp1);
+
+ // Attenuate cloud color by atmosphere
+ temp1 = sqrt(temp1); //less atmos opacity (more transparency) below clouds
+
+ // At horizon, blend high altitude sky color towards the darker color below the clouds
+ vary_HazeColor += (additiveColorBelowCloud - vary_HazeColor) * (1. - sqrt(temp1));
+
+ // won't compile on mac without this being set
+ //vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 29340c7e9f..60082f40d6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -259,7 +259,7 @@ vec3 scaleSoftClip(vec3 light)
void main()
{
vec2 tc = vary_fragcoord.xy;
- float depth = texture2DRect(depthMap, tc.xy).a;
+ float depth = texture2DRect(depthMap, tc.xy).r;
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
new file mode 100644
index 0000000000..9dfacfb520
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
@@ -0,0 +1,318 @@
+/**
+ * @file softenLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS normalMap;
+uniform sampler2DMS depthMap;
+uniform sampler2D noiseMap;
+uniform samplerCube environmentMap;
+uniform sampler2D lightFunc;
+
+uniform float blur_size;
+uniform float blur_fidelity;
+
+// Inputs
+uniform vec4 morphFactor;
+uniform vec3 camPosLocal;
+//uniform vec4 camPosWorld;
+uniform vec4 gamma;
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 distance_multiplier;
+uniform vec4 max_y;
+uniform vec4 glow;
+uniform float scene_light_strength;
+uniform vec3 env_mat[3];
+//uniform mat4 shadow_matrix[3];
+//uniform vec4 shadow_clip;
+uniform mat3 ssao_effect_mat;
+
+varying vec4 vary_light;
+varying vec2 vary_fragcoord;
+
+vec3 vary_PositionEye;
+
+vec3 vary_SunlitColor;
+vec3 vary_AmblitColor;
+vec3 vary_AdditiveColor;
+vec3 vary_AtmosAttenuation;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+vec4 getPosition_d(vec2 pos_screen, float depth)
+{
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+vec3 getSunlitColor()
+{
+ return vary_SunlitColor;
+}
+vec3 getAmblitColor()
+{
+ return vary_AmblitColor;
+}
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return vary_AtmosAttenuation;
+}
+
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
+
+void setSunlitColor(vec3 v)
+{
+ vary_SunlitColor = v;
+}
+
+void setAmblitColor(vec3 v)
+{
+ vary_AmblitColor = v;
+}
+
+void setAdditiveColor(vec3 v)
+{
+ vary_AdditiveColor = v;
+}
+
+void setAtmosAttenuation(vec3 v)
+{
+ vary_AtmosAttenuation = v;
+}
+
+void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
+
+ vec3 P = inPositionEye;
+ setPositionEye(P);
+
+ //(TERRAIN) limit altitude
+ if (P.y > max_y.x) P *= (max_y.x / P.y);
+ if (P.y < -max_y.x) P *= (-max_y.x / P.y);
+
+ vec3 tmpLightnorm = lightnorm.xyz;
+
+ vec3 Pn = normalize(P);
+ float Plen = length(P);
+
+ vec4 temp1 = vec4(0);
+ vec3 temp2 = vec3(0);
+ vec4 blue_weight;
+ vec4 haze_weight;
+ vec4 sunlight = sunlight_color;
+ vec4 light_atten;
+
+ //sunlight attenuation effect (hue and brightness) due to atmosphere
+ //this is used later for sunlight modulation at various altitudes
+ light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ //I had thought blue_density and haze_density should have equal weighting,
+ //but attenuation due to haze_density tends to seem too strong
+
+ temp1 = blue_density + vec4(haze_density.r);
+ blue_weight = blue_density / temp1;
+ haze_weight = vec4(haze_density.r) / temp1;
+
+ //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
+ temp2.y = max(0.0, tmpLightnorm.y);
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // main atmospheric scattering line integral
+ temp2.z = Plen * density_multiplier.x;
+
+ // Transparency (-> temp1)
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // compiler gets confused.
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+
+ //final atmosphere attenuation factor
+ setAtmosAttenuation(temp1.rgb);
+
+ //compute haze glow
+ //(can use temp2.x as temp because we haven't used it yet)
+ temp2.x = dot(Pn, tmpLightnorm.xyz);
+ temp2.x = 1. - temp2.x;
+ //temp2.x is 0 at the sun and increases away from sun
+ temp2.x = max(temp2.x, .03); //was glow.y
+ //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ temp2.x *= glow.x;
+ //higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ temp2.x = pow(temp2.x, glow.z);
+ //glow.z should be negative, so we're doing a sort of (1 / "angle") function
+
+ //add "minimum anti-solar illumination"
+ temp2.x += .25;
+
+ //increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+
+ /* decrease value and saturation (that in HSV, not HSL) for occluded areas
+ * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
+ * // The following line of code performs the equivalent of:
+ * float ambAlpha = tmpAmbient.a;
+ * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
+ * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
+ * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
+ */
+ tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
+
+ //haze color
+ setAdditiveColor(
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ + tmpAmbient)));
+
+ //brightness of surface both sunlight and ambient
+ setSunlitColor(vec3(sunlight * .5));
+ setAmblitColor(vec3(tmpAmbient * .25));
+ setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
+}
+
+vec3 atmosLighting(vec3 light)
+{
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor();
+ return (2.0 * light);
+}
+
+vec3 atmosTransport(vec3 light) {
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor() * 2.0;
+ return light;
+}
+vec3 atmosGetDiffuseSunlightColor()
+{
+ return getSunlitColor();
+}
+
+vec3 scaleDownLight(vec3 light)
+{
+ return (light / scene_light_strength );
+}
+
+vec3 scaleUpLight(vec3 light)
+{
+ return (light * scene_light_strength);
+}
+
+vec3 atmosAmbient(vec3 light)
+{
+ return getAmblitColor() + light / 2.0;
+}
+
+vec3 atmosAffectDirectionalLight(float lightIntensity)
+{
+ return getSunlitColor() * lightIntensity;
+}
+
+vec3 scaleSoftClip(vec3 light)
+{
+ //soft clip effect:
+ light = 1. - clamp(light, vec3(0.), vec3(1.));
+ light = 1. - pow(light, gamma.xxx);
+
+ return light;
+}
+
+vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
+{
+ vec4 ret = vec4(0,0,0,0);
+
+ for (int i = 0; i < samples; ++i)
+ {
+ ret += texelFetch(tex,tc,i);
+ }
+
+ return ret/samples;
+}
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+ ivec2 itc = ivec2(tc);
+
+ vec3 fcol = vec3(0,0,0);
+
+ for (int i = 0; i < samples; ++i)
+ {
+ float depth = texelFetch(depthMap, itc, i).r;
+ vec3 pos = getPosition_d(tc, depth).xyz;
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
+
+ float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
+
+ vec4 diffuse = texelFetch(diffuseRect, itc, i);
+ if (diffuse.a >= 1.0)
+ {
+ fcol += diffuse.rgb;
+ }
+ else
+ {
+ vec4 spec = texelFetch(specularRect, itc, i);
+
+ calcAtmospherics(pos.xyz, 1.0);
+
+ vec3 col = atmosAmbient(vec3(0));
+ col += atmosAffectDirectionalLight(max(min(da, 1.0), diffuse.a));
+
+ col *= diffuse.rgb;
+
+ if (spec.a > 0.0) // specular reflection
+ {
+ // the old infinite-sky shiny reflection
+ //
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+ float sa = dot(refnormpersp, vary_light.xyz);
+ vec3 dumbshiny = vary_SunlitColor*texture2D(lightFunc, vec2(sa, spec.a)).a;
+
+ // add the two types of shiny together
+ col += dumbshiny * spec.rgb;
+ }
+
+ col = atmosLighting(col);
+ col = scaleSoftClip(col);
+ fcol += col;
+ }
+ }
+
+ gl_FragColor.rgb = fcol.rgb/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
index 8f0bcca76b..745cc01992 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index 29fac46bfe..9aaffc15bf 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl
new file mode 100644
index 0000000000..4bb9bad275
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl
@@ -0,0 +1,234 @@
+/**
+ * @file multiSpotLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+//class 1 -- no shadows
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+uniform sampler2D projectionMap;
+
+uniform mat4 proj_mat; //screen space to light space
+uniform float proj_near; //near clip for projection
+uniform vec3 proj_p; //plane projection is emitting from (in screen space)
+uniform vec3 proj_n;
+uniform float proj_focus; //distance from plane to begin blurring
+uniform float proj_lod; //(number of mips in proj map)
+uniform float proj_range; //range between near clip and far clip plane of projection
+uniform float proj_ambient_lod;
+uniform float proj_ambiance;
+uniform float near_clip;
+uniform float far_clip;
+
+uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
+uniform float sun_wash;
+uniform int proj_shadow_idx;
+uniform float shadow_fade;
+
+varying vec4 vary_light;
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform mat4 inv_proj;
+
+vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
+
+ float det = min(lod/(proj_lod*0.5), 1.0);
+
+ float d = min(dist.x, dist.y);
+
+ float edge = 0.25*det;
+
+ ret *= clamp(d/edge, 0.0, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
+
+ return ret;
+}
+
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec4 frag = vary_fragcoord;
+ frag.xyz /= frag.w;
+ frag.xyz = frag.xyz*0.5+0.5;
+ frag.xy *= screen_res;
+ ivec2 itc = ivec2(frag.xy);
+
+ vec3 fcol = vec3(0,0,0);
+ int wght = 0;
+
+ for (int i = 0; i < samples; ++i)
+ {
+ vec3 pos = getPosition(itc, i).xyz;
+ vec3 lv = vary_light.xyz-pos.xyz;
+ float dist2 = dot(lv,lv);
+ dist2 /= vary_light.w;
+ if (dist2 <= 1.0)
+ {
+ vec3 norm = texelFetch(normalMap, itc, i).xyz*2.0-1.0;
+
+ norm = normalize(norm);
+ float l_dist = -dot(lv, proj_n);
+
+ vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
+ if (proj_tc.z >= 0.0)
+ {
+ proj_tc.xyz /= proj_tc.w;
+
+ float fa = gl_Color.a+1.0;
+ float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
+ if (dist_atten > 0.0)
+ {
+ lv = proj_origin-pos.xyz;
+ lv = normalize(lv);
+ float da = dot(norm, lv);
+
+ vec3 col = vec3(0,0,0);
+
+ vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
+
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+ if (proj_tc.z > 0.0 &&
+ proj_tc.x < 1.0 &&
+ proj_tc.y < 1.0 &&
+ proj_tc.x > 0.0 &&
+ proj_tc.y > 0.0)
+ {
+ float lit = 0.0;
+ float amb_da = proj_ambiance;
+
+ if (da > 0.0)
+ {
+ float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
+ float lod = diff * proj_lod;
+
+ vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
+
+ vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+
+ lit = da * dist_atten * noise;
+
+ col = lcol*lit*diff_tex;
+ amb_da += (da*0.5)*proj_ambiance;
+ }
+
+ //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
+ vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
+
+ amb_da += (da*da*0.5+0.5)*proj_ambiance;
+
+ amb_da *= dist_atten * noise;
+
+ amb_da = min(amb_da, 1.0-lit);
+
+ col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ }
+
+
+ vec4 spec = texelFetch(specularRect, itc, i);
+ if (spec.a > 0.0)
+ {
+ vec3 ref = reflect(normalize(pos), norm);
+
+ //project from point pos in direction ref to plane proj_p, proj_n
+ vec3 pdelta = proj_p-pos;
+ float ds = dot(ref, proj_n);
+
+ if (ds < 0.0)
+ {
+ vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
+
+ vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
+
+ if (stc.z > 0.0)
+ {
+ stc.xy /= stc.w;
+
+ float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
+
+ stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+
+ if (stc.x < 1.0 &&
+ stc.y < 1.0 &&
+ stc.x > 0.0 &&
+ stc.y > 0.0)
+ {
+ vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+ col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
+ }
+ }
+ }
+ }
+
+ fcol += col;
+ ++wght;
+ }
+ }
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
new file mode 100644
index 0000000000..2cf7d194cc
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
@@ -0,0 +1,19 @@
+/**
+ * @file starsF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+uniform sampler2D diffuseMap;
+
+void main()
+{
+ vec4 col = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+
+ gl_FragData[0] = col;
+ gl_FragData[1] = vec4(0,0,0,0);
+ gl_FragData[2] = vec4(0,0,1,0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
new file mode 100644
index 0000000000..c43125dad9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
@@ -0,0 +1,17 @@
+/**
+ * @file starsV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+
+void main()
+{
+ //transform vertex
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_FrontColor = gl_Color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
index 00093836a2..f20886565a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
//class 1, no shadow, no SSAO, should never be called
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl
new file mode 100644
index 0000000000..f20886565a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl
@@ -0,0 +1,17 @@
+/**
+ * @file sunLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+//class 1, no shadow, no SSAO, should never be called
+
+#extension GL_ARB_texture_rectangle : enable
+
+void main()
+{
+ gl_FragColor = vec4(0,0,0,0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
index cd91351ad4..665d8126a0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -35,7 +35,7 @@ uniform float shadow_offset;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl
new file mode 100644
index 0000000000..32d1b2149a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl
@@ -0,0 +1,123 @@
+/**
+ * @file sunLightSSAOF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+//class 1 -- no shadow, SSAO only
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2D noiseMap;
+
+
+// Inputs
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform float ssao_radius;
+uniform float ssao_max_radius;
+uniform float ssao_factor;
+uniform float ssao_factor_inv;
+
+varying vec2 vary_fragcoord;
+varying vec4 vary_light;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+uniform float shadow_bias;
+uniform float shadow_offset;
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+//calculate decreases in ambient lighting when crowded out (SSAO)
+float calcAmbientOcclusion(vec4 pos, vec3 norm, int sample)
+{
+ float ret = 1.0;
+
+ vec2 kern[8];
+ // exponentially (^2) distant occlusion samples spread around origin
+ kern[0] = vec2(-1.0, 0.0) * 0.125*0.125;
+ kern[1] = vec2(1.0, 0.0) * 0.250*0.250;
+ kern[2] = vec2(0.0, 1.0) * 0.375*0.375;
+ kern[3] = vec2(0.0, -1.0) * 0.500*0.500;
+ kern[4] = vec2(0.7071, 0.7071) * 0.625*0.625;
+ kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750;
+ kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875;
+ kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000;
+
+ vec2 pos_screen = vary_fragcoord.xy;
+ vec3 pos_world = pos.xyz;
+ vec2 noise_reflect = texture2D(noiseMap, vary_fragcoord.xy/128.0).xy;
+
+ float angle_hidden = 0.0;
+ int points = 0;
+
+ float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
+
+ // it was found that keeping # of samples a constant was the fastest, probably due to compiler optimizations unrolling?)
+ for (int i = 0; i < 8; i++)
+ {
+ ivec2 samppos_screen = ivec2(pos_screen + scale * reflect(kern[i], noise_reflect));
+ vec3 samppos_world = getPosition(samppos_screen, sample).xyz;
+
+ vec3 diff = pos_world - samppos_world;
+ float dist2 = dot(diff, diff);
+
+ // assume each sample corresponds to an occluding sphere with constant radius, constant x-sectional area
+ // --> solid angle shrinking by the square of distance
+ //radius is somewhat arbitrary, can approx with just some constant k * 1 / dist^2
+ //(k should vary inversely with # of samples, but this is taken care of later)
+
+ angle_hidden = angle_hidden + float(dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) * min(1.0/dist2, ssao_factor_inv);
+
+ // 'blocked' samples (significantly closer to camera relative to pos_world) are "no data", not "no occlusion"
+ points = points + int(diff.z > -1.0);
+ }
+
+ angle_hidden = min(ssao_factor*angle_hidden/float(points), 1.0);
+
+ ret = (1.0 - (float(points != 0) * angle_hidden));
+
+ return min(ret, 1.0);
+}
+
+void main()
+{
+ vec2 pos_screen = vary_fragcoord.xy;
+ ivec2 itc = ivec2(pos_screen);
+
+ float col = 0;
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec4 pos = getPosition(itc, i);
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ col += calcAmbientOcclusion(pos,norm,i);
+ }
+
+ col /= samples;
+
+ gl_FragColor[0] = 1.0;
+ gl_FragColor[1] = col;
+ gl_FragColor[2] = 1.0;
+ gl_FragColor[3] = 1.0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
index 9beb513ad8..814deb3677 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec4 vary_light;
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index 0edae47918..d005f67bf6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D detail_0;
uniform sampler2D detail_1;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
index a6163063be..3038fd2966 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_normal;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index c54d9a1e3e..de7e038402 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
index 29689ecbaf..a9bef4292d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_normal;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index e76f598d09..2710422d32 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
index 649e392630..5397290b11 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index f2023fa5ea..32f5f5f236 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl
new file mode 100644
index 0000000000..9267a8585d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl
@@ -0,0 +1,38 @@
+/**
+ * @file glowExtractF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseMap;
+uniform float minLuminance;
+uniform float maxExtractAlpha;
+uniform vec3 lumWeights;
+uniform vec3 warmthWeights;
+uniform float warmthAmount;
+
+void main()
+{
+ ivec2 itc = ivec2(gl_TexCoord[0].xy);
+ vec4 fcol = vec4(0,0,0,0);
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec4 col = texelFetch(diffuseMap, itc, i);
+
+ /// CALCULATING LUMINANCE (Using NTSC lum weights)
+ /// http://en.wikipedia.org/wiki/Luma_%28video%29
+ float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
+ float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
+
+ fcol += vec4(col.rgb, max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha));
+ }
+
+ gl_FragColor = fcol/samples;
+}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
index 0ca0608b45..76736fed53 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void main()
{
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
index 65fc2e9f99..d3225546b3 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform float glowStrength;
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
index 0bd44cec90..9bb41626ae 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec2 glowDelta;
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
index ac00f15b35..cdc2ca3da2 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D detail0;
uniform sampler2D detail1;
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
index 1e19ee7699..8af981915b 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
index 34f78565a5..d94d986581 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// this class1 shader is just a copy of terrainF
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 0dfac84a6e..06854fcc0a 100644
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 4e9c09b1ea..0f24e3c35a 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec3 scaleSoftClip(vec3 inColor);
vec3 atmosTransport(vec3 inColor);
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index a34cf23790..630459b324 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 applyWaterFog(vec4 color)
{
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index 161c794c68..831d6a761c 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index 6f821f893d..f6c6d945de 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
index d1c98bf70c..f114f766bf 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void main()
{
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
index 9c59e8c3ad..1796730c92 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
index 1fee99c446..bfe0be9fdf 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index fb5da21c72..6f1fe91007 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
index 1bdaccf9b8..19072cd052 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
@@ -6,7 +6,7 @@
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform samplerCube environmentMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
index 2e94d3bbf1..0ae6dc89e2 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
@@ -6,7 +6,7 @@
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
index 714f9a2551..5d4bf2c33e 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l)
{
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index 65b45f8081..574252af12 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l)
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index 7f65ea76f7..29f575b7e5 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
index 8f13e6dc04..65da5a6825 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
index 56f31f6a79..d491f1102e 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
index 64d549ff52..ef38ee9699 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
index c5d084c132..286c92326b 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
index 732d246471..772a420e33 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
vec3 atmosAmbient(vec3 light);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
index 73e1a1ec26..da60a3ddf5 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l);
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index afc3dc89bf..c0b72115dd 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void fullbright_lighting();
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
index 3dc4294f67..391c06edc8 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void fullbright_shiny_lighting();
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
index f0baeeeee5..f44a5ce32e 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
index 02367b9439..31e0f0a429 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
index 5daf66fb31..8ffb252f57 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
void fullbright_shiny_lighting_water();
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
index 02ff3cc2a9..e5dafa8c78 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
index 38e07dbd80..3382384c99 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
index afaac4f69c..220f26614f 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void fullbright_lighting_water();
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
index 2cf7a69baa..d079de5377 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void shiny_lighting();
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
index 4146646058..cd655f3bb5 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
index 6ea83b721d..68a086dbc1 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
index e3babe2210..4649d1c47c 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void shiny_lighting_water();
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
index d449d37c0c..b4e4dcfbbf 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
@@ -5,8 +5,6 @@
* $/LicenseInfo$
*/
-#version 120
-
void default_lighting();
void main()
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
index be38a14d52..900448035c 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
index 0d8e14e2e3..b493f76fcc 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
index 68bd81e029..4ec5ee43b4 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void default_lighting_water();
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
index f337bde329..3d05850ab3 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec3 atmosLighting(vec3 light)
{
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 4b402a7028..f1a0af21af 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec3 atmosAmbient(vec3 light)
{
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
index 20948b1e46..73bbd57315 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void setPositionEye(vec3 v);
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
index 8a2c2a7186..e0eb7b3767 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_PositionEye;
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
index a1dd4ed5fe..a251213ff5 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_PositionEye;
diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
index 7aed1fd3b5..4958cb2f72 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec4 gamma;
diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
index 6780dc4d3e..75929bc609 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec3 atmosTransport(vec3 light)
{
diff --git a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
index 172c2ca078..3e8b719f93 100644
--- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 6dfc1b952c..681e52de2a 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -5,11 +5,10 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
-uniform sampler2D diffuseMap;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
@@ -105,7 +104,7 @@ void main()
}
}
- vec4 diff= texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 diff = diffuseLookup(gl_TexCoord[0].xy);
vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
vec4 color = diff * col;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
new file mode 100644
index 0000000000..5350359f75
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
@@ -0,0 +1,125 @@
+/**
+ * @file alphaF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRectShadow shadowMap0;
+uniform sampler2DRectShadow shadowMap1;
+uniform sampler2DRectShadow shadowMap2;
+uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DRect depthMap;
+uniform sampler2D diffuseMap;
+
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform vec2 screen_res;
+uniform vec2 shadow_res;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+varying vec3 vary_ambient;
+varying vec3 vary_directional;
+varying vec3 vary_fragcoord;
+varying vec3 vary_position;
+varying vec3 vary_pointlight_col;
+
+uniform float shadow_bias;
+
+uniform mat4 inv_proj;
+
+vec4 getPosition(vec2 pos_screen)
+{
+ float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos.xyz /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += shadow_bias;
+
+ float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs);
+
+ return shadow/5.0;
+}
+
+
+void main()
+{
+ vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
+ frag *= screen_res;
+
+ float shadow = 1.0;
+ vec4 pos = vec4(vary_position, 1.0);
+
+ vec4 spos = pos;
+
+ if (spos.z > -shadow_clip.w)
+ {
+ vec4 lpos;
+
+ if (spos.z < -shadow_clip.z)
+ {
+ lpos = shadow_matrix[3]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap3, lpos, 1.5);
+ shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
+ }
+ else if (spos.z < -shadow_clip.y)
+ {
+ lpos = shadow_matrix[2]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap2, lpos, 1.5);
+ }
+ else if (spos.z < -shadow_clip.x)
+ {
+ lpos = shadow_matrix[1]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap1, lpos, 1.5);
+ }
+ else
+ {
+ lpos = shadow_matrix[0]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap0, lpos, 1.5);
+ }
+ }
+
+ vec4 diff = texture2D(diffuseMap,gl_TexCoord[0].xy);
+
+ vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
+ vec4 color = diff * col;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ color.rgb += diff.rgb * vary_pointlight_col.rgb;
+
+ //gl_FragColor = gl_Color;
+ gl_FragColor = color;
+ //gl_FragColor.r = 0.0;
+ //gl_FragColor = vec4(1,shadow,1,1);
+
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
index dfb36980b0..948a52da5b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index f6160815eb..f616ecc872 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -22,6 +22,7 @@ varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
+varying float vary_texture_index;
uniform float near_clip;
uniform float shadow_offset;
@@ -60,11 +61,13 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 vert = vec4(gl_Vertex.xyz, 1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix * vert;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+ vec4 pos = (gl_ModelViewMatrix * vert);
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
@@ -99,7 +102,7 @@ void main()
gl_FogFragCoord = pos.z;
- pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ pos = gl_ModelViewProjectionMatrix * vert;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 0ae09df0c6..01e40afc4f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
index 3155f3f929..729e4b5543 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -22,7 +22,7 @@ uniform vec2 screen_res;
float getDepth(vec2 pos_screen)
{
- float z = texture2DRect(depthMap, pos_screen.xy).a;
+ float z = texture2DRect(depthMap, pos_screen.xy).r;
z = z*2.0-1.0;
vec4 ndc = vec4(0.0, 0.0, z, 1.0);
vec4 p = inv_proj*ndc;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl
new file mode 100644
index 0000000000..b22bc5b288
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl
@@ -0,0 +1,74 @@
+/**
+ * @file edgeF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+
+varying vec2 vary_fragcoord;
+
+uniform float depth_cutoff;
+uniform float norm_cutoff;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+float getDepth(ivec2 pos_screen, int sample)
+{
+ float z = texelFetch(depthMap, pos_screen, sample).r;
+ z = z*2.0-1.0;
+ vec4 ndc = vec4(0.0, 0.0, z, 1.0);
+ vec4 p = inv_proj*ndc;
+ return p.z/p.w;
+}
+
+void main()
+{
+ float e = 0;
+
+ ivec2 itc = ivec2(vary_fragcoord.xy);
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+ float depth = getDepth(itc, i);
+
+ vec2 tc = vary_fragcoord.xy;
+
+ int sc = 1;
+
+ vec2 de;
+ de.x = (depth-getDepth(itc+ivec2(sc, sc),i)) + (depth-getDepth(itc+ivec2(-sc, -sc), i));
+ de.y = (depth-getDepth(itc+ivec2(-sc, sc),i)) + (depth-getDepth(itc+ivec2(sc, -sc), i));
+ de /= depth;
+ de *= de;
+ de = step(depth_cutoff, de);
+
+ vec2 ne;
+ vec3 nexnorm = texelFetch(normalMap, itc+ivec2(-sc,-sc), i).rgb;
+ nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
+ ne.x = dot(nexnorm, norm);
+ vec3 neynorm = texelFetch(normalMap, itc+ivec2(sc,sc), i).rgb;
+ neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
+ ne.y = dot(neynorm, norm);
+
+ ne = 1.0-ne;
+
+ ne = step(norm_cutoff, ne);
+
+ e += dot(de,de)+dot(ne,ne);
+ }
+
+ e /= samples;
+
+ gl_FragColor.a = e;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
index b3413c301f..393084a3db 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index d6cd984ebe..f54186ffca 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -91,7 +91,7 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl
new file mode 100644
index 0000000000..fee32be3e3
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl
@@ -0,0 +1,244 @@
+/**
+ * @file multiSpotLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2DRect lightMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+uniform sampler2D projectionMap;
+
+uniform mat4 proj_mat; //screen space to light space
+uniform float proj_near; //near clip for projection
+uniform vec3 proj_p; //plane projection is emitting from (in screen space)
+uniform vec3 proj_n;
+uniform float proj_focus; //distance from plane to begin blurring
+uniform float proj_lod; //(number of mips in proj map)
+uniform float proj_range; //range between near clip and far clip plane of projection
+uniform float proj_ambient_lod;
+uniform float proj_ambiance;
+uniform float near_clip;
+uniform float far_clip;
+
+uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
+uniform float sun_wash;
+uniform int proj_shadow_idx;
+uniform float shadow_fade;
+
+varying vec4 vary_light;
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform mat4 inv_proj;
+
+vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
+
+ float det = min(lod/(proj_lod*0.5), 1.0);
+
+ float d = min(dist.x, dist.y);
+
+ float edge = 0.25*det;
+
+ ret *= clamp(d/edge, 0.0, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
+
+ return ret;
+}
+
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ int wght = 0;
+
+ vec3 fcol = vec3(0,0,0);
+
+ vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
+
+ ivec2 itc = ivec2(frag.xy);
+
+ float shadow = 1.0;
+
+ if (proj_shadow_idx >= 0)
+ {
+ vec4 shd = texture2DRect(lightMap, frag);
+ float sh[2];
+ sh[0] = shd.b;
+ sh[1] = shd.a;
+ shadow = min(sh[proj_shadow_idx]+shadow_fade, 1.0);
+ }
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec3 pos = getPosition(itc, i).xyz;
+ vec3 lv = vary_light.xyz-pos.xyz;
+ float dist2 = dot(lv,lv);
+ dist2 /= vary_light.w;
+ if (dist2 <= 1.0)
+ {
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+
+ norm = normalize(norm);
+ float l_dist = -dot(lv, proj_n);
+
+ vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
+ if (proj_tc.z >= 0.0)
+ {
+ proj_tc.xyz /= proj_tc.w;
+
+ float fa = gl_Color.a+1.0;
+ float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
+ if (dist_atten > 0.0)
+ {
+ lv = proj_origin-pos.xyz;
+ lv = normalize(lv);
+ float da = dot(norm, lv);
+
+ vec3 col = vec3(0,0,0);
+
+ vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
+
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+ if (proj_tc.z > 0.0 &&
+ proj_tc.x < 1.0 &&
+ proj_tc.y < 1.0 &&
+ proj_tc.x > 0.0 &&
+ proj_tc.y > 0.0)
+ {
+ float lit = 0.0;
+ float amb_da = proj_ambiance;
+
+ if (da > 0.0)
+ {
+ float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
+ float lod = diff * proj_lod;
+
+ vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
+
+ vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+
+ lit = da * dist_atten * noise;
+
+ col = lcol*lit*diff_tex*shadow;
+ amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
+ }
+
+ //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
+ vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
+
+ amb_da += (da*da*0.5+0.5)*proj_ambiance;
+
+ amb_da *= dist_atten * noise;
+
+ amb_da = min(amb_da, 1.0-lit);
+
+ col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ }
+
+
+ vec4 spec = texelFetch(specularRect, itc, i);
+ if (spec.a > 0.0)
+ {
+ vec3 ref = reflect(normalize(pos), norm);
+
+ //project from point pos in direction ref to plane proj_p, proj_n
+ vec3 pdelta = proj_p-pos;
+ float ds = dot(ref, proj_n);
+
+ if (ds < 0.0)
+ {
+ vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
+
+ vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
+
+ if (stc.z > 0.0)
+ {
+ stc.xy /= stc.w;
+
+ float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
+
+ stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+
+ if (stc.x < 1.0 &&
+ stc.y < 1.0 &&
+ stc.x > 0.0 &&
+ stc.y > 0.0)
+ {
+ vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+ col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
+ }
+ }
+ }
+ }
+
+ fcol += col;
+ wght++;
+ }
+ }
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 0160e84278..66a1a8515f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -71,7 +71,7 @@ vec4 getPosition_d(vec2 pos_screen, float depth)
vec4 getPosition(vec2 pos_screen)
{ //get position in screen space (world units) given window coordinate and depth map
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
return getPosition_d(pos_screen, depth);
}
@@ -258,7 +258,7 @@ vec3 scaleSoftClip(vec3 light)
void main()
{
vec2 tc = vary_fragcoord.xy;
- float depth = texture2DRect(depthMap, tc.xy).a;
+ float depth = texture2DRect(depthMap, tc.xy).r;
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
@@ -288,54 +288,8 @@ void main()
float sa = dot(refnormpersp, vary_light.xyz);
vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
- /*
- // screen-space cheap fakey reflection map
- //
- vec3 refnorm = normalize(reflect(vec3(0,0,-1), norm.xyz));
- depth -= 0.5; // unbias depth
- // first figure out where we'll make our 2D guess from
- vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
- // Offset the guess source a little according to a trivial
- // checkerboard dither function and spec.a.
- // This is meant to be similar to sampling a blurred version
- // of the diffuse map. LOD would be better in that regard.
- // The goal of the blur is to soften reflections in surfaces
- // with low shinyness, and also to disguise our lameness.
- float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
- ref2d += vec2(checkoffset, checkoffset);
- ref2d += tc.xy; // use as offset from destination
- // Get attributes from the 2D guess point.
- // We average two samples of diffuse (not of anything else) per
- // pixel to try to reduce aliasing some more.
- vec3 refcol = 0.5 * (texture2DRect(diffuseRect, ref2d + vec2(0.0, -checkoffset)).rgb +
- texture2DRect(diffuseRect, ref2d + vec2(-checkoffset, 0.0)).rgb);
- float refdepth = texture2DRect(depthMap, ref2d).a;
- vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
- float refshad = texture2DRect(lightMap, ref2d).r;
- vec3 refn = texture2DRect(normalMap, ref2d).rgb;
- refn = vec3((refn.xy-0.5)*2.0,refn.z); // unpack norm
- refn = normalize(refn);
- // figure out how appropriate our guess actually was
- float refapprop = max(0.0, dot(-refnorm, normalize(pos - refpos)));
- // darken reflections from points which face away from the reflected ray - our guess was a back-face
- //refapprop *= step(dot(refnorm, refn), 0.0);
- refapprop = min(refapprop, max(0.0, -dot(refnorm, refn))); // more conservative variant
- // get appropriate light strength for guess-point
- // reflect light direction to increase the illusion that
- // these are reflections.
- vec3 reflight = reflect(lightnorm.xyz, norm.xyz);
- float reflit = min(max(dot(refn, reflight.xyz), 0.0), refshad);
- // apply sun color to guess-point, dampen according to inappropriateness of guess
- float refmod = min(refapprop, reflit);
- vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
- vec3 ssshiny = (refprod * spec.a);
- ssshiny *= 0.3; // dampen it even more
- */
- vec3 ssshiny = vec3(0,0,0);
-
// add the two types of shiny together
- col += (ssshiny + dumbshiny) * spec.rgb;
+ col += dumbshiny * spec.rgb;
}
col = atmosLighting(col);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl
new file mode 100644
index 0000000000..0bae10ca7d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl
@@ -0,0 +1,307 @@
+/**
+ * @file softenLightMSF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS normalMap;
+uniform sampler2DRect lightMap;
+uniform sampler2DMS depthMap;
+uniform sampler2D noiseMap;
+uniform samplerCube environmentMap;
+uniform sampler2D lightFunc;
+uniform vec3 gi_quad;
+
+uniform float blur_size;
+uniform float blur_fidelity;
+
+// Inputs
+uniform vec4 morphFactor;
+uniform vec3 camPosLocal;
+//uniform vec4 camPosWorld;
+uniform vec4 gamma;
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 distance_multiplier;
+uniform vec4 max_y;
+uniform vec4 glow;
+uniform float scene_light_strength;
+uniform vec3 env_mat[3];
+uniform vec4 shadow_clip;
+uniform mat3 ssao_effect_mat;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+varying vec4 vary_light;
+varying vec2 vary_fragcoord;
+
+vec3 vary_PositionEye;
+
+vec3 vary_SunlitColor;
+vec3 vary_AmblitColor;
+vec3 vary_AdditiveColor;
+vec3 vary_AtmosAttenuation;
+
+vec4 getPosition_d(vec2 pos_screen, float depth)
+{
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+vec3 getSunlitColor()
+{
+ return vary_SunlitColor;
+}
+vec3 getAmblitColor()
+{
+ return vary_AmblitColor;
+}
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return vary_AtmosAttenuation;
+}
+
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
+
+void setSunlitColor(vec3 v)
+{
+ vary_SunlitColor = v;
+}
+
+void setAmblitColor(vec3 v)
+{
+ vary_AmblitColor = v;
+}
+
+void setAdditiveColor(vec3 v)
+{
+ vary_AdditiveColor = v;
+}
+
+void setAtmosAttenuation(vec3 v)
+{
+ vary_AtmosAttenuation = v;
+}
+
+void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
+
+ vec3 P = inPositionEye;
+ setPositionEye(P);
+
+ //(TERRAIN) limit altitude
+ if (P.y > max_y.x) P *= (max_y.x / P.y);
+ if (P.y < -max_y.x) P *= (-max_y.x / P.y);
+
+ vec3 tmpLightnorm = lightnorm.xyz;
+
+ vec3 Pn = normalize(P);
+ float Plen = length(P);
+
+ vec4 temp1 = vec4(0);
+ vec3 temp2 = vec3(0);
+ vec4 blue_weight;
+ vec4 haze_weight;
+ vec4 sunlight = sunlight_color;
+ vec4 light_atten;
+
+ //sunlight attenuation effect (hue and brightness) due to atmosphere
+ //this is used later for sunlight modulation at various altitudes
+ light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ //I had thought blue_density and haze_density should have equal weighting,
+ //but attenuation due to haze_density tends to seem too strong
+
+ temp1 = blue_density + vec4(haze_density.r);
+ blue_weight = blue_density / temp1;
+ haze_weight = vec4(haze_density.r) / temp1;
+
+ //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
+ temp2.y = max(0.0, tmpLightnorm.y);
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // main atmospheric scattering line integral
+ temp2.z = Plen * density_multiplier.x;
+
+ // Transparency (-> temp1)
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // compiler gets confused.
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+
+ //final atmosphere attenuation factor
+ setAtmosAttenuation(temp1.rgb);
+
+ //compute haze glow
+ //(can use temp2.x as temp because we haven't used it yet)
+ temp2.x = dot(Pn, tmpLightnorm.xyz);
+ temp2.x = 1. - temp2.x;
+ //temp2.x is 0 at the sun and increases away from sun
+ temp2.x = max(temp2.x, .03); //was glow.y
+ //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ temp2.x *= glow.x;
+ //higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ temp2.x = pow(temp2.x, glow.z);
+ //glow.z should be negative, so we're doing a sort of (1 / "angle") function
+
+ //add "minimum anti-solar illumination"
+ temp2.x += .25;
+
+ //increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+
+ /* decrease value and saturation (that in HSV, not HSL) for occluded areas
+ * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
+ * // The following line of code performs the equivalent of:
+ * float ambAlpha = tmpAmbient.a;
+ * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
+ * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
+ * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
+ */
+ tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
+
+ //haze color
+ setAdditiveColor(
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ + tmpAmbient)));
+
+ //brightness of surface both sunlight and ambient
+ setSunlitColor(vec3(sunlight * .5));
+ setAmblitColor(vec3(tmpAmbient * .25));
+ setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
+}
+
+vec3 atmosLighting(vec3 light)
+{
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor();
+ return (2.0 * light);
+}
+
+vec3 atmosTransport(vec3 light) {
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor() * 2.0;
+ return light;
+}
+vec3 atmosGetDiffuseSunlightColor()
+{
+ return getSunlitColor();
+}
+
+vec3 scaleDownLight(vec3 light)
+{
+ return (light / scene_light_strength );
+}
+
+vec3 scaleUpLight(vec3 light)
+{
+ return (light * scene_light_strength);
+}
+
+vec3 atmosAmbient(vec3 light)
+{
+ return getAmblitColor() + light / 2.0;
+}
+
+vec3 atmosAffectDirectionalLight(float lightIntensity)
+{
+ return getSunlitColor() * lightIntensity;
+}
+
+vec3 scaleSoftClip(vec3 light)
+{
+ //soft clip effect:
+ light = 1. - clamp(light, vec3(0.), vec3(1.));
+ light = 1. - pow(light, gamma.xxx);
+
+ return light;
+}
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+ ivec2 itc = ivec2(tc);
+
+ vec3 fcol = vec3(0,0,0);
+
+ vec2 scol_ambocc = texture2DRect(lightMap, tc).rg;
+ float ambocc = scol_ambocc.g;
+
+ for (int i = 0; i < samples; ++i)
+ {
+ float depth = texelFetch(depthMap, itc.xy, i).r;
+ vec3 pos = getPosition_d(tc, depth).xyz;
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+
+ float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
+
+ vec4 diffuse = texelFetch(diffuseRect, itc, i);
+ vec4 spec = texelFetch(specularRect, itc, i);
+
+ float amb = 0;
+
+ float scol = max(scol_ambocc.r, diffuse.a);
+ amb += ambocc;
+
+ calcAtmospherics(pos.xyz, ambocc);
+
+ vec3 col = atmosAmbient(vec3(0));
+ col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
+
+ col *= diffuse.rgb;
+
+ if (spec.a > 0.0) // specular reflection
+ {
+ // the old infinite-sky shiny reflection
+ //
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+ float sa = dot(refnormpersp, vary_light.xyz);
+ vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
+
+ // add the two types of shiny together
+ col += dumbshiny * spec.rgb;
+ }
+
+ col = atmosLighting(col);
+ col = scaleSoftClip(col);
+
+ fcol += col;
+ }
+
+ gl_FragColor.rgb = fcol/samples;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
index 8f0bcca76b..745cc01992 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 50b9ef276e..cd3828fbd4 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl
new file mode 100644
index 0000000000..ec9b547a47
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl
@@ -0,0 +1,245 @@
+/**
+ * @file multiSpotLightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+uniform sampler2DMS diffuseRect;
+uniform sampler2DMS specularRect;
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2DRect lightMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
+uniform sampler2D projectionMap;
+
+uniform mat4 proj_mat; //screen space to light space
+uniform float proj_near; //near clip for projection
+uniform vec3 proj_p; //plane projection is emitting from (in screen space)
+uniform vec3 proj_n;
+uniform float proj_focus; //distance from plane to begin blurring
+uniform float proj_lod; //(number of mips in proj map)
+uniform float proj_range; //range between near clip and far clip plane of projection
+uniform float proj_ambient_lod;
+uniform float proj_ambiance;
+uniform float near_clip;
+uniform float far_clip;
+
+uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
+uniform float sun_wash;
+uniform int proj_shadow_idx;
+uniform float shadow_fade;
+
+varying vec4 vary_light;
+
+varying vec4 vary_fragcoord;
+uniform vec2 screen_res;
+
+uniform mat4 inv_proj;
+
+vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float det = max(1.0-lod/(proj_lod*0.5), 0.0);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
+
+ float det = min(lod/(proj_lod*0.5), 1.0);
+
+ float d = min(dist.x, dist.y);
+
+ float edge = 0.25*det;
+
+ ret *= clamp(d/edge, 0.0, 1.0);
+
+ return ret;
+}
+
+vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
+{
+ vec4 ret = texture2DLod(projectionMap, tc, lod);
+
+ vec2 dist = tc-vec2(0.5);
+
+ float d = dot(dist,dist);
+
+ ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
+
+ return ret;
+}
+
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec4 frag = vary_fragcoord;
+ frag.xyz /= frag.w;
+ frag.xyz = frag.xyz*0.5+0.5;
+ frag.xy *= screen_res;
+ ivec2 itc = ivec2(frag.xy);
+
+ vec3 fcol = vec3(0,0,0);
+ int wght = 0;
+
+ float shadow = 1.0;
+
+ if (proj_shadow_idx >= 0)
+ {
+ vec4 shd = texture2DRect(lightMap, frag.xy);
+ float sh[2];
+ sh[0] = shd.b;
+ sh[1] = shd.a;
+ shadow = min(sh[proj_shadow_idx]+shadow_fade, 1.0);
+ }
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec3 pos = getPosition(itc, i).xyz;
+ vec3 lv = vary_light.xyz-pos.xyz;
+ float dist2 = dot(lv,lv);
+ dist2 /= vary_light.w;
+ if (dist2 <= 1.0)
+ {
+ vec3 norm = texelFetch(normalMap, itc, i).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
+
+ norm = normalize(norm);
+ float l_dist = -dot(lv, proj_n);
+
+ vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
+ if (proj_tc.z >= 0.0)
+ {
+ proj_tc.xyz /= proj_tc.w;
+
+ float fa = gl_Color.a+1.0;
+ float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
+ if (dist_atten > 0.0)
+ {
+ lv = proj_origin-pos.xyz;
+ lv = normalize(lv);
+ float da = dot(norm, lv);
+
+ vec3 col = vec3(0,0,0);
+
+ vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
+
+ float noise = texture2D(noiseMap, frag.xy/128.0).b;
+ if (proj_tc.z > 0.0 &&
+ proj_tc.x < 1.0 &&
+ proj_tc.y < 1.0 &&
+ proj_tc.x > 0.0 &&
+ proj_tc.y > 0.0)
+ {
+ float lit = 0.0;
+ float amb_da = proj_ambiance;
+
+ if (da > 0.0)
+ {
+ float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
+ float lod = diff * proj_lod;
+
+ vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
+
+ vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+
+ lit = da * dist_atten * noise;
+
+ col = lcol*lit*diff_tex*shadow;
+ amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
+ }
+
+ //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
+ vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
+
+ amb_da += (da*da*0.5+0.5)*proj_ambiance;
+
+ amb_da *= dist_atten * noise;
+
+ amb_da = min(amb_da, 1.0-lit);
+
+ col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ }
+
+
+ vec4 spec = texelFetch(specularRect, itc, i);
+ if (spec.a > 0.0)
+ {
+ vec3 ref = reflect(normalize(pos), norm);
+
+ //project from point pos in direction ref to plane proj_p, proj_n
+ vec3 pdelta = proj_p-pos;
+ float ds = dot(ref, proj_n);
+
+ if (ds < 0.0)
+ {
+ vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
+
+ vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
+
+ if (stc.z > 0.0)
+ {
+ stc.xy /= stc.w;
+
+ float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
+
+ stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+
+ if (stc.x < 1.0 &&
+ stc.y < 1.0 &&
+ stc.x > 0.0 &&
+ stc.y > 0.0)
+ {
+ vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
+ col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
+ }
+ }
+ }
+ }
+
+ fcol += col;
+ wght++;
+ }
+ }
+ }
+ }
+
+ if (wght <= 0)
+ {
+ discard;
+ }
+
+ gl_FragColor.rgb = fcol/wght;
+ gl_FragColor.a = 0.0;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 4369b3b34f..315139b415 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -45,7 +45,7 @@ uniform float spot_shadow_offset;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl
new file mode 100644
index 0000000000..63d13c996d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl
@@ -0,0 +1,202 @@
+/**
+ * @file sunLightMSF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+//class 2, shadows, no SSAO
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2DRectShadow shadowMap0;
+uniform sampler2DRectShadow shadowMap1;
+uniform sampler2DRectShadow shadowMap2;
+uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap4;
+uniform sampler2DShadow shadowMap5;
+
+
+// Inputs
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform float ssao_radius;
+uniform float ssao_max_radius;
+uniform float ssao_factor;
+uniform float ssao_factor_inv;
+
+varying vec2 vary_fragcoord;
+varying vec4 vary_light;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+uniform vec2 shadow_res;
+uniform vec2 proj_shadow_res;
+
+uniform float shadow_bias;
+uniform float shadow_offset;
+
+uniform float spot_shadow_bias;
+uniform float spot_shadow_offset;
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen.xy, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += shadow_bias*scl;
+
+ float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs);
+
+ return shadow/5.0;
+
+ //return shadow;
+}
+
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += spot_shadow_bias*scl;
+
+ float cs = shadow2D(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ vec2 off = 1.5/proj_shadow_res;
+
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
+
+ return shadow/5.0;
+
+ //return shadow;
+}
+
+void main()
+{
+ vec2 pos_screen = vary_fragcoord.xy;
+ ivec2 itc = ivec2(pos_screen);
+
+ //try doing an unproject here
+
+ vec4 fcol = vec4(0,0,0,0);
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec4 pos = getPosition(itc, i);
+
+ vec4 nmap4 = texelFetch(normalMap, itc, i);
+ nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
+ float displace = nmap4.w;
+ vec3 norm = nmap4.xyz;
+
+ /*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
+ {
+ gl_FragColor = vec4(0.0); // doesn't matter
+ return;
+ }*/
+
+ float shadow = 1.0;
+ float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
+
+ vec3 shadow_pos = pos.xyz + displace*norm;
+ vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
+
+ vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
+
+ if (spos.z > -shadow_clip.w)
+ {
+ if (dp_directional_light == 0.0)
+ {
+ // if we know this point is facing away from the sun then we know it's in shadow without having to do a squirrelly shadow-map lookup
+ shadow = 0.0;
+ }
+ else
+ {
+ vec4 lpos;
+
+ if (spos.z < -shadow_clip.z)
+ {
+ lpos = shadow_matrix[3]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap3, lpos, 0.25);
+ shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
+ }
+ else if (spos.z < -shadow_clip.y)
+ {
+ lpos = shadow_matrix[2]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap2, lpos, 0.5);
+ }
+ else if (spos.z < -shadow_clip.x)
+ {
+ lpos = shadow_matrix[1]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap1, lpos, 0.75);
+ }
+ else
+ {
+ lpos = shadow_matrix[0]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap0, lpos, 1.0);
+ }
+
+ // take the most-shadowed value out of these two:
+ // * the blurred sun shadow in the light (shadow) map
+ // * an unblurred dot product between the sun and this norm
+ // the goal is to err on the side of most-shadow to fill-in shadow holes and reduce artifacting
+ shadow = min(shadow, dp_directional_light);
+
+ //lpos.xy /= lpos.w*32.0;
+ //if (fract(lpos.x) < 0.1 || fract(lpos.y) < 0.1)
+ //{
+ // shadow = 0.0;
+ //}
+
+ }
+ }
+ else
+ {
+ // more distant than the shadow map covers
+ shadow = 1.0;
+ }
+
+ fcol[0] += shadow;
+ fcol[1] += 1.0;
+
+ spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
+
+ //spotlight shadow 1
+ vec4 lpos = shadow_matrix[4]*spos;
+ fcol[2] += pcfShadow(shadowMap4, lpos, 0.8);
+
+ //spotlight shadow 2
+ lpos = shadow_matrix[5]*spos;
+ fcol[3] += pcfShadow(shadowMap5, lpos, 0.8);
+ }
+
+ gl_FragColor = fcol/samples;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index 847b36b1ac..d53850b489 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -5,7 +5,7 @@
* $License$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
@@ -45,7 +45,7 @@ uniform float spot_shadow_offset;
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
@@ -234,7 +234,7 @@ void main()
gl_FragColor[0] = shadow;
gl_FragColor[1] = calcAmbientOcclusion(pos, norm);
- spos.xyz = shadow_pos+offset*spot_shadow_offset;
+ spos.xyz = shadow_pos+norm*spot_shadow_offset;
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl
new file mode 100644
index 0000000000..a2a76eed9f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl
@@ -0,0 +1,241 @@
+/**
+ * @file sunLightSSAOF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_texture_multisample : enable
+
+//class 2 -- shadows and SSAO
+
+uniform sampler2DMS depthMap;
+uniform sampler2DMS normalMap;
+uniform sampler2DRectShadow shadowMap0;
+uniform sampler2DRectShadow shadowMap1;
+uniform sampler2DRectShadow shadowMap2;
+uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap4;
+uniform sampler2DShadow shadowMap5;
+uniform sampler2D noiseMap;
+
+// Inputs
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform float ssao_radius;
+uniform float ssao_max_radius;
+uniform float ssao_factor;
+uniform float ssao_factor_inv;
+
+varying vec2 vary_fragcoord;
+varying vec4 vary_light;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+uniform vec2 shadow_res;
+uniform vec2 proj_shadow_res;
+
+uniform float shadow_bias;
+uniform float shadow_offset;
+
+uniform float spot_shadow_bias;
+uniform float spot_shadow_offset;
+
+vec4 getPosition(ivec2 pos_screen, int sample)
+{
+ float depth = texelFetch(depthMap, pos_screen, sample).r;
+ vec2 sc = vec2(pos_screen.xy)*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+//calculate decreases in ambient lighting when crowded out (SSAO)
+float calcAmbientOcclusion(vec4 pos, vec3 norm, int sample)
+{
+ float ret = 1.0;
+
+ vec2 kern[8];
+ // exponentially (^2) distant occlusion samples spread around origin
+ kern[0] = vec2(-1.0, 0.0) * 0.125*0.125;
+ kern[1] = vec2(1.0, 0.0) * 0.250*0.250;
+ kern[2] = vec2(0.0, 1.0) * 0.375*0.375;
+ kern[3] = vec2(0.0, -1.0) * 0.500*0.500;
+ kern[4] = vec2(0.7071, 0.7071) * 0.625*0.625;
+ kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750;
+ kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875;
+ kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000;
+
+ vec2 pos_screen = vary_fragcoord.xy;
+ vec3 pos_world = pos.xyz;
+ vec2 noise_reflect = texture2D(noiseMap, vary_fragcoord.xy/128.0).xy;
+
+ float angle_hidden = 0.0;
+ int points = 0;
+
+ float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
+
+ // it was found that keeping # of samples a constant was the fastest, probably due to compiler optimizations (unrolling?)
+ for (int i = 0; i < 8; i++)
+ {
+ ivec2 samppos_screen = ivec2(pos_screen + scale * reflect(kern[i], noise_reflect));
+ vec3 samppos_world = getPosition(samppos_screen, sample).xyz;
+
+ vec3 diff = pos_world - samppos_world;
+ float dist2 = dot(diff, diff);
+
+ // assume each sample corresponds to an occluding sphere with constant radius, constant x-sectional area
+ // --> solid angle shrinking by the square of distance
+ //radius is somewhat arbitrary, can approx with just some constant k * 1 / dist^2
+ //(k should vary inversely with # of samples, but this is taken care of later)
+
+ angle_hidden = angle_hidden + float(dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) * min(1.0/dist2, ssao_factor_inv);
+
+ // 'blocked' samples (significantly closer to camera relative to pos_world) are "no data", not "no occlusion"
+ points = points + int(diff.z > -1.0);
+ }
+
+ angle_hidden = min(ssao_factor*angle_hidden/float(points), 1.0);
+
+ ret = (1.0 - (float(points != 0) * angle_hidden));
+
+ return min(ret, 1.0);
+}
+
+float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += shadow_bias*scl;
+
+ float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs);
+
+ return shadow/5.0;
+
+ //return shadow;
+}
+
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += spot_shadow_bias*scl;
+
+ float cs = shadow2D(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ vec2 off = 1.5/proj_shadow_res;
+
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
+
+
+ return shadow/5.0;
+
+ //return shadow;
+}
+
+void main()
+{
+ vec2 pos_screen = vary_fragcoord.xy;
+ ivec2 itc = ivec2(pos_screen);
+ vec4 fcol = vec4(0,0,0,0);
+
+ for (int i = 0; i < samples; i++)
+ {
+ vec4 pos = getPosition(itc, i);
+
+ vec4 nmap4 = texelFetch(normalMap, itc, i);
+ nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
+ float displace = nmap4.w;
+ vec3 norm = nmap4.xyz;
+
+ float shadow = 1.0;
+ float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
+
+ vec3 shadow_pos = pos.xyz + displace*norm;
+ vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
+
+ vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
+
+ if (spos.z > -shadow_clip.w)
+ {
+ if (dp_directional_light == 0.0)
+ {
+ // if we know this point is facing away from the sun then we know it's in shadow without having to do a squirrelly shadow-map lookup
+ shadow = 0.0;
+ }
+ else
+ {
+ vec4 lpos;
+
+ if (spos.z < -shadow_clip.z)
+ {
+ lpos = shadow_matrix[3]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap3, lpos, 0.25);
+ shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
+ }
+ else if (spos.z < -shadow_clip.y)
+ {
+ lpos = shadow_matrix[2]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap2, lpos, 0.5);
+ }
+ else if (spos.z < -shadow_clip.x)
+ {
+ lpos = shadow_matrix[1]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap1, lpos, 0.75);
+ }
+ else
+ {
+ lpos = shadow_matrix[0]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap0, lpos, 1.0);
+ }
+
+ // take the most-shadowed value out of these two:
+ // * the blurred sun shadow in the light (shadow) map
+ // * an unblurred dot product between the sun and this norm
+ // the goal is to err on the side of most-shadow to fill-in shadow holes and reduce artifacting
+ shadow = min(shadow, dp_directional_light);
+
+ }
+ }
+ else
+ {
+ // more distant than the shadow map covers
+ shadow = 1.0;
+ }
+
+
+ fcol[0] += shadow;
+ fcol[1] += calcAmbientOcclusion(pos, norm, i);
+
+ spos.xyz = shadow_pos+offset*spot_shadow_offset;
+
+ //spotlight shadow 1
+ vec4 lpos = shadow_matrix[4]*spos;
+ fcol[2] += pcfShadow(shadowMap4, lpos, 0.8);
+
+ //spotlight shadow 2
+ lpos = shadow_matrix[5]*spos;
+ fcol[3] += pcfShadow(shadowMap5, lpos, 0.8);
+ }
+
+ gl_FragColor = fcol / samples;
+}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
index 9beb513ad8..814deb3677 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec4 vary_light;
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
index a4ad0bfa15..dff4d4a68f 100644
--- a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect RenderTexture;
uniform float bloomStrength;
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
index d471a6c5e5..de469542f9 100644
--- a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec2 texelSize;
uniform vec2 blurDirection;
diff --git a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
index 66880b958e..8871bb3fc7 100644
--- a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect RenderTexture;
uniform float brightness;
diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
index c35c500d62..9c52b8dd5d 100644
--- a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void main(void)
{
diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
index e77baa5bee..713f8021de 100644
--- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect RenderTexture;
uniform float extractLow;
diff --git a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
index 8e0eec6f5e..fd94b2e95f 100644
--- a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect RenderTexture;
uniform sampler2D NoiseTexture;
diff --git a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
index 98a50e22fc..a1a9c9716c 100644
--- a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
+++ b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect RenderTexture;
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
index bbb8951f3a..9527dc469b 100644
--- a/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D detail_0;
uniform sampler2D detail_1;
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
index 84906c16bf..2658bee88d 100644
--- a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
void calcAtmospherics(vec3 inPositionEye);
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
index 7590c542ef..974e227b77 100644
--- a/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D detail_0;
uniform sampler2D detail_1;
diff --git a/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
index 900f1a6cb8..702e0881ac 100644
--- a/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
index f4f6b6e90f..c4e4bc08c5 100644
--- a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec3 scaleSoftClip(vec3 inColor);
vec3 atmosTransport(vec3 inColor);
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
index 9f3328cbf0..b66b72b401 100644
--- a/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec4 lightnorm;
uniform vec4 waterPlane;
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
index 342bc2ab66..4c31602736 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
@@ -5,16 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
void default_lighting()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
color.rgb = atmosLighting(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
index dad18b5883..95bd052b5d 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
@@ -5,16 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
void fullbright_lighting()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
color.rgb = fullbrightAtmosTransport(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl
new file mode 100644
index 0000000000..b1e61e1a33
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl
@@ -0,0 +1,25 @@
+/**
+ * @file lightFullbrightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+uniform sampler2D diffuseMap;
+
+void fullbright_lighting()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
index 73ff81e03a..26f0ea84e0 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
@@ -5,9 +5,8 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
+
uniform samplerCube environmentMap;
vec3 fullbrightShinyAtmosTransport(vec3 light);
@@ -15,7 +14,7 @@ vec3 fullbrightScaleSoftClip(vec3 light);
void fullbright_shiny_lighting()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy);
color.rgb *= gl_Color.rgb;
vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl
new file mode 100644
index 0000000000..953298da0d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl
@@ -0,0 +1,32 @@
+/**
+ * @file lightFullbrightShinyF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+void fullbright_shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ color.a = max(color.a, gl_Color.a);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl
index 9b4b584369..a6e10a249d 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl
@@ -5,9 +5,9 @@
* $License$
*/
-#version 120
-uniform sampler2D diffuseMap;
+
+
uniform samplerCube environmentMap;
vec3 fullbrightShinyAtmosTransport(vec3 light);
@@ -16,7 +16,7 @@ vec4 applyWaterFog(vec4 color);
void fullbright_shiny_lighting_water()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy);
color.rgb *= gl_Color.rgb;
vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..b4bb665a2b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
@@ -0,0 +1,32 @@
+/**
+ * @file lightFullbrightShinyWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_shiny_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.a = max(color.a, gl_Color.a);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
index 3d46c8d874..887d4130e7 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
@@ -5,16 +5,16 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
+
+vec4 diffuseLookup(vec2 texcoord);
vec3 fullbrightAtmosTransport(vec3 light);
vec4 applyWaterFog(vec4 color);
void fullbright_lighting_water()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
color.rgb = fullbrightAtmosTransport(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..1234682ae9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl
@@ -0,0 +1,23 @@
+/**
+ * @file lightFullbrightWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl
new file mode 100644
index 0000000000..149cf791f5
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl
@@ -0,0 +1,25 @@
+/**
+ * @file lightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+void default_lighting()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
index ebe21320b4..300fcac092 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
@@ -5,9 +5,9 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
+
+
uniform samplerCube environmentMap;
vec3 scaleSoftClip(vec3 light);
@@ -16,7 +16,7 @@ vec4 applyWaterFog(vec4 color);
void shiny_lighting()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy);
color.rgb *= gl_Color.rgb;
vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl
new file mode 100644
index 0000000000..e877c0abb1
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl
@@ -0,0 +1,32 @@
+/**
+ * @file lightShinyF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 scaleSoftClip(vec3 light);
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = max(color.a, gl_Color.a);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
index 7f48e2cf1d..07572fa915 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
@@ -5,10 +5,9 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
+
uniform samplerCube environmentMap;
vec3 atmosLighting(vec3 light);
@@ -16,7 +15,7 @@ vec4 applyWaterFog(vec4 color);
void shiny_lighting_water()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy);
color.rgb *= gl_Color.rgb;
vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..3904179427
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl
@@ -0,0 +1,29 @@
+/**
+ * @file lightShinyWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+ color.a = max(color.a, gl_Color.a);
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
index ad1dc4da77..3384f64d07 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// All lights, no specular highlights
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
index a0f6e019ef..10c770fcc2 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// All lights, no specular highlights
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
index 97eba92d7b..61341a9f1f 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
@@ -5,16 +5,14 @@
* $/LicenseInfo$
*/
-#version 120
-uniform sampler2D diffuseMap;
vec3 atmosLighting(vec3 light);
vec4 applyWaterFog(vec4 color);
void default_lighting_water()
{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+ vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
color.rgb = atmosLighting(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..ba850b61d0
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl
@@ -0,0 +1,23 @@
+/**
+ * @file lightWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void default_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
index fde32ed035..8df2e6f222 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index 8fe49e3be0..3d43a1813a 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l);
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight);
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
new file mode 100644
index 0000000000..f49e74406f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
@@ -0,0 +1,35 @@
+/**
+ * @file fullbrightShinyV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+void calcAtmospherics(vec3 inPositionEye);
+
+uniform vec4 origin;
+
+varying float vary_texture_index;
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(gl_Vertex.xyz,1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix*vert;
+
+ vec4 pos = (gl_ModelViewMatrix * vert);
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 ref = reflect(pos.xyz, -norm);
+
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+
+ calcAtmospherics(pos.xyz);
+
+ gl_FrontColor = gl_Color;
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
new file mode 100644
index 0000000000..3076fa3260
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
@@ -0,0 +1,29 @@
+/**
+ * @file fullbrightV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+void calcAtmospherics(vec3 inPositionEye);
+
+varying float vary_texture_index;
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(gl_Vertex.xyz,1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix*vert;
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+
+ vec4 pos = (gl_ModelViewMatrix * vert);
+
+ calcAtmospherics(pos.xyz);
+
+ gl_FrontColor = gl_Color;
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
index 4cebb06df0..49992d3535 100644
--- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
@@ -5,20 +5,24 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
+varying float vary_texture_index;
+
uniform vec4 origin;
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 vert = vec4(gl_Vertex.xyz,1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix*vert;
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+ vec4 pos = (gl_ModelViewMatrix * vert);
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
vec3 ref = reflect(pos.xyz, -norm);
diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
new file mode 100644
index 0000000000..5e02391767
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
@@ -0,0 +1,33 @@
+/**
+ * @file simpleV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $/LicenseInfo$
+ */
+
+
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+varying float vary_texture_index;
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(gl_Vertex.xyz,1.0);
+ vary_texture_index = gl_Vertex.w;
+ gl_Position = gl_ModelViewProjectionMatrix*vert;
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+
+ vec4 pos = (gl_ModelViewMatrix * vert);
+
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
+ gl_FrontColor = color;
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 77d15fba9a..21a0812c1b 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
//////////////////////////////////////////////////////////
// The fragment shader for the terrain atmospherics
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
index 8c5b864cbe..ab4cf4806d 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// Output variables
vec3 getSunlitColor();
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index 8d365c15ca..b61b0bb396 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// varying param funcs
void setSunlitColor(vec3 v);
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
index cf9ef30632..3a6585bb33 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_PositionEye;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 398f1556a0..0f6e231ca6 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec3 vary_PositionEye;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
index 13207997b2..20f907a006 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 267ef36d4d..3eac63076c 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
//////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
index a658edd21f..6570dcb608 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec4 gamma;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
index 77ca4868a6..d14c638130 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index 03bca8f27e..1ea00f723a 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
// SKY ////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 7f1ad4d5b4..28381482c1 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -5,8 +5,6 @@
* $/LicenseInfo$
*/
-#version 120
-
//////////////////////////////////////////////////////////
// The fragment shader for the terrain atmospherics
//////////////////////////////////////////////////////////
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index a003e2a1f1..3d970d252c 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
index fc370ef367..498fee7c66 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2DRect giLightMap;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
index ae57227fe5..eebe930666 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
index 951e3e97ae..9896f8dafe 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
index b2f8b2c633..df4c6b3e0a 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
index 19c4e07b8b..7e20d71529 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
index 8dc1410ea5..e86f2896da 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
index 5f3bf68b24..980def6443 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
index a24eda35dc..9afeac6ddf 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
index ab99a88971..6d4c20f68c 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
index 12983baa94..876f65ee3a 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
index f037754708..fc65881680 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
index ae57227fe5..eebe930666 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index ce32f66000..d38d33cc21 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
#extension GL_ARB_texture_rectangle : enable
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
index 8f0bcca76b..745cc01992 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
index c54d9a1e3e..de7e038402 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
uniform sampler2D diffuseMap;
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
index 04533fdce1..92347a5b4a 100644
--- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
index 73bc18b866..24bbc0a1a1 100644
--- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
-#version 120
+
float calcDirectionalLight(vec3 n, vec3 l);
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight);
diff --git a/indra/newview/app_settings/windlight/days/Colder%20Tones.xml b/indra/newview/app_settings/windlight/days/Colder%20Tones.xml
new file mode 100644
index 0000000000..63d0b099e1
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Colder%20Tones.xml
@@ -0,0 +1,28 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>Midnight</string>
+ </array>
+ <array>
+ <real>0.24999989569187164</real>
+ <string>Purple</string>
+ </array>
+ <array>
+ <real>0.49999979138374329</real>
+ <string>Blue Midday</string>
+ </array>
+ <array>
+ <real>0.74999970197677612</real>
+ <string>Blizzard</string>
+ </array>
+ <array>
+ <real>0.87499958276748657</real>
+ <string>Ghost</string>
+ </array>
+ <array>
+ <real>0.99999958276748657</real>
+ <string>Midnight</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/days/Dynamic%20Richness.xml b/indra/newview/app_settings/windlight/days/Dynamic%20Richness.xml
new file mode 100644
index 0000000000..f75b52e6ed
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Dynamic%20Richness.xml
@@ -0,0 +1,32 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>Night</string>
+ </array>
+ <array>
+ <real>0.12499994784593582</real>
+ <string>Blizzard</string>
+ </array>
+ <array>
+ <real>0.24999989569187164</real>
+ <string>Sunrise</string>
+ </array>
+ <array>
+ <real>0.49999979138374329</real>
+ <string>Midday 3</string>
+ </array>
+ <array>
+ <real>0.68749970197677612</real>
+ <string>Pirate</string>
+ </array>
+ <array>
+ <real>0.81249970197677612</real>
+ <string>Coastal Sunset</string>
+ </array>
+ <array>
+ <real>0.99999958276748657</real>
+ <string>Midnight</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/days/Pirate%27s%20Dream.xml b/indra/newview/app_settings/windlight/days/Pirate%27s%20Dream.xml
new file mode 100644
index 0000000000..6dc1ba9f4d
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Pirate%27s%20Dream.xml
@@ -0,0 +1,44 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>A-12AM</string>
+ </array>
+ <array>
+ <real>0.12499994784593582</real>
+ <string>A-3AM</string>
+ </array>
+ <array>
+ <real>0.22222213447093964</real>
+ <string>Barcelona</string>
+ </array>
+ <array>
+ <real>0.30208322405815125</real>
+ <string>Sunrise</string>
+ </array>
+ <array>
+ <real>0.37499985098838806</real>
+ <string>Sailor&apos;s Delight</string>
+ </array>
+ <array>
+ <real>0.53819423913955688</real>
+ <string>Coastal Afternoon</string>
+ </array>
+ <array>
+ <real>0.63194417953491211</real>
+ <string>Pirate</string>
+ </array>
+ <array>
+ <real>0.7048608660697937</real>
+ <string>Desert Sunset</string>
+ </array>
+ <array>
+ <real>0.74999970197677612</real>
+ <string>Coastal Sunset</string>
+ </array>
+ <array>
+ <real>0.87499958276748657</real>
+ <string>Blizzard</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/days/Psycho%20Strobe%21.xml b/indra/newview/app_settings/windlight/days/Psycho%20Strobe%21.xml
new file mode 100644
index 0000000000..302af5a9ba
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Psycho%20Strobe%21.xml
@@ -0,0 +1,72 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.062499973922967911</real>
+ <string>A-12AM</string>
+ </array>
+ <array>
+ <real>0.12499994784593582</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.18749992549419403</real>
+ <string>A-3AM</string>
+ </array>
+ <array>
+ <real>0.24999989569187164</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.31249985098838806</real>
+ <string>A-6AM</string>
+ </array>
+ <array>
+ <real>0.37499985098838806</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.43749979138374329</real>
+ <string>A-9AM</string>
+ </array>
+ <array>
+ <real>0.49999979138374329</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.5624997615814209</real>
+ <string>A-12PM</string>
+ </array>
+ <array>
+ <real>0.62499970197677612</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.68749970197677612</real>
+ <string>A-3PM</string>
+ </array>
+ <array>
+ <real>0.74999970197677612</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.81249970197677612</real>
+ <string>A-6PM</string>
+ </array>
+ <array>
+ <real>0.87499958276748657</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.93749958276748657</real>
+ <string>A-9PM</string>
+ </array>
+ <array>
+ <real>0.99999958276748657</real>
+ <string>Sheer Surreality</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/days/Tropicalia.xml b/indra/newview/app_settings/windlight/days/Tropicalia.xml
new file mode 100644
index 0000000000..89a56d4a13
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Tropicalia.xml
@@ -0,0 +1,32 @@
+<llsd>
+ <array>
+ <array>
+ <real>0.062499973922967911</real>
+ <string>Purple</string>
+ </array>
+ <array>
+ <real>0.16666659712791443</real>
+ <string>Funky Funky</string>
+ </array>
+ <array>
+ <real>0.31249985098838806</real>
+ <string>Sunrise</string>
+ </array>
+ <array>
+ <real>0.49999979138374329</real>
+ <string>Fine Day</string>
+ </array>
+ <array>
+ <real>0.66666638851165771</real>
+ <string>Desert Sunset</string>
+ </array>
+ <array>
+ <real>0.74999970197677612</real>
+ <string>Sailor&apos;s Delight</string>
+ </array>
+ <array>
+ <real>0.95833295583724976</real>
+ <string>Midnight</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/days/Weird-O.xml b/indra/newview/app_settings/windlight/days/Weird-O.xml
new file mode 100644
index 0000000000..1e312f2464
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Weird-O.xml
@@ -0,0 +1,56 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>Funky Funky</string>
+ </array>
+ <array>
+ <real>0.13194438815116882</real>
+ <string>Funky Funky Funky</string>
+ </array>
+ <array>
+ <real>0.26041656732559204</real>
+ <string>Gelatto</string>
+ </array>
+ <array>
+ <real>0.40624985098838806</real>
+ <string>Funky Funky Funky</string>
+ </array>
+ <array>
+ <real>0.43749979138374329</real>
+ <string>Ghost</string>
+ </array>
+ <array>
+ <real>0.46874979138374329</real>
+ <string>Gelatto</string>
+ </array>
+ <array>
+ <real>0.5486108660697937</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.6076386570930481</real>
+ <string>Gelatto</string>
+ </array>
+ <array>
+ <real>0.68055528402328491</real>
+ <string>Ghost</string>
+ </array>
+ <array>
+ <real>0.75694411993026733</real>
+ <string>Sheer Surreality</string>
+ </array>
+ <array>
+ <real>0.87847185134887695</real>
+ <string>Gelatto</string>
+ </array>
+ <array>
+ <real>0.91319411993026733</real>
+ <string>Funky Funky Funky</string>
+ </array>
+ <array>
+ <real>0.96527737379074097</real>
+ <string>Funky Funky Funky</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midday.xml b/indra/newview/app_settings/windlight/skies/Midday.xml
new file mode 100644
index 0000000000..119b3e1418
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midday.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.24475815892219543</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.37999999523162842</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.49548381567001343</real>
+ <real>0.49548381567001343</real>
+ <real>0.63999998569488525</real>
+ <real>0.31999999284744263</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998817685992</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000001192092896</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.7342105507850647</real>
+ <real>0.78157895803451538</real>
+ <real>0.89999997615814209</real>
+ <real>0.29999998211860657</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midnight.xml b/indra/newview/app_settings/windlight/skies/Midnight.xml
new file mode 100644
index 0000000000..0aba31214a
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midnight.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.20405027270317078</real>
+ <real>0.24246673285961151</real>
+ <real>0.32999998331069946</real>
+ <real>0.10999999940395355</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.44999998807907104</real>
+ <real>0.44999998807907104</real>
+ <real>0.44999998807907104</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.87999999523162842</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00030000001424923539</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.8876205482883961e-007</real>
+ <real>1</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>906.20001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>2</real>
+ <key>sun_angle</key>
+ <real>4.7123894691467285</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.34876692295074463</real>
+ <real>0.35574248433113098</real>
+ <real>0.65999996662139893</real>
+ <real>0.2199999988079071</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Sunrise.xml b/indra/newview/app_settings/windlight/skies/Sunrise.xml
new file mode 100644
index 0000000000..bbc7aeec59
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Sunrise.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.80999994277954102</real>
+ <real>0.46289783716201782</real>
+ <real>0.62999993562698364</real>
+ <real>0.26999998092651367</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.15793180465698242</real>
+ <real>0.43499568104743958</real>
+ <real>0.87000000476837158</real>
+ <real>0.87000000476837158</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.20673196017742157</real>
+ <real>0.40988314151763916</real>
+ <real>0.47999998927116394</real>
+ <real>0.47999998927116394</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22616604226328718</real>
+ <real>0.22616604226328718</real>
+ <real>0.22616604226328718</real>
+ <real>0.99997219085526012</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.88000025272481253</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013883861</real>
+ <real>10.010999679576344</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00062000000616535544</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>2.6999279499073054</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5.0009990693069994</real>
+ <real>0.0010000000474963411</real>
+ <real>-0.48000101923815919</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.094108223915100098</real>
+ <real>0.99556195735931396</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>563</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>0.094247691333293915</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.369999885559082</real>
+ <real>2.369999885559082</real>
+ <real>2.369999885559082</real>
+ <real>0.78999996185302734</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Sunset.xml b/indra/newview/app_settings/windlight/skies/Sunset.xml
new file mode 100644
index 0000000000..ebf08e1a3f
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Sunset.xml
@@ -0,0 +1,142 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0199999809265137</real>
+ <real>0.80999994277954102</real>
+ <real>0.80999994277954102</real>
+ <real>1.0199999809265137</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.10767599940299988</real>
+ <real>0.21348699927330017</real>
+ <real>0.25</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.87999999523162842</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00046000001020729542</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.07532646507024765</real>
+ <real>-0.99715894460678101</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>562.5</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0661947727203369</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
+
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index dd8a88e558..22c79a4cbd 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 27
+version 30
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -48,6 +48,7 @@ RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
+RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
UseStartScreen 1 1
UseOcclusion 1 1
@@ -59,11 +60,11 @@ Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
-SkyUseClassicClouds 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
+RenderFSAASamples 1 16
//
// Low Graphics Settings
@@ -91,10 +92,10 @@ RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
-SkyUseClassicClouds 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// Mid Graphics Settings
@@ -124,6 +125,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// High Graphics Settings (purty)
@@ -153,6 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -181,6 +184,8 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
+RenderFSAASamples 1 8
+
//
// Class Unknown Hardware (unknown)
@@ -238,6 +243,12 @@ RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
+//
+// No GL_ARB_map_buffer_range
+//
+list NoMapBufferRange
+RenderVBOMappingDisable 1 0
+
//
// "Default" setups for safe, low, medium, high
@@ -284,6 +295,7 @@ RenderDeferred 0 0
list Intel
RenderAnisotropic 1 0
+RenderVBOEnable 1 0
list GeForce2
RenderAnisotropic 1 0
@@ -467,7 +479,6 @@ RenderAvatarCloth 0 0
list ATI
RenderUseStreamVBO 1 0
-RenderAvatarVP 1 0
// Disable vertex buffer objects by default for ATI cards with little video memory
list ATIVramLT256
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 058bdcc730..649f5ebd18 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -1,4 +1,4 @@
-version 23
+version 25
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -48,6 +48,7 @@ RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
+RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
UseStartScreen 1 1
UseOcclusion 1 1
@@ -57,11 +58,11 @@ WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
-SkyUseClassicClouds 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
+RenderFSAASamples 1 16
//
// Low Graphics Settings
@@ -89,10 +90,10 @@ RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
-SkyUseClassicClouds 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// Mid Graphics Settings
@@ -122,6 +123,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// High Graphics Settings (purty)
@@ -151,6 +153,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -180,6 +183,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
+RenderFSAASamples 1 8
//
// Class Unknown Hardware (unknown)
@@ -237,6 +241,13 @@ RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
+//
+// No GL_ARB_map_buffer_range
+//
+list NoMapBufferRange
+RenderVBOMappingDisable 1 0
+
+
// "Default" setups for safe, low, medium, high
//
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index e2b979d9e9..ee08e78af5 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 23
+version 26
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -48,6 +48,7 @@ RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
+RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
UseStartScreen 1 1
UseOcclusion 1 1
@@ -58,12 +59,12 @@ Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 0.5
RenderShaderLightingMaxLevel 1 3
-SkyUseClassicClouds 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
+RenderFSAASamples 1 16
//
// Low Graphics Settings
@@ -91,10 +92,10 @@ RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
-SkyUseClassicClouds 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// Mid Graphics Settings
@@ -124,6 +125,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// High Graphics Settings (purty)
@@ -153,6 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
+RenderFSAASamples 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -182,6 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
+RenderFSAASamples 1 8
//
// Class Unknown Hardware (unknown)
@@ -240,6 +244,13 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
+// No GL_ARB_map_buffer_range
+//
+list NoMapBufferRange
+RenderVBOMappingDisable 1 0
+
+
+//
// "Default" setups for safe, low, medium, high
//
list safe
@@ -412,31 +423,6 @@ Disregard128DefaultDrawDistance 1 0
list ATI_Mobility_Radeon_X1xxx
Disregard128DefaultDrawDistance 1 0
-
-
-
-// Avatar hardware skinning causes
-// invisible avatars on HD 2600... so I masked
-// out other possible bad ones till it's fixed
-
-list ATI_Radeon_HD_2300
-RenderAvatarVP 0 0
-RenderAvatarCloth 0 0
-Disregard128DefaultDrawDistance 1 0
-list ATI_Radeon_HD_2400
-RenderAvatarVP 0 0
-RenderAvatarCloth 0 0
-Disregard128DefaultDrawDistance 1 0
-list ATI_Radeon_HD_2600
-RenderAvatarVP 0 0
-RenderAvatarCloth 0 0
-list ATI_Radeon_HD_2900
-RenderAvatarVP 0 0
-RenderAvatarCloth 0 0
-list ATI_Radeon_HD_3800
-RenderAvatarVP 0 0
-RenderAvatarCloth 0 0
-
/// Tweaked NVIDIA
list NVIDIA_GeForce_FX_5100
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index 3339172a1a..ba74f9a6c2 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -1,4 +1,4 @@
-version 27
+version 30
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -48,6 +48,7 @@ RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
+RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
UseStartScreen 1 1
UseOcclusion 1 1
@@ -58,12 +59,12 @@ Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderShaderLightingMaxLevel 1 3
-SkyUseClassicClouds 1 1
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
+RenderFSAASamples 1 16
//
// Low Graphics Settings
@@ -91,10 +92,10 @@ RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
-SkyUseClassicClouds 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// Mid Graphics Settings
@@ -124,6 +125,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
+RenderFSAASamples 1 0
//
// High Graphics Settings (purty)
@@ -153,6 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
+RenderFSAASamples 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -182,6 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
+RenderFSAASamples 1 8
//
// Class Unknown Hardware (unknown)
@@ -240,6 +244,13 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
+// No GL_ARB_map_buffer_range
+//
+list NoMapBufferRange
+RenderVBOMappingDisable 1 0
+
+
+//
// "Default" setups for safe, low, medium, high
//
list safe
@@ -282,6 +293,7 @@ RenderDeferred 0 0
list Intel
RenderAnisotropic 1 0
+RenderVBOEnable 1 0
list GeForce2
RenderAnisotropic 1 0
@@ -466,7 +478,6 @@ RenderAvatarCloth 0 0
list ATI
RenderUseStreamVBO 1 0
-RenderAvatarVP 1 0
// Disable vertex buffer objects by default for ATI cards with little video memory
list ATIVramLT256
diff --git a/indra/newview/llaccountingquotamanager.cpp b/indra/newview/llaccountingquotamanager.cpp
index 0a171959e7..a4f5de5632 100644
--- a/indra/newview/llaccountingquotamanager.cpp
+++ b/indra/newview/llaccountingquotamanager.cpp
@@ -71,12 +71,10 @@ public:
return;
}
- //Differentiate what the incoming caps could be from the data
- //bool VOContent = content.has("Objects");
+ //Differentiate what the incoming caps could be from the data
bool containsParcel = content.has("parcel");
bool containsSelection = content.has("selected");
- //bool VORegion = content.has("region");
-
+
//Loop over the stored object ids checking against the incoming data
for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
{
@@ -91,16 +89,17 @@ public:
for(S32 i = 0; i < dataCount; i++)
{
//prep#todo verify that this is safe, otherwise just add a bool
- S32 parcelId = 0;
- S32 parcelOwner = 0;
+ LLUUID parcelId;
+ //S32 parcelOwner = 0;
if ( content["parcel"][i].has("parcel_id") )
{
- parcelId = content["parcel"][i]["parcel_id"].asInteger();
- }
- if ( content["parcel"][i].has("parcel_owner") )
- {
- parcelOwner = content["parcel"][i]["parcel_owner"].asInteger();
+ parcelId = content["parcel"][i]["parcel_id"].asUUID();
}
+
+ //if ( content["parcel"][i].has("parcel_owner") )
+ //{
+ // parcelOwner = content["parcel"][i]["parcel_owner"].asInteger();
+ //}
F32 ownerRenderCost = 0;
F32 ownerPhysicsCost = 0;
@@ -117,48 +116,69 @@ public:
F32 otherNetworkCost = 0;
F32 otherSimulationCost = 0;
- F32 totalRenderCost = 0;
- F32 totalPhysicsCost = 0;
- F32 totalNetworkCost = 0;
- F32 totalSimulationCost = 0;
+ F32 tempRenderCost = 0;
+ F32 tempPhysicsCost = 0;
+ F32 tempNetworkCost = 0;
+ F32 tempSimulationCost = 0;
+
+ F32 selectedRenderCost = 0;
+ F32 selectedPhysicsCost = 0;
+ F32 selectedNetworkCost = 0;
+ F32 selectedSimulationCost = 0;
+ F32 parcelCapacity = 0;
+
+ if ( content["parcel"][i].has("capacity") )
+ {
+ parcelCapacity = content["parcel"][i].has("capacity");
+ }
+
if ( content["parcel"][i].has("owner") )
{
- ownerRenderCost = content["parcel"][i]["owner"]["render"].asReal();
+ ownerRenderCost = content["parcel"][i]["owner"]["rendering"].asReal();
ownerPhysicsCost = content["parcel"][i]["owner"]["physics"].asReal();
- ownerNetworkCost = content["parcel"][i]["owner"]["network"].asReal();
- ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal();
-
+ ownerNetworkCost = content["parcel"][i]["owner"]["streaming"].asReal();
+ ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal();
}
+
if ( content["parcel"][i].has("group") )
{
- groupRenderCost = content["parcel"][i]["group"]["render"].asReal();
+ groupRenderCost = content["parcel"][i]["group"]["rendering"].asReal();
groupPhysicsCost = content["parcel"][i]["group"]["physics"].asReal();
- groupNetworkCost = content["parcel"][i]["group"]["network"].asReal();
+ groupNetworkCost = content["parcel"][i]["group"]["streaming"].asReal();
groupSimulationCost = content["parcel"][i]["group"]["simulation"].asReal();
}
if ( content["parcel"][i].has("other") )
{
- otherRenderCost = content["parcel"][i]["other"]["render"].asReal();
+ otherRenderCost = content["parcel"][i]["other"]["rendering"].asReal();
otherPhysicsCost = content["parcel"][i]["other"]["physics"].asReal();
- otherNetworkCost = content["parcel"][i]["other"]["network"].asReal();
+ otherNetworkCost = content["parcel"][i]["other"]["streaming"].asReal();
otherSimulationCost = content["parcel"][i]["other"]["simulation"].asReal();
}
- if ( content["parcel"][i].has("total") )
+ if ( content["parcel"][i].has("temp") )
{
- totalRenderCost = content["parcel"][i]["total"]["render"].asReal();
- totalPhysicsCost = content["parcel"][i]["total"]["physics"].asReal();
- totalNetworkCost = content["parcel"][i]["total"]["network"].asReal();
- totalSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
-
+ tempRenderCost = content["parcel"][i]["total"]["rendering"].asReal();
+ tempPhysicsCost = content["parcel"][i]["total"]["physics"].asReal();
+ tempNetworkCost = content["parcel"][i]["total"]["streaming"].asReal();
+ tempSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
+ }
+
+ if ( content["parcel"][i].has("selected") )
+ {
+ selectedRenderCost = content["parcel"][i]["total"]["rendering"].asReal();
+ selectedPhysicsCost = content["parcel"][i]["total"]["physics"].asReal();
+ selectedNetworkCost = content["parcel"][i]["total"]["streaming"].asReal();
+ selectedSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
}
- ParcelQuota parcelQuota( ownerRenderCost, ownerPhysicsCost, ownerNetworkCost, ownerSimulationCost,
- groupRenderCost, groupPhysicsCost, groupNetworkCost, groupSimulationCost,
- otherRenderCost, otherPhysicsCost, otherNetworkCost, otherSimulationCost,
- totalRenderCost, totalPhysicsCost, totalNetworkCost, totalSimulationCost );
+ ParcelQuota parcelQuota( ownerRenderCost, ownerPhysicsCost, ownerNetworkCost, ownerSimulationCost,
+ groupRenderCost, groupPhysicsCost, groupNetworkCost, groupSimulationCost,
+ otherRenderCost, otherPhysicsCost, otherNetworkCost, otherSimulationCost,
+ tempRenderCost, tempPhysicsCost, tempNetworkCost, tempSimulationCost,
+ selectedRenderCost, selectedPhysicsCost, selectedNetworkCost, selectedSimulationCost,
+ parcelCapacity );
//Update the Parcel
LLParcel* pParcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
if ( pParcel )
@@ -179,18 +199,18 @@ public:
F32 networkCost = 0;
F32 simulationCost = 0;
- S32 localId = 0;
+ LLUUID objectId;
- localId = content["selected"][i]["local_id"].asInteger();
- renderCost = content["selected"][i]["render"].asReal();
+ objectId = content["selected"][i]["local_id"].asUUID();
+ renderCost = content["selected"][i]["rendering"].asReal();
physicsCost = content["selected"][i]["physics"].asReal();
- networkCost = content["selected"][i]["network"].asReal();
+ networkCost = content["selected"][i]["streaming"].asReal();
simulationCost = content["selected"][i]["simulation"].asReal();
- SelectionQuota selectionQuota( localId, renderCost, physicsCost, networkCost, simulationCost );
+ SelectionQuota selectionQuota( objectId, renderCost, physicsCost, networkCost, simulationCost );
//Update the objects
- //gObjectList.updateQuota( localId, selectionQuota );
+ gObjectList.updateQuota( objectId, selectionQuota );
}
}
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 446ded8096..8954937f69 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -41,6 +41,7 @@
#include "llcapabilitylistener.h"
#include "llchannelmanager.h"
#include "llconsole.h"
+#include "llenvmanager.h"
#include "llfirstuse.h"
#include "llfloatercamera.h"
#include "llfloaterreg.h"
@@ -84,6 +85,7 @@
#include "llwindow.h"
#include "llworld.h"
#include "llworldmap.h"
+#include "stringize.h"
using namespace LLVOAvatarDefines;
@@ -608,6 +610,8 @@ void LLAgent::standUp()
//-----------------------------------------------------------------------------
void LLAgent::setRegion(LLViewerRegion *regionp)
{
+ bool teleport = true;
+
llassert(regionp);
if (mRegionp != regionp)
{
@@ -645,6 +649,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
gSky.mVOGroundp->setRegion(regionp);
}
+ // Notify windlight managers
+ teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE);
}
else
{
@@ -685,6 +691,15 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
LLSelectMgr::getInstance()->updateSelectionCenter();
LLFloaterMove::sUpdateFlyingStatus();
+
+ if (teleport)
+ {
+ LLEnvManagerNew::instance().onTeleport();
+ }
+ else
+ {
+ LLEnvManagerNew::instance().onRegionCrossing();
+ }
}
@@ -3335,6 +3350,9 @@ bool LLAgent::teleportCore(bool is_local)
// hide land floater too - it'll be out of date
LLFloaterReg::hideInstance("about_land");
+ // hide the Region/Estate floater
+ LLFloaterReg::hideInstance("region_info");
+
// hide the search floater (EXT-8276)
LLFloaterReg::hideInstance("search");
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 80085dad9d..c30d3b9aa3 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -392,11 +392,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
}
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
- LLVector3 object_extents;
+ LLVector3 object_extents = object->getScale();
const LLVector4a* oe4 = object->mDrawable->getSpatialExtents();
- LLVector4a size;
- size.setSub(oe4[1], oe4[0]);
- object_extents.set( size[0], size[1], size[2] );
+ object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] );
// make sure they object extents are non-zero
object_extents.clamp(0.001f, F32_MAX);
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index d426afb17c..36272f0c7c 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -33,7 +33,6 @@
#include "llagentwearablesfetch.h"
#include "llappearancemgr.h"
#include "llcallbacklist.h"
-#include "llfolderview.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -45,6 +44,7 @@
#include "llsidepanelappearance.h"
#include "llsidetray.h"
#include "lltexlayer.h"
+#include "lltooldraganddrop.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearable.h"
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d2582d524d..1d9519d675 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1,4 +1,4 @@
- /**
+/**
* @file llappviewer.cpp
* @brief The LLAppViewer class definitions
*
@@ -1640,9 +1640,7 @@ bool LLAppViewer::cleanup()
llinfos << "Cleaning up Objects" << llendflush;
LLViewerObject::cleanupVOClasses();
-
- LLWaterParamManager::cleanupClass();
- LLWLParamManager::cleanupClass();
+
LLPostProcess::cleanupClass();
LLTracker::cleanupInstance();
@@ -4341,7 +4339,6 @@ void LLAppViewer::idle()
//
// Update weather effects
//
- LLWorld::getInstance()->updateClouds(gFrameDTClamped);
gSky.propagateHeavenlyBodies(gFrameDTClamped); // moves sun, moon, and planets
// Update wind vector
@@ -4357,9 +4354,6 @@ void LLAppViewer::idle()
// Compute average wind and use to drive motion of water
average_wind = regionp->mWind.getAverage();
- F32 cloud_density = regionp->mCloudLayer.getDensityRegion(wind_position_region);
-
- gSky.setCloudDensityAtAgent(cloud_density);
gSky.setWind(average_wind);
//LLVOWater::setWind(average_wind);
}
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index e1d3de8409..5b9a449be1 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -384,18 +384,18 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
// Continuing the horrible hack above, we need to extract the originally requested permissions data, if any,
// and use them for each next file to be uploaded. Note the requested perms are not the same as the
U32 everyone_perms =
- content.has("everyone_mask") ?
- content["everyone_mask"].asInteger() :
+ content.has("new_everyone_mask") ?
+ content["new_everyone_mask"].asInteger() :
PERM_NONE;
U32 group_perms =
- content.has("group_mask") ?
- content["group_mask"].asInteger() :
+ content.has("new_group_mask") ?
+ content["new_group_mask"].asInteger() :
PERM_NONE;
U32 next_owner_perms =
- content.has("next_owner_mask") ?
- content["next_owner_mask"].asInteger() :
+ content.has("new_next_owner_mask") ?
+ content["new_next_owner_mask"].asInteger() :
PERM_NONE;
std::string display_name = LLStringUtil::null;
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index cbbdcb2983..8344b08bfb 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -49,6 +49,7 @@
#include "llfloaterpay.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h"
+#include "llfolderview.h"
#include "llgiveinventory.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType
@@ -69,6 +70,7 @@
#include "lltrans.h"
#include "llcallingcard.h"
#include "llslurl.h" // IDEVO
+#include "llsidepanelinventory.h"
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
@@ -312,7 +314,9 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
std::string url = getProfileURL(username);
// PROFILES: open in webkit window
- LLWeb::loadWebURLInternal(url, "", agent_id.asString());
+ const bool show_chrome = false;
+ static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
+ LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect);
}
// static
@@ -444,8 +448,6 @@ void LLAvatarActions::share(const LLUUID& id)
namespace action_give_inventory
{
- typedef std::set<LLUUID> uuid_set_t;
-
/**
* Returns a pointer to 'Add More' inventory panel of Edit Outfit SP.
*/
@@ -475,18 +477,16 @@ namespace action_give_inventory
/**
* Checks My Inventory visibility.
*/
+
static bool is_give_inventory_acceptable()
{
- LLInventoryPanel* active_panel = get_active_inventory_panel();
- if (!active_panel) return false;
-
// check selection in the panel
- const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
+ const std::set<LLUUID> inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
if (inventory_selected_uuids.empty()) return false; // nothing selected
bool acceptable = false;
- uuid_set_t::const_iterator it = inventory_selected_uuids.begin();
- const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end();
+ std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin();
+ const std::set<LLUUID>::const_iterator it_end = inventory_selected_uuids.end();
for (; it != it_end; ++it)
{
LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
@@ -529,12 +529,12 @@ namespace action_give_inventory
}
}
- static void build_items_string(const uuid_set_t& inventory_selected_uuids , std::string& items_string)
+ static void build_items_string(const std::set<LLUUID>& inventory_selected_uuids , std::string& items_string)
{
llassert(inventory_selected_uuids.size() > 0);
const std::string& separator = LLTrans::getString("words_separator");
- for (uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); ; )
+ for (std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin(); ; )
{
LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
if (NULL != inv_cat)
@@ -570,10 +570,7 @@ namespace action_give_inventory
return;
}
- LLInventoryPanel* active_panel = get_active_inventory_panel();
- if (!active_panel) return;
-
- const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
+ const std::set<LLUUID> inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
if (inventory_selected_uuids.empty())
{
return;
@@ -590,8 +587,8 @@ namespace action_give_inventory
// We souldn't open IM session, just calculate session ID for logging purpose. See EXT-6710
const LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, avatar_uuid);
- uuid_set_t::const_iterator it = inventory_selected_uuids.begin();
- const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end();
+ std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin();
+ const std::set<LLUUID>::const_iterator it_end = inventory_selected_uuids.end();
const std::string& separator = LLTrans::getString("words_separator");
std::string noncopy_item_names;
@@ -654,10 +651,7 @@ namespace action_give_inventory
{
llassert(avatar_names.size() == avatar_uuids.size());
- LLInventoryPanel* active_panel = get_active_inventory_panel();
- if (!active_panel) return;
-
- const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
+ const std::set<LLUUID> inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
if (inventory_selected_uuids.empty())
{
return;
@@ -678,6 +672,33 @@ namespace action_give_inventory
}
}
+
+
+//static
+std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
+{
+ std::set<LLUUID> inventory_selected_uuids;
+
+ LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel();
+ if (active_panel)
+ {
+ inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
+ }
+
+ if (inventory_selected_uuids.empty())
+ {
+ LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
+ LLInventoryPanel * inbox = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
+ if (inbox)
+ {
+ inventory_selected_uuids = inbox->getRootFolder()->getSelectionList();
+ }
+
+ }
+
+ return inventory_selected_uuids;
+}
+
//static
void LLAvatarActions::shareWithAvatars()
{
@@ -705,12 +726,12 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL
// check selection in the panel
LLFolderView* root_folder = inv_panel->getRootFolder();
- const uuid_set_t inventory_selected_uuids = root_folder->getSelectionList();
+ const std::set<LLUUID> inventory_selected_uuids = root_folder->getSelectionList();
if (inventory_selected_uuids.empty()) return false; // nothing selected
bool can_share = true;
- uuid_set_t::const_iterator it = inventory_selected_uuids.begin();
- const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end();
+ std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin();
+ const std::set<LLUUID>::const_iterator it_end = inventory_selected_uuids.end();
for (; it != it_end; ++it)
{
LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
@@ -773,6 +794,10 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
// static
bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
{
+ // We can't send more than 250 lures in a single message, so disable this
+ // button when there are too many id's selected.
+ if(ids.size() > 250) return false;
+
bool result = true;
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 956fed7461..fbfd815f41 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -36,6 +36,7 @@
class LLInventoryPanel;
+
/**
* Friend-related actions (add, remove, offer teleport, etc)
*/
@@ -196,6 +197,8 @@ public:
*/
static bool canShareSelectedItems(LLInventoryPanel* inv_panel = NULL);
+ static std::set<LLUUID> getInventorySelectedUUIDs();
+
private:
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
static bool handleRemove(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 01d19c5ba0..79e6c7b66b 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -386,6 +386,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b
{
bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
getChild<LLButton>("speak_flyout_btn")->setEnabled(voice_status);
+ gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(voice_status);
if (voice_status)
{
LLFirstUse::speak(true);
@@ -570,7 +571,7 @@ BOOL LLBottomTray::postBuild()
// it takes some time between logging in to world and connecting to voice channel.
getChild<LLButton>("speak_btn")->setEnabled(false);
getChild<LLButton>("speak_flyout_btn")->setEnabled(false);
-
+ gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(false);
// Registering Chat Bar to receive Voice client status change notifications.
LLVoiceClient::getInstance()->addObserver(this);
diff --git a/indra/newview/llcloud.cpp b/indra/newview/llcloud.cpp
deleted file mode 100644
index cda0f6e4a2..0000000000
--- a/indra/newview/llcloud.cpp
+++ /dev/null
@@ -1,538 +0,0 @@
-/**
- * @file llcloud.cpp
- * @brief Implementation of viewer LLCloudLayer class
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llmath.h"
-//#include "vmath.h"
-#include "v3math.h"
-#include "v4math.h"
-#include "llquaternion.h"
-#include "llrand.h"
-#include "v4color.h"
-
-#include "llwind.h"
-#include "llcloud.h"
-#include "llgl.h"
-#include "llviewerobjectlist.h"
-#include "llvoclouds.h"
-#include "llvosky.h"
-#include "llsky.h"
-#include "llviewerregion.h"
-#include "patch_dct.h"
-#include "patch_code.h"
-#include "llglheaders.h"
-#include "pipeline.h"
-#include "lldrawpool.h"
-#include "llworld.h"
-
-extern LLPipeline gPipeline;
-
-const F32 CLOUD_UPDATE_RATE = 1.0f; // Global time dilation for clouds
-const F32 CLOUD_GROW_RATE = 0.05f;
-const F32 CLOUD_DECAY_RATE = -0.05f;
-const F32 CLOUD_VELOCITY_SCALE = 0.01f;
-const F32 CLOUD_DENSITY = 25.f;
-const S32 CLOUD_COUNT_MAX = 20;
-const F32 CLOUD_HEIGHT_RANGE = 48.f;
-const F32 CLOUD_HEIGHT_MEAN = 192.f;
-
-enum
-{
- LL_PUFF_GROWING = 0,
- LL_PUFF_DYING = 1
-};
-
-// Used for patch decoder
-S32 gBuffer[16*16];
-
-
-//static
-S32 LLCloudPuff::sPuffCount = 0;
-
-LLCloudPuff::LLCloudPuff() :
- mAlpha(0.01f),
- mRate(CLOUD_GROW_RATE*CLOUD_UPDATE_RATE),
- mLifeState(LL_PUFF_GROWING)
-{
-}
-
-LLCloudGroup::LLCloudGroup() :
- mCloudLayerp(NULL),
- mDensity(0.f),
- mTargetPuffCount(0),
- mVOCloudsp(NULL)
-{
-}
-
-void LLCloudGroup::cleanup()
-{
- if (mVOCloudsp)
- {
- if (!mVOCloudsp->isDead())
- {
- gObjectList.killObject(mVOCloudsp);
- }
- mVOCloudsp = NULL;
- }
-}
-
-void LLCloudGroup::setCenterRegion(const LLVector3 &center)
-{
- mCenterRegion = center;
-}
-
-void LLCloudGroup::updatePuffs(const F32 dt)
-{
- mDensity = mCloudLayerp->getDensityRegion(mCenterRegion);
-
- if (!mVOCloudsp)
- {
- mVOCloudsp = (LLVOClouds *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_CLOUDS, mCloudLayerp->getRegion());
- mVOCloudsp->setCloudGroup(this);
- mVOCloudsp->setPositionRegion(mCenterRegion);
- mVOCloudsp->setScale(LLVector3(256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
- 256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
- CLOUD_HEIGHT_RANGE + CLOUD_PUFF_HEIGHT)*0.5f);
- gPipeline.createObject(mVOCloudsp);
- }
-
- LLVector3 velocity;
- LLVector3d vel_d;
- // Update the positions of all of the clouds
- for (U32 i = 0; i < mCloudPuffs.size(); i++)
- {
- LLCloudPuff &puff = mCloudPuffs[i];
- velocity = mCloudLayerp->getRegion()->mWind.getCloudVelocity(mCloudLayerp->getRegion()->getPosRegionFromGlobal(puff.mPositionGlobal));
- velocity *= CLOUD_VELOCITY_SCALE*CLOUD_UPDATE_RATE;
- vel_d.setVec(velocity);
- mCloudPuffs[i].mPositionGlobal += vel_d;
- mCloudPuffs[i].mAlpha += mCloudPuffs[i].mRate * dt;
- mCloudPuffs[i].mAlpha = llmin(1.f, mCloudPuffs[i].mAlpha);
- mCloudPuffs[i].mAlpha = llmax(0.f, mCloudPuffs[i].mAlpha);
- }
-}
-
-void LLCloudGroup::updatePuffOwnership()
-{
- U32 i = 0;
- while (i < mCloudPuffs.size())
- {
- if (mCloudPuffs[i].getLifeState() == LL_PUFF_DYING)
- {
- i++;
- continue;
- }
- if (inGroup(mCloudPuffs[i]))
- {
- i++;
- continue;
- }
-
- //llinfos << "Cloud moving to new group" << llendl;
- LLCloudGroup *new_cgp = LLWorld::getInstance()->findCloudGroup(mCloudPuffs[i]);
- if (!new_cgp)
- {
- //llinfos << "Killing puff not in group" << llendl;
- mCloudPuffs[i].setLifeState(LL_PUFF_DYING);
- mCloudPuffs[i].mRate = CLOUD_DECAY_RATE*CLOUD_UPDATE_RATE;
- i++;
- continue;
- }
- //llinfos << "Puff handed off!" << llendl;
- LLCloudPuff puff;
- puff.mPositionGlobal = mCloudPuffs[i].mPositionGlobal;
- puff.mAlpha = mCloudPuffs[i].mAlpha;
- mCloudPuffs.erase(mCloudPuffs.begin() + i);
- new_cgp->mCloudPuffs.push_back(puff);
- }
-
- //llinfos << "Puff count: " << LLCloudPuff::sPuffCount << llendl;
-}
-
-void LLCloudGroup::updatePuffCount()
-{
- if (!mVOCloudsp)
- {
- return;
- }
- S32 i;
- S32 target_puff_count = llround(CLOUD_DENSITY * mDensity);
- target_puff_count = llmax(0, target_puff_count);
- target_puff_count = llmin(CLOUD_COUNT_MAX, target_puff_count);
- S32 current_puff_count = (S32) mCloudPuffs.size();
- // Create a new cloud if we need one
- if (current_puff_count < target_puff_count)
- {
- LLVector3d puff_pos_global;
- mCloudPuffs.resize(target_puff_count);
- for (i = current_puff_count; i < target_puff_count; i++)
- {
- puff_pos_global = mVOCloudsp->getPositionGlobal();
- F32 x = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE;
- F32 y = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE;
- F32 z = ll_frand(CLOUD_HEIGHT_RANGE) - 0.5f*CLOUD_HEIGHT_RANGE;
- puff_pos_global += LLVector3d(x, y, z);
- mCloudPuffs[i].mPositionGlobal = puff_pos_global;
- mCloudPuffs[i].mAlpha = 0.01f;
- LLCloudPuff::sPuffCount++;
- }
- }
-
- // Count the number of live puffs
- S32 live_puff_count = 0;
- for (i = 0; i < (S32) mCloudPuffs.size(); i++)
- {
- if (mCloudPuffs[i].getLifeState() != LL_PUFF_DYING)
- {
- live_puff_count++;
- }
- }
-
-
- // Start killing enough puffs so the live puff count == target puff count
- S32 new_dying_count = llmax(0, live_puff_count - target_puff_count);
- i = 0;
- while (new_dying_count > 0)
- {
- if (mCloudPuffs[i].getLifeState() != LL_PUFF_DYING)
- {
- //llinfos << "Killing extra live cloud" << llendl;
- mCloudPuffs[i].setLifeState(LL_PUFF_DYING);
- mCloudPuffs[i].mRate = CLOUD_DECAY_RATE*CLOUD_UPDATE_RATE;
- new_dying_count--;
- }
- i++;
- }
-
- // Remove fully dead puffs
- i = 0;
- while (i < (S32) mCloudPuffs.size())
- {
- if (mCloudPuffs[i].isDead())
- {
- //llinfos << "Removing dead puff!" << llendl;
- mCloudPuffs.erase(mCloudPuffs.begin() + i);
- LLCloudPuff::sPuffCount--;
- }
- else
- {
- i++;
- }
- }
-}
-
-BOOL LLCloudGroup::inGroup(const LLCloudPuff &puff) const
-{
- // Do min/max check on center of the cloud puff
- F32 min_x, min_y, max_x, max_y;
- F32 delta = 128.f/CLOUD_GROUPS_PER_EDGE;
- min_x = mCenterRegion.mV[VX] - delta;
- min_y = mCenterRegion.mV[VY] - delta;
- max_x = mCenterRegion.mV[VX] + delta;
- max_y = mCenterRegion.mV[VY] + delta;
-
- LLVector3 pos_region = mCloudLayerp->getRegion()->getPosRegionFromGlobal(puff.getPositionGlobal());
-
- if ((pos_region.mV[VX] < min_x)
- || (pos_region.mV[VY] < min_y)
- || (pos_region.mV[VX] > max_x)
- || (pos_region.mV[VY] > max_y))
- {
- return FALSE;
- }
- return TRUE;
-}
-
-LLCloudLayer::LLCloudLayer()
-: mOriginGlobal(0.0f, 0.0f, 0.0f),
- mMetersPerEdge(1.0f),
- mMetersPerGrid(1.0f),
- mWindp(NULL),
- mDensityp(NULL)
-{
- S32 i, j;
- for (i = 0; i < 4; i++)
- {
- mNeighbors[i] = NULL;
- }
-
- F32 x, y;
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- y = (0.5f + i)*(256.f/CLOUD_GROUPS_PER_EDGE);
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- x = (0.5f + j)*(256.f/CLOUD_GROUPS_PER_EDGE);
-
- mCloudGroups[i][j].setCloudLayerp(this);
- mCloudGroups[i][j].setCenterRegion(LLVector3(x, y, CLOUD_HEIGHT_MEAN));
- }
- }
-}
-
-
-
-LLCloudLayer::~LLCloudLayer()
-{
- destroy();
-}
-
-
-void LLCloudLayer::create(LLViewerRegion *regionp)
-{
- llassert(regionp);
-
- mRegionp = regionp;
- mDensityp = new F32 [CLOUD_GRIDS_PER_EDGE * CLOUD_GRIDS_PER_EDGE];
-
- U32 i;
- for (i = 0; i < CLOUD_GRIDS_PER_EDGE*CLOUD_GRIDS_PER_EDGE; i++)
- {
- mDensityp[i] = 0.f;
- }
-}
-
-void LLCloudLayer::setRegion(LLViewerRegion *regionp)
-{
- mRegionp = regionp;
-}
-
-void LLCloudLayer::destroy()
-{
- reset();
-
- delete [] mDensityp;
- mDensityp = NULL;
- mWindp = NULL;
-}
-
-
-void LLCloudLayer::reset()
-{
- // Kill all of the existing puffs
- S32 i, j;
-
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- mCloudGroups[i][j].cleanup();
- }
- }
-}
-
-void LLCloudLayer::setWindPointer(LLWind *windp)
-{
- if (mWindp)
- {
- mWindp->setCloudDensityPointer(NULL);
- }
- mWindp = windp;
- if (mWindp)
- {
- mWindp->setCloudDensityPointer(mDensityp);
- }
-}
-
-
-void LLCloudLayer::setWidth(F32 width)
-{
- mMetersPerEdge = width;
- mMetersPerGrid = width / CLOUD_GRIDS_PER_EDGE;
-}
-
-
-F32 LLCloudLayer::getDensityRegion(const LLVector3 &pos_region)
-{
- // "position" is region-local
- S32 i, j, ii, jj;
-
- i = lltrunc(pos_region.mV[VX] / mMetersPerGrid);
- j = lltrunc(pos_region.mV[VY] / mMetersPerGrid);
- ii = i + 1;
- jj = j + 1;
-
-
- // clamp
- if (i >= (S32)CLOUD_GRIDS_PER_EDGE)
- {
- i = CLOUD_GRIDS_PER_EDGE - 1;
- ii = i;
- }
- else if (i < 0)
- {
- i = 0;
- ii = i;
- }
- else if (ii >= (S32)CLOUD_GRIDS_PER_EDGE || ii < 0)
- {
- ii = i;
- }
-
- if (j >= (S32)CLOUD_GRIDS_PER_EDGE)
- {
- j = CLOUD_GRIDS_PER_EDGE - 1;
- jj = j;
- }
- else if (j < 0)
- {
- j = 0;
- jj = j;
- }
- else if (jj >= (S32)CLOUD_GRIDS_PER_EDGE || jj < 0)
- {
- jj = j;
- }
-
- F32 dx = (pos_region.mV[VX] - (F32) i * mMetersPerGrid) / mMetersPerGrid;
- F32 dy = (pos_region.mV[VY] - (F32) j * mMetersPerGrid) / mMetersPerGrid;
- F32 omdx = 1.0f - dx;
- F32 omdy = 1.0f - dy;
-
- F32 density = dx * dy * *(mDensityp + ii + jj * CLOUD_GRIDS_PER_EDGE) +
- dx * omdy * *(mDensityp + i + jj * CLOUD_GRIDS_PER_EDGE) +
- omdx * dy * *(mDensityp + ii + j * CLOUD_GRIDS_PER_EDGE) +
- omdx * omdy * *(mDensityp + i + j * CLOUD_GRIDS_PER_EDGE);
-
- return density;
-}
-
-void LLCloudLayer::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
-{
- LLPatchHeader patch_header;
-
- init_patch_decompressor(group_headerp->patch_size);
-
- // Don't use the packed group_header stride because the strides used on
- // simulator and viewer are not equal.
- group_headerp->stride = group_headerp->patch_size; // offset required to step up one row
- set_group_of_patch_header(group_headerp);
-
- decode_patch_header(bitpack, &patch_header);
- decode_patch(bitpack, gBuffer);
- decompress_patch(mDensityp, gBuffer, &patch_header);
-}
-
-void LLCloudLayer::updatePuffs(const F32 dt)
-{
- // We want to iterate through all of the cloud groups
- // and update their density targets
-
- S32 i, j;
-
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- mCloudGroups[i][j].updatePuffs(dt);
- }
- }
-}
-
-void LLCloudLayer::updatePuffOwnership()
-{
- S32 i, j;
-
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- mCloudGroups[i][j].updatePuffOwnership();
- }
- }
-}
-
-void LLCloudLayer::updatePuffCount()
-{
- S32 i, j;
-
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- mCloudGroups[i][j].updatePuffCount();
- }
- }
-}
-
-LLCloudGroup *LLCloudLayer::findCloudGroup(const LLCloudPuff &puff)
-{
- S32 i, j;
-
- for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++)
- {
- for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++)
- {
- if (mCloudGroups[i][j].inGroup(puff))
- {
- return &(mCloudGroups[i][j]);
- }
- }
- }
- return NULL;
-}
-
-
-
-void LLCloudLayer::connectNeighbor(LLCloudLayer *cloudp, U32 direction)
-{
- if (direction >= 4)
- {
- // Only care about cardinal 4 directions.
- return;
- }
-
- mNeighbors[direction] = cloudp;
- if (cloudp)
- mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = this;
-}
-
-
-void LLCloudLayer::disconnectNeighbor(U32 direction)
-{
- if (direction >= 4)
- {
- // Only care about cardinal 4 directions.
- return;
- }
-
- if (mNeighbors[direction])
- {
- mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = NULL;
- mNeighbors[direction] = NULL;
- }
-}
-
-
-void LLCloudLayer::disconnectAllNeighbors()
-{
- S32 i;
- for (i = 0; i < 4; i++)
- {
- disconnectNeighbor(i);
- }
-}
diff --git a/indra/newview/llcloud.h b/indra/newview/llcloud.h
deleted file mode 100644
index 0435ba1ece..0000000000
--- a/indra/newview/llcloud.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * @file llcloud.h
- * @brief Description of viewer LLCloudLayer class
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLCLOUD_H
-#define LL_LLCLOUD_H
-
-// Some ideas on how clouds should work
-//
-// Each region has a cloud layer
-// Each cloud layer has pre-allocated space for N clouds
-// The LLSky class knows the max number of clouds to render M.
-// All clouds use the same texture, but the tex-coords can take on 8 configurations
-// (four rotations, front and back)
-//
-// The sky's part
-// --------------
-// The sky knows that A clouds have been assigned to regions and there are B left over.
-// Divide B by number of active regions to get C.
-// Ask each region to add C more clouds and return total number D.
-// Add up all the D's to get a new A.
-//
-// The cloud layer's part
-// ----------------------
-// The cloud layer is a grid of possibility. Each grid's value represents the probablility
-// (0.0 to 1.0) that a cloud placement query will succeed.
-//
-// The sky asks the region to add C more clouds.
-// The cloud layer tries a total of E times to place clouds and returns total cloud count.
-//
-// Clouds move according to local wind velocity.
-// If a cloud moves out of region then it's location is sent to neighbor region
-// or it is allowed to drift and decay.
-//
-// The clouds in non-visible regions do not propagate every frame.
-// Each frame one non-visible region is allowed to propagate it's clouds
-// (might have to check to see if incoming cloud was already visible or not).
-//
-//
-
-#include "llmath.h"
-//#include "vmath.h"
-#include "v3math.h"
-#include "v3dmath.h"
-#include "v4math.h"
-#include "v4color.h"
-#include "llpointer.h"
-#include "lldarray.h"
-
-#include "llframetimer.h"
-
-const U32 CLOUD_GRIDS_PER_EDGE = 16;
-
-const F32 CLOUD_PUFF_WIDTH = 64.f;
-const F32 CLOUD_PUFF_HEIGHT = 48.f;
-
-class LLWind;
-class LLVOClouds;
-class LLViewerRegion;
-class LLCloudLayer;
-class LLBitPack;
-class LLGroupHeader;
-
-const S32 CLOUD_GROUPS_PER_EDGE = 4;
-
-class LLCloudPuff
-{
-public:
- LLCloudPuff();
-
- const LLVector3d &getPositionGlobal() const { return mPositionGlobal; }
- friend class LLCloudGroup;
-
- void updatePuffs(const F32 dt);
- void updatePuffOwnership();
-
- F32 getAlpha() const { return mAlpha; }
- U32 getLifeState() const { return mLifeState; }
- void setLifeState(const U32 state) { mLifeState = state; }
- BOOL isDead() const { return mAlpha <= 0.f; }
-
-
- static S32 sPuffCount;
-protected:
- F32 mAlpha;
- F32 mRate;
- LLVector3d mPositionGlobal;
-
- BOOL mLifeState;
-};
-
-class LLCloudGroup
-{
-public:
- LLCloudGroup();
-
- void cleanup();
-
- void setCloudLayerp(LLCloudLayer *clp) { mCloudLayerp = clp; }
- void setCenterRegion(const LLVector3 &center);
-
- void updatePuffs(const F32 dt);
- void updatePuffOwnership();
- void updatePuffCount();
-
- BOOL inGroup(const LLCloudPuff &puff) const;
-
- F32 getDensity() const { return mDensity; }
- S32 getNumPuffs() const { return (S32) mCloudPuffs.size(); }
- const LLCloudPuff &getPuff(const S32 i) { return mCloudPuffs[i]; }
-protected:
- LLCloudLayer *mCloudLayerp;
- LLVector3 mCenterRegion;
- F32 mDensity;
- S32 mTargetPuffCount;
-
- std::vector<LLCloudPuff> mCloudPuffs;
- LLPointer<LLVOClouds> mVOCloudsp;
-};
-
-
-class LLCloudLayer
-{
-public:
- LLCloudLayer();
- ~LLCloudLayer();
-
- void create(LLViewerRegion *regionp);
- void destroy();
-
- void reset(); // Clears all active cloud puffs
-
-
- void updatePuffs(const F32 dt);
- void updatePuffOwnership();
- void updatePuffCount();
-
- LLCloudGroup *findCloudGroup(const LLCloudPuff &puff);
-
- void setRegion(LLViewerRegion *regionp);
- LLViewerRegion* getRegion() const { return mRegionp; }
- void setWindPointer(LLWind *windp);
- void setOriginGlobal(const LLVector3d &origin_global) { mOriginGlobal = origin_global; }
- void setWidth(F32 width);
-
- void setBrightness(F32 brightness);
- void setSunColor(const LLColor4 &color);
-
- F32 getDensityRegion(const LLVector3 &pos_region); // "position" is in local coordinates
-
- void decompress(LLBitPack &bitpack, LLGroupHeader *group_header);
-
- LLCloudLayer* getNeighbor(const S32 n) const { return mNeighbors[n]; }
-
- void connectNeighbor(LLCloudLayer *cloudp, U32 direction);
- void disconnectNeighbor(U32 direction);
- void disconnectAllNeighbors();
-
-public:
- LLVector3d mOriginGlobal;
- F32 mMetersPerEdge;
- F32 mMetersPerGrid;
-
-
- F32 mMaxAlpha; // The max cloud puff _render_ alpha
-
-protected:
- LLCloudLayer *mNeighbors[4];
- LLWind *mWindp;
- LLViewerRegion *mRegionp;
- F32 *mDensityp; // the probability density grid
-
- LLCloudGroup mCloudGroups[CLOUD_GROUPS_PER_EDGE][CLOUD_GROUPS_PER_EDGE];
-};
-
-
-#endif
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 84c560639e..254c0adef1 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -317,7 +317,6 @@ BOOL LLCOFWearables::postBuild()
mAttachments->setComparator(&WEARABLE_NAME_COMPARATOR);
mBodyParts->setComparator(&WEARABLE_NAME_COMPARATOR);
-
mClothingTab = getChild<LLAccordionCtrlTab>("tab_clothing");
mClothingTab->setDropDownStateChangedCallback(boost::bind(&LLCOFWearables::onAccordionTabStateChanged, this, _1, _2));
@@ -499,6 +498,10 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
mAttachments->sort();
mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
}
+ else
+ {
+ mAttachments->setNoItemsCommentText(LLTrans::getString("no_attachments"));
+ }
if (mBodyParts->size())
{
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
new file mode 100644
index 0000000000..347a467a8b
--- /dev/null
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -0,0 +1,230 @@
+/**
+ * @file lldaycyclemanager.cpp
+ * @brief Implementation for the LLDayCycleManager class.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lldaycyclemanager.h"
+
+#include "lldiriterator.h"
+
+void LLDayCycleManager::getPresetNames(preset_name_list_t& names) const
+{
+ names.clear();
+
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ names.push_back(it->first);
+ }
+}
+
+void LLDayCycleManager::getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const
+{
+ user.clear();
+ sys.clear();
+
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ const std::string& name = it->first;
+
+ if (isSystemPreset(name))
+ {
+ sys.push_back(name);
+ }
+ else
+ {
+ user.push_back(name);
+ }
+ }
+}
+
+void LLDayCycleManager::getUserPresetNames(preset_name_list_t& user) const
+{
+ preset_name_list_t sys; // unused
+ getPresetNames(user, sys);
+}
+
+bool LLDayCycleManager::getPreset(const std::string name, LLWLDayCycle& day_cycle) const
+{
+ dc_map_t::const_iterator it = mDayCycleMap.find(name);
+ if (it == mDayCycleMap.end())
+ {
+ return false;
+ }
+
+ day_cycle = it->second;
+ return true;
+}
+
+bool LLDayCycleManager::getPreset(const std::string name, LLSD& day_cycle) const
+{
+ LLWLDayCycle dc;
+ if (!getPreset(name, dc))
+ {
+ return false;
+ }
+
+ day_cycle = dc.asLLSD();
+ return true;
+}
+
+bool LLDayCycleManager::presetExists(const std::string name) const
+{
+ LLWLDayCycle dummy;
+ return getPreset(name, dummy);
+}
+
+bool LLDayCycleManager::isSystemPreset(const std::string& name) const
+{
+ return gDirUtilp->fileExists(getSysDir() + LLURI::escape(name) + ".xml");
+}
+
+bool LLDayCycleManager::savePreset(const std::string& name, const LLSD& data)
+{
+ // Save given preset.
+ LLWLDayCycle day;
+ day.loadDayCycle(data, LLEnvKey::SCOPE_LOCAL);
+ day.save(getUserDir() + LLURI::escape(name) + ".xml");
+
+ // Add it to our map.
+ addPreset(name, data);
+ mModifySignal();
+ return true;
+}
+
+bool LLDayCycleManager::deletePreset(const std::string& name)
+{
+ // Remove it from the map.
+ dc_map_t::iterator it = mDayCycleMap.find(name);
+ if (it == mDayCycleMap.end())
+ {
+ LL_WARNS("Windlight") << "No day cycle named " << name << LL_ENDL;
+ return false;
+ }
+ mDayCycleMap.erase(it);
+
+ // Remove from the filesystem.
+ std::string filename = LLURI::escape(name) + ".xml";
+ if (gDirUtilp->fileExists(getUserDir() + filename))
+ {
+ gDirUtilp->deleteFilesInDir(getUserDir(), filename);
+ }
+
+ // Signal interested parties.
+ mModifySignal();
+ return true;
+}
+
+bool LLDayCycleManager::isSkyPresetReferenced(const std::string& preset_name) const
+{
+ // We're traversing local day cycles, they can only reference local skies.
+ LLWLParamKey key(preset_name, LLEnvKey::SCOPE_LOCAL);
+
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ if (it->second.hasReferencesTo(key))
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+boost::signals2::connection LLDayCycleManager::setModifyCallback(const modify_signal_t::slot_type& cb)
+{
+ return mModifySignal.connect(cb);
+}
+
+// virtual
+void LLDayCycleManager::initSingleton()
+{
+ LL_DEBUGS("Windlight") << "Loading all day cycles" << LL_ENDL;
+ loadAllPresets();
+}
+
+void LLDayCycleManager::loadAllPresets()
+{
+ mDayCycleMap.clear();
+
+ // First, load system (coming out of the box) day cycles.
+ loadPresets(getSysDir());
+
+ // Then load user presets. Note that user day cycles will modify any system ones already loaded.
+ loadPresets(getUserDir());
+}
+
+void LLDayCycleManager::loadPresets(const std::string& dir)
+{
+ LLDirIterator dir_iter(dir, "*.xml");
+
+ while (1)
+ {
+ std::string file;
+ if (!dir_iter.next(file)) break; // no more files
+ loadPreset(dir + file);
+ }
+}
+
+bool LLDayCycleManager::loadPreset(const std::string& path)
+{
+ LLSD data = LLWLDayCycle::loadDayCycleFromPath(path);
+ if (data.isUndefined())
+ {
+ llwarns << "Error loading day cycle from " << path << llendl;
+ return false;
+ }
+
+ std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
+ addPreset(name, data);
+
+ return true;
+}
+
+bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data)
+{
+ if (name.empty())
+ {
+ llassert(name.empty());
+ return false;
+ }
+
+ LLWLDayCycle day;
+ day.loadDayCycle(data, LLEnvKey::SCOPE_LOCAL);
+ mDayCycleMap[name] = day;
+ return true;
+}
+
+// static
+std::string LLDayCycleManager::getSysDir()
+{
+ return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", "");
+}
+
+// static
+std::string LLDayCycleManager::getUserDir()
+{
+ return gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS , "windlight/days", "");
+}
diff --git a/indra/newview/lldaycyclemanager.h b/indra/newview/lldaycyclemanager.h
new file mode 100644
index 0000000000..3d2144960d
--- /dev/null
+++ b/indra/newview/lldaycyclemanager.h
@@ -0,0 +1,84 @@
+/**
+ * @file lldaycyclemanager.h
+ * @brief Implementation for the LLDayCycleManager class.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLDAYCYCLEMANAGER_H
+#define LL_LLDAYCYCLEMANAGER_H
+
+#include <map>
+#include <string>
+
+#include "llwldaycycle.h"
+#include "llwlparammanager.h"
+
+/**
+ * WindLight day cycles manager class
+ *
+ * Provides interface for accessing, loading and saving day cycles.
+ */
+class LLDayCycleManager : public LLSingleton<LLDayCycleManager>
+{
+ LOG_CLASS(LLDayCycleManager);
+
+public:
+ typedef std::list<std::string> preset_name_list_t;
+
+ typedef std::map<std::string, LLWLDayCycle> dc_map_t;
+ typedef boost::signals2::signal<void()> modify_signal_t;
+
+ void getPresetNames(preset_name_list_t& names) const;
+ void getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const;
+ void getUserPresetNames(preset_name_list_t& user) const;
+
+ bool getPreset(const std::string name, LLWLDayCycle& day_cycle) const;
+ bool getPreset(const std::string name, LLSD& day_cycle) const;
+ bool presetExists(const std::string name) const;
+ bool isSystemPreset(const std::string& name) const;
+ bool savePreset(const std::string& name, const LLSD& data);
+ bool deletePreset(const std::string& name);
+
+ /// @return true if there is a day cycle that refers to the sky preset.
+ bool isSkyPresetReferenced(const std::string& preset_name) const;
+
+ /// Emitted when a preset gets added or deleted.
+ boost::signals2::connection setModifyCallback(const modify_signal_t::slot_type& cb);
+
+private:
+ friend class LLSingleton<LLDayCycleManager>;
+ /*virtual*/ void initSingleton();
+
+ void loadAllPresets();
+ void loadPresets(const std::string& dir);
+ bool loadPreset(const std::string& path);
+ bool addPreset(const std::string& name, const LLSD& data);
+
+ static std::string getSysDir();
+ static std::string getUserDir();
+
+ dc_map_t mDayCycleMap;
+ modify_signal_t mModifySignal;
+};
+
+#endif // LL_LLDAYCYCLEMANAGER_H
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index b6d67899f8..216cc66ef8 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -62,7 +62,8 @@ void LLDebugView::init()
LLRect r;
LLRect rect = getLocalRect();
- r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100);
+ // Rectangle to draw debug data in (full height, 3/4 width)
+ r.set(10, rect.getHeight() - 100, ((rect.getWidth()*3)/4), 100);
LLConsole::Params cp;
cp.name("debug console");
cp.max_lines(20);
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index bdc12ec0e3..debac9dcbf 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -94,7 +94,9 @@ void LLDrawable::init()
mRenderType = 0;
mCurrentScale = LLVector3(1,1,1);
mDistanceWRTCamera = 0.0f;
-
+ mPositionGroup.clear();
+ mExtents[0].clear();
+ mExtents[1].clear();
mQuietCount = 0;
mState = 0;
@@ -385,7 +387,6 @@ void LLDrawable::makeActive()
pcode == LLViewerObject::LL_VO_SURFACE_PATCH ||
pcode == LLViewerObject::LL_VO_PART_GROUP ||
pcode == LLViewerObject::LL_VO_HUD_PART_GROUP ||
- pcode == LLViewerObject::LL_VO_CLOUDS ||
pcode == LLViewerObject::LL_VO_GROUND ||
pcode == LLViewerObject::LL_VO_SKY)
{
@@ -587,7 +588,10 @@ void LLDrawable::setRadius(F32 radius)
void LLDrawable::moveUpdatePipeline(BOOL moved)
{
- makeActive();
+ if (moved)
+ {
+ makeActive();
+ }
// Update the face centers.
for (S32 i = 0; i < getNumFaces(); i++)
@@ -695,7 +699,8 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
- llerrs << "WTF?" << llendl;
+ llwarns << "Attempted to update distance for non-world camera." << llendl;
+ return;
}
//switch LOD with the spatial group to avoid artifacts
@@ -1513,10 +1518,6 @@ BOOL LLDrawable::isAnimating() const
{
return TRUE;
}
- if (mVObjp->getPCode() == LLViewerObject::LL_VO_CLOUDS)
- {
- return TRUE;
- }
if (!isRoot() && !mVObjp->getAngularVelocity().isExactlyZero())
{
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 9ebe1a45b4..e268640a21 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -276,6 +276,7 @@ public:
REBUILD_SHADOW = 0x02000000,
HAS_ALPHA = 0x04000000,
RIGGED = 0x08000000,
+ PARTITION_MOVE = 0x10000000,
} EDrawableFlags;
private: //aligned members
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 25e4bc847c..fa7d6e2a40 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -35,7 +35,6 @@
#include "lldrawpoolalpha.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolbump.h"
-#include "lldrawpoolclouds.h"
#include "lldrawpoolground.h"
#include "lldrawpoolsimple.h"
#include "lldrawpoolsky.h"
@@ -191,6 +190,16 @@ void LLDrawPool::renderPostDeferred(S32 pass)
//virtual
void LLDrawPool::endRenderPass( S32 pass )
{
+ for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
+ { //dummy cleanup of any currently bound textures
+ if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE)
+ {
+ gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType());
+ gGL.getTexUnit(i)->disable();
+ }
+ }
+
+ gGL.getTexUnit(0)->activate();
}
//virtual
@@ -430,14 +439,14 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
pushBatches(type, mask, TRUE);
}
-void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture)
+void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
LLDrawInfo* pparams = *i;
if (pparams)
{
- pushBatch(*pparams, mask, texture);
+ pushBatch(*pparams, mask, texture, batch_textures);
}
}
}
@@ -456,26 +465,43 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
}
}
-void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
+void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
applyModelMatrix(params);
+ bool tex_setup = false;
+
if (texture)
{
- if (params.mTexture.notNull())
+ if (batch_textures && params.mTextureList.size() > 1)
{
- params.mTexture->addTextureStats(params.mVSize);
- gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
- if (params.mTextureMatrix)
+ for (U32 i = 0; i < params.mTextureList.size(); ++i)
{
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
- gPipeline.mTextureMatrixOps++;
+ if (params.mTextureList[i].notNull())
+ {
+ gGL.getTexUnit(i)->bind(params.mTextureList[i], TRUE);
+ }
}
}
else
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ { //not batching textures or batch has only 1 texture -- might need a texture matrix
+ if (params.mTexture.notNull())
+ {
+ params.mTexture->addTextureStats(params.mVSize);
+ gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
+ if (params.mTextureMatrix)
+ {
+ tex_setup = true;
+ gGL.getTexUnit(0)->activate();
+ glMatrixMode(GL_TEXTURE);
+ glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gPipeline.mTextureMatrixOps++;
+ }
+ }
+ else
+ {
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ }
}
}
@@ -490,7 +516,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
}
- if (params.mTextureMatrix && texture && params.mTexture.notNull())
+ if (tex_setup)
{
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index d3fd9ead0d..c7acbb42c6 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -146,8 +146,8 @@ public:
void resetDrawOrders() { }
static void applyModelMatrix(LLDrawInfo& params);
- virtual void pushBatches(U32 type, U32 mask, BOOL texture = TRUE);
- virtual void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture);
+ virtual void pushBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
+ virtual void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures = FALSE);
virtual void renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE);
virtual void renderGroups(U32 type, U32 mask, BOOL texture = TRUE);
virtual void renderTexture(U32 type, U32 mask);
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 8b5a2ce781..ad7e3ad593 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -124,7 +124,10 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
if (pass == 0)
{
simple_shader = &gDeferredAlphaProgram;
- fullbright_shader = &gDeferredFullbrightProgram;
+ fullbright_shader = &gObjectFullbrightProgram;
+
+ //prime simple shader (loads shadow relevant uniforms)
+ gPipeline.bindDeferredShader(*simple_shader);
}
else
{
@@ -228,13 +231,13 @@ void LLDrawPoolAlpha::render(S32 pass)
if (!LLPipeline::sRenderDeferred)
{
simple_shader->bind();
- pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask());
+ pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
if (fullbright_shader)
{
fullbright_shader->bind();
}
- pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask());
+ pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
LLGLSLShader::bindNoShader();
}
else
@@ -273,7 +276,14 @@ void LLDrawPoolAlpha::render(S32 pass)
}
}
- renderAlpha(getVertexDataMask());
+ if (mVertexShaderLevel > 0)
+ {
+ renderAlpha(getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX);
+ }
+ else
+ {
+ renderAlpha(getVertexDataMask());
+ }
gGL.setColorMask(true, false);
@@ -283,23 +293,26 @@ void LLDrawPoolAlpha::render(S32 pass)
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- }
-
if (sShowDebugAlpha)
{
- if(gPipeline.canUseWindLightShaders())
+ BOOL shaders = gPipeline.canUseVertexShaders();
+ if(shaders)
{
- LLGLSLShader::bindNoShader();
+ gObjectFullbrightNonIndexedProgram.bind();
+ }
+ else
+ {
+ gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
- gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
glColor4f(1,0,0,1);
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0);
+ if(shaders)
+ {
+ gObjectFullbrightNonIndexedProgram.unbind();
+ }
}
}
@@ -339,12 +352,9 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
{
BOOL initialized_lighting = FALSE;
BOOL light_enabled = TRUE;
- S32 diffuse_channel = 0;
-
- BOOL use_shaders = (LLPipeline::sUnderWaterRender && gPipeline.canUseVertexShaders())
- || gPipeline.canUseWindLightShadersOnObjects();
-
+ BOOL use_shaders = gPipeline.canUseVertexShaders();
+
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
{
LLSpatialGroup* group = *i;
@@ -357,7 +367,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
bool draw_glow_for_this_partition = mVertexShaderLevel > 0 && // no shaders = no glow.
// All particle systems seem to come off the wire with texture entries which claim that they glow. This is probably a bug in the data. Suppress.
group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_PARTICLE &&
- group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_CLOUD &&
group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD_PARTICLE;
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
@@ -368,92 +377,89 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
LLRenderPass::applyModelMatrix(params);
+
+ if (params.mFullbright)
{
- if (params.mFullbright)
- {
- // Turn off lighting if it hasn't already been so.
- if (light_enabled || !initialized_lighting)
- {
- initialized_lighting = TRUE;
- if (use_shaders)
- {
- target_shader = fullbright_shader;
- }
- else
- {
- gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
- }
- light_enabled = FALSE;
- }
- }
- // Turn on lighting if it isn't already.
- else if (!light_enabled || !initialized_lighting)
+ // Turn off lighting if it hasn't already been so.
+ if (light_enabled || !initialized_lighting)
{
initialized_lighting = TRUE;
if (use_shaders)
{
- target_shader = simple_shader;
+ target_shader = fullbright_shader;
}
else
{
- gPipeline.enableLightsDynamic();
+ gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
- light_enabled = TRUE;
+ light_enabled = FALSE;
}
-
- // If we need shaders, and we're not ALREADY using the proper shader, then bind it
- // (this way we won't rebind shaders unnecessarily).
- if(use_shaders && (current_shader != target_shader))
+ }
+ // Turn on lighting if it isn't already.
+ else if (!light_enabled || !initialized_lighting)
+ {
+ initialized_lighting = TRUE;
+ if (use_shaders)
{
- llassert(target_shader != NULL);
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
- }
- current_shader = target_shader;
- if (deferred_render)
- {
- gPipeline.bindDeferredShader(*current_shader);
- diffuse_channel = current_shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- }
- else
- {
- current_shader->bind();
- }
+ target_shader = simple_shader;
}
- else if (!use_shaders && current_shader != NULL)
+ else
{
- if (deferred_render)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
- }
- LLGLSLShader::bindNoShader();
- current_shader = NULL;
+ gPipeline.enableLightsDynamic();
}
+ light_enabled = TRUE;
+ }
- if (params.mGroup)
- {
- params.mGroup->rebuildMesh();
- }
+ // If we need shaders, and we're not ALREADY using the proper shader, then bind it
+ // (this way we won't rebind shaders unnecessarily).
+ if(use_shaders && (current_shader != target_shader))
+ {
+ llassert(target_shader != NULL);
+ current_shader = target_shader;
+ current_shader->bind();
+ }
+ else if (!use_shaders && current_shader != NULL)
+ {
+ LLGLSLShader::bindNoShader();
+ current_shader = NULL;
+ }
-
- if (params.mTexture.notNull())
+ if (params.mGroup)
+ {
+ params.mGroup->rebuildMesh();
+ }
+
+ bool tex_setup = false;
+
+ if (use_shaders && params.mTextureList.size() > 1)
+ {
+ for (U32 i = 0; i < params.mTextureList.size(); ++i)
{
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture.get());
- if(params.mTexture.notNull())
+ if (params.mTextureList[i].notNull())
{
- params.mTexture->addTextureStats(params.mVSize);
+ gGL.getTexUnit(i)->bind(params.mTextureList[i], TRUE);
}
+ }
+ }
+ else
+ { //not batching textures or batch has only 1 texture -- might need a texture matrix
+ if (params.mTexture.notNull())
+ {
+ params.mTexture->addTextureStats(params.mVSize);
+ gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
if (params.mTextureMatrix)
{
+ tex_setup = true;
gGL.getTexUnit(0)->activate();
glMatrixMode(GL_TEXTURE);
glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
}
}
+ else
+ {
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ }
}
params.mVertexBuffer->setBuffer(mask);
@@ -480,7 +486,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
}
- if (params.mTextureMatrix && params.mTexture.notNull())
+ if (tex_setup)
{
gGL.getTexUnit(0)->activate();
glLoadIdentity();
@@ -490,15 +496,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
}
}
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- LLVertexBuffer::unbind();
- LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
- }
-
+ LLVertexBuffer::unbind();
+
if (!light_enabled)
{
gPipeline.enableLightsDynamic();
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 645c7ebcae..9f790d03fe 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -459,14 +459,6 @@ S32 LLDrawPoolAvatar::getNumPasses()
{
return 10;
}
- if (LLPipeline::sImpostorRender)
- {
- return 1;
- }
- else
- {
- return 3;
- }
}
@@ -613,11 +605,11 @@ void LLDrawPoolAvatar::beginRigid()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleWaterProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedProgram;
}
if (sVertexProgram != NULL)
@@ -669,7 +661,7 @@ void LLDrawPoolAvatar::endDeferredImpostor()
void LLDrawPoolAvatar::beginDeferredRigid()
{
- sVertexProgram = &gDeferredDiffuseProgram;
+ sVertexProgram = &gDeferredNonIndexedDiffuseProgram;
sVertexProgram->bind();
}
@@ -700,11 +692,11 @@ void LLDrawPoolAvatar::beginSkinned()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleWaterProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedProgram;
}
}
@@ -789,11 +781,11 @@ void LLDrawPoolAvatar::beginRiggedSimple()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleWaterProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleProgram;
+ sVertexProgram = &gObjectSimpleNonIndexedProgram;
}
}
@@ -864,11 +856,11 @@ void LLDrawPoolAvatar::beginRiggedFullbright()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectFullbrightWaterProgram;
+ sVertexProgram = &gObjectFullbrightNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectFullbrightProgram;
+ sVertexProgram = &gObjectFullbrightNonIndexedProgram;
}
}
@@ -908,11 +900,11 @@ void LLDrawPoolAvatar::beginRiggedShinySimple()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectShinyWaterProgram;
+ sVertexProgram = &gObjectShinyNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectShinyProgram;
+ sVertexProgram = &gObjectShinyNonIndexedProgram;
}
}
@@ -953,11 +945,11 @@ void LLDrawPoolAvatar::beginRiggedFullbrightShiny()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectFullbrightShinyWaterProgram;
+ sVertexProgram = &gObjectFullbrightShinyNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectFullbrightShinyProgram;
+ sVertexProgram = &gObjectFullbrightShinyNonIndexedProgram;
}
}
@@ -1419,7 +1411,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
- if (avatar->isSelf() && !gAgent.needsRenderAvatar())
+ if (avatar->isSelf() && !gAgent.needsRenderAvatar() || !gMeshRepo.meshRezEnabled())
{
return;
}
@@ -1456,7 +1448,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
continue;
}
- const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id);
+ const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj);
if (!skin)
{
continue;
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 2f76baaaf7..813b3820ee 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -316,6 +316,9 @@ void LLDrawPoolBump::endRenderPass(S32 pass)
llassert(0);
break;
}
+
+ //to cleanup texture channels
+ LLRenderPass::endRenderPass(pass);
}
//static
@@ -354,6 +357,11 @@ void LLDrawPoolBump::beginShiny(bool invisible)
}
bindCubeMap(shader, mVertexShaderLevel, diffuse_channel, cube_channel, invisible);
+
+ if (mVertexShaderLevel > 1)
+ { //indexed texture rendering, channel 0 is always diffuse
+ diffuse_channel = 0;
+ }
}
//static
@@ -421,16 +429,16 @@ void LLDrawPoolBump::renderShiny(bool invisible)
LLGLEnable blend_enable(GL_BLEND);
if (!invisible && mVertexShaderLevel > 1)
{
- LLRenderPass::renderTexture(LLRenderPass::PASS_SHINY, sVertexMask);
+ LLRenderPass::pushBatches(LLRenderPass::PASS_SHINY, sVertexMask | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
else if (!invisible)
{
renderGroups(LLRenderPass::PASS_SHINY, sVertexMask);
}
- else // invisible
- {
- renderGroups(LLRenderPass::PASS_INVISI_SHINY, sVertexMask);
- }
+ //else // invisible (deprecated)
+ //{
+ //renderGroups(LLRenderPass::PASS_INVISI_SHINY, sVertexMask);
+ //}
}
}
@@ -529,6 +537,12 @@ void LLDrawPoolBump::beginFullbrightShiny()
gGL.getTexUnit(cube_channel)->bind(cube_map);
gGL.getTexUnit(0)->activate();
}
+
+ if (mVertexShaderLevel > 1)
+ { //indexed texture rendering, channel 0 is always diffuse
+ diffuse_channel = 0;
+ }
+
mShiny = TRUE;
}
@@ -543,7 +557,15 @@ void LLDrawPoolBump::renderFullbrightShiny()
if( gSky.mVOSkyp->getCubeMap() )
{
LLGLEnable blend_enable(GL_BLEND);
- LLRenderPass::renderTexture(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask);
+
+ if (mVertexShaderLevel > 1)
+ {
+ LLRenderPass::pushBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+ }
+ else
+ {
+ LLRenderPass::renderTexture(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask);
+ }
}
}
@@ -843,6 +865,9 @@ void LLDrawPoolBump::endPostDeferredPass(S32 pass)
endBump(LLRenderPass::PASS_POST_BUMP);
break;
}
+
+ //to disable texture channels
+ LLRenderPass::endRenderPass(pass);
}
void LLDrawPoolBump::renderPostDeferred(S32 pass)
@@ -1300,43 +1325,60 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
}
}
-void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
+void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
applyModelMatrix(params);
- if (params.mTextureMatrix)
+ bool tex_setup = false;
+
+ if (batch_textures && params.mTextureList.size() > 1)
{
- if (mShiny)
+ for (U32 i = 0; i < params.mTextureList.size(); ++i)
{
- gGL.getTexUnit(0)->activate();
- glMatrixMode(GL_TEXTURE);
+ if (params.mTextureList[i].notNull())
+ {
+ gGL.getTexUnit(i)->bind(params.mTextureList[i], TRUE);
+ }
}
- else
+ }
+ else
+ { //not batching textures or batch has only 1 texture -- might need a texture matrix
+ if (params.mTextureMatrix)
{
- gGL.getTexUnit(1)->activate();
- glMatrixMode(GL_TEXTURE);
+ if (mShiny)
+ {
+ gGL.getTexUnit(0)->activate();
+ glMatrixMode(GL_TEXTURE);
+ }
+ else
+ {
+ gGL.getTexUnit(1)->activate();
+ glMatrixMode(GL_TEXTURE);
+ glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gPipeline.mTextureMatrixOps++;
+ gGL.getTexUnit(0)->activate();
+ }
+
glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
- gGL.getTexUnit(0)->activate();
- }
-
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
- gPipeline.mTextureMatrixOps++;
- }
- if (mShiny && mVertexShaderLevel > 1 && texture)
- {
- if (params.mTexture.notNull())
- {
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
- params.mTexture->addTextureStats(params.mVSize);
+ tex_setup = true;
}
- else
+
+ if (mShiny && mVertexShaderLevel > 1 && texture)
{
- gGL.getTexUnit(diffuse_channel)->unbind(LLTexUnit::TT_TEXTURE);
+ if (params.mTexture.notNull())
+ {
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
+ params.mTexture->addTextureStats(params.mVSize);
+ }
+ else
+ {
+ gGL.getTexUnit(diffuse_channel)->unbind(LLTexUnit::TT_TEXTURE);
+ }
}
}
-
+
if (params.mGroup)
{
params.mGroup->rebuildMesh();
@@ -1344,7 +1386,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
params.mVertexBuffer->setBuffer(mask);
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
- if (params.mTextureMatrix)
+ if (tex_setup)
{
if (mShiny)
{
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index f4702bf61d..476b1d41b7 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -55,7 +55,7 @@ public:
virtual void endRenderPass( S32 pass );
virtual S32 getNumPasses();
/*virtual*/ void prerender();
- /*virtual*/ void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture);
+ /*virtual*/ void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures = FALSE);
void renderBump(U32 type, U32 mask);
void renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture);
diff --git a/indra/newview/lldrawpoolclouds.cpp b/indra/newview/lldrawpoolclouds.cpp
deleted file mode 100644
index 5db1d8cfed..0000000000
--- a/indra/newview/lldrawpoolclouds.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file lldrawpoolclouds.cpp
- * @brief LLDrawPoolClouds class implementation
- *
- * $LicenseInfo:firstyear=2006&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lldrawpoolclouds.h"
-
-#include "llface.h"
-#include "llsky.h"
-#include "llviewercamera.h"
-#include "llvoclouds.h"
-#include "pipeline.h"
-
-LLDrawPoolClouds::LLDrawPoolClouds() :
- LLDrawPool(POOL_CLOUDS)
-{
-}
-
-LLDrawPool *LLDrawPoolClouds::instancePool()
-{
- return new LLDrawPoolClouds();
-}
-
-BOOL LLDrawPoolClouds::addFace(LLFace* face)
-{
- llerrs << "WTF?" << llendl;
- return FALSE;
-}
-
-void LLDrawPoolClouds::enqueue(LLFace *facep)
-{
- mDrawFace.push_back(facep);
- facep->mDistance = (facep->mCenterAgent - gCamera->getOrigin()) * gCamera->getAtAxis();
-}
-
-void LLDrawPoolClouds::beginRenderPass(S32 pass)
-{
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glEnableClientState(GL_NORMAL_ARRAY);
-}
-
-void LLDrawPoolClouds::prerender()
-{
- mVertexShaderLevel = gPipeline.getVertexShaderLevel(LLPipeline::SHADER_ENVIRONMENT);
-}
-
-void LLDrawPoolClouds::render(S32 pass)
-{
- LLFastTimer ftm(LLFastTimer::FTM_RENDER_CLOUDS);
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
- {
- return;
- }
-
- if (mDrawFace.empty())
- {
- return;
- }
-
- LLGLSPipelineAlpha gls_pipeline_alpha;
- LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- glAlphaFunc(GL_GREATER,0.01f);
-
- gPipeline.enableLightsFullbright(LLColor4(1.f,1.f,1.f));
-
- mDrawFace[0]->bindTexture();
-
- std::sort(mDrawFace.begin(), mDrawFace.end(), LLFace::CompareDistanceGreater());
-
- drawLoop();
-}
-
-
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 2e83167851..5dbb27cabb 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -44,6 +44,36 @@ static LLGLSLShader* fullbright_shader = NULL;
static LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple");
static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass");
+void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
+{
+ gDeferredFullbrightProgram.bind();
+}
+
+void LLDrawPoolGlow::renderPostDeferred(S32 pass)
+{
+ LLFastTimer t(FTM_RENDER_GLOW);
+ LLGLEnable blend(GL_BLEND);
+ LLGLDisable test(GL_ALPHA_TEST);
+ gGL.flush();
+ /// Get rid of z-fighting with non-glow pass.
+ LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(-1.0f, -1.0f);
+ gGL.setSceneBlendType(LLRender::BT_ADD);
+
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ gGL.setColorMask(false, true);
+ pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+
+ gGL.setColorMask(true, false);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+}
+
+void LLDrawPoolGlow::endPostDeferredPass(S32 pass)
+{
+ gDeferredFullbrightProgram.unbind();
+ LLRenderPass::endRenderPass(pass);
+}
+
void LLDrawPoolGlow::render(S32 pass)
{
LLFastTimer t(FTM_RENDER_GLOW);
@@ -68,7 +98,15 @@ void LLDrawPoolGlow::render(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
gGL.setColorMask(false, true);
- renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask());
+
+ if (shader_level > 1)
+ {
+ pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+ }
+ else
+ {
+ renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask());
+ }
gGL.setColorMask(true, false);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -79,10 +117,10 @@ void LLDrawPoolGlow::render(S32 pass)
}
}
-void LLDrawPoolGlow::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
+void LLDrawPoolGlow::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
glColor4ubv(params.mGlowColor.mV);
- LLRenderPass::pushBatch(params, mask, texture);
+ LLRenderPass::pushBatch(params, mask, texture, batch_textures);
}
@@ -126,10 +164,11 @@ void LLDrawPoolSimple::beginRenderPass(S32 pass)
void LLDrawPoolSimple::endRenderPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_SIMPLE);
+ stop_glerror();
LLRenderPass::endRenderPass(pass);
-
- if (mVertexShaderLevel > 0){
-
+ stop_glerror();
+ if (mVertexShaderLevel > 0)
+ {
simple_shader->unbind();
}
}
@@ -142,13 +181,24 @@ void LLDrawPoolSimple::render(S32 pass)
{ //render simple
LLFastTimer t(FTM_RENDER_SIMPLE);
gPipeline.enableLightsDynamic();
- renderTexture(LLRenderPass::PASS_SIMPLE, getVertexDataMask());
- if (LLPipeline::sRenderDeferred)
- { //if deferred rendering is enabled, bump faces aren't registered as simple
- //render bump faces here as simple so bump faces will appear under water
- renderTexture(LLRenderPass::PASS_BUMP, getVertexDataMask());
+ if (mVertexShaderLevel > 0)
+ {
+ U32 mask = getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX;
+
+ pushBatches(LLRenderPass::PASS_SIMPLE, mask, TRUE, TRUE);
+
+ if (LLPipeline::sRenderDeferred)
+ { //if deferred rendering is enabled, bump faces aren't registered as simple
+ //render bump faces here as simple so bump faces will appear under water
+ pushBatches(LLRenderPass::PASS_BUMP, mask, TRUE, TRUE);
+ }
+ }
+ else
+ {
+ renderTexture(LLRenderPass::PASS_SIMPLE, getVertexDataMask());
}
+
}
}
@@ -177,7 +227,7 @@ void LLDrawPoolSimple::renderDeferred(S32 pass)
{ //render simple
LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED);
- renderTexture(LLRenderPass::PASS_SIMPLE, getVertexDataMask());
+ pushBatches(LLRenderPass::PASS_SIMPLE, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
}
@@ -200,11 +250,11 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
if (LLPipeline::sUnderWaterRender)
{
- simple_shader = &gObjectSimpleWaterProgram;
+ simple_shader = &gObjectSimpleNonIndexedWaterProgram;
}
else
{
- simple_shader = &gObjectSimpleProgram;
+ simple_shader = &gObjectSimpleNonIndexedProgram;
}
if (mVertexShaderLevel > 0)
@@ -285,6 +335,26 @@ void LLDrawPoolFullbright::prerender()
mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
}
+void LLDrawPoolFullbright::beginPostDeferredPass(S32 pass)
+{
+ gDeferredFullbrightProgram.bind();
+}
+
+void LLDrawPoolFullbright::renderPostDeferred(S32 pass)
+{
+ LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
+ pushBatches(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask, TRUE, TRUE);
+}
+
+void LLDrawPoolFullbright::endPostDeferredPass(S32 pass)
+{
+ gDeferredFullbrightProgram.unbind();
+ LLRenderPass::endRenderPass(pass);
+}
+
void LLDrawPoolFullbright::beginRenderPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
@@ -313,25 +383,21 @@ void LLDrawPoolFullbright::endRenderPass(S32 pass)
void LLDrawPoolFullbright::render(S32 pass)
{ //render fullbright
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
if (mVertexShaderLevel > 0)
{
fullbright_shader->bind();
fullbright_shader->uniform1f(LLViewerShaderMgr::FULLBRIGHT, 1.f);
+ U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
+ pushBatches(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask, TRUE, TRUE);
}
else
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
+ U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR;
+ renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask);
}
-
- //gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f);
-
- //LLGLEnable test(GL_ALPHA_TEST);
- //LLGLEnable blend(GL_BLEND);
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR;
- renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask);
-
- //gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
S32 LLDrawPoolFullbright::getNumPasses()
diff --git a/indra/newview/lldrawpoolsimple.h b/indra/newview/lldrawpoolsimple.h
index 5f3bbebbda..3811b3d398 100644
--- a/indra/newview/lldrawpoolsimple.h
+++ b/indra/newview/lldrawpoolsimple.h
@@ -98,9 +98,9 @@ public:
LLDrawPoolFullbright();
/*virtual*/ S32 getNumPostDeferredPasses() { return 1; }
- /*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); }
- /*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); }
- /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); }
+ /*virtual*/ void beginPostDeferredPass(S32 pass);
+ /*virtual*/ void endPostDeferredPass(S32 pass);
+ /*virtual*/ void renderPostDeferred(S32 pass);
/*virtual*/ void beginRenderPass(S32 pass);
/*virtual*/ void endRenderPass(S32 pass);
@@ -126,12 +126,12 @@ public:
virtual void prerender() { }
/*virtual*/ S32 getNumPostDeferredPasses() { return 1; }
- /*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); }
- /*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); }
- /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); }
+ /*virtual*/ void beginPostDeferredPass(S32 pass);
+ /*virtual*/ void endPostDeferredPass(S32 pass);
+ /*virtual*/ void renderPostDeferred(S32 pass);
void render(S32 pass = 0);
- void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE);
+ void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
};
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 84eeace9c6..3daa0f8261 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -143,7 +143,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
void LLDrawPoolTerrain::endRenderPass( S32 pass )
{
LLFastTimer t(FTM_RENDER_TERRAIN);
- LLFacePool::endRenderPass(pass);
+ //LLFacePool::endRenderPass(pass);
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0) {
sShader->unbind();
@@ -215,8 +215,10 @@ void LLDrawPoolTerrain::render(S32 pass)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
- sShader = &gObjectFullbrightProgram;
+ sShader = &gObjectFullbrightNonIndexedProgram;
sShader->bind();
+ LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
sShader = old_shader;
sShader->bind();
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 195ee60a2e..81c796b146 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -66,11 +66,11 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
if (LLPipeline::sUnderWaterRender)
{
- shader = &gObjectSimpleWaterProgram;
+ shader = &gObjectSimpleNonIndexedWaterProgram;
}
else
{
- shader = &gObjectSimpleProgram;
+ shader = &gObjectSimpleNonIndexedProgram;
}
if (gPipeline.canUseWindLightShadersOnObjects())
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index dc94924da4..31c14361b5 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -108,7 +108,7 @@ void LLDrawPoolWater::prerender()
// got rid of modulation by light color since it got a little too
// green at sunset and sl-57047 (underwater turns black at 8:00)
- sWaterFogColor = LLWaterParamManager::instance()->getFogColor();
+ sWaterFogColor = LLWaterParamManager::instance().getFogColor();
sWaterFogColor.mV[3] = 0;
}
@@ -527,7 +527,7 @@ void LLDrawPoolWater::shade()
//bind normal map
S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
+ LLWaterParamManager * param_mgr = &LLWaterParamManager::instance();
// change mWaterNormp if needed
if (mWaterNormp->getID() != param_mgr->getNormalMapID())
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 696c2d1abd..bf79c2100c 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -34,6 +34,8 @@
#include "llviewercamera.h"
#include "llimage.h"
#include "llwlparammanager.h"
+#include "llviewershadermgr.h"
+#include "llglslshader.h"
#include "llsky.h"
#include "llvowlsky.h"
#include "llviewerregion.h"
@@ -44,6 +46,8 @@ LLPointer<LLViewerTexture> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
LLPointer<LLImageRaw> LLDrawPoolWLSky::sCloudNoiseRawImage = NULL;
+static LLGLSLShader* cloud_shader = NULL;
+static LLGLSLShader* sky_shader = NULL;
LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
@@ -66,7 +70,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
- LLWLParamManager::instance()->propagateParameters();
+ LLWLParamManager::getInstance()->propagateParameters();
}
LLDrawPoolWLSky::~LLDrawPoolWLSky()
@@ -83,12 +87,32 @@ LLViewerTexture *LLDrawPoolWLSky::getDebugTexture()
void LLDrawPoolWLSky::beginRenderPass( S32 pass )
{
+ sky_shader =
+ LLPipeline::sUnderWaterRender ?
+ &gObjectSimpleWaterProgram :
+ &gWLSkyProgram;
+
+ cloud_shader =
+ LLPipeline::sUnderWaterRender ?
+ &gObjectSimpleWaterProgram :
+ &gWLCloudProgram;
}
void LLDrawPoolWLSky::endRenderPass( S32 pass )
{
}
+void LLDrawPoolWLSky::beginDeferredPass(S32 pass)
+{
+ sky_shader = &gDeferredWLSkyProgram;
+ cloud_shader = &gDeferredWLCloudProgram;
+}
+
+void LLDrawPoolWLSky::endDeferredPass(S32 pass)
+{
+
+}
+
void LLDrawPoolWLSky::renderDome(F32 camHeightLocal, LLGLSLShader * shader) const
{
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
@@ -128,19 +152,14 @@ void LLDrawPoolWLSky::renderSkyHaze(F32 camHeightLocal) const
{
if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
{
- LLGLSLShader* shader =
- LLPipeline::sUnderWaterRender ?
- &gObjectSimpleWaterProgram :
- &gWLSkyProgram;
-
LLGLDisable blend(GL_BLEND);
- shader->bind();
+ sky_shader->bind();
/// Render the skydome
- renderDome(camHeightLocal, shader);
+ renderDome(camHeightLocal, sky_shader);
- shader->unbind();
+ sky_shader->unbind();
}
}
@@ -161,7 +180,7 @@ void LLDrawPoolWLSky::renderStars(void) const
// clamping and allow the star_alpha param to brighten the stars.
bool error;
LLColor4 star_alpha(LLColor4::black);
- star_alpha.mV[3] = LLWLParamManager::instance()->mCurParams.getFloat("star_brightness", error) / 2.f;
+ star_alpha.mV[3] = LLWLParamManager::getInstance()->mCurParams.getFloat("star_brightness", error) / 2.f;
llassert_always(!error);
gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex());
@@ -186,23 +205,18 @@ void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const
{
if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS))
{
- LLGLSLShader* shader =
- LLPipeline::sUnderWaterRender ?
- &gObjectSimpleWaterProgram :
- &gWLCloudProgram;
-
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
gGL.getTexUnit(0)->bind(sCloudNoiseTexture);
- shader->bind();
+ cloud_shader->bind();
/// Render the skydome
- renderDome(camHeightLocal, shader);
+ renderDome(camHeightLocal, cloud_shader);
- shader->unbind();
+ cloud_shader->unbind();
}
}
@@ -246,6 +260,53 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
}
}
+void LLDrawPoolWLSky::renderDeferred(S32 pass)
+{
+ if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
+ {
+ return;
+ }
+ LLFastTimer ftm(FTM_RENDER_WL_SKY);
+
+ const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
+
+ LLGLSNoFog disableFog;
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ LLGLDisable clip(GL_CLIP_PLANE0);
+
+ gGL.setColorMask(true, false);
+
+ LLGLSquashToFarClip far_clip(glh_get_current_projection());
+
+ renderSkyHaze(camHeightLocal);
+
+ LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
+ glPushMatrix();
+
+
+ glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+
+ gDeferredStarProgram.bind();
+ // *NOTE: have to bind a texture here since register combiners blending in
+ // renderStars() requires something to be bound and we might as well only
+ // bind the moon's texture once.
+ gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
+
+ renderHeavenlyBodies();
+
+ renderStars();
+
+ gDeferredStarProgram.unbind();
+
+ glPopMatrix();
+
+ renderSkyClouds(camHeightLocal);
+
+ gGL.setColorMask(true, true);
+ //gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+}
+
void LLDrawPoolWLSky::render(S32 pass)
{
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
@@ -254,7 +315,7 @@ void LLDrawPoolWLSky::render(S32 pass)
}
LLFastTimer ftm(FTM_RENDER_WL_SKY);
- const F32 camHeightLocal = LLWLParamManager::instance()->getDomeOffset() * LLWLParamManager::instance()->getDomeRadius();
+ const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
LLGLSNoFog disableFog;
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h
index 8ca1ebb942..cd15c991ee 100644
--- a/indra/newview/lldrawpoolwlsky.h
+++ b/indra/newview/lldrawpoolwlsky.h
@@ -44,10 +44,10 @@ public:
/*virtual*/ BOOL isDead() { return FALSE; }
- /*virtual*/ S32 getNumPostDeferredPasses() { return getNumPasses(); }
- /*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); }
- /*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); }
- /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); }
+ /*virtual*/ S32 getNumDeferredPasses() { return 1; }
+ /*virtual*/ void beginDeferredPass(S32 pass);
+ /*virtual*/ void endDeferredPass(S32 pass);
+ /*virtual*/ void renderDeferred(S32 pass);
/*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ void beginRenderPass( S32 pass );
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
new file mode 100644
index 0000000000..c2720eaf28
--- /dev/null
+++ b/indra/newview/llenvmanager.cpp
@@ -0,0 +1,684 @@
+/**
+ * @file llenvmanager.cpp
+ * @brief Implementation of classes managing WindLight and water settings.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llenvmanager.h"
+
+#include "llagent.h"
+#include "lldaycyclemanager.h"
+#include "llviewercontrol.h" // for gSavedSettings
+#include "llviewerregion.h"
+#include "llwaterparammanager.h"
+#include "llwlhandlers.h"
+#include "llwlparammanager.h"
+
+std::string LLEnvPrefs::getWaterPresetName() const
+{
+ if (mWaterPresetName.empty())
+ {
+ llwarns << "Water preset name is empty" << llendl;
+ }
+
+ return mWaterPresetName;
+}
+
+std::string LLEnvPrefs::getSkyPresetName() const
+{
+ if (mSkyPresetName.empty())
+ {
+ llwarns << "Sky preset name is empty" << llendl;
+ }
+
+ return mSkyPresetName;
+}
+
+std::string LLEnvPrefs::getDayCycleName() const
+{
+ if (mDayCycleName.empty())
+ {
+ llwarns << "Day cycle name is empty" << llendl;
+ }
+
+ return mDayCycleName;
+}
+
+void LLEnvPrefs::setUseRegionSettings(bool val)
+{
+ mUseRegionSettings = val;
+}
+
+void LLEnvPrefs::setUseWaterPreset(const std::string& name)
+{
+ mUseRegionSettings = false;
+ mWaterPresetName = name;
+}
+
+void LLEnvPrefs::setUseSkyPreset(const std::string& name)
+{
+ mUseRegionSettings = false;
+ mUseDayCycle = false;
+ mSkyPresetName = name;
+}
+
+void LLEnvPrefs::setUseDayCycle(const std::string& name)
+{
+ mUseRegionSettings = false;
+ mUseDayCycle = true;
+ mDayCycleName = name;
+}
+
+//=============================================================================
+LLEnvManagerNew::LLEnvManagerNew()
+{
+ mInterpNextChangeMessage = true;
+
+ // Set default environment settings.
+ mUserPrefs.mUseRegionSettings = true;
+ mUserPrefs.mUseDayCycle = true;
+ mUserPrefs.mWaterPresetName = "Default";
+ mUserPrefs.mSkyPresetName = "Default";
+ mUserPrefs.mDayCycleName = "Default";
+}
+
+bool LLEnvManagerNew::getUseRegionSettings() const
+{
+ return mUserPrefs.getUseRegionSettings();
+}
+
+bool LLEnvManagerNew::getUseDayCycle() const
+{
+ return mUserPrefs.getUseDayCycle();
+}
+
+bool LLEnvManagerNew::getUseFixedSky() const
+{
+ return mUserPrefs.getUseFixedSky();
+}
+
+std::string LLEnvManagerNew::getWaterPresetName() const
+{
+ return mUserPrefs.getWaterPresetName();
+}
+
+std::string LLEnvManagerNew::getSkyPresetName() const
+{
+ return mUserPrefs.getSkyPresetName();
+}
+
+std::string LLEnvManagerNew::getDayCycleName() const
+{
+ return mUserPrefs.getDayCycleName();
+}
+
+const LLEnvironmentSettings& LLEnvManagerNew::getRegionSettings() const
+{
+ return !mNewRegionPrefs.isEmpty() ? mNewRegionPrefs : mCachedRegionPrefs;
+}
+
+void LLEnvManagerNew::setRegionSettings(const LLEnvironmentSettings& new_settings)
+{
+ // Set region settings override that will be used locally
+ // until user either uploads the changes or goes to another region.
+ mNewRegionPrefs = new_settings;
+}
+
+bool LLEnvManagerNew::usePrefs()
+{
+ LL_DEBUGS("Windlight") << "Displaying preferred environment" << LL_ENDL;
+ updateManagersFromPrefs(false);
+ return true;
+}
+
+bool LLEnvManagerNew::useDefaults()
+{
+ bool rslt;
+
+ rslt = useDefaultWater();
+ rslt &= useDefaultSky();
+
+ return rslt;
+}
+
+bool LLEnvManagerNew::useRegionSettings()
+{
+ bool rslt;
+
+ rslt = useRegionSky();
+ rslt &= useRegionWater();
+
+ return rslt;
+}
+
+bool LLEnvManagerNew::useWaterPreset(const std::string& name)
+{
+ LL_DEBUGS("Windlight") << "Displaying water preset " << name << LL_ENDL;
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+ bool rslt = water_mgr.getParamSet(name, water_mgr.mCurParams);
+ llassert(rslt == true);
+ return rslt;
+}
+
+bool LLEnvManagerNew::useWaterParams(const LLSD& params)
+{
+ LL_DEBUGS("Windlight") << "Displaying water params" << LL_ENDL;
+ LLWaterParamManager::instance().mCurParams.setAll(params);
+ return true;
+}
+
+bool LLEnvManagerNew::useSkyPreset(const std::string& name)
+{
+ LLWLParamManager& sky_mgr = LLWLParamManager::instance();
+ LLWLParamSet param_set;
+
+ if (!sky_mgr.getParamSet(LLWLParamKey(name, LLEnvKey::SCOPE_LOCAL), param_set))
+ {
+ llwarns << "No sky preset named " << name << llendl;
+ return false;
+ }
+
+ LL_DEBUGS("Windlight") << "Displaying sky preset " << name << LL_ENDL;
+ sky_mgr.applySkyParams(param_set.getAll());
+ return true;
+}
+
+bool LLEnvManagerNew::useSkyParams(const LLSD& params)
+{
+ LL_DEBUGS("Windlight") << "Displaying sky params" << LL_ENDL;
+ LLWLParamManager::instance().applySkyParams(params);
+ return true;
+}
+
+bool LLEnvManagerNew::useDayCycle(const std::string& name, LLEnvKey::EScope scope)
+{
+ LLSD params;
+
+ if (scope == LLEnvKey::SCOPE_REGION)
+ {
+ LL_DEBUGS("Windlight") << "Displaying region day cycle " << name << LL_ENDL;
+ params = getRegionSettings().getWLDayCycle();
+ }
+ else
+ {
+ LL_DEBUGS("Windlight") << "Displaying local day cycle " << name << LL_ENDL;
+
+ if (!LLDayCycleManager::instance().getPreset(name, params))
+ {
+ llwarns << "No day cycle named " << name << llendl;
+ return false;
+ }
+ }
+
+ bool rslt = LLWLParamManager::instance().applyDayCycleParams(params, scope);
+ llassert(rslt == true);
+ return rslt;
+}
+
+bool LLEnvManagerNew::useDayCycleParams(const LLSD& params, LLEnvKey::EScope scope, F32 time /* = 0.5*/)
+{
+ LL_DEBUGS("Windlight") << "Displaying day cycle params" << LL_ENDL;
+ return LLWLParamManager::instance().applyDayCycleParams(params, scope);
+}
+
+void LLEnvManagerNew::setUseRegionSettings(bool val)
+{
+ mUserPrefs.setUseRegionSettings(val);
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
+void LLEnvManagerNew::setUseWaterPreset(const std::string& name)
+{
+ // *TODO: make sure the preset exists.
+ if (name.empty())
+ {
+ llwarns << "Empty water preset name passed" << llendl;
+ return;
+ }
+
+ mUserPrefs.setUseWaterPreset(name);
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
+void LLEnvManagerNew::setUseSkyPreset(const std::string& name)
+{
+ // *TODO: make sure the preset exists.
+ if (name.empty())
+ {
+ llwarns << "Empty sky preset name passed" << llendl;
+ return;
+ }
+
+ mUserPrefs.setUseSkyPreset(name);
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
+void LLEnvManagerNew::setUseDayCycle(const std::string& name)
+{
+ if (!LLDayCycleManager::instance().presetExists(name))
+ {
+ llwarns << "Invalid day cycle name passed" << llendl;
+ return;
+ }
+
+ mUserPrefs.setUseDayCycle(name);
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
+void LLEnvManagerNew::loadUserPrefs()
+{
+ // operate on members directly to avoid side effects
+ mUserPrefs.mWaterPresetName = gSavedSettings.getString("WaterPresetName");
+ mUserPrefs.mSkyPresetName = gSavedSettings.getString("SkyPresetName");
+ mUserPrefs.mDayCycleName = gSavedSettings.getString("DayCycleName");
+
+ mUserPrefs.mUseRegionSettings = gSavedSettings.getBOOL("UseEnvironmentFromRegion");
+ mUserPrefs.mUseDayCycle = gSavedSettings.getBOOL("UseDayCycle");
+}
+
+void LLEnvManagerNew::saveUserPrefs()
+{
+ gSavedSettings.setString("WaterPresetName", getWaterPresetName());
+ gSavedSettings.setString("SkyPresetName", getSkyPresetName());
+ gSavedSettings.setString("DayCycleName", getDayCycleName());
+
+ gSavedSettings.setBOOL("UseEnvironmentFromRegion", getUseRegionSettings());
+ gSavedSettings.setBOOL("UseDayCycle", getUseDayCycle());
+
+ mUsePrefsChangeSignal();
+}
+
+void LLEnvManagerNew::setUserPrefs(
+ const std::string& water_preset,
+ const std::string& sky_preset,
+ const std::string& day_cycle_preset,
+ bool use_fixed_sky,
+ bool use_region_settings)
+{
+ // operate on members directly to avoid side effects
+ mUserPrefs.mWaterPresetName = water_preset;
+ mUserPrefs.mSkyPresetName = sky_preset;
+ mUserPrefs.mDayCycleName = day_cycle_preset;
+
+ mUserPrefs.mUseRegionSettings = use_region_settings;
+ mUserPrefs.mUseDayCycle = !use_fixed_sky;
+
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
+void LLEnvManagerNew::dumpUserPrefs()
+{
+ LL_DEBUGS("Windlight") << "WaterPresetName: " << gSavedSettings.getString("WaterPresetName") << LL_ENDL;
+ LL_DEBUGS("Windlight") << "SkyPresetName: " << gSavedSettings.getString("SkyPresetName") << LL_ENDL;
+ LL_DEBUGS("Windlight") << "DayCycleName: " << gSavedSettings.getString("DayCycleName") << LL_ENDL;
+
+ LL_DEBUGS("Windlight") << "UseEnvironmentFromRegion: " << gSavedSettings.getBOOL("UseEnvironmentFromRegion") << LL_ENDL;
+ LL_DEBUGS("Windlight") << "UseDayCycle: " << gSavedSettings.getBOOL("UseDayCycle") << LL_ENDL;
+}
+
+void LLEnvManagerNew::dumpPresets()
+{
+ const LLEnvironmentSettings& region_settings = getRegionSettings();
+ std::string region_name = gAgent.getRegion() ? gAgent.getRegion()->getName() : "Unknown region";
+
+ // Dump water presets.
+ LL_DEBUGS("Windlight") << "Waters:" << LL_ENDL;
+ if (region_settings.getWaterParams().size() != 0)
+ {
+ LL_DEBUGS("Windlight") << " - " << region_name << LL_ENDL;
+ }
+ LLWaterParamManager::preset_name_list_t water_presets;
+ LLWaterParamManager::instance().getPresetNames(water_presets);
+ for (LLWaterParamManager::preset_name_list_t::const_iterator it = water_presets.begin(); it != water_presets.end(); ++it)
+ {
+ LL_DEBUGS("Windlight") << " - " << *it << LL_ENDL;
+ }
+
+ // Dump sky presets.
+ LL_DEBUGS("Windlight") << "Skies:" << LL_ENDL;
+ LLWLParamManager::preset_key_list_t sky_preset_keys;
+ LLWLParamManager::instance().getPresetKeys(sky_preset_keys);
+ for (LLWLParamManager::preset_key_list_t::const_iterator it = sky_preset_keys.begin(); it != sky_preset_keys.end(); ++it)
+ {
+ std::string preset_name = it->name;
+ std::string item_title;
+
+ if (it->scope == LLEnvKey::SCOPE_LOCAL) // local preset
+ {
+ item_title = preset_name;
+ }
+ else // region preset
+ {
+ item_title = preset_name + " (" + region_name + ")";
+ }
+ LL_DEBUGS("Windlight") << " - " << item_title << LL_ENDL;
+ }
+
+ // Dump day cycles.
+ LL_DEBUGS("Windlight") << "Days:" << LL_ENDL;
+ const LLSD& cur_region_dc = region_settings.getWLDayCycle();
+ if (cur_region_dc.size() != 0)
+ {
+ LL_DEBUGS("Windlight") << " - " << region_name << LL_ENDL;
+ }
+ LLDayCycleManager::preset_name_list_t days;
+ LLDayCycleManager::instance().getPresetNames(days);
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = days.begin(); it != days.end(); ++it)
+ {
+ LL_DEBUGS("Windlight") << " - " << *it << LL_ENDL;
+ }
+}
+
+void LLEnvManagerNew::requestRegionSettings()
+{
+ LLEnvironmentRequest::initiate();
+}
+
+bool LLEnvManagerNew::sendRegionSettings(const LLEnvironmentSettings& new_settings)
+{
+ LLSD metadata;
+
+ metadata["regionID"] = gAgent.getRegion()->getRegionID();
+ // add last received update ID to outbound message so simulator can handle concurrent updates
+ metadata["messageID"] = mLastReceivedID;
+
+ return LLEnvironmentApply::initiateRequest(new_settings.makePacket(metadata));
+}
+
+boost::signals2::connection LLEnvManagerNew::setPreferencesChangeCallback(const prefs_change_signal_t::slot_type& cb)
+{
+ return mUsePrefsChangeSignal.connect(cb);
+}
+
+boost::signals2::connection LLEnvManagerNew::setRegionSettingsChangeCallback(const region_settings_change_signal_t::slot_type& cb)
+{
+ return mRegionSettingsChangeSignal.connect(cb);
+}
+
+boost::signals2::connection LLEnvManagerNew::setRegionChangeCallback(const region_change_signal_t::slot_type& cb)
+{
+ return mRegionChangeSignal.connect(cb);
+}
+
+boost::signals2::connection LLEnvManagerNew::setRegionSettingsAppliedCallback(const region_settings_applied_signal_t::slot_type& cb)
+{
+ return mRegionSettingsAppliedSignal.connect(cb);
+}
+
+// static
+bool LLEnvManagerNew::canEditRegionSettings()
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ BOOL owner_or_god = gAgent.isGodlike() || (region && region->getOwner() == gAgent.getID());
+ BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager());
+
+ LL_DEBUGS("Windlight") << "Can edit region settings: " << (bool) owner_or_god_or_manager << LL_ENDL;
+ return owner_or_god_or_manager;
+}
+
+// static
+const std::string LLEnvManagerNew::getScopeString(LLEnvKey::EScope scope)
+{
+ switch(scope)
+ {
+ case LLEnvKey::SCOPE_LOCAL:
+ return LLTrans::getString("LocalSettings");
+ case LLEnvKey::SCOPE_REGION:
+ return LLTrans::getString("RegionSettings");
+ default:
+ return " (?)";
+ }
+}
+
+void LLEnvManagerNew::onRegionCrossing()
+{
+ LL_DEBUGS("Windlight") << "Crossed region" << LL_ENDL;
+ onRegionChange(true);
+}
+
+void LLEnvManagerNew::onTeleport()
+{
+ LL_DEBUGS("Windlight") << "Teleported" << LL_ENDL;
+ onRegionChange(false);
+}
+
+void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
+{
+ // If the message was valid, grab the UUID from it and save it for next outbound update message.
+ mLastReceivedID = content[0]["messageID"].asUUID();
+
+ // Refresh cached region settings.
+ LL_DEBUGS("Windlight") << "Caching region environment settings: " << content << LL_ENDL;
+ F32 sun_hour = 0; // *TODO
+ LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
+ mCachedRegionPrefs = new_settings;
+
+ // Load region sky presets.
+ LLWLParamManager::instance().refreshRegionPresets();
+
+ // If using server settings, update managers.
+ if (getUseRegionSettings())
+ {
+ updateManagersFromPrefs(mInterpNextChangeMessage);
+ }
+
+ // Let interested parties know about the region settings update.
+ mRegionSettingsChangeSignal();
+
+ // reset
+ mInterpNextChangeMessage = false;
+}
+
+void LLEnvManagerNew::onRegionSettingsApplyResponse(bool ok)
+{
+ LL_DEBUGS("Windlight") << "Applying region settings " << (ok ? "succeeded" : "failed") << LL_ENDL;
+
+ // Clear locally modified region settings because they have just been uploaded.
+ mNewRegionPrefs.clear();
+
+ mRegionSettingsAppliedSignal(ok);
+}
+
+//-- private methods ----------------------------------------------------------
+
+// virtual
+void LLEnvManagerNew::initSingleton()
+{
+ LL_DEBUGS("Windlight") << "Initializing LLEnvManagerNew" << LL_ENDL;
+
+ loadUserPrefs();
+}
+
+void LLEnvManagerNew::updateSkyFromPrefs()
+{
+ bool success = true;
+
+ // Sync sky with user prefs.
+ if (getUseRegionSettings()) // apply region-wide settings
+ {
+ success = useRegionSky();
+ }
+ else // apply user-specified settings
+ {
+ if (getUseDayCycle())
+ {
+ success = useDayCycle(getDayCycleName(), LLEnvKey::SCOPE_LOCAL);
+ }
+ else
+ {
+ success = useSkyPreset(getSkyPresetName());
+ }
+ }
+
+ // If something went wrong, fall back to defaults.
+ if (!success)
+ {
+ // *TODO: fix user prefs
+ useDefaultSky();
+ }
+}
+
+void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate)
+{
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+ LLSD target_water_params;
+
+ // Determine new water settings based on user prefs.
+
+ {
+ // Fall back to default water.
+ LLWaterParamSet default_water;
+ water_mgr.getParamSet("Default", default_water);
+ target_water_params = default_water.getAll();
+ }
+
+ if (getUseRegionSettings())
+ {
+ // *TODO: make sure whether region settings belong to the current region?
+ const LLSD& region_water_params = getRegionSettings().getWaterParams();
+ if (region_water_params.size() != 0) // region has no water settings
+ {
+ LL_DEBUGS("Windlight") << "Applying region water" << LL_ENDL;
+ target_water_params = region_water_params;
+ }
+ else
+ {
+ LL_DEBUGS("Windlight") << "Applying default water" << LL_ENDL;
+ }
+ }
+ else
+ {
+ std::string water = getWaterPresetName();
+ LL_DEBUGS("Windlight") << "Applying water preset [" << water << "]" << LL_ENDL;
+ LLWaterParamSet params;
+ if (!water_mgr.getParamSet(water, params))
+ {
+ llwarns << "No water preset named " << water << ", falling back to defaults" << llendl;
+ water_mgr.getParamSet("Default", params);
+
+ // *TODO: Fix user preferences accordingly.
+ }
+ target_water_params = params.getAll();
+ }
+
+ // Sync water with user prefs.
+ water_mgr.applyParams(target_water_params, interpolate);
+}
+
+void LLEnvManagerNew::updateManagersFromPrefs(bool interpolate)
+{
+ // Apply water settings.
+ updateWaterFromPrefs(interpolate);
+
+ // Apply sky settings.
+ updateSkyFromPrefs();
+}
+
+bool LLEnvManagerNew::useRegionSky()
+{
+ const LLEnvironmentSettings& region_settings = getRegionSettings();
+
+ // If region is set to defaults,
+ if (region_settings.getSkyMap().size() == 0)
+ {
+ // well... apply the default sky settings.
+ useDefaultSky();
+ return true;
+ }
+
+ // *TODO: Support fixed sky from region.
+
+ // Otherwise apply region day cycle.
+ LL_DEBUGS("Windlight") << "Applying region sky" << LL_ENDL;
+ return useDayCycleParams(
+ region_settings.getWLDayCycle(),
+ LLEnvKey::SCOPE_REGION,
+ region_settings.getDayTime());
+}
+
+bool LLEnvManagerNew::useRegionWater()
+{
+ const LLEnvironmentSettings& region_settings = getRegionSettings();
+ const LLSD& region_water = region_settings.getWaterParams();
+
+ // If region is set to defaults,
+ if (region_water.size() == 0)
+ {
+ // well... apply the default water settings.
+ return useDefaultWater();
+ }
+
+ // Otherwise apply region water.
+ LL_DEBUGS("Windlight") << "Applying region sky" << LL_ENDL;
+ return useWaterParams(region_water);
+}
+
+bool LLEnvManagerNew::useDefaultSky()
+{
+ return useDayCycle("Default", LLEnvKey::SCOPE_LOCAL);
+}
+
+bool LLEnvManagerNew::useDefaultWater()
+{
+ return useWaterPreset("Default");
+}
+
+
+void LLEnvManagerNew::onRegionChange(bool interpolate)
+{
+ // Avoid duplicating region setting requests
+ // by checking whether the region is actually changing.
+ LLViewerRegion* regionp = gAgent.getRegion();
+ LLUUID region_uuid = regionp ? regionp->getRegionID() : LLUUID::null;
+ if (region_uuid == mCurRegionUUID)
+ {
+ return;
+ }
+
+ // Clear locally modified region settings.
+ mNewRegionPrefs.clear();
+
+ // *TODO: clear environment settings of the previous region?
+
+ // Request environment settings of the new region.
+ LL_DEBUGS("Windlight") << "New viewer region: " << region_uuid << LL_ENDL;
+ mCurRegionUUID = region_uuid;
+ mInterpNextChangeMessage = interpolate;
+ requestRegionSettings();
+
+ // Let interested parties know agent region has been changed.
+ mRegionChangeSignal();
+}
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
new file mode 100644
index 0000000000..96af102c1a
--- /dev/null
+++ b/indra/newview/llenvmanager.h
@@ -0,0 +1,283 @@
+/**
+ * @file llenvmanager.h
+ * @brief Declaration of classes managing WindLight and water settings.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLENVMANAGER_H
+#define LL_LLENVMANAGER_H
+
+#include "llmemory.h"
+#include "llsd.h"
+
+class LLWLParamManager;
+class LLWaterParamManager;
+class LLWLAnimator;
+
+// generic key
+struct LLEnvKey
+{
+public:
+ // Note: enum ordering is important; for example, a region-level floater (1) will see local and region (all values that are <=)
+ typedef enum e_scope
+ {
+ SCOPE_LOCAL, // 0
+ SCOPE_REGION//, // 1
+ // SCOPE_ESTATE, // 2
+ // etc.
+ } EScope;
+};
+
+class LLEnvironmentSettings
+{
+public:
+ LLEnvironmentSettings() :
+ mWLDayCycle(LLSD::emptyMap()),
+ mSkyMap(LLSD::emptyMap()),
+ mWaterParams(LLSD::emptyMap()),
+ mDayTime(0.f)
+ {}
+ LLEnvironmentSettings(const LLSD& dayCycle, const LLSD& skyMap, const LLSD& waterParams, F64 dayTime) :
+ mWLDayCycle(dayCycle),
+ mSkyMap(skyMap),
+ mWaterParams(waterParams),
+ mDayTime(dayTime)
+ {}
+ ~LLEnvironmentSettings() {}
+
+ void saveParams(const LLSD& dayCycle, const LLSD& skyMap, const LLSD& waterParams, F64 dayTime)
+ {
+ mWLDayCycle = dayCycle;
+ mSkyMap = skyMap;
+ mWaterParams = waterParams;
+ mDayTime = dayTime;
+ }
+
+ const LLSD& getWLDayCycle() const
+ {
+ return mWLDayCycle;
+ }
+
+ const LLSD& getWaterParams() const
+ {
+ return mWaterParams;
+ }
+
+ const LLSD& getSkyMap() const
+ {
+ return mSkyMap;
+ }
+
+ F64 getDayTime() const
+ {
+ return mDayTime;
+ }
+
+ bool isEmpty() const
+ {
+ return mWLDayCycle.size() == 0;
+ }
+
+ void clear()
+ {
+ *this = LLEnvironmentSettings();
+ }
+
+ LLSD makePacket(const LLSD& metadata) const
+ {
+ LLSD full_packet = LLSD::emptyArray();
+
+ // 0: metadata
+ full_packet.append(metadata);
+
+ // 1: day cycle
+ full_packet.append(mWLDayCycle);
+
+ // 2: map of sky setting names to sky settings (as LLSD)
+ full_packet.append(mSkyMap);
+
+ // 3: water params
+ full_packet.append(mWaterParams);
+
+ return full_packet;
+ }
+
+private:
+ LLSD mWLDayCycle, mWaterParams, mSkyMap;
+ F64 mDayTime;
+};
+
+/**
+ * User environment preferences.
+ */
+class LLEnvPrefs
+{
+public:
+ LLEnvPrefs() : mUseRegionSettings(true), mUseDayCycle(true) {}
+
+ bool getUseRegionSettings() const { return mUseRegionSettings; }
+ bool getUseDayCycle() const { return mUseDayCycle; }
+ bool getUseFixedSky() const { return !getUseDayCycle(); }
+
+ std::string getWaterPresetName() const;
+ std::string getSkyPresetName() const;
+ std::string getDayCycleName() const;
+
+ void setUseRegionSettings(bool val);
+ void setUseWaterPreset(const std::string& name);
+ void setUseSkyPreset(const std::string& name);
+ void setUseDayCycle(const std::string& name);
+
+ bool mUseRegionSettings;
+ bool mUseDayCycle;
+ std::string mWaterPresetName;
+ std::string mSkyPresetName;
+ std::string mDayCycleName;
+};
+
+/**
+ * Setting:
+ * 1. Use region settings.
+ * 2. Use my setting: <water preset> + <fixed_sky>|<day_cycle>
+ */
+class LLEnvManagerNew : public LLSingleton<LLEnvManagerNew>
+{
+ LOG_CLASS(LLEnvManagerNew);
+public:
+ typedef boost::signals2::signal<void()> prefs_change_signal_t;
+ typedef boost::signals2::signal<void()> region_settings_change_signal_t;
+ typedef boost::signals2::signal<void()> region_change_signal_t;
+ typedef boost::signals2::signal<void(bool)> region_settings_applied_signal_t;
+
+ LLEnvManagerNew();
+
+ // getters to access user env. preferences
+ bool getUseRegionSettings() const;
+ bool getUseDayCycle() const;
+ bool getUseFixedSky() const;
+ std::string getWaterPresetName() const;
+ std::string getSkyPresetName() const;
+ std::string getDayCycleName() const;
+
+ /// @return cached env. settings of the current region.
+ const LLEnvironmentSettings& getRegionSettings() const;
+
+ /**
+ * Set new region settings without uploading them to the region.
+ *
+ * The override will be reset when the changes are applied to the region (=uploaded)
+ * or user teleports to another region.
+ */
+ void setRegionSettings(const LLEnvironmentSettings& new_settings);
+
+ // Change environment w/o changing user preferences.
+ bool usePrefs();
+ bool useDefaults();
+ bool useRegionSettings();
+ bool useWaterPreset(const std::string& name);
+ bool useWaterParams(const LLSD& params);
+ bool useSkyPreset(const std::string& name);
+ bool useSkyParams(const LLSD& params);
+ bool useDayCycle(const std::string& name, LLEnvKey::EScope scope);
+ bool useDayCycleParams(const LLSD& params, LLEnvKey::EScope scope, F32 time = 0.5);
+
+ // setters for user env. preferences
+ void setUseRegionSettings(bool val);
+ void setUseWaterPreset(const std::string& name);
+ void setUseSkyPreset(const std::string& name);
+ void setUseDayCycle(const std::string& name);
+ void setUserPrefs(
+ const std::string& water_preset,
+ const std::string& sky_preset,
+ const std::string& day_cycle_preset,
+ bool use_fixed_sky,
+ bool use_region_settings);
+
+ // debugging methods
+ void dumpUserPrefs();
+ void dumpPresets();
+
+ // Misc.
+ void requestRegionSettings();
+ bool sendRegionSettings(const LLEnvironmentSettings& new_settings);
+ boost::signals2::connection setPreferencesChangeCallback(const prefs_change_signal_t::slot_type& cb);
+ boost::signals2::connection setRegionSettingsChangeCallback(const region_settings_change_signal_t::slot_type& cb);
+ boost::signals2::connection setRegionChangeCallback(const region_change_signal_t::slot_type& cb);
+ boost::signals2::connection setRegionSettingsAppliedCallback(const region_settings_applied_signal_t::slot_type& cb);
+
+ static bool canEditRegionSettings(); /// @return true if we have access to editing region environment
+ static const std::string getScopeString(LLEnvKey::EScope scope);
+
+ // Public callbacks.
+ void onRegionCrossing();
+ void onTeleport();
+ void onRegionSettingsResponse(const LLSD& content);
+ void onRegionSettingsApplyResponse(bool ok);
+
+private:
+ friend class LLSingleton<LLEnvManagerNew>;
+ /*virtual*/ void initSingleton();
+
+ void loadUserPrefs();
+ void saveUserPrefs();
+
+ void updateSkyFromPrefs();
+ void updateWaterFromPrefs(bool interpolate);
+ void updateManagersFromPrefs(bool interpolate);
+
+ bool useRegionSky();
+ bool useRegionWater();
+
+ bool useDefaultSky();
+ bool useDefaultWater();
+
+ void onRegionChange(bool interpolate);
+
+ /// Emitted when user environment preferences change.
+ prefs_change_signal_t mUsePrefsChangeSignal;
+
+ /// Emitted when region environment settings update comes.
+ region_settings_change_signal_t mRegionSettingsChangeSignal;
+
+ /// Emitted when agent region changes. Move to LLAgent?
+ region_change_signal_t mRegionChangeSignal;
+
+ /// Emitted when agent region changes. Move to LLAgent?
+ region_settings_applied_signal_t mRegionSettingsAppliedSignal;
+
+ LLEnvPrefs mUserPrefs; /// User environment preferences.
+ LLEnvironmentSettings mCachedRegionPrefs; /// Cached region environment settings.
+ LLEnvironmentSettings mNewRegionPrefs; /// Not-yet-uploaded modified region env. settings.
+ bool mInterpNextChangeMessage; /// Interpolate env. settings on next region change.
+ LLUUID mCurRegionUUID; /// To avoid duplicated region env. settings requests.
+ LLUUID mLastReceivedID; /// Id of last received region env. settings.
+};
+
+#endif // LL_LLENVMANAGER_H
+
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 5398c13c44..b6566fcbd0 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -165,6 +165,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
+ mTextureIndex = 255;
setDrawable(drawablep);
mVObjp = objp;
@@ -364,14 +365,7 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align)
//allocate vertices in blocks of 4 for alignment
num_vertices = (num_vertices + 0x3) & ~0x3;
}
- else
- {
- if (mDrawablep->getVOVolume())
- {
- llerrs << "WTF?" << llendl;
- }
- }
-
+
if (mGeomCount != num_vertices ||
mIndicesCount != num_indices)
{
@@ -393,6 +387,26 @@ void LLFace::setGeomIndex(U16 idx)
}
}
+void LLFace::setTextureIndex(U8 index)
+{
+ if (index != mTextureIndex)
+ {
+ mTextureIndex = index;
+
+ if (mTextureIndex != 255)
+ {
+ mDrawablep->setState(LLDrawable::REBUILD_POSITION);
+ }
+ else
+ {
+ if (mDrawInfo && !mDrawInfo->mTextureList.empty())
+ {
+ llerrs << "Face with no texture index references indexed texture draw info." << llendl;
+ }
+ }
+ }
+}
+
void LLFace::setIndicesIndex(S32 idx)
{
if (mIndicesIndex != idx)
@@ -415,11 +429,11 @@ U16 LLFace::getGeometryAvatar(
if (mVertexBuffer.notNull())
{
- mVertexBuffer->getVertexStrider (vertices, mGeomIndex);
- mVertexBuffer->getNormalStrider (normals, mGeomIndex);
- mVertexBuffer->getTexCoord0Strider (tex_coords, mGeomIndex);
- mVertexBuffer->getWeightStrider(vertex_weights, mGeomIndex);
- mVertexBuffer->getClothWeightStrider(clothing_weights, mGeomIndex);
+ mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount);
+ mVertexBuffer->getNormalStrider (normals, mGeomIndex, mGeomCount);
+ mVertexBuffer->getTexCoord0Strider (tex_coords, mGeomIndex, mGeomCount);
+ mVertexBuffer->getWeightStrider(vertex_weights, mGeomIndex, mGeomCount);
+ mVertexBuffer->getClothWeightStrider(clothing_weights, mGeomIndex, mGeomCount);
}
return mGeomIndex;
@@ -432,17 +446,17 @@ U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &no
if (mVertexBuffer.notNull())
{
- mVertexBuffer->getVertexStrider(vertices, mGeomIndex);
+ mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount);
if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_NORMAL))
{
- mVertexBuffer->getNormalStrider(normals, mGeomIndex);
+ mVertexBuffer->getNormalStrider(normals, mGeomIndex, mGeomCount);
}
if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD0))
{
- mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex);
+ mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex, mGeomCount);
}
- mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
+ mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount);
}
return mGeomIndex;
@@ -679,6 +693,19 @@ static void xform(LLVector2 &tex_coord, F32 cosAng, F32 sinAng, F32 offS, F32 of
}
+bool less_than_max_mag(const LLVector4a& vec)
+{
+ LLVector4a MAX_MAG;
+ MAX_MAG.splat(1024.f*1024.f);
+
+ LLVector4a val;
+ val.setAbs(vec);
+
+ S32 lt = val.lessThan(MAX_MAG).getGatheredBits() & 0x7;
+
+ return lt == 0x7;
+}
+
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
{
@@ -713,6 +740,8 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
min = face.mExtents[0];
max = face.mExtents[1];
+ llassert(less_than_max_mag(min));
+ llassert(less_than_max_mag(max));
//min, max are in volume space, convert to drawable render space
LLVector4a center;
@@ -724,6 +753,9 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
size.setSub(max, min);
size.mul(0.5f);
+ llassert(less_than_max_mag(min));
+ llassert(less_than_max_mag(max));
+
if (!global_volume)
{
//VECTORIZE THIS
@@ -761,6 +793,8 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
newMin = newMax = center;
+ llassert(less_than_max_mag(center));
+
for (U32 i = 0; i < 4; i++)
{
LLVector4a delta;
@@ -772,6 +806,9 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
newMin.setMin(newMin,min);
newMax.setMax(newMax,max);
+
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
}
if (!mDrawablep->isActive())
@@ -780,14 +817,22 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
newMin.add(offset);
newMax.add(offset);
+
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
}
t.setAdd(newMin, newMax);
t.mul(0.5f);
+ llassert(less_than_max_mag(t));
+
//VECTORIZE THIS
mCenterLocal.set(t.getF32ptr());
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
+
t.setSub(newMax,newMin);
mBoundingSphereRadius = t.getLength3().getF32()*0.5f;
@@ -1078,27 +1123,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const LLTextureEntry *tep = mVObjp->getTE(f);
const U8 bump_code = tep ? tep->getBumpmap() : 0;
- if (rebuild_pos)
- {
- mVertexBuffer->getVertexStrider(vert, mGeomIndex);
- vertices = (LLVector4a*) vert.get();
- }
- if (rebuild_normal)
- {
- mVertexBuffer->getNormalStrider(norm, mGeomIndex);
- normals = (LLVector4a*) norm.get();
- }
- if (rebuild_binormal)
- {
- mVertexBuffer->getBinormalStrider(binorm, mGeomIndex);
- binormals = (LLVector4a*) binorm.get();
- }
- if (rebuild_weights)
- {
- mVertexBuffer->getWeight4Strider(wght, mGeomIndex);
- weights = (LLVector4a*) wght.get();
- }
-
F32 tcoord_xoffset = 0.f ;
F32 tcoord_yoffset = 0.f ;
F32 tcoord_xscale = 1.f ;
@@ -1107,12 +1131,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
- mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex);
- if (bump_code && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD1))
- {
- mVertexBuffer->getTexCoord1Strider(tex_coords2, mGeomIndex);
- }
-
in_atlas = isAtlasInUse() ;
if(in_atlas)
{
@@ -1125,11 +1143,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
tcoord_yscale = tmp->mV[1] ;
}
}
- if (rebuild_color)
- {
- mVertexBuffer->getColorStrider(colors, mGeomIndex);
- }
-
+
BOOL is_static = mDrawablep->isStatic();
BOOL is_global = is_static;
@@ -1168,7 +1182,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
// INDICES
if (full_rebuild)
{
- mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
+ mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, true);
+
__m128i* dst = (__m128i*) indicesp.get();
__m128i* src = (__m128i*) vf.mIndices;
__m128i offset = _mm_set1_epi16(index_offset);
@@ -1185,6 +1200,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
indicesp[i] = vf.mIndices[i]+index_offset;
}
+
+ mVertexBuffer->setBuffer(0);
}
LLMatrix4a mat_normal;
@@ -1330,6 +1347,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (!in_atlas && !do_bump)
{ //not in atlas or not bump mapped, might be able to do a cheap update
+ mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex, mGeomCount);
+
if (texgen != LLTextureEntry::TEX_GEN_PLANAR)
{
if (!do_tex_mat)
@@ -1402,9 +1421,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
}
+
+ mVertexBuffer->setBuffer(0);
}
else
{ //either bump mapped or in atlas, just do the whole expensive loop
+ mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex, mGeomCount, true);
+
+ std::vector<LLVector2> bump_tc;
+
for (S32 i = 0; i < num_vertices; i++)
{
LLVector2 tc(vf.mTexCoords[i]);
@@ -1535,8 +1560,20 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
*tex_coords++ = tc;
-
- if (bump_code && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD1))
+ if (do_bump)
+ {
+ bump_tc.push_back(tc);
+ }
+ }
+
+ mVertexBuffer->setBuffer(0);
+
+
+ if (do_bump)
+ {
+ mVertexBuffer->getTexCoord1Strider(tex_coords2, mGeomIndex, mGeomCount, true);
+
+ for (S32 i = 0; i < num_vertices; i++)
{
LLVector4a tangent;
tangent.setCross3(vf.mBinormals[i], vf.mNormals[i]);
@@ -1558,16 +1595,22 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
binormal.normalize3fast();
+ LLVector2 tc = bump_tc[i];
tc += LLVector2( bump_s_primary_light_ray.dot3(tangent).getF32(), bump_t_primary_light_ray.dot3(binormal).getF32() );
*tex_coords2++ = tc;
- }
+ }
+
+ mVertexBuffer->setBuffer(0);
}
}
}
if (rebuild_pos)
{
+ mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, true);
+ vertices = (LLVector4a*) vert.get();
+
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
@@ -1580,10 +1623,28 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
mat_vert.affineTransform(*src++, *dst++);
}
while(dst < end);
+
+ F32 index = (F32) (mTextureIndex < 255 ? mTextureIndex : 0);
+ F32 *index_dst = (F32*) vertices;
+ F32 *index_end = (F32*) end;
+
+ index_dst += 3;
+ index_end += 3;
+ do
+ {
+ *index_dst = index;
+ index_dst += 4;
+ }
+ while (index_dst < index_end);
+
+ mVertexBuffer->setBuffer(0);
}
if (rebuild_normal)
{
+ mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, true);
+ normals = (LLVector4a*) norm.get();
+
for (S32 i = 0; i < num_vertices; i++)
{
LLVector4a normal;
@@ -1591,10 +1652,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
normal.normalize3fast();
normals[i] = normal;
}
+
+ mVertexBuffer->setBuffer(0);
}
if (rebuild_binormal)
{
+ mVertexBuffer->getBinormalStrider(binorm, mGeomIndex, mGeomCount, true);
+ binormals = (LLVector4a*) binorm.get();
+
for (S32 i = 0; i < num_vertices; i++)
{
LLVector4a binormal;
@@ -1602,15 +1668,22 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
binormal.normalize3fast();
binormals[i] = binormal;
}
+
+ mVertexBuffer->setBuffer(0);
}
if (rebuild_weights && vf.mWeights)
{
+ mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, true);
+ weights = (LLVector4a*) wght.get();
LLVector4a::memcpyNonAliased16((F32*) weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
+ mVertexBuffer->setBuffer(0);
}
if (rebuild_color)
{
+ mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, true);
+
LLVector4a src;
U32 vec[4];
@@ -1629,6 +1702,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
dst[i] = src;
}
+
+ mVertexBuffer->setBuffer(0);
}
if (rebuild_tcoord)
@@ -2045,13 +2120,13 @@ S32 LLFace::getColors(LLStrider<LLColor4U> &colors)
}
// llassert(mGeomIndex >= 0);
- mVertexBuffer->getColorStrider(colors, mGeomIndex);
+ mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount);
return mGeomIndex;
}
S32 LLFace::getIndices(LLStrider<U16> &indicesp)
{
- mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
+ mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount);
llassert(indicesp[0] != indicesp[1]);
return mIndicesIndex;
}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index b2170c4cf3..b5eaeecd60 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -94,6 +94,8 @@ public:
U16 getGeomCount() const { return mGeomCount; } // vertex count for this face
U16 getGeomIndex() const { return mGeomIndex; } // index into draw pool
U16 getGeomStart() const { return mGeomIndex; } // index into draw pool
+ void setTextureIndex(U8 index);
+ U8 getTextureIndex() const { return mTextureIndex; }
void setTexture(LLViewerTexture* tex) ;
void switchTexture(LLViewerTexture* new_texture);
void dirtyTexture();
@@ -262,6 +264,7 @@ private:
U16 mGeomCount; // vertex count for this face
U16 mGeomIndex; // index into draw pool
+ U8 mTextureIndex; // index of texture channel to use for pseudo-atlasing
U32 mIndicesCount;
U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!)
S32 mIndexInTex ;
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index cd5e779c4d..a29ccf2b6d 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -31,6 +31,7 @@
#include "llinventoryfunctions.h"
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
+#include "llviewerinventory.h"
LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index c95b046707..c6743ca13b 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -55,6 +55,7 @@
#include "llrender.h"
#include "llsdutil.h"
#include "llsdutil_math.h"
+#include "lltrans.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
@@ -457,7 +458,7 @@ void LLFloaterAuction::onClickSellToAnyone(void* data)
LLSD args;
args["LAND_SIZE"] = llformat("%d", area);
args["SALE_PRICE"] = llformat("%d", sale_price);
- args["NAME"] = "Anyone";
+ args["NAME"] = LLTrans::getString("Anyone");
LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog
params.substitutions(args)
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
deleted file mode 100644
index 22816ee802..0000000000
--- a/indra/newview/llfloaterdaycycle.cpp
+++ /dev/null
@@ -1,531 +0,0 @@
-/**
- * @file llfloaterdaycycle.cpp
- * @brief LLFloaterDayCycle class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterdaycycle.h"
-
-#include "pipeline.h"
-#include "llsky.h"
-
-#include "llsliderctrl.h"
-#include "llmultislider.h"
-#include "llmultisliderctrl.h"
-#include "llspinctrl.h"
-#include "llcheckboxctrl.h"
-#include "lluictrlfactory.h"
-#include "llviewercamera.h"
-#include "llcombobox.h"
-#include "lllineeditor.h"
-#include "llwlanimator.h"
-
-#include "v4math.h"
-#include "llviewerdisplay.h"
-#include "llviewercontrol.h"
-#include "llviewerwindow.h"
-
-#include "llwlparamset.h"
-#include "llwlparammanager.h"
-#include "llpostprocess.h"
-#include "llfloaterwindlight.h"
-
-
-std::map<std::string, LLWLSkyKey> LLFloaterDayCycle::sSliderToKey;
-const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f;
-
-LLFloaterDayCycle::LLFloaterDayCycle(const LLSD& key)
-: LLFloater(key)
-{
-}
-
-BOOL LLFloaterDayCycle::postBuild()
-{
- // add the combo boxes
- LLComboBox* keyCombo = getChild<LLComboBox>("WLKeyPresets");
-
- if(keyCombo != NULL)
- {
- keyCombo->removeall();
- std::map<std::string, LLWLParamSet>::iterator mIt =
- LLWLParamManager::instance()->mParamList.begin();
- for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++)
- {
- keyCombo->add(std::string(mIt->first));
- }
-
- // set defaults on combo boxes
- keyCombo->selectFirstItem();
- }
-
- // add the time slider
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLTimeSlider");
-
- sldr->addSlider();
-
- // load it up
- initCallbacks();
-
- syncMenu();
- syncSliderTrack();
-
- return TRUE;
-}
-
-LLFloaterDayCycle::~LLFloaterDayCycle()
-{
-}
-
-void LLFloaterDayCycle::initCallbacks(void)
-{
- // WL Day Cycle
- getChild<LLUICtrl>("WLTimeSlider")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onTimeSliderMoved, this, _1));
- getChild<LLUICtrl>("WLDayCycleKeys")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onKeyTimeMoved, this, _1));
- getChild<LLUICtrl>("WLCurKeyHour")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onKeyTimeChanged, this, _1));
- getChild<LLUICtrl>("WLCurKeyMin")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onKeyTimeChanged, this, _1));
- getChild<LLUICtrl>("WLKeyPresets")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onKeyPresetChanged, this, _1));
-
- getChild<LLUICtrl>("WLLengthOfDayHour")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onTimeRateChanged, this, _1));
- getChild<LLUICtrl>("WLLengthOfDayMin")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onTimeRateChanged, this, _1));
- getChild<LLUICtrl>("WLLengthOfDaySec")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onTimeRateChanged, this, _1));
- getChild<LLUICtrl>("WLUseLindenTime")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onUseLindenTime, this, _1));
- getChild<LLUICtrl>("WLAnimSky")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onRunAnimSky, this, _1));
- getChild<LLUICtrl>("WLStopAnimSky")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onStopAnimSky, this, _1));
-
- getChild<LLUICtrl>("WLLoadDayCycle")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onLoadDayCycle, this, _1));
- getChild<LLUICtrl>("WLSaveDayCycle")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onSaveDayCycle, this, _1));
-
- getChild<LLUICtrl>("WLAddKey")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onAddKey, this, _1));
- getChild<LLUICtrl>("WLDeleteKey")->setCommitCallback(boost::bind(&LLFloaterDayCycle::onDeleteKey, this, _1));
-}
-
-void LLFloaterDayCycle::syncMenu()
-{
-// std::map<std::string, LLVector4> & currentParams = LLWLParamManager::instance()->mCurParams.mParamValues;
-
- // set time
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLTimeSlider");
- sldr->setCurSliderValue((F32)LLWLParamManager::instance()->mAnimator.getDayTime() * sHoursPerDay);
-
- LLSpinCtrl* secSpin = getChild<LLSpinCtrl>("WLLengthOfDaySec");
- LLSpinCtrl* minSpin = getChild<LLSpinCtrl>("WLLengthOfDayMin");
- LLSpinCtrl* hourSpin = getChild<LLSpinCtrl>("WLLengthOfDayHour");
-
- F32 curRate;
- F32 hours, min, sec;
-
- // get the current rate
- curRate = LLWLParamManager::instance()->mDay.mDayRate;
- hours = (F32)((int)(curRate / 60 / 60));
- curRate -= (hours * 60 * 60);
- min = (F32)((int)(curRate / 60));
- curRate -= (min * 60);
- sec = curRate;
-
- hourSpin->setValue(hours);
- minSpin->setValue(min);
- secSpin->setValue(sec);
-
- // turn off Use Estate Time button if it's already being used
- if( LLWLParamManager::instance()->mAnimator.mUseLindenTime == true)
- {
- getChildView("WLUseLindenTime")->setEnabled(FALSE);
- }
- else
- {
- getChildView("WLUseLindenTime")->setEnabled(TRUE);
- }
-}
-
-void LLFloaterDayCycle::syncSliderTrack()
-{
- // clear the slider
- LLMultiSliderCtrl* kSldr = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
-
- kSldr->clear();
- sSliderToKey.clear();
-
- // add sliders
- std::map<F32, std::string>::iterator mIt =
- LLWLParamManager::instance()->mDay.mTimeMap.begin();
- for(; mIt != LLWLParamManager::instance()->mDay.mTimeMap.end(); mIt++)
- {
- addSliderKey(mIt->first * sHoursPerDay, mIt->second);
- }
-}
-
-void LLFloaterDayCycle::syncTrack()
-{
- // if no keys, do nothing
- if(sSliderToKey.size() == 0)
- {
- return;
- }
-
- LLMultiSliderCtrl* sldr;
- sldr = getChild<LLMultiSliderCtrl>(
- "WLDayCycleKeys");
- llassert_always(sSliderToKey.size() == sldr->getValue().size());
-
- LLMultiSliderCtrl* tSldr;
- tSldr = getChild<LLMultiSliderCtrl>(
- "WLTimeSlider");
-
- // create a new animation track
- LLWLParamManager::instance()->mDay.clearKeys();
-
- // add the keys one by one
- std::map<std::string, LLWLSkyKey>::iterator mIt = sSliderToKey.begin();
- for(; mIt != sSliderToKey.end(); mIt++)
- {
- LLWLParamManager::instance()->mDay.addKey(mIt->second.time / sHoursPerDay,
- mIt->second.presetName);
- }
-
- // set the param manager's track to the new one
- LLWLParamManager::instance()->resetAnimator(
- tSldr->getCurSliderValue() / sHoursPerDay, false);
-
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
-}
-
-void LLFloaterDayCycle::onRunAnimSky(LLUICtrl* ctrl)
-{
- // if no keys, do nothing
- if(sSliderToKey.size() == 0)
- {
- return;
- }
-
- LLMultiSliderCtrl* sldr;
- sldr = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
- llassert_always(sSliderToKey.size() == sldr->getValue().size());
-
- LLMultiSliderCtrl* tSldr;
- tSldr = getChild<LLMultiSliderCtrl>("WLTimeSlider");
-
- // turn off linden time
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // set the param manager's track to the new one
- LLWLParamManager::instance()->resetAnimator(
- tSldr->getCurSliderValue() / sHoursPerDay, true);
-
- llassert_always(LLWLParamManager::instance()->mAnimator.mTimeTrack.size() == sldr->getValue().size());
-}
-
-void LLFloaterDayCycle::onStopAnimSky(LLUICtrl* ctrl)
-{
- // if no keys, do nothing
- if(sSliderToKey.size() == 0) {
- return;
- }
-
- // turn off animation and using linden time
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-}
-
-void LLFloaterDayCycle::onUseLindenTime(LLUICtrl* ctrl)
-{
- LLComboBox* box = getChild<LLComboBox>("WLPresetsCombo");
- box->selectByValue("");
-
- LLWLParamManager::instance()->mAnimator.mIsRunning = true;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
-}
-
-void LLFloaterDayCycle::onLoadDayCycle(LLUICtrl* ctrl)
-{
- LLWLParamManager::instance()->mDay.loadDayCycle("Default.xml");
-
- // sync it all up
- syncSliderTrack();
- syncMenu();
-
- // set the param manager's track to the new one
- LLMultiSliderCtrl* tSldr;
- tSldr = getChild<LLMultiSliderCtrl>(
- "WLTimeSlider");
- LLWLParamManager::instance()->resetAnimator(
- tSldr->getCurSliderValue() / sHoursPerDay, false);
-
- // and draw it
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
-}
-
-void LLFloaterDayCycle::onSaveDayCycle(LLUICtrl* ctrl)
-{
- LLWLParamManager::instance()->mDay.saveDayCycle("Default.xml");
-}
-
-
-void LLFloaterDayCycle::onTimeSliderMoved(LLUICtrl* ctrl)
-{
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>(
- "WLTimeSlider");
-
- /// get the slider value
- F32 val = sldr->getCurSliderValue() / sHoursPerDay;
-
- // set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime((F64)val);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
-}
-
-void LLFloaterDayCycle::onKeyTimeMoved(LLUICtrl* ctrl)
-{
- LLComboBox* comboBox = getChild<LLComboBox>("WLKeyPresets");
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
- LLSpinCtrl* hourSpin = getChild<LLSpinCtrl>("WLCurKeyHour");
- LLSpinCtrl* minSpin = getChild<LLSpinCtrl>("WLCurKeyMin");
-
- if(sldr->getValue().size() == 0) {
- return;
- }
-
- // make sure we have a slider
- const std::string& curSldr = sldr->getCurSlider();
- if(curSldr == "") {
- return;
- }
-
- F32 time = sldr->getCurSliderValue();
-
- // check to see if a key exists
- std::string presetName = sSliderToKey[curSldr].presetName;
- sSliderToKey[curSldr].time = time;
-
- // if it exists, turn on check box
- comboBox->selectByValue(presetName);
-
- // now set the spinners
- F32 hour = (F32)((S32)time);
- F32 min = (time - hour) * 60;
-
- // handle imprecision
- if(min >= 59) {
- min = 0;
- hour += 1;
- }
-
- hourSpin->set(hour);
- minSpin->set(min);
-
- syncTrack();
-
-}
-
-void LLFloaterDayCycle::onKeyTimeChanged(LLUICtrl* ctrl)
-{
- // if no keys, skipped
- if(sSliderToKey.size() == 0) {
- return;
- }
-
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>(
- "WLDayCycleKeys");
- LLSpinCtrl* hourSpin = getChild<LLSpinCtrl>(
- "WLCurKeyHour");
- LLSpinCtrl* minSpin = getChild<LLSpinCtrl>(
- "WLCurKeyMin");
-
- F32 hour = hourSpin->get();
- F32 min = minSpin->get();
- F32 val = hour + min / 60.0f;
-
- const std::string& curSldr = sldr->getCurSlider();
- sldr->setCurSliderValue(val, TRUE);
- F32 time = sldr->getCurSliderValue() / sHoursPerDay;
-
- // now set the key's time in the sliderToKey map
- std::string presetName = sSliderToKey[curSldr].presetName;
- sSliderToKey[curSldr].time = time;
-
- syncTrack();
-}
-
-void LLFloaterDayCycle::onKeyPresetChanged(LLUICtrl* ctrl)
-{
- // get the time
- LLComboBox* comboBox = getChild<LLComboBox>(
- "WLKeyPresets");
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>(
- "WLDayCycleKeys");
-
- // do nothing if no sliders
- if(sldr->getValue().size() == 0) {
- return;
- }
-
- // change the map
- std::string newPreset(comboBox->getSelectedValue().asString());
- const std::string& curSldr = sldr->getCurSlider();
-
- // if null, don't use
- if(curSldr == "") {
- return;
- }
-
- sSliderToKey[curSldr].presetName = newPreset;
-
- syncTrack();
-}
-
-void LLFloaterDayCycle::onTimeRateChanged(LLUICtrl* ctrl)
-{
- // get the time
- LLSpinCtrl* secSpin = getChild<LLSpinCtrl>(
- "WLLengthOfDaySec");
-
- LLSpinCtrl* minSpin = getChild<LLSpinCtrl>(
- "WLLengthOfDayMin");
-
- LLSpinCtrl* hourSpin = getChild<LLSpinCtrl>(
- "WLLengthOfDayHour");
-
- F32 hour;
- hour = (F32)hourSpin->getValue().asReal();
- F32 min;
- min = (F32)minSpin->getValue().asReal();
- F32 sec;
- sec = (F32)secSpin->getValue().asReal();
-
- F32 time = 60.0f * 60.0f * hour + 60.0f * min + sec;
- if(time <= 0) {
- time = 1;
- }
- LLWLParamManager::instance()->mDay.mDayRate = time;
-
- syncTrack();
-}
-
-void LLFloaterDayCycle::onAddKey(LLUICtrl* ctrl)
-{
- LLComboBox* comboBox = getChild<LLComboBox>(
- "WLKeyPresets");
- LLMultiSliderCtrl* kSldr = getChild<LLMultiSliderCtrl>(
- "WLDayCycleKeys");
- LLMultiSliderCtrl* tSldr = getChild<LLMultiSliderCtrl>(
- "WLTimeSlider");
-
- llassert_always(sSliderToKey.size() == kSldr->getValue().size());
-
- // get the values
- std::string newPreset(comboBox->getSelectedValue().asString());
-
- // add the slider key
- addSliderKey(tSldr->getCurSliderValue(), newPreset);
-
- syncTrack();
-}
-
-void LLFloaterDayCycle::addSliderKey(F32 time, const std::string & presetName)
-{
- LLMultiSliderCtrl* kSldr = getChild<LLMultiSliderCtrl>(
- "WLDayCycleKeys");
-
- // make a slider
- const std::string& sldrName = kSldr->addSlider(time);
- if(sldrName == "") {
- return;
- }
-
- // set the key
- LLWLSkyKey newKey;
- newKey.presetName = presetName;
- newKey.time = kSldr->getCurSliderValue();
-
- llassert_always(sldrName != LLStringUtil::null);
-
- // add to map
- sSliderToKey.insert(std::pair<std::string, LLWLSkyKey>(sldrName, newKey));
-
- llassert_always(sSliderToKey.size() == kSldr->getValue().size());
-
-}
-
-void LLFloaterDayCycle::deletePreset(std::string& presetName)
-{
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
-
- /// delete any reference
- std::map<std::string, LLWLSkyKey>::iterator curr_preset, next_preset;
- for(curr_preset = sSliderToKey.begin(); curr_preset != sSliderToKey.end(); curr_preset = next_preset)
- {
- next_preset = curr_preset;
- ++next_preset;
- if (curr_preset->second.presetName == presetName)
- {
- sldr->deleteSlider(curr_preset->first);
- sSliderToKey.erase(curr_preset);
- }
- }
-}
-
-void LLFloaterDayCycle::onDeleteKey(LLUICtrl* ctrl)
-{
- if(sSliderToKey.size() == 0) {
- return;
- }
-
- LLComboBox* comboBox = getChild<LLComboBox>(
- "WLKeyPresets");
- LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
-
- // delete from map
- const std::string& sldrName = sldr->getCurSlider();
- std::map<std::string, LLWLSkyKey>::iterator mIt = sSliderToKey.find(sldrName);
- sSliderToKey.erase(mIt);
-
- sldr->deleteCurSlider();
-
- if(sSliderToKey.size() == 0) {
- return;
- }
-
- const std::string& name = sldr->getCurSlider();
- comboBox->selectByValue(sSliderToKey[name].presetName);
- F32 time = sSliderToKey[name].time;
-
- LLSpinCtrl* hourSpin = getChild<LLSpinCtrl>("WLCurKeyHour");
- LLSpinCtrl* minSpin = getChild<LLSpinCtrl>("WLCurKeyMin");
-
- // now set the spinners
- F32 hour = (F32)((S32)time);
- F32 min = (time - hour) / 60;
- hourSpin->set(hour);
- minSpin->set(min);
-
- syncTrack();
-
-}
diff --git a/indra/newview/llfloaterdaycycle.h b/indra/newview/llfloaterdaycycle.h
deleted file mode 100644
index 993ddb8f07..0000000000
--- a/indra/newview/llfloaterdaycycle.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * @file llfloaterdaycycle.h
- * @brief LLFloaterDayCycle class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERDAYCYCLE_H
-#define LL_LLFLOATERDAYCYCLE_H
-
-#include "llfloater.h"
-
-#include <vector>
-#include "llwlparamset.h"
-#include "llwlanimator.h"
-
-struct WLColorControl;
-struct WLFloatControl;
-
-/// convenience class for holding keys mapped to sliders
-struct LLWLSkyKey
-{
-public:
- std::string presetName;
- F32 time;
-};
-
-/// Menu for all of windlight's functionality.
-/// Menuing system for adjusting the atmospheric settings of the world.
-class LLFloaterDayCycle : public LLFloater
-{
-public:
-
- LLFloaterDayCycle(const LLSD& key);
- virtual ~LLFloaterDayCycle();
- /*virtual*/ BOOL postBuild();
-
- /// initialize all
- void initCallbacks(void);
-
- /// on time slider moved
- void onTimeSliderMoved(LLUICtrl* ctrl);
-
- /// what happens when you move the key frame
- void onKeyTimeMoved(LLUICtrl* ctrl);
-
- /// what happens when you change the key frame's time
- void onKeyTimeChanged(LLUICtrl* ctrl);
-
- /// if you change the combo box, change the frame
- void onKeyPresetChanged(LLUICtrl* ctrl);
-
- /// run this when user says to run the sky animation
- void onRunAnimSky(LLUICtrl* ctrl);
-
- /// run this when user says to stop the sky animation
- void onStopAnimSky(LLUICtrl* ctrl);
-
- /// if you change the combo box, change the frame
- void onTimeRateChanged(LLUICtrl* ctrl);
-
- /// add a new key on slider
- void onAddKey(LLUICtrl* ctrl);
-
- /// delete any and all reference to a preset
- void deletePreset(std::string& presetName);
-
- /// delete a key frame
- void onDeleteKey(LLUICtrl* ctrl);
-
- /// button to load day
- void onLoadDayCycle(LLUICtrl* ctrl);
-
- /// button to save day
- void onSaveDayCycle(LLUICtrl* ctrl);
-
- /// toggle for Linden time
- void onUseLindenTime(LLUICtrl* ctrl);
-
- /// sync up sliders with day cycle structure
- void syncMenu();
-
- // makes sure key slider has what's in day cycle
- void syncSliderTrack();
-
- /// makes sure day cycle data structure has what's in menu
- void syncTrack();
-
- /// add a slider to the track
- void addSliderKey(F32 time, const std::string& presetName);
-
-private:
-
- // map of sliders to parameters
- static std::map<std::string, LLWLSkyKey> sSliderToKey;
-
- static const F32 sHoursPerDay;
-};
-
-
-#endif
diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp
new file mode 100644
index 0000000000..d08aa81cfe
--- /dev/null
+++ b/indra/newview/llfloaterdeleteenvpreset.cpp
@@ -0,0 +1,285 @@
+/**
+ * @file llfloaterdeleteenvpreset.cpp
+ * @brief Floater to delete a water / sky / day cycle preset.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterdeleteenvpreset.h"
+
+// libs
+#include "llbutton.h"
+#include "llcombobox.h"
+#include "llnotificationsutil.h"
+
+// newview
+#include "lldaycyclemanager.h"
+#include "llwaterparammanager.h"
+
+static bool confirmation_callback(const LLSD& notification, const LLSD& response, boost::function<void()> cb)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ cb();
+ }
+ return false;
+
+}
+
+LLFloaterDeleteEnvPreset::LLFloaterDeleteEnvPreset(const LLSD &key)
+: LLFloater(key)
+, mPresetCombo(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterDeleteEnvPreset::postBuild()
+{
+ mPresetCombo = getChild<LLComboBox>("preset_combo");
+ mPresetCombo->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::postPopulate, this));
+
+ getChild<LLButton>("delete")->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::onBtnDelete, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::onBtnCancel, this));
+
+ // Listen to user preferences change, in which case we need to rebuild the presets list
+ // to disable the [new] current preset.
+ LLEnvManagerNew::instance().setPreferencesChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populatePresetsList, this));
+
+ // Listen to presets addition/removal.
+ LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateDayCyclesList, this));
+ LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateSkyPresetsList, this));
+ LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateWaterPresetsList, this));
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterDeleteEnvPreset::onOpen(const LLSD& key)
+{
+ std::string param = key.asString();
+ std::string floater_title = getString(std::string("title_") + param);
+ std::string combo_label = getString(std::string("label_" + param));
+
+ // Update floater title.
+ setTitle(floater_title);
+
+ // Update the combobox label.
+ getChild<LLUICtrl>("label")->setValue(combo_label);
+
+ // Populate the combobox.
+ populatePresetsList();
+}
+
+void LLFloaterDeleteEnvPreset::onBtnDelete()
+{
+ std::string param = mKey.asString();
+ std::string preset_name = mPresetCombo->getValue().asString();
+ boost::function<void()> confirm_cb;
+
+ if (param == "water")
+ {
+ // Don't allow deleting system presets.
+ if (LLWaterParamManager::instance().isSystemPreset(preset_name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteWaterPresetConfirmation, this);
+ }
+ else if (param == "sky")
+ {
+ // Don't allow deleting presets referenced by local day cycles.
+ if (LLDayCycleManager::instance().isSkyPresetReferenced(preset_name))
+ {
+ LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", getString("msg_sky_is_referenced")));
+ return;
+ }
+
+ LLWLParamManager& wl_mgr = LLWLParamManager::instance();
+
+ // Don't allow deleting system presets.
+ if (wl_mgr.isSystemPreset(preset_name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteSkyPresetConfirmation, this);
+ }
+ else if (param == "day_cycle")
+ {
+ LLDayCycleManager& day_mgr = LLDayCycleManager::instance();
+
+ // Don't allow deleting system presets.
+ if (day_mgr.isSystemPreset(preset_name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteDayCycleConfirmation, this);
+ }
+ else
+ {
+ llwarns << "Unrecognized key" << llendl;
+ }
+
+ LLSD args;
+ args["MESSAGE"] = getString("msg_confirm_deletion");
+ LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(),
+ boost::bind(&confirmation_callback, _1, _2, confirm_cb));
+}
+
+void LLFloaterDeleteEnvPreset::onBtnCancel()
+{
+ closeFloater();
+}
+
+void LLFloaterDeleteEnvPreset::populatePresetsList()
+{
+ std::string param = mKey.asString();
+
+ if (param == "water")
+ {
+ populateWaterPresetsList();
+ }
+ else if (param == "sky")
+ {
+ populateSkyPresetsList();
+ }
+ else if (param == "day_cycle")
+ {
+ populateDayCyclesList();
+ }
+ else
+ {
+ llwarns << "Unrecognized key" << llendl;
+ }
+}
+
+void LLFloaterDeleteEnvPreset::populateWaterPresetsList()
+{
+ if (mKey.asString() != "water") return;
+
+ mPresetCombo->removeall();
+
+ std::string cur_preset;
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ if (!env_mgr.getUseRegionSettings())
+ {
+ cur_preset = env_mgr.getWaterPresetName();
+ }
+
+ LLWaterParamManager::preset_name_list_t presets;
+ LLWaterParamManager::instance().getUserPresetNames(presets); // list only user presets
+ for (LLWaterParamManager::preset_name_list_t::const_iterator it = presets.begin(); it != presets.end(); ++it)
+ {
+ std::string name = *it;
+
+ bool enabled = (name != cur_preset); // don't allow deleting current preset
+ mPresetCombo->add(name, ADD_BOTTOM, enabled);
+ }
+
+ postPopulate();
+}
+
+void LLFloaterDeleteEnvPreset::populateSkyPresetsList()
+{
+ if (mKey.asString() != "sky") return;
+
+ mPresetCombo->removeall();
+
+ std::string cur_preset;
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ if (!env_mgr.getUseRegionSettings() && env_mgr.getUseFixedSky())
+ {
+ cur_preset = env_mgr.getSkyPresetName();
+ }
+
+ LLWLParamManager::preset_name_list_t user_presets;
+ LLWLParamManager::instance().getUserPresetNames(user_presets);
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ const std::string& name = *it;
+ mPresetCombo->add(name, ADD_BOTTOM, /*enabled = */ name != cur_preset);
+ }
+
+ postPopulate();
+}
+
+void LLFloaterDeleteEnvPreset::populateDayCyclesList()
+{
+ if (mKey.asString() != "day_cycle") return;
+
+ mPresetCombo->removeall();
+
+ std::string cur_day;
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ if (!env_mgr.getUseRegionSettings() && env_mgr.getUseDayCycle())
+ {
+ cur_day = env_mgr.getDayCycleName();
+ }
+
+ LLDayCycleManager& day_mgr = LLDayCycleManager::instance();
+ LLDayCycleManager::preset_name_list_t user_days;
+ day_mgr.getUserPresetNames(user_days); // list only user presets
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
+ {
+ const std::string& name = *it;
+ mPresetCombo->add(name, ADD_BOTTOM, name != cur_day);
+ }
+
+ postPopulate();
+}
+
+void LLFloaterDeleteEnvPreset::postPopulate()
+{
+ // Handle empty list and empty selection.
+ bool has_selection = mPresetCombo->getItemCount() > 0 && mPresetCombo->getSelectedValue().isDefined();
+
+ if (!has_selection)
+ {
+ mPresetCombo->setLabel(getString("combo_label"));
+ }
+
+ getChild<LLButton>("delete")->setEnabled(has_selection);
+}
+
+void LLFloaterDeleteEnvPreset::onDeleteDayCycleConfirmation()
+{
+ LLDayCycleManager::instance().deletePreset(mPresetCombo->getValue().asString());
+}
+
+void LLFloaterDeleteEnvPreset::onDeleteSkyPresetConfirmation()
+{
+ LLWLParamKey key(mPresetCombo->getValue().asString(), LLEnvKey::SCOPE_LOCAL);
+ LLWLParamManager::instance().removeParamSet(key, true);
+}
+
+void LLFloaterDeleteEnvPreset::onDeleteWaterPresetConfirmation()
+{
+ LLWaterParamManager::instance().removeParamSet(mPresetCombo->getValue().asString(), true);
+}
diff --git a/indra/newview/llfloaterdeleteenvpreset.h b/indra/newview/llfloaterdeleteenvpreset.h
new file mode 100644
index 0000000000..1211505273
--- /dev/null
+++ b/indra/newview/llfloaterdeleteenvpreset.h
@@ -0,0 +1,62 @@
+/**
+ * @file llfloaterdeleteenvpreset.h
+ * @brief Floater to delete a water / sky / day cycle preset.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERDELETEENVPRESET_H
+#define LL_LLFLOATERDELETEENVPRESET_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+
+class LLFloaterDeleteEnvPreset : public LLFloater
+{
+ LOG_CLASS(LLFloaterDeleteEnvPreset);
+
+public:
+ LLFloaterDeleteEnvPreset(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ void onBtnDelete();
+ void onBtnCancel();
+
+private:
+ void populatePresetsList();
+ void populateWaterPresetsList();
+ void populateSkyPresetsList();
+ void populateDayCyclesList();
+
+ void postPopulate();
+
+ void onDeleteDayCycleConfirmation();
+ void onDeleteSkyPresetConfirmation();
+ void onDeleteWaterPresetConfirmation();
+
+ LLComboBox* mPresetCombo;
+};
+
+#endif // LL_LLFLOATERDELETEENVPRESET_H
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp
new file mode 100644
index 0000000000..b63677b258
--- /dev/null
+++ b/indra/newview/llfloatereditdaycycle.cpp
@@ -0,0 +1,825 @@
+/**
+ * @file llfloatereditdaycycle.cpp
+ * @brief Floater to create or edit a day cycle
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatereditdaycycle.h"
+
+// libs
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llloadingindicator.h"
+#include "llmultisliderctrl.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llspinctrl.h"
+#include "lltimectrl.h"
+
+// newview
+#include "llagent.h"
+#include "lldaycyclemanager.h"
+#include "llenvmanager.h"
+#include "llregioninfomodel.h"
+#include "llviewerregion.h"
+#include "llwlparammanager.h"
+
+const F32 LLFloaterEditDayCycle::sHoursPerDay = 24.0f;
+
+LLFloaterEditDayCycle::LLFloaterEditDayCycle(const LLSD &key)
+: LLFloater(key)
+, mDayCycleNameEditor(NULL)
+, mDayCyclesCombo(NULL)
+, mTimeSlider(NULL)
+, mKeysSlider(NULL)
+, mSkyPresetsCombo(NULL)
+, mTimeCtrl(NULL)
+, mMakeDefaultCheckBox(NULL)
+, mSaveButton(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterEditDayCycle::postBuild()
+{
+ mDayCycleNameEditor = getChild<LLLineEditor>("day_cycle_name");
+ mDayCyclesCombo = getChild<LLComboBox>("day_cycle_combo");
+
+ mTimeSlider = getChild<LLMultiSliderCtrl>("WLTimeSlider");
+ mKeysSlider = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
+ mSkyPresetsCombo = getChild<LLComboBox>("WLSkyPresets");
+ mTimeCtrl = getChild<LLTimeCtrl>("time");
+ mSaveButton = getChild<LLButton>("save");
+ mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
+
+ initCallbacks();
+
+ // add the time slider
+ mTimeSlider->addSlider();
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterEditDayCycle::onOpen(const LLSD& key)
+{
+ bool new_day = isNewDay();
+ std::string param = key.asString();
+ std::string floater_title = getString(std::string("title_") + param);
+ std::string hint = getString(std::string("hint_" + param));
+
+ // Update floater title.
+ setTitle(floater_title);
+
+ // Update the hint at the top.
+ getChild<LLUICtrl>("hint")->setValue(hint);
+
+ // Hide the hint to the right of the combo if we're invoked to create a new preset.
+ getChildView("note")->setVisible(!new_day);
+
+ // Switch between the day cycle presets combobox and day cycle name input field.
+ mDayCyclesCombo->setVisible(!new_day);
+ mDayCycleNameEditor->setVisible(new_day);
+
+ // TODO: Make sure only one instance of the floater exists?
+
+ reset();
+}
+
+// virtual
+void LLFloaterEditDayCycle::onClose(bool app_quitting)
+{
+ if (!app_quitting) // there's no point to change environment if we're quitting
+ {
+ LLEnvManagerNew::instance().usePrefs(); // revert changes made to current day cycle
+ }
+}
+
+// virtual
+void LLFloaterEditDayCycle::draw()
+{
+ syncTimeSlider();
+ LLFloater::draw();
+}
+
+void LLFloaterEditDayCycle::initCallbacks(void)
+{
+ mDayCycleNameEditor->setKeystrokeCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleNameEdited, this), NULL);
+ mDayCyclesCombo->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleSelected, this));
+ mDayCyclesCombo->setTextEntryCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleNameEdited, this));
+ mTimeSlider->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onTimeSliderMoved, this));
+ mKeysSlider->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyTimeMoved, this));
+ mTimeCtrl->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyTimeChanged, this));
+ mSkyPresetsCombo->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyPresetChanged, this));
+
+ getChild<LLButton>("WLAddKey")->setClickedCallback(boost::bind(&LLFloaterEditDayCycle::onAddKey, this));
+ getChild<LLButton>("WLDeleteKey")->setClickedCallback(boost::bind(&LLFloaterEditDayCycle::onDeleteKey, this));
+
+ mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onBtnSave, this));
+ mSaveButton->setRightMouseDownCallback(boost::bind(&LLFloaterEditDayCycle::dumpTrack, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onBtnCancel, this));
+
+ // Connect to env manager events.
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ env_mgr.setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsChange, this));
+ env_mgr.setRegionChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionChange, this));
+ env_mgr.setRegionSettingsAppliedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsApplied, this, _1));
+
+ // Connect to day cycle manager events.
+ LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleListChange, this));
+
+ // Connect to sky preset list changes.
+ LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEditDayCycle::onSkyPresetListChange, this));
+
+ // Connect to region info updates.
+ LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditDayCycle::onRegionInfoUpdate, this));
+}
+
+void LLFloaterEditDayCycle::syncTimeSlider()
+{
+ // set time
+ mTimeSlider->setCurSliderValue((F32)LLWLParamManager::getInstance()->mAnimator.getDayTime() * sHoursPerDay);
+}
+
+void LLFloaterEditDayCycle::loadTrack()
+{
+ // clear the slider
+ mKeysSlider->clear();
+ mSliderToKey.clear();
+
+ // add sliders
+
+ lldebugs << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << llendl;
+
+ LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay;
+ for (std::map<F32, LLWLParamKey>::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it)
+ {
+ addSliderKey(it->first * sHoursPerDay, it->second);
+ }
+
+ // set drop-down menu to match preset of currently-selected keyframe (one is automatically selected initially)
+ const std::string& cur_sldr = mKeysSlider->getCurSlider();
+ if (strlen(cur_sldr.c_str()) > 0) // only do this if there is a curSldr, otherwise we put an invalid entry into the map
+ {
+ mSkyPresetsCombo->selectByValue(mSliderToKey[cur_sldr].keyframe.toStringVal());
+ }
+
+ syncTimeSlider();
+}
+
+void LLFloaterEditDayCycle::applyTrack()
+{
+ lldebugs << "Applying track (" << mSliderToKey.size() << ")" << llendl;
+
+ // if no keys, do nothing
+ if (mSliderToKey.size() == 0)
+ {
+ lldebugs << "No keys, not syncing" << llendl;
+ return;
+ }
+
+ llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
+
+ // create a new animation track
+ LLWLParamManager::getInstance()->mDay.clearKeyframes();
+
+ // add the keys one by one
+ for (std::map<std::string, SliderKey>::iterator it = mSliderToKey.begin();
+ it != mSliderToKey.end(); ++it)
+ {
+ LLWLParamManager::getInstance()->mDay.addKeyframe(it->second.time / sHoursPerDay,
+ it->second.keyframe);
+ }
+
+ // set the param manager's track to the new one
+ LLWLParamManager::getInstance()->resetAnimator(
+ mTimeSlider->getCurSliderValue() / sHoursPerDay, false);
+
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
+}
+
+void LLFloaterEditDayCycle::refreshSkyPresetsList()
+{
+ // Don't allow selecting region skies for a local day cycle,
+ // because thus we may end up with invalid day cycle.
+ bool include_region_skies = getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION;
+
+ mSkyPresetsCombo->removeall();
+
+ LLWLParamManager::preset_name_list_t region_presets;
+ LLWLParamManager::preset_name_list_t user_presets, sys_presets;
+ LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
+
+ if (include_region_skies)
+ {
+ // Add region presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = region_presets.begin(); it != region_presets.end(); ++it)
+ {
+ std::string preset_name = *it;
+ std::string item_title = preset_name + " (" + getRegionName() + ")";
+ mSkyPresetsCombo->add(preset_name, LLWLParamKey(*it, LLEnvKey::SCOPE_REGION).toStringVal());
+ }
+
+ if (!region_presets.empty())
+ {
+ mSkyPresetsCombo->addSeparator();
+ }
+ }
+
+ // Add user presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mSkyPresetsCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ if (!user_presets.empty())
+ {
+ mSkyPresetsCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
+ {
+ mSkyPresetsCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ // set defaults on combo boxes
+ mSkyPresetsCombo->selectFirstItem();
+}
+
+void LLFloaterEditDayCycle::refreshDayCyclesList()
+{
+ llassert(isNewDay() == false);
+
+ mDayCyclesCombo->removeall();
+
+#if 0 // Disable editing existing day cycle until the workflow is clear enough.
+ const LLSD& region_day = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
+ if (region_day.size() > 0)
+ {
+ LLWLParamKey key(getRegionName(), LLEnvKey::SCOPE_REGION);
+ mDayCyclesCombo->add(key.name, key.toLLSD());
+ mDayCyclesCombo->addSeparator();
+ }
+#endif
+
+ LLDayCycleManager::preset_name_list_t user_days, sys_days;
+ LLDayCycleManager::instance().getPresetNames(user_days, sys_days);
+
+ // Add user days.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
+ {
+ mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+
+ if (user_days.size() > 0)
+ {
+ mDayCyclesCombo->addSeparator();
+ }
+
+ // Add system days.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it)
+ {
+ mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+
+ mDayCyclesCombo->setLabel(getString("combo_label"));
+}
+
+void LLFloaterEditDayCycle::onTimeSliderMoved()
+{
+ /// get the slider value
+ F32 val = mTimeSlider->getCurSliderValue() / sHoursPerDay;
+
+ // set the value, turn off animation
+ LLWLParamManager::getInstance()->mAnimator.setDayTime((F64)val);
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ // then call update once
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
+}
+
+void LLFloaterEditDayCycle::onKeyTimeMoved()
+{
+ if (mKeysSlider->getValue().size() == 0)
+ {
+ return;
+ }
+
+ // make sure we have a slider
+ const std::string& cur_sldr = mKeysSlider->getCurSlider();
+ if (cur_sldr == "")
+ {
+ return;
+ }
+
+ F32 time24 = mKeysSlider->getCurSliderValue();
+
+ // check to see if a key exists
+ LLWLParamKey key = mSliderToKey[cur_sldr].keyframe;
+ lldebugs << "Setting key time: " << time24 << LL_ENDL;
+ mSliderToKey[cur_sldr].time = time24;
+
+ // if it exists, turn on check box
+ mSkyPresetsCombo->selectByValue(key.toStringVal());
+
+ mTimeCtrl->setTime24(time24);
+
+ applyTrack();
+}
+
+void LLFloaterEditDayCycle::onKeyTimeChanged()
+{
+ // if no keys, skipped
+ if (mSliderToKey.size() == 0)
+ {
+ return;
+ }
+
+ F32 time24 = mTimeCtrl->getTime24();
+
+ const std::string& cur_sldr = mKeysSlider->getCurSlider();
+ mKeysSlider->setCurSliderValue(time24, TRUE);
+ F32 time = mKeysSlider->getCurSliderValue() / sHoursPerDay;
+
+ // now set the key's time in the sliderToKey map
+ lldebugs << "Setting key time: " << time << LL_ENDL;
+ mSliderToKey[cur_sldr].time = time;
+
+ applyTrack();
+}
+
+void LLFloaterEditDayCycle::onKeyPresetChanged()
+{
+ // do nothing if no sliders
+ if (mKeysSlider->getValue().size() == 0)
+ {
+ return;
+ }
+
+ // change the map
+
+ std::string stringVal = mSkyPresetsCombo->getSelectedValue().asString();
+ LLWLParamKey new_key(stringVal);
+ llassert(!new_key.name.empty());
+ const std::string& cur_sldr = mKeysSlider->getCurSlider();
+
+ // if null, don't use
+ if (cur_sldr == "")
+ {
+ return;
+ }
+
+ mSliderToKey[cur_sldr].keyframe = new_key;
+
+ // Apply changes to current day cycle.
+ applyTrack();
+}
+
+void LLFloaterEditDayCycle::onAddKey()
+{
+ llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
+
+ S32 max_sliders;
+ LLEnvKey::EScope scope = LLEnvKey::SCOPE_LOCAL; // *TODO: editing region day cycle
+ switch (scope)
+ {
+ case LLEnvKey::SCOPE_LOCAL:
+ max_sliders = 20; // *HACK this should be LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES;
+ break;
+ case LLEnvKey::SCOPE_REGION:
+ max_sliders = 12; // *HACK this should be LLWLPacketScrubber::MAX_REGION_KEY_FRAMES;
+ break;
+ default:
+ max_sliders = (S32) mKeysSlider->getMaxValue();
+ break;
+ }
+
+ if ((S32)mSliderToKey.size() >= max_sliders)
+ {
+ LLSD args;
+ args["SCOPE"] = LLEnvManagerNew::getScopeString(scope);
+ args["MAX"] = max_sliders;
+ LLNotificationsUtil::add("DayCycleTooManyKeyframes", args, LLSD(), LLNotificationFunctorRegistry::instance().DONOTHING);
+ return;
+ }
+
+ // add the slider key
+ std::string key_val = mSkyPresetsCombo->getSelectedValue().asString();
+ LLWLParamKey sky_params(key_val);
+ llassert(!sky_params.name.empty());
+
+ F32 time = mTimeSlider->getCurSliderValue();
+ addSliderKey(time, sky_params);
+
+ // apply the change to current day cycles
+ applyTrack();
+}
+
+void LLFloaterEditDayCycle::addSliderKey(F32 time, LLWLParamKey keyframe)
+{
+ // make a slider
+ const std::string& sldr_name = mKeysSlider->addSlider(time);
+ if (sldr_name.empty())
+ {
+ return;
+ }
+
+ // set the key
+ SliderKey newKey(keyframe, mKeysSlider->getCurSliderValue());
+
+ llassert_always(sldr_name != LLStringUtil::null);
+
+ // add to map
+ mSliderToKey.insert(std::pair<std::string, SliderKey>(sldr_name, newKey));
+
+ llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
+}
+
+LLWLParamKey LLFloaterEditDayCycle::getSelectedDayCycle()
+{
+ LLWLParamKey dc_key;
+
+ if (mDayCycleNameEditor->getVisible())
+ {
+ dc_key.name = mDayCycleNameEditor->getText();
+ dc_key.scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ LLSD combo_val = mDayCyclesCombo->getValue();
+
+ if (!combo_val.isArray()) // manually typed text
+ {
+ dc_key.name = combo_val.asString();
+ dc_key.scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ dc_key.fromLLSD(combo_val);
+ }
+ }
+
+ return dc_key;
+}
+
+bool LLFloaterEditDayCycle::isNewDay() const
+{
+ return mKey.asString() == "new";
+}
+
+void LLFloaterEditDayCycle::dumpTrack()
+{
+ LL_DEBUGS("Windlight") << "Dumping day cycle" << LL_ENDL;
+
+ LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay;
+ for (std::map<F32, LLWLParamKey>::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it)
+ {
+ F32 time = it->first * 24.0f;
+ S32 h = (S32) time;
+ S32 m = (S32) ((time - h) * 60.0f);
+ LL_DEBUGS("Windlight") << llformat("(%.3f) %02d:%02d", time, h, m) << " => " << it->second.name << LL_ENDL;
+ }
+}
+
+void LLFloaterEditDayCycle::enableEditing(bool enable)
+{
+ mSkyPresetsCombo->setEnabled(enable);
+ mTimeCtrl->setEnabled(enable);
+ getChild<LLPanel>("day_cycle_slider_panel")->setCtrlsEnabled(enable);
+ mSaveButton->setEnabled(enable);
+ mMakeDefaultCheckBox->setEnabled(enable);
+}
+
+void LLFloaterEditDayCycle::reset()
+{
+ // clear the slider
+ mKeysSlider->clear();
+ mSliderToKey.clear();
+
+ refreshSkyPresetsList();
+
+ if (isNewDay())
+ {
+ mDayCycleNameEditor->setValue(LLSD());
+ F32 time = 0.5f * sHoursPerDay;
+ mSaveButton->setEnabled(FALSE); // will be enabled as soon as users enters a name
+ mTimeSlider->setCurSliderValue(time);
+
+ addSliderKey(time, LLWLParamKey("Default", LLEnvKey::SCOPE_LOCAL));
+ onKeyTimeMoved(); // update the time control and sky sky combo
+
+ applyTrack();
+ }
+ else
+ {
+ refreshDayCyclesList();
+
+ // Disable controls until a day cycle to edit is selected.
+ enableEditing(false);
+ }
+}
+
+void LLFloaterEditDayCycle::saveRegionDayCycle()
+{
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay; // the day cycle being edited
+
+ // Get current day cycle and the sky preset it references.
+ LLSD day_cycle = cur_dayp.asLLSD();
+ LLSD sky_map;
+ cur_dayp.getSkyMap(sky_map);
+
+ // Apply it to the region.
+ LLEnvironmentSettings new_region_settings;
+ new_region_settings.saveParams(day_cycle, sky_map, env_mgr.getRegionSettings().getWaterParams(), 0.0f);
+
+#if 1
+ LLEnvManagerNew::instance().setRegionSettings(new_region_settings);
+#else // Temporary disabled ability to upload new region settings from the Day Cycle Editor.
+ if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings))
+ {
+ llwarns << "Error applying region environment settings" << llendl;
+ return;
+ }
+
+ setApplyProgress(true);
+#endif
+}
+
+void LLFloaterEditDayCycle::setApplyProgress(bool started)
+{
+ LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("progress_indicator");
+
+ indicator->setVisible(started);
+
+ if (started)
+ {
+ indicator->start();
+ }
+ else
+ {
+ indicator->stop();
+ }
+}
+
+bool LLFloaterEditDayCycle::getApplyProgress() const
+{
+ return getChild<LLLoadingIndicator>("progress_indicator")->getVisible();
+}
+
+void LLFloaterEditDayCycle::onDeleteKey()
+{
+ if (mSliderToKey.size() == 0)
+ {
+ return;
+ }
+ else if (mSliderToKey.size() == 1)
+ {
+ LLNotifications::instance().add("EnvCannotDeleteLastDayCycleKey", LLSD(), LLSD());
+ return;
+ }
+
+ // delete from map
+ const std::string& sldr_name = mKeysSlider->getCurSlider();
+ std::map<std::string, SliderKey>::iterator mIt = mSliderToKey.find(sldr_name);
+ mSliderToKey.erase(mIt);
+
+ mKeysSlider->deleteCurSlider();
+
+ if (mSliderToKey.size() == 0)
+ {
+ return;
+ }
+
+ const std::string& name = mKeysSlider->getCurSlider();
+ mSkyPresetsCombo->selectByValue(mSliderToKey[name].keyframe.toStringVal());
+ F32 time24 = mSliderToKey[name].time;
+
+ mTimeCtrl->setTime24(time24);
+
+ applyTrack();
+}
+
+void LLFloaterEditDayCycle::onRegionSettingsChange()
+{
+ LL_DEBUGS("Windlight") << "Region settings changed" << LL_ENDL;
+
+ if (getApplyProgress()) // our region settings have being applied
+ {
+ setApplyProgress(false);
+
+ // Change preference if requested.
+ if (mMakeDefaultCheckBox->getValue())
+ {
+ LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << llendl;
+ LLEnvManagerNew::instance().setUseRegionSettings(true);
+ }
+
+ closeFloater();
+ }
+}
+
+void LLFloaterEditDayCycle::onRegionChange()
+{
+ LL_DEBUGS("Windlight") << "Region changed" << LL_ENDL;
+
+ // If we're editing the region day cycle
+ if (getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION)
+ {
+ reset(); // undoes all unsaved changes
+ }
+}
+
+void LLFloaterEditDayCycle::onRegionSettingsApplied(bool success)
+{
+ LL_DEBUGS("Windlight") << "Region settings applied: " << success << LL_ENDL;
+
+ if (!success)
+ {
+ // stop progress indicator
+ setApplyProgress(false);
+ }
+}
+
+void LLFloaterEditDayCycle::onRegionInfoUpdate()
+{
+ LL_DEBUGS("Windlight") << "Region info updated" << LL_ENDL;
+ bool can_edit = true;
+
+ // If we've selected the region day cycle for editing.
+ if (getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION)
+ {
+ // check whether we have the access
+ can_edit = LLEnvManagerNew::canEditRegionSettings();
+ }
+
+ enableEditing(can_edit);
+}
+
+void LLFloaterEditDayCycle::onDayCycleNameEdited()
+{
+ // Disable saving a day cycle having empty name.
+ LLWLParamKey key = getSelectedDayCycle();
+ mSaveButton->setEnabled(!key.name.empty());
+}
+
+void LLFloaterEditDayCycle::onDayCycleSelected()
+{
+ LLSD day_data;
+ LLWLParamKey dc_key = getSelectedDayCycle();
+ bool can_edit = true;
+
+ if (dc_key.scope == LLEnvKey::SCOPE_LOCAL)
+ {
+ if (!LLDayCycleManager::instance().getPreset(dc_key.name, day_data))
+ {
+ llwarns << "No day cycle named " << dc_key.name << llendl;
+ return;
+ }
+ }
+ else
+ {
+ day_data = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
+ if (day_data.size() == 0)
+ {
+ llwarns << "Empty region day cycle" << llendl;
+ llassert(day_data.size() > 0);
+ return;
+ }
+
+ can_edit = LLEnvManagerNew::canEditRegionSettings();
+ }
+
+ // We may need to add or remove region skies from the list.
+ refreshSkyPresetsList();
+
+ F32 slider_time = mTimeSlider->getCurSliderValue() / sHoursPerDay;
+ LLWLParamManager::instance().applyDayCycleParams(day_data, dc_key.scope, slider_time);
+ loadTrack();
+
+ enableEditing(can_edit);
+}
+
+void LLFloaterEditDayCycle::onBtnSave()
+{
+ LLDayCycleManager& day_mgr = LLDayCycleManager::instance();
+ LLWLParamKey selected_day = getSelectedDayCycle();
+
+ if (selected_day.scope == LLEnvKey::SCOPE_REGION)
+ {
+ saveRegionDayCycle();
+ closeFloater();
+ return;
+ }
+
+ std::string name = selected_day.name;
+ if (name.empty())
+ {
+ // *TODO: show an alert
+ llwarns << "Empty day cycle name" << llendl;
+ return;
+ }
+
+ // Don't allow overwriting system presets.
+ if (day_mgr.isSystemPreset(name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ // Save, ask for confirmation for overwriting an existing preset.
+ if (day_mgr.presetExists(name))
+ {
+ LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterEditDayCycle::onSaveAnswer, this, _1, _2));
+ }
+ else
+ {
+ // new preset, hence no confirmation needed
+ onSaveConfirmed();
+ }
+}
+
+void LLFloaterEditDayCycle::onBtnCancel()
+{
+ closeFloater();
+}
+
+bool LLFloaterEditDayCycle::onSaveAnswer(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ // If they choose save, do it. Otherwise, don't do anything
+ if (option == 0)
+ {
+ onSaveConfirmed();
+ }
+
+ return false;
+}
+
+void LLFloaterEditDayCycle::onSaveConfirmed()
+{
+ std::string name = getSelectedDayCycle().name;
+
+ // Save preset.
+ LLSD data = LLWLParamManager::instance().mDay.asLLSD();
+ LL_DEBUGS("Windlight") << "Saving day cycle " << name << ": " << data << LL_ENDL;
+ LLDayCycleManager::instance().savePreset(name, data);
+
+ // Change preference if requested.
+ if (mMakeDefaultCheckBox->getValue())
+ {
+ LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << llendl;
+ LLEnvManagerNew::instance().setUseDayCycle(name);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterEditDayCycle::onDayCycleListChange()
+{
+ if (!isNewDay())
+ {
+ refreshDayCyclesList();
+ }
+}
+
+void LLFloaterEditDayCycle::onSkyPresetListChange()
+{
+ refreshSkyPresetsList();
+
+ // Refresh sliders from the currently visible day cycle.
+ loadTrack();
+}
+
+// static
+std::string LLFloaterEditDayCycle::getRegionName()
+{
+ return gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown");
+}
diff --git a/indra/newview/llfloatereditdaycycle.h b/indra/newview/llfloatereditdaycycle.h
new file mode 100644
index 0000000000..e6e4fe39c1
--- /dev/null
+++ b/indra/newview/llfloatereditdaycycle.h
@@ -0,0 +1,137 @@
+/**
+ * @file llfloatereditdaycycle.h
+ * @brief Floater to create or edit a day cycle
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATEREDITDAYCYCLE_H
+#define LL_LLFLOATEREDITDAYCYCLE_H
+
+#include "llfloater.h"
+
+#include "llwlparammanager.h" // for LLWLParamKey
+
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+class LLMultiSliderCtrl;
+class LLTimeCtrl;
+
+/**
+ * Floater for creating or editing a day cycle.
+ */
+class LLFloaterEditDayCycle : public LLFloater
+{
+ LOG_CLASS(LLFloaterEditDayCycle);
+
+public:
+ LLFloaterEditDayCycle(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void draw();
+
+private:
+
+ /// sync the time slider with day cycle structure
+ void syncTimeSlider();
+
+ // makes sure key slider has what's in day cycle
+ void loadTrack();
+
+ /// makes sure day cycle data structure has what's in menu
+ void applyTrack();
+
+ /// refresh the sky presets combobox
+ void refreshSkyPresetsList();
+
+ /// refresh the day cycle combobox
+ void refreshDayCyclesList();
+
+ /// add a slider to the track
+ void addSliderKey(F32 time, LLWLParamKey keyframe);
+
+ void initCallbacks();
+ LLWLParamKey getSelectedDayCycle();
+ bool isNewDay() const;
+ void dumpTrack();
+ void enableEditing(bool enable);
+ void reset();
+ void saveRegionDayCycle();
+
+ void setApplyProgress(bool started);
+ bool getApplyProgress() const;
+
+ void onTimeSliderMoved(); /// time slider moved
+ void onKeyTimeMoved(); /// a key frame moved
+ void onKeyTimeChanged(); /// a key frame's time changed
+ void onKeyPresetChanged(); /// sky preset selected
+ void onAddKey(); /// new key added on slider
+ void onDeleteKey(); /// a key frame deleted
+
+ void onRegionSettingsChange();
+ void onRegionChange();
+ void onRegionSettingsApplied(bool success);
+ void onRegionInfoUpdate();
+
+ void onDayCycleNameEdited();
+ void onDayCycleSelected();
+ void onBtnSave();
+ void onBtnCancel();
+
+ bool onSaveAnswer(const LLSD& notification, const LLSD& response);
+ void onSaveConfirmed();
+
+ void onDayCycleListChange();
+ void onSkyPresetListChange();
+
+ static std::string getRegionName();
+
+ /// convenience class for holding keyframes mapped to sliders
+ struct SliderKey
+ {
+ public:
+ SliderKey(LLWLParamKey kf, F32 t) : keyframe(kf), time(t) {}
+ SliderKey() : keyframe(), time(0.f) {} // Don't use this default constructor
+
+ LLWLParamKey keyframe;
+ F32 time;
+ };
+
+ static const F32 sHoursPerDay;
+
+ LLLineEditor* mDayCycleNameEditor;
+ LLComboBox* mDayCyclesCombo;
+ LLMultiSliderCtrl* mTimeSlider;
+ LLMultiSliderCtrl* mKeysSlider;
+ LLComboBox* mSkyPresetsCombo;
+ LLTimeCtrl* mTimeCtrl;
+ LLCheckBoxCtrl* mMakeDefaultCheckBox;
+ LLButton* mSaveButton;
+
+ // map of sliders to parameters
+ std::map<std::string, SliderKey> mSliderToKey;
+};
+
+#endif // LL_LLFLOATEREDITDAYCYCLE_H
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
new file mode 100644
index 0000000000..abee7b5dc9
--- /dev/null
+++ b/indra/newview/llfloatereditsky.cpp
@@ -0,0 +1,923 @@
+/**
+ * @file llfloatereditsky.cpp
+ * @brief Floater to create or edit a sky preset
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatereditsky.h"
+
+// libs
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llmultisliderctrl.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llsliderctrl.h"
+#include "lltabcontainer.h"
+#include "lltimectrl.h"
+
+// newview
+#include "llagent.h"
+#include "llcolorswatch.h"
+#include "llregioninfomodel.h"
+#include "llviewerregion.h"
+
+static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f;
+static const F32 WL_BLUE_HORIZON_DENSITY_SCALE = 2.0f;
+static const F32 WL_CLOUD_SLIDER_SCALE = 1.0f;
+
+static F32 sun_pos_to_time24(F32 sun_pos)
+{
+ return fmodf(sun_pos * 24.0f + 6, 24.0f);
+}
+
+static F32 time24_to_sun_pos(F32 time24)
+{
+ F32 sun_pos = fmodf((time24 - 6) / 24.0f, 1.0f);
+ if (sun_pos < 0) ++sun_pos;
+ return sun_pos;
+}
+
+LLFloaterEditSky::LLFloaterEditSky(const LLSD &key)
+: LLFloater(key)
+, mSkyPresetNameEditor(NULL)
+, mSkyPresetCombo(NULL)
+, mMakeDefaultCheckBox(NULL)
+, mSaveButton(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterEditSky::postBuild()
+{
+ mSkyPresetNameEditor = getChild<LLLineEditor>("sky_preset_name");
+ mSkyPresetCombo = getChild<LLComboBox>("sky_preset_combo");
+ mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
+ mSaveButton = getChild<LLButton>("save");
+
+ initCallbacks();
+
+ // Create the sun position scrubber on the slider.
+ getChild<LLMultiSliderCtrl>("WLSunPos")->addSlider(12.f);
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterEditSky::onOpen(const LLSD& key)
+{
+ bool new_preset = isNewPreset();
+ std::string param = key.asString();
+ std::string floater_title = getString(std::string("title_") + param);
+ std::string hint = getString(std::string("hint_" + param));
+
+ // Update floater title.
+ setTitle(floater_title);
+
+ // Update the hint at the top.
+ getChild<LLUICtrl>("hint")->setValue(hint);
+
+ // Hide the hint to the right of the combo if we're invoked to create a new preset.
+ getChildView("note")->setVisible(!new_preset);
+
+ // Switch between the sky presets combobox and preset name input field.
+ mSkyPresetCombo->setVisible(!new_preset);
+ mSkyPresetNameEditor->setVisible(new_preset);
+
+ reset();
+}
+
+// virtual
+void LLFloaterEditSky::onClose(bool app_quitting)
+{
+ if (!app_quitting) // there's no point to change environment if we're quitting
+ {
+ LLEnvManagerNew::instance().usePrefs(); // revert changes made to current environment
+ }
+}
+
+// virtual
+void LLFloaterEditSky::draw()
+{
+ syncControls();
+ LLFloater::draw();
+}
+
+void LLFloaterEditSky::initCallbacks(void)
+{
+ // *TODO: warn user if a region environment update comes while we're editing a region sky preset.
+
+ mSkyPresetNameEditor->setKeystrokeCallback(boost::bind(&LLFloaterEditSky::onSkyPresetNameEdited, this), NULL);
+ mSkyPresetCombo->setCommitCallback(boost::bind(&LLFloaterEditSky::onSkyPresetSelected, this));
+ mSkyPresetCombo->setTextEntryCallback(boost::bind(&LLFloaterEditSky::onSkyPresetNameEdited, this));
+
+ mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditSky::onBtnSave, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditSky::onBtnCancel, this));
+
+ LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditSky::onRegionSettingsChange, this));
+ LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEditSky::onSkyPresetListChange, this));
+
+ // Connect to region info updates.
+ LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this));
+
+ //-------------------------------------------------------------------------
+
+ LLWLParamManager& param_mgr = LLWLParamManager::instance();
+
+ // blue horizon
+ getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mBlueHorizon));
+
+ // haze density, horizon, mult, and altitude
+ getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mHazeDensity));
+ getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mHazeHorizon));
+ getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mDensityMult));
+ getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mMaxAlt));
+
+ // blue density
+ getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mBlueDensity));
+
+ // Lighting
+
+ // sunlight
+ getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mSunlight));
+
+ // glow
+ getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowRMoved, this, _1, &param_mgr.mGlow));
+ getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowBMoved, this, _1, &param_mgr.mGlow));
+
+ // ambient
+ getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mAmbient));
+
+ // time of day
+ getChild<LLUICtrl>("WLSunPos")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &param_mgr.mLightnorm)); // multi-slider
+ getChild<LLTimeCtrl>("WLDayTime")->setCommitCallback(boost::bind(&LLFloaterEditSky::onTimeChanged, this)); // time ctrl
+ getChild<LLUICtrl>("WLEastAngle")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &param_mgr.mLightnorm));
+
+ // Clouds
+
+ // Cloud Color
+ getChild<LLUICtrl>("WLCloudColor")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mCloudColor));
+
+ // Cloud
+ getChild<LLUICtrl>("WLCloudX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mCloudMain));
+ getChild<LLUICtrl>("WLCloudY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &param_mgr.mCloudMain));
+ getChild<LLUICtrl>("WLCloudDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &param_mgr.mCloudMain));
+
+ // Cloud Detail
+ getChild<LLUICtrl>("WLCloudDetailX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mCloudDetail));
+ getChild<LLUICtrl>("WLCloudDetailY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &param_mgr.mCloudDetail));
+ getChild<LLUICtrl>("WLCloudDetailDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &param_mgr.mCloudDetail));
+
+ // Cloud extras
+ getChild<LLUICtrl>("WLCloudCoverage")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mCloudCoverage));
+ getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mCloudScale));
+ getChild<LLUICtrl>("WLCloudLockX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXToggled, this, _1));
+ getChild<LLUICtrl>("WLCloudLockY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYToggled, this, _1));
+ getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXMoved, this, _1));
+ getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYMoved, this, _1));
+ getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mDistanceMult));
+
+ // Dome
+ getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mWLGamma));
+ getChild<LLUICtrl>("WLStarAlpha")->setCommitCallback(boost::bind(&LLFloaterEditSky::onStarAlphaMoved, this, _1));
+}
+
+//=================================================================================================
+
+void LLFloaterEditSky::syncControls()
+{
+ bool err;
+
+ LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
+
+ LLWLParamSet& cur_params = param_mgr->mCurParams;
+
+ // blue horizon
+ param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err);
+ setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
+
+ // haze density, horizon, mult, and altitude
+ param_mgr->mHazeDensity = cur_params.getVector(param_mgr->mHazeDensity.mName, err);
+ childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r);
+ param_mgr->mHazeHorizon = cur_params.getVector(param_mgr->mHazeHorizon.mName, err);
+ childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r);
+ param_mgr->mDensityMult = cur_params.getVector(param_mgr->mDensityMult.mName, err);
+ childSetValue("WLDensityMult", param_mgr->mDensityMult.x *
+ param_mgr->mDensityMult.mult);
+ param_mgr->mMaxAlt = cur_params.getVector(param_mgr->mMaxAlt.mName, err);
+ childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x);
+
+ // blue density
+ param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err);
+ setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
+
+ // Lighting
+
+ // sunlight
+ param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err);
+ setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
+
+ // glow
+ param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err);
+ childSetValue("WLGlowR", 2 - param_mgr->mGlow.r / 20.0f);
+ childSetValue("WLGlowB", -param_mgr->mGlow.b / 5.0f);
+
+ // ambient
+ param_mgr->mAmbient = cur_params.getVector(param_mgr->mAmbient.mName, err);
+ setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
+
+ F32 time24 = sun_pos_to_time24(param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
+ getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
+ getChild<LLTimeCtrl>("WLDayTime")->setTime24(time24);
+ childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);
+
+ // Clouds
+
+ // Cloud Color
+ param_mgr->mCloudColor = cur_params.getVector(param_mgr->mCloudColor.mName, err);
+ setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE);
+
+ // Cloud
+ param_mgr->mCloudMain = cur_params.getVector(param_mgr->mCloudMain.mName, err);
+ childSetValue("WLCloudX", param_mgr->mCloudMain.r);
+ childSetValue("WLCloudY", param_mgr->mCloudMain.g);
+ childSetValue("WLCloudDensity", param_mgr->mCloudMain.b);
+
+ // Cloud Detail
+ param_mgr->mCloudDetail = cur_params.getVector(param_mgr->mCloudDetail.mName, err);
+ childSetValue("WLCloudDetailX", param_mgr->mCloudDetail.r);
+ childSetValue("WLCloudDetailY", param_mgr->mCloudDetail.g);
+ childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b);
+
+ // Cloud extras
+ param_mgr->mCloudCoverage = cur_params.getVector(param_mgr->mCloudCoverage.mName, err);
+ param_mgr->mCloudScale = cur_params.getVector(param_mgr->mCloudScale.mName, err);
+ childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x);
+ childSetValue("WLCloudScale", param_mgr->mCloudScale.x);
+
+ // cloud scrolling
+ bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
+ bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
+ childSetValue("WLCloudLockX", lockX);
+ childSetValue("WLCloudLockY", lockY);
+
+ // disable if locked, enable if not
+ if (lockX)
+ {
+ childDisable("WLCloudScrollX");
+ }
+ else
+ {
+ childEnable("WLCloudScrollX");
+ }
+ if (lockY)
+ {
+ childDisable("WLCloudScrollY");
+ }
+ else
+ {
+ childEnable("WLCloudScrollY");
+ }
+
+ // *HACK cloud scrolling is off my an additive of 10
+ childSetValue("WLCloudScrollX", param_mgr->mCurParams.getCloudScrollX() - 10.0f);
+ childSetValue("WLCloudScrollY", param_mgr->mCurParams.getCloudScrollY() - 10.0f);
+
+ param_mgr->mDistanceMult = cur_params.getVector(param_mgr->mDistanceMult.mName, err);
+ childSetValue("WLDistanceMult", param_mgr->mDistanceMult.x);
+
+ // Tweak extras
+
+ param_mgr->mWLGamma = cur_params.getVector(param_mgr->mWLGamma.mName, err);
+ childSetValue("WLGamma", param_mgr->mWLGamma.x);
+
+ childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness());
+}
+
+void LLFloaterEditSky::setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k)
+{
+ // Set the value, dividing it by <k> first.
+ LLVector4 color_vec = from_ctrl;
+ getChild<LLColorSwatchCtrl>(name)->set(LLColor4(color_vec / k));
+}
+
+// color control callbacks
+void LLFloaterEditSky::onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
+ LLVector4 color_vec(swatch->get().mV);
+
+ // Set intensity to maximum of the RGB values.
+ color_vec.mV[3] = llmax(color_vec.mV[0], llmax(color_vec.mV[1], color_vec.mV[2]));
+
+ // Multiply RGB values by the appropriate factor.
+ F32 k = WL_CLOUD_SLIDER_SCALE;
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ k = WL_SUN_AMBIENT_SLIDER_SCALE;
+ }
+ if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ k = WL_BLUE_HORIZON_DENSITY_SCALE;
+ }
+
+ color_vec *= k; // intensity isn't affected by the multiplication
+
+ // Apply the new RGBI value.
+ *color_ctrl = color_vec;
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditSky::onColorControlRMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ color_ctrl->r = sldr_ctrl->getValueF32();
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ color_ctrl->r *= WL_SUN_AMBIENT_SLIDER_SCALE;
+ }
+ if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ color_ctrl->r *= WL_BLUE_HORIZON_DENSITY_SCALE;
+ }
+
+ // move i if it's the max
+ if (color_ctrl->r >= color_ctrl->g && color_ctrl->r >= color_ctrl->b && color_ctrl->hasSliderName)
+ {
+ color_ctrl->i = color_ctrl->r;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ childSetValue(name, color_ctrl->r / WL_SUN_AMBIENT_SLIDER_SCALE);
+ }
+ else if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ childSetValue(name, color_ctrl->r / WL_BLUE_HORIZON_DENSITY_SCALE);
+ }
+ else
+ {
+ childSetValue(name, color_ctrl->r);
+ }
+ }
+
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditSky::onColorControlGMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ color_ctrl->g = sldr_ctrl->getValueF32();
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ color_ctrl->g *= WL_SUN_AMBIENT_SLIDER_SCALE;
+ }
+ if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ color_ctrl->g *= WL_BLUE_HORIZON_DENSITY_SCALE;
+ }
+
+ // move i if it's the max
+ if (color_ctrl->g >= color_ctrl->r && color_ctrl->g >= color_ctrl->b && color_ctrl->hasSliderName)
+ {
+ color_ctrl->i = color_ctrl->g;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ childSetValue(name, color_ctrl->g / WL_SUN_AMBIENT_SLIDER_SCALE);
+ }
+ else if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ childSetValue(name, color_ctrl->g / WL_BLUE_HORIZON_DENSITY_SCALE);
+ }
+ else
+ {
+ childSetValue(name, color_ctrl->g);
+ }
+ }
+
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditSky::onColorControlBMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ color_ctrl->b = sldr_ctrl->getValueF32();
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ color_ctrl->b *= WL_SUN_AMBIENT_SLIDER_SCALE;
+ }
+ if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ color_ctrl->b *= WL_BLUE_HORIZON_DENSITY_SCALE;
+ }
+
+ // move i if it's the max
+ if (color_ctrl->b >= color_ctrl->r && color_ctrl->b >= color_ctrl->g && color_ctrl->hasSliderName)
+ {
+ color_ctrl->i = color_ctrl->b;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ if (color_ctrl->isSunOrAmbientColor)
+ {
+ childSetValue(name, color_ctrl->b / WL_SUN_AMBIENT_SLIDER_SCALE);
+ }
+ else if (color_ctrl->isBlueHorizonOrDensity)
+ {
+ childSetValue(name, color_ctrl->b / WL_BLUE_HORIZON_DENSITY_SCALE);
+ }
+ else
+ {
+ childSetValue(name, color_ctrl->b);
+ }
+ }
+
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+/// GLOW SPECIFIC CODE
+void LLFloaterEditSky::onGlowRMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ // scaled by 20
+ color_ctrl->r = (2 - sldr_ctrl->getValueF32()) * 20;
+
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+/// \NOTE that we want NEGATIVE (-) B
+void LLFloaterEditSky::onGlowBMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ /// \NOTE that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
+ color_ctrl->b = -sldr_ctrl->getValueF32() * 5;
+
+ color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditSky::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
+
+ floatControl->x = sldr_ctrl->getValueF32() / floatControl->mult;
+
+ floatControl->update(LLWLParamManager::getInstance()->mCurParams);
+ LLWLParamManager::getInstance()->propagateParameters();
+}
+
+
+// Lighting callbacks
+
+// time of day
+void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLMultiSliderCtrl* sun_msldr = getChild<LLMultiSliderCtrl>("WLSunPos");
+ LLSliderCtrl* east_sldr = getChild<LLSliderCtrl>("WLEastAngle");
+ LLTimeCtrl* time_ctrl = getChild<LLTimeCtrl>("WLDayTime");
+ WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
+
+ F32 time24 = sun_msldr->getCurSliderValue();
+ time_ctrl->setTime24(time24); // sync the time ctrl with the new sun position
+
+ // get the two angles
+ LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
+
+ param_mgr->mCurParams.setSunAngle(F_TWO_PI * time24_to_sun_pos(time24));
+ param_mgr->mCurParams.setEastAngle(F_TWO_PI * east_sldr->getValueF32());
+
+ // set the sun vector
+ color_ctrl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
+ cos(param_mgr->mCurParams.getSunAngle());
+ color_ctrl->g = sin(param_mgr->mCurParams.getSunAngle());
+ color_ctrl->b = cos(param_mgr->mCurParams.getEastAngle()) *
+ cos(param_mgr->mCurParams.getSunAngle());
+ color_ctrl->i = 1.f;
+
+ color_ctrl->update(param_mgr->mCurParams);
+ param_mgr->propagateParameters();
+}
+
+void LLFloaterEditSky::onTimeChanged()
+{
+ F32 time24 = getChild<LLTimeCtrl>("WLDayTime")->getTime24();
+ getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
+ onSunMoved(getChild<LLUICtrl>("WLSunPos"), &LLWLParamManager::instance().mLightnorm);
+}
+
+void LLFloaterEditSky::onStarAlphaMoved(LLUICtrl* ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ LLWLParamManager::getInstance()->mCurParams.setStarBrightness(sldr_ctrl->getValueF32());
+}
+
+// Clouds
+void LLFloaterEditSky::onCloudScrollXMoved(LLUICtrl* ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+ // *HACK all cloud scrolling is off by an additive of 10.
+ LLWLParamManager::getInstance()->mCurParams.setCloudScrollX(sldr_ctrl->getValueF32() + 10.0f);
+}
+
+void LLFloaterEditSky::onCloudScrollYMoved(LLUICtrl* ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ // *HACK all cloud scrolling is off by an additive of 10.
+ LLWLParamManager::getInstance()->mCurParams.setCloudScrollY(sldr_ctrl->getValueF32() + 10.0f);
+}
+
+void LLFloaterEditSky::onCloudScrollXToggled(LLUICtrl* ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLCheckBoxCtrl* cb_ctrl = static_cast<LLCheckBoxCtrl*>(ctrl);
+
+ bool lock = cb_ctrl->get();
+ LLWLParamManager::getInstance()->mCurParams.setEnableCloudScrollX(!lock);
+
+ LLSliderCtrl* sldr = getChild<LLSliderCtrl>("WLCloudScrollX");
+
+ if (cb_ctrl->get())
+ {
+ sldr->setEnabled(false);
+ }
+ else
+ {
+ sldr->setEnabled(true);
+ }
+
+}
+
+void LLFloaterEditSky::onCloudScrollYToggled(LLUICtrl* ctrl)
+{
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
+
+ LLCheckBoxCtrl* cb_ctrl = static_cast<LLCheckBoxCtrl*>(ctrl);
+ bool lock = cb_ctrl->get();
+ LLWLParamManager::getInstance()->mCurParams.setEnableCloudScrollY(!lock);
+
+ LLSliderCtrl* sldr = getChild<LLSliderCtrl>("WLCloudScrollY");
+
+ if (cb_ctrl->get())
+ {
+ sldr->setEnabled(false);
+ }
+ else
+ {
+ sldr->setEnabled(true);
+ }
+}
+
+//=================================================================================================
+
+void LLFloaterEditSky::reset()
+{
+ if (isNewPreset())
+ {
+ mSkyPresetNameEditor->setValue(LLSD());
+ mSaveButton->setEnabled(FALSE); // will be enabled as soon as users enters a name
+ }
+ else
+ {
+ refreshSkyPresetsList();
+
+ // Disable controls until a sky preset to edit is selected.
+ enableEditing(false);
+ }
+}
+
+bool LLFloaterEditSky::isNewPreset() const
+{
+ return mKey.asString() == "new";
+}
+
+void LLFloaterEditSky::refreshSkyPresetsList()
+{
+ mSkyPresetCombo->removeall();
+
+ LLWLParamManager::preset_name_list_t region_presets, user_presets, sys_presets;
+ LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
+
+#if 0 // Disable editing region skies until the workflow is clear enough.
+ // Add region presets.
+ std::string region_name = gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown");
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = region_presets.begin(); it != region_presets.end(); ++it)
+ {
+ std::string item_title = *it + " (" + region_name + ")";
+ mSkyPresetCombo->add(item_title, LLWLParamKey(*it, LLEnvKey::SCOPE_REGION).toLLSD());
+ }
+ if (region_presets.size() > 0)
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+#endif
+
+ // Add user presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+ if (user_presets.size() > 0)
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+
+ mSkyPresetCombo->setLabel(getString("combo_label"));
+}
+
+void LLFloaterEditSky::enableEditing(bool enable)
+{
+ // Enable/disable the tab and their contents.
+ LLTabContainer* tab_container = getChild<LLTabContainer>("WindLight Tabs");
+ tab_container->setEnabled(enable);
+ for (S32 i = 0; i < tab_container->getTabCount(); ++i)
+ {
+ tab_container->enableTabButton(i, enable);
+ tab_container->getPanelByIndex(i)->setCtrlsEnabled(enable);
+ }
+
+ // Enable/disable saving.
+ mSaveButton->setEnabled(enable);
+ mMakeDefaultCheckBox->setEnabled(enable);
+}
+
+void LLFloaterEditSky::saveRegionSky()
+{
+ LLWLParamKey key(getSelectedSkyPreset());
+ llassert(key.scope == LLEnvKey::SCOPE_REGION);
+
+ LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << llendl;
+ LLWLParamManager& wl_mgr = LLWLParamManager::instance();
+ wl_mgr.mCurParams.mName = key.name;
+ wl_mgr.setParamSet(key, wl_mgr.mCurParams);
+
+ // *TODO: save to cached region settings.
+ LL_WARNS("Windlight") << "Saving region sky is not fully implemented yet" << LL_ENDL;
+}
+
+LLWLParamKey LLFloaterEditSky::getSelectedSkyPreset()
+{
+ LLWLParamKey key;
+
+ if (mSkyPresetNameEditor->getVisible())
+ {
+ key.name = mSkyPresetNameEditor->getText();
+ key.scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ LLSD combo_val = mSkyPresetCombo->getValue();
+
+ if (!combo_val.isArray()) // manually typed text
+ {
+ key.name = combo_val.asString();
+ key.scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ key.fromLLSD(combo_val);
+ }
+ }
+
+ return key;
+}
+
+void LLFloaterEditSky::onSkyPresetNameEdited()
+{
+ // Disable saving a sky preset having empty name.
+ LLWLParamKey key = getSelectedSkyPreset();
+ mSaveButton->setEnabled(!key.name.empty());
+}
+
+void LLFloaterEditSky::onSkyPresetSelected()
+{
+ LLWLParamKey key = getSelectedSkyPreset();
+ LLWLParamSet sky_params;
+
+ if (!LLWLParamManager::instance().getParamSet(key, sky_params))
+ {
+ // Manually entered string?
+ LL_WARNS("Windlight") << "No sky preset named " << key.toString() << LL_ENDL;
+ return;
+ }
+
+ LLEnvManagerNew::instance().useSkyParams(sky_params.getAll());
+ //syncControls();
+
+ bool can_edit = (key.scope == LLEnvKey::SCOPE_LOCAL || LLEnvManagerNew::canEditRegionSettings());
+ enableEditing(can_edit);
+
+ mMakeDefaultCheckBox->setEnabled(key.scope == LLEnvKey::SCOPE_LOCAL);
+}
+
+bool LLFloaterEditSky::onSaveAnswer(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ // If they choose save, do it. Otherwise, don't do anything
+ if (option == 0)
+ {
+ onSaveConfirmed();
+ }
+
+ return false;
+}
+
+void LLFloaterEditSky::onSaveConfirmed()
+{
+ // Save current params to the selected preset.
+ LLWLParamKey key(getSelectedSkyPreset());
+
+ LL_DEBUGS("Windlight") << "Saving sky preset " << key.name << LL_ENDL;
+ LLWLParamManager& wl_mgr = LLWLParamManager::instance();
+ if (wl_mgr.hasParamSet(key))
+ {
+ wl_mgr.setParamSet(key, wl_mgr.mCurParams);
+ }
+ else
+ {
+ wl_mgr.addParamSet(key, wl_mgr.mCurParams);
+ }
+
+ wl_mgr.savePreset(key);
+
+ // Change preference if requested.
+ if (mMakeDefaultCheckBox->getValue())
+ {
+ LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << llendl;
+ LLEnvManagerNew::instance().setUseSkyPreset(key.name);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterEditSky::onBtnSave()
+{
+ LLWLParamKey selected_sky = getSelectedSkyPreset();
+ LLWLParamManager& wl_mgr = LLWLParamManager::instance();
+
+ if (selected_sky.scope == LLEnvKey::SCOPE_REGION)
+ {
+ saveRegionSky();
+ closeFloater();
+ return;
+ }
+
+ std::string name = selected_sky.name;
+ if (name.empty())
+ {
+ // *TODO: show an alert
+ llwarns << "Empty sky preset name" << llendl;
+ return;
+ }
+
+ // Don't allow overwriting system presets.
+ if (wl_mgr.isSystemPreset(name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ // Save, ask for confirmation for overwriting an existing preset.
+ if (wl_mgr.hasParamSet(selected_sky))
+ {
+ LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterEditSky::onSaveAnswer, this, _1, _2));
+ }
+ else
+ {
+ // new preset, hence no confirmation needed
+ onSaveConfirmed();
+ }
+}
+
+void LLFloaterEditSky::onBtnCancel()
+{
+ closeFloater();
+}
+
+void LLFloaterEditSky::onSkyPresetListChange()
+{
+ LLWLParamKey key = getSelectedSkyPreset(); // preset being edited
+ if (!LLWLParamManager::instance().hasParamSet(key))
+ {
+ // Preset we've been editing doesn't exist anymore. Close the floater.
+ closeFloater(false);
+ }
+ else
+ {
+ // A new preset has been added.
+ // Refresh the presets list, though it may not make sense as the floater is about to be closed.
+ refreshSkyPresetsList();
+ }
+}
+
+void LLFloaterEditSky::onRegionSettingsChange()
+{
+ // If creating a new sky, don't bother.
+ if (isNewPreset())
+ {
+ return;
+ }
+
+ if (getSelectedSkyPreset().scope == LLEnvKey::SCOPE_REGION) // if editing a region sky
+ {
+ // reset the floater to its initial state
+ reset();
+
+ // *TODO: Notify user?
+ }
+ else // editing a local sky
+ {
+ refreshSkyPresetsList();
+ }
+}
+
+void LLFloaterEditSky::onRegionInfoUpdate()
+{
+ bool can_edit = true;
+
+ // If we've selected a region sky preset for editing.
+ if (getSelectedSkyPreset().scope == LLEnvKey::SCOPE_REGION)
+ {
+ // check whether we have the access
+ can_edit = LLEnvManagerNew::canEditRegionSettings();
+ }
+
+ enableEditing(can_edit);
+}
diff --git a/indra/newview/llfloatereditsky.h b/indra/newview/llfloatereditsky.h
new file mode 100644
index 0000000000..a06c4fc5fa
--- /dev/null
+++ b/indra/newview/llfloatereditsky.h
@@ -0,0 +1,113 @@
+/**
+ * @file llfloatereditsky.h
+ * @brief Floater to create or edit a sky preset
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATEREDITSKY_H
+#define LL_LLFLOATEREDITSKY_H
+
+#include "llfloater.h"
+#include "llwlparammanager.h"
+
+class LLButton;
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+
+/**
+ * Floater for creating or editing a sky preset.
+ */
+class LLFloaterEditSky : public LLFloater
+{
+ LOG_CLASS(LLFloaterEditSky);
+
+public:
+ LLFloaterEditSky(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void draw();
+
+private:
+ void initCallbacks(void);
+
+ //-- WL stuff begins ------------------------------------------------------
+
+ void syncControls(); /// sync up sliders with parameters
+
+ void setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k);
+
+ // general purpose callbacks for dealing with color controllers
+ void onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl);
+ void onColorControlRMoved(LLUICtrl* ctrl, void* userdata);
+ void onColorControlGMoved(LLUICtrl* ctrl, void* userdata);
+ void onColorControlBMoved(LLUICtrl* ctrl, void* userdata);
+ void onFloatControlMoved(LLUICtrl* ctrl, void* userdata);
+
+ // lighting callbacks for glow
+ void onGlowRMoved(LLUICtrl* ctrl, void* userdata);
+ void onGlowBMoved(LLUICtrl* ctrl, void* userdata);
+
+ // lighting callbacks for sun
+ void onSunMoved(LLUICtrl* ctrl, void* userdata);
+ void onTimeChanged();
+
+ // for handling when the star slider is moved to adjust the alpha
+ void onStarAlphaMoved(LLUICtrl* ctrl);
+
+ // handle cloud scrolling
+ void onCloudScrollXMoved(LLUICtrl* ctrl);
+ void onCloudScrollYMoved(LLUICtrl* ctrl);
+ void onCloudScrollXToggled(LLUICtrl* ctrl);
+ void onCloudScrollYToggled(LLUICtrl* ctrl);
+
+ //-- WL stuff ends --------------------------------------------------------
+
+ void reset(); /// reset the floater to its initial state
+ bool isNewPreset() const;
+ void refreshSkyPresetsList();
+ void enableEditing(bool enable);
+ void saveRegionSky();
+ LLWLParamKey getSelectedSkyPreset();
+
+ void onSkyPresetNameEdited();
+ void onSkyPresetSelected();
+ bool onSaveAnswer(const LLSD& notification, const LLSD& response);
+ void onSaveConfirmed();
+
+ void onBtnSave();
+ void onBtnCancel();
+
+ void onSkyPresetListChange();
+ void onRegionSettingsChange();
+ void onRegionInfoUpdate();
+
+ LLLineEditor* mSkyPresetNameEditor;
+ LLComboBox* mSkyPresetCombo;
+ LLCheckBoxCtrl* mMakeDefaultCheckBox;
+ LLButton* mSaveButton;
+};
+
+#endif // LL_LLFLOATEREDITSKY_H
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp
new file mode 100644
index 0000000000..64cfc4054f
--- /dev/null
+++ b/indra/newview/llfloatereditwater.cpp
@@ -0,0 +1,772 @@
+/**
+ * @file llfloatereditwater.cpp
+ * @brief Floater to create or edit a water preset
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatereditwater.h"
+
+// libs
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcolorswatch.h"
+#include "llcombobox.h"
+//#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llsliderctrl.h"
+#include "lltexturectrl.h"
+
+// newview
+#include "llagent.h"
+#include "llregioninfomodel.h"
+#include "llviewerregion.h"
+#include "llwaterparammanager.h"
+
+#undef max // Fixes a Windows compiler error
+
+LLFloaterEditWater::LLFloaterEditWater(const LLSD &key)
+: LLFloater(key)
+, mWaterPresetNameEditor(NULL)
+, mWaterPresetCombo(NULL)
+, mMakeDefaultCheckBox(NULL)
+, mSaveButton(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterEditWater::postBuild()
+{
+ mWaterPresetNameEditor = getChild<LLLineEditor>("water_preset_name");
+ mWaterPresetCombo = getChild<LLComboBox>("water_preset_combo");
+ mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
+ mSaveButton = getChild<LLButton>("save");
+
+ initCallbacks();
+ refreshWaterPresetsList();
+ syncControls();
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterEditWater::onOpen(const LLSD& key)
+{
+ bool new_preset = isNewPreset();
+ std::string param = key.asString();
+ std::string floater_title = getString(std::string("title_") + param);
+ std::string hint = getString(std::string("hint_" + param));
+
+ // Update floater title.
+ setTitle(floater_title);
+
+ // Update the hint at the top.
+ getChild<LLUICtrl>("hint")->setValue(hint);
+
+ // Hide the hint to the right of the combo if we're invoked to create a new preset.
+ getChildView("note")->setVisible(!new_preset);
+
+ // Switch between the water presets combobox and preset name input field.
+ mWaterPresetCombo->setVisible(!new_preset);
+ mWaterPresetNameEditor->setVisible(new_preset);
+
+ reset();
+}
+
+// virtual
+void LLFloaterEditWater::onClose(bool app_quitting)
+{
+ if (!app_quitting) // there's no point to change environment if we're quitting
+ {
+ LLEnvManagerNew::instance().usePrefs(); // revert changes made to current environment
+ }
+}
+
+// virtual
+void LLFloaterEditWater::draw()
+{
+ syncControls();
+ LLFloater::draw();
+}
+
+void LLFloaterEditWater::initCallbacks(void)
+{
+ mWaterPresetNameEditor->setKeystrokeCallback(boost::bind(&LLFloaterEditWater::onWaterPresetNameEdited, this), NULL);
+ mWaterPresetCombo->setCommitCallback(boost::bind(&LLFloaterEditWater::onWaterPresetSelected, this));
+ mWaterPresetCombo->setTextEntryCallback(boost::bind(&LLFloaterEditWater::onWaterPresetNameEdited, this));
+
+ mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditWater::onBtnSave, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditWater::onBtnCancel, this));
+
+ LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditWater::onRegionSettingsChange, this));
+ LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEditWater::onWaterPresetListChange, this));
+
+ // Connect to region info updates.
+ LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditWater::onRegionInfoUpdate, this));
+
+ //-------------------------------------------------------------------------
+
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+
+ getChild<LLUICtrl>("WaterFogColor")->setCommitCallback(boost::bind(&LLFloaterEditWater::onWaterFogColorMoved, this, _1, &water_mgr.mFogColor));
+ //getChild<LLUICtrl>("WaterGlow")->setCommitCallback(boost::bind(&LLFloaterEditWater::onColorControlAMoved, this, _1, &water_mgr.mFogColor));
+
+ // fog density
+ getChild<LLUICtrl>("WaterFogDensity")->setCommitCallback(boost::bind(&LLFloaterEditWater::onExpFloatControlMoved, this, _1, &water_mgr.mFogDensity));
+ getChild<LLUICtrl>("WaterUnderWaterFogMod")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mUnderWaterFogMod));
+
+ // blue density
+ getChild<LLUICtrl>("WaterNormalScaleX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlXMoved, this, _1, &water_mgr.mNormalScale));
+ getChild<LLUICtrl>("WaterNormalScaleY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlYMoved, this, _1, &water_mgr.mNormalScale));
+ getChild<LLUICtrl>("WaterNormalScaleZ")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlZMoved, this, _1, &water_mgr.mNormalScale));
+
+ // fresnel
+ getChild<LLUICtrl>("WaterFresnelScale")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mFresnelScale));
+ getChild<LLUICtrl>("WaterFresnelOffset")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mFresnelOffset));
+
+ // scale above/below
+ getChild<LLUICtrl>("WaterScaleAbove")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mScaleAbove));
+ getChild<LLUICtrl>("WaterScaleBelow")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mScaleBelow));
+
+ // blur mult
+ getChild<LLUICtrl>("WaterBlurMult")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &water_mgr.mBlurMultiplier));
+
+ // wave direction
+ getChild<LLUICtrl>("WaterWave1DirX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlXMoved, this, _1, &water_mgr.mWave1Dir));
+ getChild<LLUICtrl>("WaterWave1DirY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlYMoved, this, _1, &water_mgr.mWave1Dir));
+ getChild<LLUICtrl>("WaterWave2DirX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlXMoved, this, _1, &water_mgr.mWave2Dir));
+ getChild<LLUICtrl>("WaterWave2DirY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlYMoved, this, _1, &water_mgr.mWave2Dir));
+
+ LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("WaterNormalMap");
+ texture_ctrl->setDefaultImageAssetID(DEFAULT_WATER_NORMAL);
+ texture_ctrl->setCommitCallback(boost::bind(&LLFloaterEditWater::onNormalMapPicked, this, _1));
+}
+
+//=============================================================================
+
+void LLFloaterEditWater::syncControls()
+{
+ // *TODO: Eliminate slow getChild() calls.
+
+ bool err;
+
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+
+ LLWaterParamSet& current_params = water_mgr.mCurParams;
+
+ // blue horizon
+ water_mgr.mFogColor = current_params.getVector4(water_mgr.mFogColor.mName, err);
+
+ LLColor4 col = water_mgr.getFogColor();
+ //getChild<LLUICtrl>("WaterGlow")->setValue(col.mV[3]);
+ col.mV[3] = 1.0f;
+ getChild<LLColorSwatchCtrl>("WaterFogColor")->set(col);
+
+ // fog and wavelets
+ water_mgr.mFogDensity.mExp =
+ log(current_params.getFloat(water_mgr.mFogDensity.mName, err)) /
+ log(water_mgr.mFogDensity.mBase);
+ water_mgr.setDensitySliderValue(water_mgr.mFogDensity.mExp);
+ getChild<LLUICtrl>("WaterFogDensity")->setValue(water_mgr.mFogDensity.mExp);
+
+ water_mgr.mUnderWaterFogMod.mX =
+ current_params.getFloat(water_mgr.mUnderWaterFogMod.mName, err);
+ getChild<LLUICtrl>("WaterUnderWaterFogMod")->setValue(water_mgr.mUnderWaterFogMod.mX);
+
+ water_mgr.mNormalScale = current_params.getVector3(water_mgr.mNormalScale.mName, err);
+ getChild<LLUICtrl>("WaterNormalScaleX")->setValue(water_mgr.mNormalScale.mX);
+ getChild<LLUICtrl>("WaterNormalScaleY")->setValue(water_mgr.mNormalScale.mY);
+ getChild<LLUICtrl>("WaterNormalScaleZ")->setValue(water_mgr.mNormalScale.mZ);
+
+ // Fresnel
+ water_mgr.mFresnelScale.mX = current_params.getFloat(water_mgr.mFresnelScale.mName, err);
+ getChild<LLUICtrl>("WaterFresnelScale")->setValue(water_mgr.mFresnelScale.mX);
+ water_mgr.mFresnelOffset.mX = current_params.getFloat(water_mgr.mFresnelOffset.mName, err);
+ getChild<LLUICtrl>("WaterFresnelOffset")->setValue(water_mgr.mFresnelOffset.mX);
+
+ // Scale Above/Below
+ water_mgr.mScaleAbove.mX = current_params.getFloat(water_mgr.mScaleAbove.mName, err);
+ getChild<LLUICtrl>("WaterScaleAbove")->setValue(water_mgr.mScaleAbove.mX);
+ water_mgr.mScaleBelow.mX = current_params.getFloat(water_mgr.mScaleBelow.mName, err);
+ getChild<LLUICtrl>("WaterScaleBelow")->setValue(water_mgr.mScaleBelow.mX);
+
+ // blur mult
+ water_mgr.mBlurMultiplier.mX = current_params.getFloat(water_mgr.mBlurMultiplier.mName, err);
+ getChild<LLUICtrl>("WaterBlurMult")->setValue(water_mgr.mBlurMultiplier.mX);
+
+ // wave directions
+ water_mgr.mWave1Dir = current_params.getVector2(water_mgr.mWave1Dir.mName, err);
+ getChild<LLUICtrl>("WaterWave1DirX")->setValue(water_mgr.mWave1Dir.mX);
+ getChild<LLUICtrl>("WaterWave1DirY")->setValue(water_mgr.mWave1Dir.mY);
+
+ water_mgr.mWave2Dir = current_params.getVector2(water_mgr.mWave2Dir.mName, err);
+ getChild<LLUICtrl>("WaterWave2DirX")->setValue(water_mgr.mWave2Dir.mX);
+ getChild<LLUICtrl>("WaterWave2DirY")->setValue(water_mgr.mWave2Dir.mY);
+
+ LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
+ textCtrl->setImageAssetID(water_mgr.getNormalMapID());
+}
+
+// color control callbacks
+void LLFloaterEditWater::onColorControlRMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ color_ctrl->mR = sldr_ctrl->getValueF32();
+
+ // move i if it's the max
+ if (color_ctrl->mR >= color_ctrl->mG
+ && color_ctrl->mR >= color_ctrl->mB
+ && color_ctrl->mHasSliderName)
+ {
+ color_ctrl->mI = color_ctrl->mR;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ getChild<LLUICtrl>(name)->setValue(color_ctrl->mR);
+ }
+
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onColorControlGMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ color_ctrl->mG = sldr_ctrl->getValueF32();
+
+ // move i if it's the max
+ if (color_ctrl->mG >= color_ctrl->mR
+ && color_ctrl->mG >= color_ctrl->mB
+ && color_ctrl->mHasSliderName)
+ {
+ color_ctrl->mI = color_ctrl->mG;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ getChild<LLUICtrl>(name)->setValue(color_ctrl->mG);
+
+ }
+
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onColorControlBMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ color_ctrl->mB = sldr_ctrl->getValueF32();
+
+ // move i if it's the max
+ if (color_ctrl->mB >= color_ctrl->mR
+ && color_ctrl->mB >= color_ctrl->mG
+ && color_ctrl->mHasSliderName)
+ {
+ color_ctrl->mI = color_ctrl->mB;
+ std::string name = color_ctrl->mSliderName;
+ name.append("I");
+
+ getChild<LLUICtrl>(name)->setValue(color_ctrl->mB);
+ }
+
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ color_ctrl->mA = sldr_ctrl->getValueF32();
+
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+
+void LLFloaterEditWater::onColorControlIMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ color_ctrl->mI = sldr_ctrl->getValueF32();
+
+ // only for sliders where we pass a name
+ if (color_ctrl->mHasSliderName)
+ {
+ // set it to the top
+ F32 maxVal = std::max(std::max(color_ctrl->mR, color_ctrl->mG), color_ctrl->mB);
+ F32 iVal;
+
+ iVal = color_ctrl->mI;
+
+ // get the names of the other sliders
+ std::string rName = color_ctrl->mSliderName;
+ rName.append("R");
+ std::string gName = color_ctrl->mSliderName;
+ gName.append("G");
+ std::string bName = color_ctrl->mSliderName;
+ bName.append("B");
+
+ // handle if at 0
+ if (iVal == 0)
+ {
+ color_ctrl->mR = 0;
+ color_ctrl->mG = 0;
+ color_ctrl->mB = 0;
+
+ // if all at the start
+ // set them all to the intensity
+ }
+ else if (maxVal == 0)
+ {
+ color_ctrl->mR = iVal;
+ color_ctrl->mG = iVal;
+ color_ctrl->mB = iVal;
+ }
+ else
+ {
+ // add delta amounts to each
+ F32 delta = (iVal - maxVal) / maxVal;
+ color_ctrl->mR *= (1.0f + delta);
+ color_ctrl->mG *= (1.0f + delta);
+ color_ctrl->mB *= (1.0f + delta);
+ }
+
+ // set the sliders to the new vals
+ getChild<LLUICtrl>(rName)->setValue(color_ctrl->mR);
+ getChild<LLUICtrl>(gName)->setValue(color_ctrl->mG);
+ getChild<LLUICtrl>(bName)->setValue(color_ctrl->mB);
+ }
+
+ // now update the current parameters and send them to shaders
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+// vector control callbacks
+void LLFloaterEditWater::onVector3ControlXMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ vector_ctrl->mX = sldr_ctrl->getValueF32();
+
+ vector_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+// vector control callbacks
+void LLFloaterEditWater::onVector3ControlYMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ vector_ctrl->mY = sldr_ctrl->getValueF32();
+
+ vector_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+// vector control callbacks
+void LLFloaterEditWater::onVector3ControlZMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ vector_ctrl->mZ = sldr_ctrl->getValueF32();
+
+ vector_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+
+// vector control callbacks
+void LLFloaterEditWater::onVector2ControlXMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ vector_ctrl->mX = sldr_ctrl->getValueF32();
+
+ vector_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+// vector control callbacks
+void LLFloaterEditWater::onVector2ControlYMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ vector_ctrl->mY = sldr_ctrl->getValueF32();
+
+ vector_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onFloatControlMoved(LLUICtrl* ctrl, WaterFloatControl* floatControl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ floatControl->mX = sldr_ctrl->getValueF32() / floatControl->mMult;
+
+ floatControl->update(LLWaterParamManager::getInstance()->mCurParams);
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onExpFloatControlMoved(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl)
+{
+ LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
+
+ F32 val = sldr_ctrl->getValueF32();
+ expFloatControl->mExp = val;
+ LLWaterParamManager::getInstance()->setDensitySliderValue(val);
+
+ expFloatControl->update(LLWaterParamManager::getInstance()->mCurParams);
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onWaterFogColorMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl)
+{
+ LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
+ *color_ctrl = swatch->get();
+
+ color_ctrl->update(LLWaterParamManager::getInstance()->mCurParams);
+ LLWaterParamManager::getInstance()->propagateParameters();
+}
+
+void LLFloaterEditWater::onNormalMapPicked(LLUICtrl* ctrl)
+{
+ LLTextureCtrl* textCtrl = static_cast<LLTextureCtrl*>(ctrl);
+ LLUUID textID = textCtrl->getImageAssetID();
+ LLWaterParamManager::getInstance()->setNormalMapID(textID);
+}
+
+//=============================================================================
+
+void LLFloaterEditWater::reset()
+{
+ if (isNewPreset())
+ {
+ mWaterPresetNameEditor->setValue(LLSD());
+ mSaveButton->setEnabled(FALSE); // will be enabled as soon as users enters a name
+ }
+ else
+ {
+ refreshWaterPresetsList();
+
+ // Disable controls until a water preset to edit is selected.
+ enableEditing(false);
+ }
+}
+
+bool LLFloaterEditWater::isNewPreset() const
+{
+ return mKey.asString() == "new";
+}
+
+void LLFloaterEditWater::refreshWaterPresetsList()
+{
+ mWaterPresetCombo->removeall();
+
+#if 0 // *TODO: enable when we have a clear workflow to edit existing region environment
+ // If the region already has water params, add them to the list.
+ const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings();
+ if (region_settings.getWaterParams().size() != 0)
+ {
+ const std::string& region_name = gAgent.getRegion()->getName();
+ mWaterPresetCombo->add(region_name, LLSD().with(0, region_name).with(1, LLEnvKey::SCOPE_REGION));
+ mWaterPresetCombo->addSeparator();
+ }
+#endif
+
+ std::list<std::string> user_presets, system_presets;
+ LLWaterParamManager::instance().getPresetNames(user_presets, system_presets);
+
+ // Add local user presets first.
+ for (std::list<std::string>::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ const std::string& name = *it;
+ mWaterPresetCombo->add(name, LLSD().with(0, name).with(1, LLEnvKey::SCOPE_LOCAL)); // [<name>, <scope>]
+ }
+
+ if (user_presets.size() > 0)
+ {
+ mWaterPresetCombo->addSeparator();
+ }
+
+ // Add local system presets.
+ for (std::list<std::string>::const_iterator it = system_presets.begin(); it != system_presets.end(); ++it)
+ {
+ const std::string& name = *it;
+ mWaterPresetCombo->add(name, LLSD().with(0, name).with(1, LLEnvKey::SCOPE_LOCAL)); // [<name>, <scope>]
+ }
+
+ mWaterPresetCombo->setLabel(getString("combo_label"));
+}
+
+void LLFloaterEditWater::enableEditing(bool enable)
+{
+ // Enable/disable water controls.
+ getChild<LLPanel>("panel_water_preset")->setCtrlsEnabled(enable);
+
+ // Enable/disable saving.
+ mSaveButton->setEnabled(enable);
+ mMakeDefaultCheckBox->setEnabled(enable);
+}
+
+void LLFloaterEditWater::saveRegionWater()
+{
+ llassert(getCurrentScope() == LLEnvKey::SCOPE_REGION); // make sure we're editing region water
+
+ LL_DEBUGS("Windlight") << "Saving region water preset" << llendl;
+
+ //LLWaterParamSet region_water = water_mgr.mCurParams;
+
+ // *TODO: save to cached region settings.
+ LL_WARNS("Windlight") << "Saving region water is not fully implemented yet" << LL_ENDL;
+}
+
+std::string LLFloaterEditWater::getCurrentPresetName() const
+{
+ std::string name;
+ LLEnvKey::EScope scope;
+ getSelectedPreset(name, scope);
+ return name;
+}
+
+LLEnvKey::EScope LLFloaterEditWater::getCurrentScope() const
+{
+ std::string name;
+ LLEnvKey::EScope scope;
+ getSelectedPreset(name, scope);
+ return scope;
+}
+
+void LLFloaterEditWater::getSelectedPreset(std::string& name, LLEnvKey::EScope& scope) const
+{
+ if (mWaterPresetNameEditor->getVisible())
+ {
+ name = mWaterPresetNameEditor->getText();
+ scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ LLSD combo_val = mWaterPresetCombo->getValue();
+
+ if (!combo_val.isArray()) // manually typed text
+ {
+ name = combo_val.asString();
+ scope = LLEnvKey::SCOPE_LOCAL;
+ }
+ else
+ {
+ name = combo_val[0].asString();
+ scope = (LLEnvKey::EScope) combo_val[1].asInteger();
+ }
+ }
+}
+
+void LLFloaterEditWater::onWaterPresetNameEdited()
+{
+ // Disable saving a water preset having empty name.
+ mSaveButton->setEnabled(!getCurrentPresetName().empty());
+}
+
+void LLFloaterEditWater::onWaterPresetSelected()
+{
+ LLWaterParamSet water_params;
+ std::string name;
+ LLEnvKey::EScope scope;
+
+ getSelectedPreset(name, scope);
+
+ // Display selected preset.
+ if (scope == LLEnvKey::SCOPE_REGION)
+ {
+ water_params.setAll(LLEnvManagerNew::instance().getRegionSettings().getWaterParams());
+ }
+ else // local preset selected
+ {
+ if (!LLWaterParamManager::instance().getParamSet(name, water_params))
+ {
+ // Manually entered string?
+ LL_WARNS("Windlight") << "No water preset named " << name << LL_ENDL;
+ return;
+ }
+ }
+
+ LLEnvManagerNew::instance().useWaterParams(water_params.getAll());
+
+ bool can_edit = (scope == LLEnvKey::SCOPE_LOCAL || LLEnvManagerNew::canEditRegionSettings());
+ enableEditing(can_edit);
+
+ mMakeDefaultCheckBox->setEnabled(scope == LLEnvKey::SCOPE_LOCAL);
+}
+
+bool LLFloaterEditWater::onSaveAnswer(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ // If they choose save, do it. Otherwise, don't do anything
+ if (option == 0)
+ {
+ onSaveConfirmed();
+ }
+
+ return false;
+}
+
+void LLFloaterEditWater::onSaveConfirmed()
+{
+ // Save currently displayed water params to the selected preset.
+ std::string name = getCurrentPresetName();
+
+ LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL;
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+ if (water_mgr.hasParamSet(name))
+ {
+ water_mgr.setParamSet(name, water_mgr.mCurParams);
+ }
+ else
+ {
+ water_mgr.addParamSet(name, water_mgr.mCurParams);
+ }
+
+ water_mgr.savePreset(name);
+
+ // Change preference if requested.
+ if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue())
+ {
+ LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << llendl;
+ LLEnvManagerNew::instance().setUseWaterPreset(name);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterEditWater::onBtnSave()
+{
+ LLEnvKey::EScope scope;
+ std::string name;
+ getSelectedPreset(name, scope);
+
+ if (scope == LLEnvKey::SCOPE_REGION)
+ {
+ saveRegionWater();
+ closeFloater();
+ return;
+ }
+
+ if (name.empty())
+ {
+ // *TODO: show an alert
+ llwarns << "Empty water preset name" << llendl;
+ return;
+ }
+
+ // Don't allow overwriting system presets.
+ LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
+ if (water_mgr.isSystemPreset(name))
+ {
+ LLNotificationsUtil::add("WLNoEditDefault");
+ return;
+ }
+
+ // Save, ask for confirmation for overwriting an existing preset.
+ if (water_mgr.hasParamSet(name))
+ {
+ LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterEditWater::onSaveAnswer, this, _1, _2));
+ }
+ else
+ {
+ // new preset, hence no confirmation needed
+ onSaveConfirmed();
+ }
+}
+
+void LLFloaterEditWater::onBtnCancel()
+{
+ closeFloater();
+}
+
+void LLFloaterEditWater::onWaterPresetListChange()
+{
+ std::string name;
+ LLEnvKey::EScope scope;
+ getSelectedPreset(name, scope); // preset being edited
+
+ if (scope == LLEnvKey::SCOPE_LOCAL && !LLWaterParamManager::instance().hasParamSet(name))
+ {
+ // Preset we've been editing doesn't exist anymore. Close the floater.
+ closeFloater(false);
+ }
+ else
+ {
+ // A new preset has been added.
+ // Refresh the presets list, though it may not make sense as the floater is about to be closed.
+ refreshWaterPresetsList();
+ }
+}
+
+void LLFloaterEditWater::onRegionSettingsChange()
+{
+ // If creating a new preset, don't bother.
+ if (isNewPreset())
+ {
+ return;
+ }
+
+ if (getCurrentScope() == LLEnvKey::SCOPE_REGION) // if editing region water
+ {
+ // reset the floater to its initial state
+ reset();
+
+ // *TODO: Notify user?
+ }
+ else // editing a local preset
+ {
+ refreshWaterPresetsList();
+ }
+}
+
+void LLFloaterEditWater::onRegionInfoUpdate()
+{
+ bool can_edit = true;
+
+ // If we've selected the region water for editing.
+ if (getCurrentScope() == LLEnvKey::SCOPE_REGION)
+ {
+ // check whether we have the access
+ can_edit = LLEnvManagerNew::canEditRegionSettings();
+ }
+
+ enableEditing(can_edit);
+}
diff --git a/indra/newview/llfloaterwater.h b/indra/newview/llfloatereditwater.h
index e3db91e80d..2211bca59f 100644
--- a/indra/newview/llfloaterwater.h
+++ b/indra/newview/llfloatereditwater.h
@@ -1,10 +1,10 @@
/**
- * @file llfloaterwindlight.h
- * @brief LLFloaterWater class definition
+ * @file llfloatereditwater.h
+ * @brief Floater to create or edit a water preset
*
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2011, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,17 +24,16 @@
* $/LicenseInfo$
*/
-/*
- * Menu for adjusting the atmospheric settings of the world
- */
-
-#ifndef LL_LLFLOATER_WATER_H
-#define LL_LLFLOATER_WATER_H
+#ifndef LL_LLFLOATEREDITWATER_H
+#define LL_LLFLOATEREDITWATER_H
#include "llfloater.h"
+#include "llenvmanager.h" // for LLEnvKey
-#include <vector>
-#include "llwlparamset.h"
+class LLButton;
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
struct WaterVector2Control;
struct WaterVector3Control;
@@ -42,66 +41,75 @@ struct WaterColorControl;
struct WaterFloatControl;
struct WaterExpFloatControl;
-/// Menuing system for all of windlight's functionality
-class LLFloaterWater : public LLFloater
+class LLFloaterEditWater : public LLFloater
{
+ LOG_CLASS(LLFloaterEditWater);
+
public:
+ LLFloaterEditWater(const LLSD &key);
- LLFloaterWater(const LLSD& key);
- virtual ~LLFloaterWater();
/*virtual*/ BOOL postBuild();
- /// initialize all
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void draw();
+
+private:
void initCallbacks(void);
- bool newPromptCallback(const LLSD& notification, const LLSD& response);
+ //-- WL stuff begins ------------------------------------------------------
- /// general purpose callbacks for dealing with color controllers
- void onColorControlRMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
- void onColorControlGMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
- void onColorControlBMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
- void onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
- void onColorControlIMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
+ void syncControls(); /// sync up sliders with parameters
- void onVector3ControlXMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl);
- void onVector3ControlYMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl);
- void onVector3ControlZMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl);
+ // general purpose callbacks for dealing with color controllers
+ void onColorControlRMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
+ void onColorControlGMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
+ void onColorControlBMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
+ void onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
+ void onColorControlIMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
+
+ void onVector3ControlXMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
+ void onVector3ControlYMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
+ void onVector3ControlZMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
+
+ void onVector2ControlXMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl);
+ void onVector2ControlYMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl);
- void onVector2ControlXMoved(LLUICtrl* ctrl, WaterVector2Control* vectorControl);
- void onVector2ControlYMoved(LLUICtrl* ctrl, WaterVector2Control* vectorControl);
-
void onFloatControlMoved(LLUICtrl* ctrl, WaterFloatControl* floatControl);
void onExpFloatControlMoved(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl);
- void onWaterFogColorMoved(LLUICtrl* ctrl, WaterColorControl* colorControl);
-
- /// handle if they choose a new normal map
- void onNormalMapPicked(LLUICtrl* ctrl);
+ void onWaterFogColorMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
- /// when user hits the load preset button
- void onNewPreset();
+ void onNormalMapPicked(LLUICtrl* ctrl); /// handle if they choose a new normal map
- /// when user hits the save preset button
- void onSavePreset();
+ //-- WL stuff ends --------------------------------------------------------
- /// prompts a user when overwriting a preset
- bool saveAlertCallback(const LLSD& notification, const LLSD& response);
+ void reset();
+ bool isNewPreset() const;
+ void refreshWaterPresetsList();
+ void enableEditing(bool enable);
+ void saveRegionWater();
- /// when user hits the save preset button
- void onDeletePreset();
+ std::string getCurrentPresetName() const;
+ LLEnvKey::EScope getCurrentScope() const;
+ void getSelectedPreset(std::string& name, LLEnvKey::EScope& scope) const;
- /// prompts a user when overwriting a preset
- bool deleteAlertCallback(const LLSD& notification, const LLSD& response);
+ void onWaterPresetNameEdited();
+ void onWaterPresetSelected();
+ bool onSaveAnswer(const LLSD& notification, const LLSD& response);
+ void onSaveConfirmed();
- /// what to do when you change the preset name
- void onChangePresetName(LLUICtrl* ctrl);
+ void onBtnSave();
+ void onBtnCancel();
- /// sync up sliders with parameters
- void syncMenu();
+ void onWaterPresetListChange();
+ void onRegionSettingsChange();
+ void onRegionInfoUpdate();
-private:
- static std::set<std::string> sDefaultPresets;
+ LLLineEditor* mWaterPresetNameEditor;
+ LLComboBox* mWaterPresetCombo;
+ LLCheckBoxCtrl* mMakeDefaultCheckBox;
+ LLButton* mSaveButton;
};
-
-#endif
+#endif // LL_LLFLOATEREDITWATER_H
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp
new file mode 100644
index 0000000000..4dbc8cdee0
--- /dev/null
+++ b/indra/newview/llfloaterenvironmentsettings.cpp
@@ -0,0 +1,282 @@
+/**
+ * @file llfloaterenvironmentsettings.cpp
+ * @brief LLFloaterEnvironmentSettings class definition
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterenvironmentsettings.h"
+
+#include "llcombobox.h"
+#include "llradiogroup.h"
+
+#include "lldaycyclemanager.h"
+#include "llenvmanager.h"
+#include "llwaterparammanager.h"
+#include "llwlparamset.h"
+#include "llwlparammanager.h"
+
+LLFloaterEnvironmentSettings::LLFloaterEnvironmentSettings(const LLSD &key)
+: LLFloater(key)
+ ,mRegionSettingsRadioGroup(NULL)
+ ,mDayCycleSettingsRadioGroup(NULL)
+ ,mWaterPresetCombo(NULL)
+ ,mSkyPresetCombo(NULL)
+ ,mDayCyclePresetCombo(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterEnvironmentSettings::postBuild()
+{
+ mRegionSettingsRadioGroup = getChild<LLRadioGroup>("region_settings_radio_group");
+ mRegionSettingsRadioGroup->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSwitchRegionSettings, this));
+
+ mDayCycleSettingsRadioGroup = getChild<LLRadioGroup>("sky_dayc_settings_radio_group");
+ mDayCycleSettingsRadioGroup->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSwitchDayCycle, this));
+
+ mWaterPresetCombo = getChild<LLComboBox>("water_settings_preset_combo");
+ mWaterPresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectWaterPreset, this));
+
+ mSkyPresetCombo = getChild<LLComboBox>("sky_settings_preset_combo");
+ mSkyPresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectSkyPreset, this));
+
+ mDayCyclePresetCombo = getChild<LLComboBox>("dayc_settings_preset_combo");
+ mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectDayCyclePreset, this));
+
+ childSetCommitCallback("ok_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnOK, this), NULL);
+ getChild<LLUICtrl>("ok_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance()));
+ childSetCommitCallback("cancel_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnCancel, this), NULL);
+ getChild<LLUICtrl>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance()));
+
+ setCloseCallback(boost::bind(&LLFloaterEnvironmentSettings::cancel, this));
+
+ LLEnvManagerNew::instance().setPreferencesChangeCallback(boost::bind(&LLFloaterEnvironmentSettings::refresh, this));
+ LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterEnvironmentSettings::populateDayCyclePresetsList, this));
+ LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEnvironmentSettings::populateSkyPresetsList, this));
+ LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEnvironmentSettings::populateWaterPresetsList, this));
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterEnvironmentSettings::onOpen(const LLSD& key)
+{
+ refresh();
+}
+
+void LLFloaterEnvironmentSettings::onSwitchRegionSettings()
+{
+ getChild<LLView>("user_environment_settings")->setEnabled(mRegionSettingsRadioGroup->getSelectedIndex() != 0);
+
+ apply();
+}
+
+void LLFloaterEnvironmentSettings::onSwitchDayCycle()
+{
+ bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+
+ mSkyPresetCombo->setEnabled(is_fixed_sky);
+ mDayCyclePresetCombo->setEnabled(!is_fixed_sky);
+
+ apply();
+}
+
+void LLFloaterEnvironmentSettings::onSelectWaterPreset()
+{
+ apply();
+}
+
+void LLFloaterEnvironmentSettings::onSelectSkyPreset()
+{
+ apply();
+}
+
+void LLFloaterEnvironmentSettings::onSelectDayCyclePreset()
+{
+ apply();
+}
+
+void LLFloaterEnvironmentSettings::onBtnOK()
+{
+ // Save and apply new user preferences.
+ bool use_region_settings = mRegionSettingsRadioGroup->getSelectedIndex() == 0;
+ bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+ std::string water_preset = mWaterPresetCombo->getValue().asString();
+ std::string sky_preset = mSkyPresetCombo->getValue().asString();
+ std::string day_cycle = mDayCyclePresetCombo->getValue().asString();
+
+ LLEnvManagerNew::instance().setUserPrefs(
+ water_preset,
+ sky_preset,
+ day_cycle,
+ use_fixed_sky,
+ use_region_settings);
+
+ // *TODO: This triggers applying user preferences again, which is suboptimal.
+ closeFloater();
+}
+
+void LLFloaterEnvironmentSettings::onBtnCancel()
+{
+ closeFloater();
+}
+
+void LLFloaterEnvironmentSettings::refresh()
+{
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+
+ bool use_region_settings = env_mgr.getUseRegionSettings();
+ bool use_fixed_sky = env_mgr.getUseFixedSky();
+
+ // Set up radio buttons according to user preferences.
+ mRegionSettingsRadioGroup->setSelectedIndex(use_region_settings ? 0 : 1);
+ mDayCycleSettingsRadioGroup->setSelectedIndex(use_fixed_sky ? 0 : 1);
+
+ // Populate the combo boxes with appropriate lists of available presets.
+ populateWaterPresetsList();
+ populateSkyPresetsList();
+ populateDayCyclePresetsList();
+
+ // Enable/disable other controls based on user preferences.
+ getChild<LLView>("user_environment_settings")->setEnabled(!use_region_settings);
+ mSkyPresetCombo->setEnabled(use_fixed_sky);
+ mDayCyclePresetCombo->setEnabled(!use_fixed_sky);
+
+ // Select the current presets in combo boxes.
+ mWaterPresetCombo->selectByValue(env_mgr.getWaterPresetName());
+ mSkyPresetCombo->selectByValue(env_mgr.getSkyPresetName());
+ mDayCyclePresetCombo->selectByValue(env_mgr.getDayCycleName());
+}
+
+void LLFloaterEnvironmentSettings::apply()
+{
+ // Update environment with the user choice.
+ bool use_region_settings = mRegionSettingsRadioGroup->getSelectedIndex() == 0;
+ bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+ std::string water_preset = mWaterPresetCombo->getValue().asString();
+ std::string sky_preset = mSkyPresetCombo->getValue().asString();
+ std::string day_cycle = mDayCyclePresetCombo->getValue().asString();
+
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ if (use_region_settings)
+ {
+ env_mgr.useRegionSettings();
+ }
+ else
+ {
+ if (use_fixed_sky)
+ {
+ env_mgr.useSkyPreset(sky_preset);
+ }
+ else
+ {
+ env_mgr.useDayCycle(day_cycle, LLEnvKey::SCOPE_LOCAL);
+ }
+
+ env_mgr.useWaterPreset(water_preset);
+ }
+}
+
+void LLFloaterEnvironmentSettings::cancel()
+{
+ // Revert environment to user preferences.
+ LLEnvManagerNew::instance().usePrefs();
+}
+
+void LLFloaterEnvironmentSettings::populateWaterPresetsList()
+{
+ mWaterPresetCombo->removeall();
+
+ std::list<std::string> user_presets, system_presets;
+ LLWaterParamManager::instance().getPresetNames(user_presets, system_presets);
+
+ // Add user presets first.
+ for (std::list<std::string>::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mWaterPresetCombo->add(*it);
+ }
+
+ if (user_presets.size() > 0)
+ {
+ mWaterPresetCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (std::list<std::string>::const_iterator it = system_presets.begin(); it != system_presets.end(); ++it)
+ {
+ mWaterPresetCombo->add(*it);
+ }
+}
+
+void LLFloaterEnvironmentSettings::populateSkyPresetsList()
+{
+ mSkyPresetCombo->removeall();
+
+ LLWLParamManager::preset_name_list_t region_presets; // unused as we don't list region presets here
+ LLWLParamManager::preset_name_list_t user_presets, sys_presets;
+ LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
+
+ // Add user presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it);
+ }
+
+ if (!user_presets.empty())
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it);
+ }
+}
+
+void LLFloaterEnvironmentSettings::populateDayCyclePresetsList()
+{
+ mDayCyclePresetCombo->removeall();
+
+ LLDayCycleManager::preset_name_list_t user_days, sys_days;
+ LLDayCycleManager::instance().getPresetNames(user_days, sys_days);
+
+ // Add user days.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
+ {
+ mDayCyclePresetCombo->add(*it);
+ }
+
+ if (user_days.size() > 0)
+ {
+ mDayCyclePresetCombo->addSeparator();
+ }
+
+ // Add system days.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it)
+ {
+ mDayCyclePresetCombo->add(*it);
+ }
+}
diff --git a/indra/newview/llfloaterenvironmentsettings.h b/indra/newview/llfloaterenvironmentsettings.h
new file mode 100644
index 0000000000..0ab458a0f6
--- /dev/null
+++ b/indra/newview/llfloaterenvironmentsettings.h
@@ -0,0 +1,71 @@
+/**
+ * @file llfloaterenvironmentsettings.h
+ * @brief LLFloaterEnvironmentSettings class definition
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERENVIRONMENTSETTINGS_H
+#define LL_LLFLOATERENVIRONMENTSETTINGS_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+class LLRadioGroup;
+
+class LLFloaterEnvironmentSettings : public LLFloater
+{
+ LOG_CLASS(LLFloaterEnvironmentSettings);
+
+public:
+ LLFloaterEnvironmentSettings(const LLSD &key);
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ void onSwitchRegionSettings();
+ void onSwitchDayCycle();
+
+ void onSelectWaterPreset();
+ void onSelectSkyPreset();
+ void onSelectDayCyclePreset();
+
+ void onBtnOK();
+ void onBtnCancel();
+
+ void refresh(); /// update controls with user prefs
+ void apply();
+ void cancel();
+
+ void populateWaterPresetsList();
+ void populateSkyPresetsList();
+ void populateDayCyclePresetsList();
+
+ LLRadioGroup* mRegionSettingsRadioGroup;
+ LLRadioGroup* mDayCycleSettingsRadioGroup;
+
+ LLComboBox* mWaterPresetCombo;
+ LLComboBox* mSkyPresetCombo;
+ LLComboBox* mDayCyclePresetCombo;
+};
+
+#endif // LL_LLFLOATERENVIRONMENTSETTINGS_H
diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp
deleted file mode 100644
index fcaef1f34b..0000000000
--- a/indra/newview/llfloaterenvsettings.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * @file llfloaterenvsettings.cpp
- * @brief LLFloaterEnvSettings class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterenvsettings.h"
-
-#include "llfloaterreg.h"
-#include "llfloaterwindlight.h"
-#include "llfloaterwater.h"
-#include "lluictrlfactory.h"
-#include "llsliderctrl.h"
-#include "llcombobox.h"
-#include "llcolorswatch.h"
-#include "llwlanimator.h"
-
-#include "llwlparamset.h"
-#include "llwlparammanager.h"
-#include "llwaterparammanager.h"
-#include "llmath.h"
-#include "llviewerwindow.h"
-
-#include "pipeline.h"
-
-#include <sstream>
-
-LLFloaterEnvSettings::LLFloaterEnvSettings(const LLSD& key)
- : LLFloater(key)
-{
-}
-// virtual
-LLFloaterEnvSettings::~LLFloaterEnvSettings()
-{
-}
-// virtual
-BOOL LLFloaterEnvSettings::postBuild()
-{
- // load it up
- initCallbacks();
- syncMenu();
- return TRUE;
-}
-
-void LLFloaterEnvSettings::initCallbacks(void)
-{
- // our three sliders
- getChild<LLUICtrl>("EnvTimeSlider")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onChangeDayTime, this, _1));
- getChild<LLUICtrl>("EnvCloudSlider")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onChangeCloudCoverage, this, _1));
- getChild<LLUICtrl>("EnvWaterFogSlider")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onChangeWaterFogDensity, this, _1, &LLWaterParamManager::instance()->mFogDensity));
-
- // color picker
- getChild<LLUICtrl>("EnvWaterColor")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onChangeWaterColor, this, _1, &LLWaterParamManager::instance()->mFogColor));
-
- // WL Top
- getChild<LLUICtrl>("EnvAdvancedSkyButton")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onOpenAdvancedSky, this));
- getChild<LLUICtrl>("EnvAdvancedWaterButton")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onOpenAdvancedWater, this));
- getChild<LLUICtrl>("EnvUseEstateTimeButton")->setCommitCallback(boost::bind(&LLFloaterEnvSettings::onUseEstateTime, this));
-}
-
-// menu maintenance functions
-
-void LLFloaterEnvSettings::syncMenu()
-{
- LLSliderCtrl* sldr;
- sldr = getChild<LLSliderCtrl>("EnvTimeSlider");
-
- // sync the clock
- F32 val = (F32)LLWLParamManager::instance()->mAnimator.getDayTime();
- std::string timeStr = timeToString(val);
-
- LLTextBox* textBox;
- textBox = getChild<LLTextBox>("EnvTimeText");
-
- textBox->setValue(timeStr);
-
- // sync time slider which starts at 6 AM
- val -= 0.25;
- if(val < 0)
- {
- val++;
- }
- sldr->setValue(val);
-
- // sync cloud coverage
- bool err;
- getChild<LLUICtrl>("EnvCloudSlider")->setValue(LLWLParamManager::instance()->mCurParams.getFloat("cloud_shadow", err));
-
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
- // sync water params
- LLColor4 col = param_mgr->getFogColor();
- LLColorSwatchCtrl* colCtrl = getChild<LLColorSwatchCtrl>("EnvWaterColor");
- col.mV[3] = 1.0f;
- colCtrl->set(col);
-
- getChild<LLUICtrl>("EnvWaterFogSlider")->setValue(param_mgr->mFogDensity.mExp);
- param_mgr->setDensitySliderValue(param_mgr->mFogDensity.mExp);
-
- // turn off Use Estate Time button if it's already being used
- if(LLWLParamManager::instance()->mAnimator.mUseLindenTime)
- {
- getChildView("EnvUseEstateTimeButton")->setEnabled(FALSE);
- } else {
- getChildView("EnvUseEstateTimeButton")->setEnabled(TRUE);
- }
-
- if(!gPipeline.canUseVertexShaders())
- {
- getChildView("EnvWaterColor")->setEnabled(FALSE);
- getChildView("EnvWaterColorText")->setEnabled(FALSE);
- //getChildView("EnvAdvancedWaterButton")->setEnabled(FALSE);
- }
- else
- {
- getChildView("EnvWaterColor")->setEnabled(TRUE);
- getChildView("EnvWaterColorText")->setEnabled(TRUE);
- //getChildView("EnvAdvancedWaterButton")->setEnabled(TRUE);
- }
-
- // only allow access to these if they are using windlight
- if(!gPipeline.canUseWindLightShaders())
- {
-
- getChildView("EnvCloudSlider")->setEnabled(FALSE);
- getChildView("EnvCloudText")->setEnabled(FALSE);
- //getChildView("EnvAdvancedSkyButton")->setEnabled(FALSE);
- }
- else
- {
- getChildView("EnvCloudSlider")->setEnabled(TRUE);
- getChildView("EnvCloudText")->setEnabled(TRUE);
- //getChildView("EnvAdvancedSkyButton")->setEnabled(TRUE);
- }
-}
-
-void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
-
- // deactivate animator
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- F32 val = sldr->getValueF32() + 0.25f;
- if(val > 1.0)
- {
- val--;
- }
-
- LLWLParamManager::instance()->mAnimator.setDayTime((F64)val);
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
-}
-
-void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
-
- // deactivate animator
- //LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- //LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- F32 val = sldr->getValueF32();
- LLWLParamManager::instance()->mCurParams.set("cloud_shadow", val);
-}
-
-void LLFloaterEnvSettings::onChangeWaterFogDensity(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl)
-{
- LLSliderCtrl* sldr;
- sldr = getChild<LLSliderCtrl>("EnvWaterFogSlider");
-
- F32 val = sldr->getValueF32();
- expFloatControl->mExp = val;
- LLWaterParamManager::instance()->setDensitySliderValue(val);
-
- expFloatControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterEnvSettings::onChangeWaterColor(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
- *colorControl = swatch->get();
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-
-void LLFloaterEnvSettings::onOpenAdvancedSky()
-{
- LLFloaterReg::showInstance("env_windlight");
-}
-
-void LLFloaterEnvSettings::onOpenAdvancedWater()
-{
- LLFloaterReg::showInstance("env_water");
-}
-
-
-void LLFloaterEnvSettings::onUseEstateTime()
-{
- LLFloaterWindLight* wl = LLFloaterReg::findTypedInstance<LLFloaterWindLight>("env_windlight");
- if(wl)
- {
- LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
- box->selectByValue("");
- }
-
- LLWLParamManager::instance()->mAnimator.mIsRunning = true;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
-}
-
-std::string LLFloaterEnvSettings::timeToString(F32 curTime)
-{
- S32 hours;
- S32 min;
-
- // get hours and minutes
- hours = (S32) (24.0 * curTime);
- curTime -= ((F32) hours / 24.0f);
- min = llround(24.0f * 60.0f * curTime);
-
- // handle case where it's 60
- if(min == 60)
- {
- hours++;
- min = 0;
- }
-
- std::string newTime = getString("timeStr");
- struct tm * timeT;
- time_t secT = time(0);
- timeT = gmtime (&secT);
-
- timeT->tm_hour = hours;
- timeT->tm_min = min;
- secT = mktime (timeT);
- secT -= LLStringOps::getLocalTimeOffset ();
-
- LLSD substitution;
- substitution["datetime"] = (S32) secT;
-
- LLStringUtil::format (newTime, substitution);
- return newTime;
-}
diff --git a/indra/newview/llfloaterenvsettings.h b/indra/newview/llfloaterenvsettings.h
deleted file mode 100644
index a6280cfb97..0000000000
--- a/indra/newview/llfloaterenvsettings.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * @file llfloaterskysettings.h
- * @brief LLFloaterEnvSettings class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/*
- * Simple menu for adjusting the atmospheric settings of the world
- */
-
-#ifndef LL_LLFLOATERENVSETTINGS_H
-#define LL_LLFLOATERENVSETTINGS_H
-
-#include "llfloater.h"
-
-struct WaterColorControl;
-struct WaterExpFloatControl;
-
-/// Menuing system for all of windlight's functionality
-class LLFloaterEnvSettings : public LLFloater
-{
-public:
-
- LLFloaterEnvSettings(const LLSD& key);
- /*virtual*/ ~LLFloaterEnvSettings();
- /*virtual*/ BOOL postBuild();
- /// initialize all the callbacks for the menu
- void initCallbacks(void);
-
- /// handle if time of day is changed
- void onChangeDayTime(LLUICtrl* ctrl);
-
- /// handle if cloud coverage is changed
- void onChangeCloudCoverage(LLUICtrl* ctrl);
-
- /// handle change in water fog density
- void onChangeWaterFogDensity(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl);
-
- /// handle change in water fog color
- void onChangeWaterColor(LLUICtrl* ctrl, WaterColorControl* colorControl);
-
- /// open the advanced sky settings menu
- void onOpenAdvancedSky();
-
- /// open the advanced water settings menu
- void onOpenAdvancedWater();
-
- /// sync time with the server
- void onUseEstateTime();
-
- //// menu management
-
- /// sync up sliders with parameters
- void syncMenu();
-
- /// convert the present time to a digital clock time
- std::string timeToString(F32 curTime);
-
-private:
-};
-
-
-#endif
diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp
index 627defd006..3012638d44 100644
--- a/indra/newview/llfloaterhelpbrowser.cpp
+++ b/indra/newview/llfloaterhelpbrowser.cpp
@@ -71,9 +71,18 @@ void LLFloaterHelpBrowser::buildURLHistory()
}
}
+void LLFloaterHelpBrowser::onOpen(const LLSD& key)
+{
+ gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+}
+
//virtual
void LLFloaterHelpBrowser::onClose(bool app_quitting)
{
+ if (!app_quitting)
+ {
+ gSavedSettings.setBOOL("HelpFloaterOpen", FALSE);
+ }
// really really destroy the help browser when it's closed, it'll be recreated.
destroy(); // really destroy this dialog on closure, it's relatively heavyweight.
}
diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h
index 2731c81b9c..afe0f4df69 100644
--- a/indra/newview/llfloaterhelpbrowser.h
+++ b/indra/newview/llfloaterhelpbrowser.h
@@ -42,6 +42,7 @@ class LLFloaterHelpBrowser :
/*virtual*/ BOOL postBuild();
/*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void onOpen(const LLSD& key);
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 0d0c1f594d..9b7593ce61 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1818,6 +1818,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mClearBtn(NULL),
mMatureCtrl(NULL),
mPushRestrictionCtrl(NULL),
+ mSeeAvatarsCtrl(NULL),
mParcel(parcel)
{
}
@@ -1860,6 +1861,9 @@ BOOL LLPanelLandOptions::postBuild()
mPushRestrictionCtrl = getChild<LLCheckBoxCtrl>( "PushRestrictCheck");
childSetCommitCallback("PushRestrictCheck", onCommitAny, this);
+ mSeeAvatarsCtrl = getChild<LLCheckBoxCtrl>( "SeeAvatarsCheck");
+ childSetCommitCallback("SeeAvatarsCheck", onCommitAny, this);
+
mCheckShowDirectory = getChild<LLCheckBoxCtrl>( "ShowDirectoryCheck");
childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this);
@@ -1952,7 +1956,7 @@ void LLPanelLandOptions::refresh()
mCheckEditLand ->set(FALSE);
mCheckEditLand ->setEnabled(FALSE);
-
+
mCheckSafe ->set(FALSE);
mCheckSafe ->setEnabled(FALSE);
@@ -1968,6 +1972,9 @@ void LLPanelLandOptions::refresh()
mPushRestrictionCtrl->set(FALSE);
mPushRestrictionCtrl->setEnabled(FALSE);
+ mSeeAvatarsCtrl->set(TRUE);
+ mSeeAvatarsCtrl->setEnabled(FALSE);
+
mLandingTypeCombo->setCurrentByIndex(0);
mLandingTypeCombo->setEnabled(FALSE);
@@ -2001,7 +2008,7 @@ void LLPanelLandOptions::refresh()
BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT);
mCheckEditLand ->set( parcel->getAllowTerraform() );
mCheckEditLand ->setEnabled( can_change_terraform );
-
+
mCheckSafe ->set( !parcel->getAllowDamage() );
mCheckSafe ->setEnabled( can_change_options );
@@ -2027,6 +2034,10 @@ void LLPanelLandOptions::refresh()
mPushRestrictionCtrl->setEnabled(can_change_options);
}
+ mSeeAvatarsCtrl->set(parcel->getSeeAVs());
+ mSeeAvatarsCtrl->setLabel(getString("see_avs_text"));
+ mSeeAvatarsCtrl->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData());
+
BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
GP_LAND_SET_LANDING_POINT);
mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType());
@@ -2231,6 +2242,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL allow_publish = FALSE;
BOOL mature_publish = self->mMatureCtrl->get();
BOOL push_restriction = self->mPushRestrictionCtrl->get();
+ BOOL see_avs = self->mSeeAvatarsCtrl->get();
BOOL show_directory = self->mCheckShowDirectory->get();
// we have to get the index from a lookup, not from the position in the dropdown!
S32 category_index = LLParcel::getCategoryFromString(self->mCategoryCombo->getSelectedValue());
@@ -2264,6 +2276,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
parcel->setCategory((LLParcel::ECategory)category_index);
parcel->setLandingType((LLParcel::ELandingType)landing_type_index);
parcel->setSnapshotID(snapshot_id);
+ parcel->setSeeAVs(see_avs);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 8a70fa24d8..6fceca1acd 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -348,6 +348,7 @@ private:
LLCheckBoxCtrl *mMatureCtrl;
LLCheckBoxCtrl *mPushRestrictionCtrl;
+ LLCheckBoxCtrl *mSeeAvatarsCtrl;
LLSafeHandle<LLParcelSelection>& mParcel;
};
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 9dd5269a6b..ab6753b4be 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -178,6 +178,80 @@ std::string lod_label_name[NUM_LOD+1] =
"I went off the end of the lod_label_name array. Me so smart."
};
+
+#define LL_DEGENERACY_TOLERANCE 1e-7f
+
+inline F32 dot3fpu(const LLVector4a& a, const LLVector4a& b)
+{
+ volatile F32 p0 = a[0] * b[0];
+ volatile F32 p1 = a[1] * b[1];
+ volatile F32 p2 = a[2] * b[2];
+ return p0 + p1 + p2;
+}
+
+bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a& c, F32 tolerance = LL_DEGENERACY_TOLERANCE)
+{
+ // small area check
+ {
+ LLVector4a edge1; edge1.setSub( a, b );
+ LLVector4a edge2; edge2.setSub( a, c );
+ //////////////////////////////////////////////////////////////////////////
+ /// Linden Modified
+ //////////////////////////////////////////////////////////////////////////
+
+ // If no one edge is more than 10x longer than any other edge, we weaken
+ // the tolerance by a factor of 1e-4f.
+
+ LLVector4a edge3; edge3.setSub( c, b );
+ const F32 len1sq = edge1.dot3(edge1).getF32();
+ const F32 len2sq = edge2.dot3(edge2).getF32();
+ const F32 len3sq = edge3.dot3(edge3).getF32();
+ bool abOK = (len1sq <= 100.f * len2sq) && (len1sq <= 100.f * len3sq);
+ bool acOK = (len2sq <= 100.f * len1sq) && (len1sq <= 100.f * len3sq);
+ bool cbOK = (len3sq <= 100.f * len1sq) && (len1sq <= 100.f * len2sq);
+ if ( abOK && acOK && cbOK )
+ {
+ tolerance *= 1e-4f;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ /// End Modified
+ //////////////////////////////////////////////////////////////////////////
+
+ LLVector4a cross; cross.setCross3( edge1, edge2 );
+
+ LLVector4a edge1b; edge1b.setSub( b, a );
+ LLVector4a edge2b; edge2b.setSub( b, c );
+ LLVector4a crossb; crossb.setCross3( edge1b, edge2b );
+
+ if ( ( cross.dot3(cross).getF32() < tolerance ) || ( crossb.dot3(crossb).getF32() < tolerance ))
+ {
+ return true;
+ }
+ }
+
+ // point triangle distance check
+ {
+ LLVector4a Q; Q.setSub(a, b);
+ LLVector4a R; R.setSub(c, b);
+
+ const F32 QQ = dot3fpu(Q, Q);
+ const F32 RR = dot3fpu(R, R);
+ const F32 QR = dot3fpu(R, Q);
+
+ volatile F32 QQRR = QQ * RR;
+ volatile F32 QRQR = QR * QR;
+ F32 Det = (QQRR - QRQR);
+
+ if( Det == 0.0f )
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool validate_face(const LLVolumeFace& face)
{
for (U32 i = 0; i < face.mNumIndices; ++i)
@@ -189,6 +263,31 @@ bool validate_face(const LLVolumeFace& face)
}
}
+ if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0)
+ {
+ llwarns << "Face has invalid number of indices." << llendl;
+ return false;
+ }
+
+ /*const LLVector4a scale(0.5f);
+
+ for (U32 i = 0; i < face.mNumIndices; i+=3)
+ {
+ U16 idx1 = face.mIndices[i];
+ U16 idx2 = face.mIndices[i+1];
+ U16 idx3 = face.mIndices[i+2];
+
+ LLVector4a v1; v1.setMul(face.mPositions[idx1], scale);
+ LLVector4a v2; v2.setMul(face.mPositions[idx2], scale);
+ LLVector4a v3; v3.setMul(face.mPositions[idx3], scale);
+
+ if (ll_is_degenerate(v1,v2,v3))
+ {
+ llwarns << "Degenerate face found!" << llendl;
+ return false;
+ }
+ }*/
+
return true;
}
@@ -314,15 +413,17 @@ BOOL LLFloaterModelPreview::postBuild()
childSetCommitCallback("pelvis_offset", onPelvisOffsetCommit, this);
childSetCommitCallback("lod_file_or_limit", refresh, this);
- childSetCommitCallback("physics_load_radio", refresh, this);
+ childSetCommitCallback("physics_load_radio", onPhysicsLoadRadioCommit, this);
//childSetCommitCallback("physics_optimize", refresh, this);
//childSetCommitCallback("physics_use_hull", refresh, this);
childDisable("upload_skin");
childDisable("upload_joints");
-
+
childDisable("ok_btn");
+ childSetCommitCallback("confirm_checkbox", refresh, this);
+
mViewOptionMenuButton = getChild<LLMenuButton>("options_gear_btn");
mCommitCallbackRegistrar.add("ModelImport.ViewOption.Action", boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _2));
@@ -470,6 +571,29 @@ void LLFloaterModelPreview::onPelvisOffsetCommit( LLUICtrl*, void* userdata )
}
//static
+void LLFloaterModelPreview::onPhysicsLoadRadioCommit( LLUICtrl*, void *userdata)
+{
+ LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
+ if (fmp)
+ {
+ if (fmp->childGetValue("physics_use_lod").asBoolean())
+ {
+ onPhysicsUseLOD(NULL,NULL);
+ }
+ if (fmp->childGetValue("physics_load_from_file").asBoolean())
+ {
+
+ }
+ LLModelPreview *model_preview = fmp->mModelPreview;
+ if (model_preview)
+ {
+ model_preview->refresh();
+ model_preview->updateStatusMessages();
+ }
+ }
+}
+
+//static
void LLFloaterModelPreview::onUploadJointsCommit(LLUICtrl*,void* userdata)
{
LLFloaterModelPreview *fp =(LLFloaterModelPreview *)userdata;
@@ -573,6 +697,11 @@ void LLFloaterModelPreview::draw()
childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING)));
}
else
+ if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_PARSING )
+ {
+ childSetTextArg("status", "[STATUS]", getString("status_parse_error"));
+ }
+ else
{
childSetTextArg("status", "[STATUS]", getString("status_idle"));
}
@@ -992,7 +1121,7 @@ LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* pre
std::deque<std::string>& jointsFromNodes )
: mJointList( jointMap )
, mJointsFromNode( jointsFromNodes )
-, LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE)
+, LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE), mNumOfFetchingTextures(0)
{
mJointMap["mPelvis"] = "mPelvis";
mJointMap["mTorso"] = "mTorso";
@@ -1157,11 +1286,7 @@ void stretch_extents(LLModel* model, LLMatrix4& mat, LLVector3& min, LLVector3&
void LLModelLoader::run()
{
- if (!doLoadModel())
- {
- mPreview = NULL;
- }
-
+ doLoadModel();
doOnIdleOneTime(boost::bind(&LLModelLoader::loadModelCallback,this));
}
@@ -1225,6 +1350,23 @@ bool LLModelLoader::doLoadModel()
return false;
}
+ //Verify some basic properties of the dae
+ //1. Basic validity check on controller
+ U32 controllerCount = (int) db->getElementCount( NULL, "controller" );
+ bool result = false;
+ for ( int i=0; i<controllerCount; ++i )
+ {
+ domController* pController = NULL;
+ db->getElement( (daeElement**) &pController, i , NULL, "controller" );
+ result = mPreview->verifyController( pController );
+ if (!result)
+ {
+ setLoadState( ERROR_PARSING );
+ return true;
+ }
+ }
+
+
//get unit scale
mTransform.setIdentity();
@@ -1275,7 +1417,7 @@ bool LLModelLoader::doLoadModel()
if(model->getStatus() != LLModel::NO_ERRORS)
{
setLoadState(ERROR_PARSING + model->getStatus()) ;
- return true ; //abort
+ return false; //abort
}
if (model.notNull() && validate_model(model))
@@ -1634,7 +1776,7 @@ bool LLModelLoader::doLoadModel()
{
if (pos.getCount() <= j+2)
{
- llerrs << "WTF?" << llendl;
+ llerrs << "Invalid position array size." << llendl;
}
LLVector3 v(pos[j], pos[j+1], pos[j+2]);
@@ -1759,11 +1901,19 @@ bool LLModelLoader::doLoadModel()
{
llwarns << "document has no visual_scene" << llendl;
setLoadState( ERROR_PARSING );
- return false;
+ return true;
}
+
setLoadState( DONE );
- processElement(scene);
+ bool badElement = false;
+
+ processElement( scene, badElement );
+
+ if ( badElement )
+ {
+ setLoadState( ERROR_PARSING );
+ }
return true;
}
@@ -2124,7 +2274,8 @@ void LLModelLoader::loadTextures()
iter->second[i].mMaterial[j].mDiffuseMap =
LLViewerTextureManager::getFetchedTextureFromUrl("file://" + iter->second[i].mMaterial[j].mDiffuseMapFilename, TRUE, LLViewerTexture::BOOST_PREVIEW);
iter->second[i].mMaterial[j].mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE);
- iter->second[i].mMaterial[j].mDiffuseMap->forceToSaveRawImage();
+ iter->second[i].mMaterial[j].mDiffuseMap->forceToSaveRawImage(0, F32_MAX);
+ mNumOfFetchingTextures++ ;
}
}
}
@@ -2153,6 +2304,90 @@ bool LLModelLoader::isNodeAJoint( domNode* pNode )
return false;
}
+//-----------------------------------------------------------------------------
+// verifyCount
+//-----------------------------------------------------------------------------
+bool LLModelPreview::verifyCount( int expected, int result )
+{
+ if ( expected != result )
+ {
+ llinfos<< "Error: (expected/got)"<<expected<<"/"<<result<<"verts"<<llendl;
+ return false;
+ }
+ return true;
+}
+//-----------------------------------------------------------------------------
+// verifyController
+//-----------------------------------------------------------------------------
+bool LLModelPreview::verifyController( domController* pController )
+{
+
+ bool result = true;
+
+ domSkin* pSkin = pController->getSkin();
+
+ if ( pSkin )
+ {
+ xsAnyURI & uri = pSkin->getSource();
+ domElement* pElement = uri.getElement();
+
+ if ( !pElement )
+ {
+ llinfos<<"Can't resolve skin source"<<llendl;
+ return false;
+ }
+
+ daeString type_str = pElement->getTypeName();
+ if ( stricmp(type_str, "geometry") == 0 )
+ {
+ //Skin is reference directly by geometry and get the vertex count from skin
+ domSkin::domVertex_weights* pVertexWeights = pSkin->getVertex_weights();
+ U32 vertexWeightsCount = pVertexWeights->getCount();
+ domGeometry* pGeometry = (domGeometry*) (domElement*) uri.getElement();
+ domMesh* pMesh = pGeometry->getMesh();
+
+ if ( pMesh )
+ {
+ //Get vertex count from geometry
+ domVertices* pVertices = pMesh->getVertices();
+ if ( !pVertices )
+ {
+ llinfos<<"No vertices!"<<llendl;
+ return false;
+ }
+
+ if ( pVertices )
+ {
+ xsAnyURI src = pVertices->getInput_array()[0]->getSource();
+ domSource* pSource = (domSource*) (domElement*) src.getElement();
+ U32 verticesCount = pSource->getTechnique_common()->getAccessor()->getCount();
+ result = verifyCount( verticesCount, vertexWeightsCount );
+ if ( !result )
+ {
+ return result;
+ }
+ }
+ }
+
+ U32 vcountCount = (U32) pVertexWeights->getVcount()->getValue().getCount();
+ result = verifyCount( vcountCount, vertexWeightsCount );
+ if ( !result )
+ {
+ return result;
+ }
+
+ domInputLocalOffset_Array& inputs = pVertexWeights->getInput_array();
+ U32 sum = 0;
+ for (size_t i=0; i<vcountCount; i++)
+ {
+ sum += pVertexWeights->getVcount()->getValue()[i];
+ }
+ result = verifyCount( sum * inputs.getCount(), (domInt) pVertexWeights->getV()->getValue().getCount() );
+ }
+ }
+
+ return result;
+}
//-----------------------------------------------------------------------------
// extractTranslation()
@@ -2263,7 +2498,7 @@ daeElement* LLModelLoader::getChildFromElement( daeElement* pElement, std::strin
return NULL;
}
-void LLModelLoader::processElement(daeElement* element)
+void LLModelLoader::processElement( daeElement* element, bool& badElement )
{
LLMatrix4 saved_transform = mTransform;
@@ -2296,8 +2531,11 @@ void LLModelLoader::processElement(daeElement* element)
{
domFloat3 dom_value = scale->getValue();
+
+ LLVector3 scale_vector = LLVector3(dom_value[0], dom_value[1], dom_value[2]);
+ scale_vector.abs(); // Set all values positive, since we don't currently support mirrored meshes
LLMatrix4 scaling;
- scaling.initScale(LLVector3(dom_value[0], dom_value[1], dom_value[2]));
+ scaling.initScale(scale_vector);
scaling *= mTransform;
mTransform = scaling;
@@ -2360,6 +2598,12 @@ void LLModelLoader::processElement(daeElement* element)
}
}
}
+ else
+ {
+ llinfos<<"Unable to resolve geometry URL."<<llendl;
+ badElement = true;
+ }
+
}
domInstance_node* instance_node = daeSafeCast<domInstance_node>(element);
@@ -2368,7 +2612,7 @@ void LLModelLoader::processElement(daeElement* element)
daeElement* instance = instance_node->getUrl().getElement();
if (instance)
{
- processElement(instance);
+ processElement(instance,badElement);
}
}
@@ -2376,7 +2620,7 @@ void LLModelLoader::processElement(daeElement* element)
daeTArray< daeSmartRef<daeElement> > children = element->getChildren();
for (S32 i = 0; i < children.getCount(); i++)
{
- processElement(children[i]);
+ processElement(children[i],badElement);
}
domNode* node = daeSafeCast<domNode>(element);
@@ -2660,7 +2904,7 @@ LLModelPreview::~LLModelPreview()
{
if (mModelLoader)
{
- delete mModelLoader;
+ mModelLoader->mPreview = NULL;
mModelLoader = NULL;
}
//*HACK : *TODO : turn this back on when we understand why this crashes
@@ -2675,7 +2919,8 @@ U32 LLModelPreview::calcResourceCost()
if (mFMP && mModelLoader)
{
- if ( getLoadState() < LLModelLoader::ERROR_PARSING )
+ const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
+ if ( getLoadState() < LLModelLoader::ERROR_PARSING && confirmed_checkbox )
{
mFMP->childEnable("ok_btn");
}
@@ -2817,7 +3062,8 @@ void LLModelPreview::rebuildUploadData()
F32 max_scale = 0.f;
- if ( mBaseScene.size() > 0 )
+ const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
+ if ( mBaseScene.size() > 0 && confirmed_checkbox )
{
mFMP->childEnable("ok_btn");
}
@@ -3221,6 +3467,8 @@ void LLModelPreview::loadModelCallback(S32 lod)
}
mLoading = false;
+ if (mFMP)
+ mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->set(FALSE);
refresh();
mModelLoadedSignal();
@@ -3234,7 +3482,7 @@ void LLModelPreview::resetPreviewTarget()
mPreviewScale = (mModelLoader->mExtents[1] - mModelLoader->mExtents[0]) * 0.5f;
}
- setPreviewTarget(mPreviewScale.magVec()*2.f);
+ setPreviewTarget(mPreviewScale.magVec()*10.f);
}
void LLModelPreview::generateNormals()
@@ -3752,7 +4000,35 @@ void LLModelPreview::updateStatusMessages()
mMaxTriangleLimit = total_tris[LLModel::LOD_HIGH];
}
+ bool has_degenerate = false;
+
+ {//check for degenerate triangles in physics mesh
+ U32 lod = LLModel::LOD_PHYSICS;
+ const LLVector4a scale(0.5f);
+ for (U32 i = 0; i < mModel[lod].size() && !has_degenerate; ++i)
+ { //for each model in the lod
+ if (mModel[lod][i]->mPhysics.mHull.empty())
+ { //no decomp exists
+ S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces();
+ for (S32 j = 0; j < cur_submeshes && !has_degenerate; ++j)
+ { //for each submesh (face), add triangles and vertices to current total
+ const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j);
+ for (S32 k = 0; k < face.mNumIndices && !has_degenerate; )
+ {
+ LLVector4a v1; v1.setMul(face.mPositions[face.mIndices[k++]], scale);
+ LLVector4a v2; v2.setMul(face.mPositions[face.mIndices[k++]], scale);
+ LLVector4a v3; v3.setMul(face.mPositions[face.mIndices[k++]], scale);
+ if (ll_is_degenerate(v1,v2,v3))
+ {
+ has_degenerate = true;
+ }
+ }
+ }
+ }
+ }
+ }
+
mFMP->childSetTextArg("submeshes_info", "[SUBMESHES]", llformat("%d", total_submeshes[LLModel::LOD_HIGH]));
std::string mesh_status_na = mFMP->getString("mesh_status_na");
@@ -3853,7 +4129,10 @@ void LLModelPreview::updateStatusMessages()
for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j)
{
- upload_ok = upload_ok && mdl->mPhysics.mHull[i].size() <= 256;
+ if (mdl->mPhysics.mHull[j].size() > 256)
+ {
+ upload_ok = false;
+ }
}
}
@@ -3876,7 +4155,16 @@ void LLModelPreview::updateStatusMessages()
}
}
- if ( upload_ok && !errorStateFromLoader && skinAndRigOk )
+ if(upload_ok && mModelLoader)
+ {
+ if(!mModelLoader->areTexturesReady() && mFMP->childGetValue("upload_textures").asBoolean())
+ {
+ upload_ok = false ;
+ }
+ }
+
+ const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
+ if ( upload_ok && !errorStateFromLoader && skinAndRigOk && !has_degenerate && confirmed_checkbox)
{
mFMP->childEnable("ok_btn");
}
@@ -4238,11 +4526,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
const LLModel::weight_list& weight_list = base_mdl->getJointInfluences(pos);
LLVector4 w(0,0,0,0);
- if (weight_list.size() > 4)
- {
- llerrs << "WTF?" << llendl;
- }
-
+
for (U32 i = 0; i < weight_list.size(); ++i)
{
F32 wght = llmin(weight_list[i].mWeight, 0.999999f);
@@ -4455,7 +4739,7 @@ BOOL LLModelPreview::render()
LLVector3 target_pos = mPreviewTarget+offset;
F32 z_near = 0.001f;
- F32 z_far = mCameraDistance+mPreviewScale.magVec()+mCameraOffset.magVec();
+ F32 z_far = mCameraDistance*10.0f+mPreviewScale.magVec()+mCameraOffset.magVec();
if (skin_weight)
{
@@ -4605,39 +4889,43 @@ BOOL LLModelPreview::render()
LLModel::Decomposition& physics = model->mPhysics;
- if (physics.mMesh.empty())
- { //build vertex buffer for physics mesh
- gMeshRepo.buildPhysicsMesh(physics);
- }
-
- if (!physics.mMesh.empty())
- { //render hull instead of mesh
+ if (!physics.mHull.empty())
+ {
render_mesh = false;
- for (U32 i = 0; i < physics.mMesh.size(); ++i)
- {
- if (explode > 0.f)
+
+ if (physics.mMesh.empty())
+ { //build vertex buffer for physics mesh
+ gMeshRepo.buildPhysicsMesh(physics);
+ }
+
+ if (!physics.mMesh.empty())
+ { //render hull instead of mesh
+ for (U32 i = 0; i < physics.mMesh.size(); ++i)
{
- gGL.pushMatrix();
+ if (explode > 0.f)
+ {
+ gGL.pushMatrix();
- LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters;
- offset *= explode;
+ LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters;
+ offset *= explode;
- gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
- }
+ gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
+ }
- static std::vector<LLColor4U> hull_colors;
+ static std::vector<LLColor4U> hull_colors;
- if (i+1 >= hull_colors.size())
- {
- hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255));
- }
+ if (i+1 >= hull_colors.size())
+ {
+ hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255));
+ }
- glColor4ubv(hull_colors[i].mV);
- LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
+ glColor4ubv(hull_colors[i].mV);
+ LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
- if (explode > 0.f)
- {
- gGL.popMatrix();
+ if (explode > 0.f)
+ {
+ gGL.popMatrix();
+ }
}
}
}
@@ -4663,9 +4951,10 @@ BOOL LLModelPreview::render()
glColor3f(1.f, 1.f, 0.f);
- glLineWidth(3.f);
+ glLineWidth(2.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
+
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glLineWidth(1.f);
}
@@ -4674,6 +4963,80 @@ BOOL LLModelPreview::render()
gGL.popMatrix();
}
+ glLineWidth(3.f);
+ glPointSize(8.f);
+ gPipeline.enableLightsFullbright(LLColor4::white);
+ //show degenerate triangles
+ LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
+ LLGLDisable cull(GL_CULL_FACE);
+ glColor4f(1.f,0.f,0.f,1.f);
+ const LLVector4a scale(0.5f);
+
+ for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
+ {
+ LLModelInstance& instance = *iter;
+
+ LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS];
+
+ if (!model)
+ {
+ continue;
+ }
+
+ gGL.pushMatrix();
+ LLMatrix4 mat = instance.mTransform;
+
+ glMultMatrixf((GLfloat*) mat.mMatrix);
+
+
+ LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread;
+ if (decomp)
+ {
+ LLMutexLock(decomp->mMutex);
+
+ LLModel::Decomposition& physics = model->mPhysics;
+
+ if (physics.mHull.empty())
+ {
+ if (mVertexBuffer[LLModel::LOD_PHYSICS].empty())
+ {
+ genBuffers(LLModel::LOD_PHYSICS, false);
+ }
+
+ for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i)
+ {
+ LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i];
+
+ buffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
+
+ LLStrider<LLVector3> pos_strider;
+ buffer->getVertexStrider(pos_strider, 0);
+ LLVector4a* pos = (LLVector4a*) pos_strider.get();
+
+ LLStrider<U16> idx;
+ buffer->getIndexStrider(idx, 0);
+
+ for (U32 i = 0; i < buffer->getNumIndices(); i += 3)
+ {
+ LLVector4a v1; v1.setMul(pos[*idx++], scale);
+ LLVector4a v2; v2.setMul(pos[*idx++], scale);
+ LLVector4a v3; v3.setMul(pos[*idx++], scale);
+
+ if (ll_is_degenerate(v1,v2,v3))
+ {
+ buffer->draw(LLRender::LINE_LOOP, 3, i);
+ buffer->draw(LLRender::POINTS, 3, i);
+ }
+ }
+ }
+ }
+ }
+
+ gGL.popMatrix();
+ }
+ glLineWidth(1.f);
+ glPointSize(1.f);
+ gPipeline.enableLightsPreview();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
}
@@ -4938,6 +5301,14 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture
{
LLModelPreview* preview = (LLModelPreview*) userdata;
preview->refresh();
+
+ if(final && preview->mModelLoader)
+ {
+ if(preview->mModelLoader->mNumOfFetchingTextures > 0)
+ {
+ preview->mModelLoader->mNumOfFetchingTextures-- ;
+ }
+ }
}
void LLModelPreview::onLODParamCommit(bool enforce_tri_limit)
@@ -4959,35 +5330,7 @@ LLFloaterModelPreview::DecompRequest::DecompRequest(const std::string& stage, LL
mParams = sInstance->mDecompParams;
//copy out positions and indices
- if (mdl)
- {
- U16 index_offset = 0;
-
- mPositions.clear();
- mIndices.clear();
-
- //queue up vertex positions and indices
- for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = mdl->getVolumeFace(i);
- if (mPositions.size() + face.mNumVertices > 65535)
- {
- continue;
- }
-
- for (U32 j = 0; j < face.mNumVertices; ++j)
- {
- mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr()));
- }
-
- for (U32 j = 0; j < face.mNumIndices; ++j)
- {
- mIndices.push_back(face.mIndices[j]+index_offset);
- }
-
- index_offset += face.mNumVertices;
- }
- }
+ assignData(mdl) ;
}
void LLFloaterModelPreview::setStatusMessage(const std::string& msg)
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index f6d4a08d1f..d4f6b4d293 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -50,6 +50,7 @@ class domProfile_COMMON;
class domInstance_geometry;
class domNode;
class domTranslate;
+class domController;
class LLMenuButton;
class LLToggleableMenu;
@@ -107,7 +108,7 @@ public:
void loadModelCallback();
void loadTextures() ; //called in the main thread.
- void processElement(daeElement* element);
+ void processElement(daeElement* element, bool& badElement);
std::vector<LLImportMaterial> getMaterials(LLModel* model, domInstance_geometry* instance_geo);
LLImportMaterial profileToMaterial(domProfile_COMMON* material);
std::string getElementLabel(daeElement *element);
@@ -131,6 +132,9 @@ public:
JointTransformMap& mJointList;
std::deque<std::string>& mJointsFromNode;
+ S32 mNumOfFetchingTextures ; //updated in the main thread
+ bool areTexturesReady() { return !mNumOfFetchingTextures; } //called in the main thread.
+
private:
static std::list<LLModelLoader*> sActiveLoaderList;
static bool isAlive(LLModelLoader* loader) ;
@@ -199,6 +203,8 @@ protected:
static void onUploadJointsCommit(LLUICtrl*,void*);
static void onUploadSkinCommit(LLUICtrl*,void*);
+ static void onPhysicsLoadRadioCommit(LLUICtrl*,void *data);
+
static void onPreviewLODCommit(LLUICtrl*,void*);
static void onGenerateNormalsCommit(LLUICtrl*,void*);
@@ -309,9 +315,6 @@ public:
void setHasPivot( bool val ) { mHasPivot = val; }
void setModelPivot( const LLVector3& pivot ) { mModelPivot = pivot; }
- //Sets the current avatars joints to new positions
- //Makes in world go to shit, however
- void changeAvatarsJointPositions( LLModel* pModel );
//Determines the viability of an asset to be used as an avatar rig (w or w/o joint upload caps)
void critiqueRigForUploadApplicability( const std::vector<std::string> &jointListFromAsset );
void critiqueJointToNodeMappingFromScene( void );
@@ -325,6 +328,8 @@ public:
//Accessors for the legacy rigs
const bool isLegacyRigValid( void ) const { return mLegacyRigValid; }
void setLegacyRigValid( bool rigValid ) { mLegacyRigValid = rigValid; }
+ //Verify that a controller matches vertex counts
+ bool verifyController( domController* pController );
static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
@@ -341,7 +346,12 @@ public:
LLVector3 getTranslationForJointOffset( std::string joint );
+private:
+ //Utility function for controller vertex compare
+ bool verifyCount( int expected, int result );
+ //Creates the dummy avatar for the preview window
void createPreviewAvatar( void );
+ //Accessor for the dummy avatar
LLVOAvatar* getPreviewAvatar( void ) { return mPreviewAvatar; }
protected:
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp
index faf81dbc5c..707c8288df 100644
--- a/indra/newview/llfloatermodelwizard.cpp
+++ b/indra/newview/llfloatermodelwizard.cpp
@@ -422,8 +422,11 @@ void LLFloaterModelWizard::executePhysicsStage(std::string stage_name)
{
LLModel* mdl = sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS][i];
DecompRequest* request = new DecompRequest(stage_name, mdl);
- sInstance->mCurRequest.insert(request);
- gMeshRepo.mDecompThread->submitRequest(request);
+ if(request->isValid())
+ {
+ sInstance->mCurRequest.insert(request);
+ gMeshRepo.mDecompThread->submitRequest(request);
+ }
}
}
}
@@ -438,35 +441,7 @@ LLFloaterModelWizard::DecompRequest::DecompRequest(const std::string& stage, LLM
mParams = sInstance->mDecompParams;
//copy out positions and indices
- if (mdl)
- {
- U16 index_offset = 0;
-
- mPositions.clear();
- mIndices.clear();
-
- //queue up vertex positions and indices
- for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = mdl->getVolumeFace(i);
- if (mPositions.size() + face.mNumVertices > 65535)
- {
- continue;
- }
-
- for (U32 j = 0; j < face.mNumVertices; ++j)
- {
- mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr()));
- }
-
- for (U32 j = 0; j < face.mNumIndices; ++j)
- {
- mIndices.push_back(face.mIndices[j]+index_offset);
- }
-
- index_offset += face.mNumVertices;
- }
- }
+ assignData(mdl) ;
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 60a2f813aa..7848484ac6 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -327,6 +327,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.SelectSkin", boost::bind(&LLFloaterPreference::onSelectSkin, this));
mCommitCallbackRegistrar.add("Pref.VoiceSetKey", boost::bind(&LLFloaterPreference::onClickSetKey, this));
mCommitCallbackRegistrar.add("Pref.VoiceSetMiddleMouse", boost::bind(&LLFloaterPreference::onClickSetMiddleMouse, this));
+ mCommitCallbackRegistrar.add("Pref.SetSounds", boost::bind(&LLFloaterPreference::onClickSetSounds, this));
// mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this));
// mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this));
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
@@ -1286,6 +1287,14 @@ void LLFloaterPreference::onClickSetMiddleMouse()
p2t_line_editor->setValue(advanced_preferences->getString("middle_mouse"));
}
}
+
+void LLFloaterPreference::onClickSetSounds()
+{
+ // Disable Enable gesture sounds checkbox if the master sound is disabled
+ // or if sound effects are disabled.
+ getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
+}
+
/*
void LLFloaterPreference::onClickSkipDialogs()
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index ef92575347..61f2c78640 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -129,6 +129,7 @@ public:
void onClickSetKey();
void setKey(KEY key);
void onClickSetMiddleMouse();
+ void onClickSetSounds();
// void onClickSkipDialogs();
// void onClickResetDialogs();
void onClickEnablePopup();
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 232b8e9096..bedc7ef704 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -40,6 +40,10 @@
#include "llxfermanager.h"
#include "indra_constants.h"
#include "message.h"
+#include "llloadingindicator.h"
+#include "llradiogroup.h"
+#include "llsd.h"
+#include "llsdserialize.h"
#include "llagent.h"
#include "llappviewer.h"
@@ -48,6 +52,8 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
+#include "lldaycyclemanager.h"
+#include "llenvmanager.h"
#include "llfilepicker.h"
#include "llfloatergodtools.h" // for send_sim_wide_deletes()
#include "llfloatertopobjects.h" // added to fix SL-32336
@@ -55,12 +61,12 @@
#include "llfloaterreg.h"
#include "llfloaterregiondebugconsole.h"
#include "llfloatertelehub.h"
-#include "llfloaterwindlight.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
+#include "llregioninfomodel.h"
#include "llscrolllistitem.h"
#include "llsliderctrl.h"
#include "llslurl.h"
@@ -80,12 +86,16 @@
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
#include "llvlcomposition.h"
+#include "llwaterparammanager.h"
#include "lltrans.h"
#include "llagentui.h"
+#include "llmeshrepository.h"
const S32 TERRAIN_TEXTURE_COUNT = 4;
const S32 CORNER_COUNT = 4;
+#define TMP_DISABLE_WLES // STORM-1180
+
///----------------------------------------------------------------------------
/// Local class declaration
///----------------------------------------------------------------------------
@@ -189,24 +199,24 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
BOOL LLFloaterRegionInfo::postBuild()
{
mTab = getChild<LLTabContainer>("region_panels");
+ mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2));
// contruct the panels
LLPanelRegionInfo* panel;
- panel = new LLPanelRegionGeneralInfo;
+ panel = new LLPanelEstateInfo;
mInfoPanels.push_back(panel);
- panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
-
- panel->buildFromFile("panel_region_general.xml");
+ panel->buildFromFile("panel_region_estate.xml");
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
- panel = new LLPanelRegionDebugInfo;
+ panel = new LLPanelEstateCovenant;
mInfoPanels.push_back(panel);
- panel->buildFromFile("panel_region_debug.xml");
+ panel->buildFromFile("panel_region_covenant.xml");
mTab->addTabPanel(panel);
- panel = new LLPanelRegionTextureInfo;
+ panel = new LLPanelRegionGeneralInfo;
mInfoPanels.push_back(panel);
- panel->buildFromFile("panel_region_texture.xml");
+ panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
+ panel->buildFromFile("panel_region_general.xml");
mTab->addTabPanel(panel);
panel = new LLPanelRegionTerrainInfo;
@@ -214,20 +224,23 @@ BOOL LLFloaterRegionInfo::postBuild()
panel->buildFromFile("panel_region_terrain.xml");
mTab->addTabPanel(panel);
- panel = new LLPanelEstateInfo;
+ panel = new LLPanelEnvironmentInfo;
mInfoPanels.push_back(panel);
- panel->buildFromFile("panel_region_estate.xml");
+ panel->buildFromFile("panel_region_environment.xml");
mTab->addTabPanel(panel);
- panel = new LLPanelEstateCovenant;
+ panel = new LLPanelRegionDebugInfo;
mInfoPanels.push_back(panel);
- panel->buildFromFile("panel_region_covenant.xml");
+ panel->buildFromFile("panel_region_debug.xml");
mTab->addTabPanel(panel);
gMessageSystem->setHandlerFunc(
"EstateOwnerMessage",
&processEstateOwnerRequest);
+ // Request region info when agent region changes.
+ LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionInfo::requestRegionInfo, this));
+
return TRUE;
}
@@ -306,17 +319,25 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
{
LLPanel* panel;
LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
- llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl;
if(!floater)
{
return;
}
+
+ // We need to re-request environment setting here,
+ // otherwise after we apply (send) updated region settings we won't get them back,
+ // so our environment won't be updated.
+ // This is also the way to know about externally changed region environment.
+ LLEnvManagerNew::instance().requestRegionSettings();
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLViewerRegion* region = gAgent.getRegion();
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
+ // *TODO: Replace parcing msg with accessing the region info model.
+ LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
+
// extract message
std::string sim_name;
std::string sim_type = LLTrans::getString("land_type_unknown");
@@ -388,15 +409,10 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel = tab->getChild<LLPanel>("Terrain");
panel->getChild<LLUICtrl>("region_text")->setValue(LLSD(sim_name));
- panel->getChild<LLUICtrl>("water_height_spin")->setValue(LLSD(water_height));
- panel->getChild<LLUICtrl>("terrain_raise_spin")->setValue(LLSD(terrain_raise_limit));
- panel->getChild<LLUICtrl>("terrain_lower_spin")->setValue(LLSD(terrain_lower_limit));
- panel->getChild<LLUICtrl>("use_estate_sun_check")->setValue(LLSD(use_estate_sun));
-
- panel->getChild<LLUICtrl>("fixed_sun_check")->setValue(LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED)));
- panel->getChildView("fixed_sun_check")->setEnabled(allow_modify && !use_estate_sun);
- panel->getChild<LLUICtrl>("sun_hour_slider")->setValue(LLSD(sun_hour));
- panel->getChildView("sun_hour_slider")->setEnabled(allow_modify && !use_estate_sun);
+ panel->getChild<LLUICtrl>("water_height_spin")->setValue(region_info.mWaterHeight);
+ panel->getChild<LLUICtrl>("terrain_raise_spin")->setValue(region_info.mTerrainRaiseLimit);
+ panel->getChild<LLUICtrl>("terrain_lower_spin")->setValue(region_info.mTerrainLowerLimit);
+
panel->setCtrlsEnabled(allow_modify);
floater->refreshFromRegion( gAgent.getRegion() );
@@ -422,6 +438,29 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
return panel;
}
+// static
+LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain()
+{
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
+ if (!floater)
+ {
+ llassert(floater);
+ return NULL;
+ }
+
+ LLTabContainer* tab_container = floater->getChild<LLTabContainer>("region_panels");
+ LLPanelRegionTerrainInfo* panel =
+ dynamic_cast<LLPanelRegionTerrainInfo*>(tab_container->getChild<LLPanel>("Terrain"));
+ llassert(panel);
+ return panel;
+}
+
+void LLFloaterRegionInfo::onTabSelected(const LLSD& param)
+{
+ LLPanel* active_panel = getChild<LLPanel>(param.asString());
+ active_panel->onOpen(LLSD());
+}
+
void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
{
if (!region)
@@ -502,8 +541,13 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data)
// virtual
BOOL LLPanelRegionInfo::postBuild()
{
- getChild<LLUICtrl>("apply_btn")->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this));
- getChildView("apply_btn")->setEnabled(FALSE);
+ // If the panel has an Apply button, set a callback for it.
+ LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn");
+ if (apply_btn)
+ {
+ apply_btn->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this));
+ }
+
refresh();
return TRUE;
}
@@ -555,12 +599,14 @@ void LLPanelRegionInfo::sendEstateOwnerMessage(
void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable)
{
- getChildView(btn_name)->setEnabled(enable);
+ LLView* button = findChildView(btn_name);
+ if (button) button->setEnabled(enable);
}
void LLPanelRegionInfo::disableButton(const std::string& btn_name)
{
- getChildView(btn_name)->setEnabled(FALSE);
+ LLView* button = findChildView(btn_name);
+ if (button) button->setEnabled(FALSE);
}
void LLPanelRegionInfo::initCtrl(const std::string& name)
@@ -590,10 +636,7 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
getChildView("im_btn")->setEnabled(allow_modify);
getChildView("manage_telehub_btn")->setEnabled(allow_modify);
- const bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") &&
- gAgent.getRegion() &&
- !gAgent.getRegion()->getCapability("GetMesh").empty() &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty();
+ const bool enable_mesh = gMeshRepo.meshRezEnabled();
getChildView("mesh_rez_enabled_check")->setVisible(enable_mesh);
getChildView("mesh_rez_enabled_check")->setEnabled(getChildView("mesh_rez_enabled_check")->getEnabled() && enable_mesh);
// Data gets filled in by processRegionInfo
@@ -1054,131 +1097,7 @@ void LLPanelRegionDebugInfo::onClickCancelRestart(void* data)
}
-/////////////////////////////////////////////////////////////////////////////
-// LLPanelRegionTextureInfo
-//
-LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo()
-{
- // nothing.
-}
-
-bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region)
-{
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
- setCtrlsEnabled(allow_modify);
- getChildView("apply_btn")->setEnabled(FALSE);
-
- if (region)
- {
- getChild<LLUICtrl>("region_text")->setValue(LLSD(region->getName()));
- }
- else
- {
- getChild<LLUICtrl>("region_text")->setValue(LLSD(""));
- }
-
- if (!region) return LLPanelRegionInfo::refreshFromRegion(region);
-
- LLVLComposition* compp = region->getComposition();
- LLTextureCtrl* texture_ctrl;
- std::string buffer;
- for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
- {
- buffer = llformat("texture_detail_%d", i);
- texture_ctrl = getChild<LLTextureCtrl>(buffer);
- if(texture_ctrl)
- {
- lldebugs << "Detail Texture " << i << ": "
- << compp->getDetailTextureID(i) << llendl;
- LLUUID tmp_id(compp->getDetailTextureID(i));
- texture_ctrl->setImageAssetID(tmp_id);
- }
- }
-
- for(S32 i = 0; i < CORNER_COUNT; ++i)
- {
- buffer = llformat("height_start_spin_%d", i);
- getChild<LLUICtrl>(buffer)->setValue(LLSD(compp->getStartHeight(i)));
- buffer = llformat("height_range_spin_%d", i);
- getChild<LLUICtrl>(buffer)->setValue(LLSD(compp->getHeightRange(i)));
- }
-
- // Call the parent for common book-keeping
- return LLPanelRegionInfo::refreshFromRegion(region);
-}
-
-
-BOOL LLPanelRegionTextureInfo::postBuild()
-{
- LLPanelRegionInfo::postBuild();
- std::string buffer;
- for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
- {
- buffer = llformat("texture_detail_%d", i);
- initCtrl(buffer);
- }
-
- for(S32 i = 0; i < CORNER_COUNT; ++i)
- {
- buffer = llformat("height_start_spin_%d", i);
- initCtrl(buffer);
- buffer = llformat("height_range_spin_%d", i);
- initCtrl(buffer);
- }
-
-// LLButton* btn = ("dump", LLRect(0, 20, 100, 0), "", onClickDump, this);
-// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT);
-// addChild(btn);
-
- return LLPanelRegionInfo::postBuild();
-}
-
-BOOL LLPanelRegionTextureInfo::sendUpdate()
-{
- llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl;
-
- // Make sure user hasn't chosen wacky textures.
- if (!validateTextureSizes())
- {
- return FALSE;
- }
-
- LLTextureCtrl* texture_ctrl;
- std::string buffer;
- std::string id_str;
- LLMessageSystem* msg = gMessageSystem;
- strings_t strings;
-
- LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
-
- for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
- {
- buffer = llformat("texture_detail_%d", i);
- texture_ctrl = getChild<LLTextureCtrl>(buffer);
- if(texture_ctrl)
- {
- LLUUID tmp_id(texture_ctrl->getImageAssetID());
- tmp_id.toString(id_str);
- buffer = llformat("%d %s", i, id_str.c_str());
- strings.push_back(buffer);
- }
- }
- sendEstateOwnerMessage(msg, "texturedetail", invoice, strings);
- strings.clear();
- for(S32 i = 0; i < CORNER_COUNT; ++i)
- {
- buffer = llformat("height_start_spin_%d", i);
- std::string buffer2 = llformat("height_range_spin_%d", i);
- std::string buffer3 = llformat("%d %f %f", i, (F32)getChild<LLUICtrl>(buffer)->getValue().asReal(), (F32)getChild<LLUICtrl>(buffer2)->getValue().asReal());
- strings.push_back(buffer3);
- }
- sendEstateOwnerMessage(msg, "textureheights", invoice, strings);
- strings.clear();
- sendEstateOwnerMessage(msg, "texturecommit", invoice, strings);
- return TRUE;
-}
-
-BOOL LLPanelRegionTextureInfo::validateTextureSizes()
+BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
{
for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
{
@@ -1221,49 +1140,86 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
return TRUE;
}
-
-// static
-void LLPanelRegionTextureInfo::onClickDump(void* data)
-{
- llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl;
-}
-
-
/////////////////////////////////////////////////////////////////////////////
// LLPanelRegionTerrainInfo
/////////////////////////////////////////////////////////////////////////////
+// Initialize statics
+
BOOL LLPanelRegionTerrainInfo::postBuild()
{
LLPanelRegionInfo::postBuild();
-
+
initCtrl("water_height_spin");
initCtrl("terrain_raise_spin");
initCtrl("terrain_lower_spin");
- initCtrl("fixed_sun_check");
- getChild<LLUICtrl>("fixed_sun_check")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeFixedSun, this));
- getChild<LLUICtrl>("use_estate_sun_check")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeUseEstateTime, this));
- getChild<LLUICtrl>("sun_hour_slider")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeSunHour, this));
+ std::string buffer;
+ for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
+ {
+ buffer = llformat("texture_detail_%d", i);
+ initCtrl(buffer);
+ }
+
+ for(S32 i = 0; i < CORNER_COUNT; ++i)
+ {
+ buffer = llformat("height_start_spin_%d", i);
+ initCtrl(buffer);
+ buffer = llformat("height_range_spin_%d", i);
+ initCtrl(buffer);
+ }
childSetAction("download_raw_btn", onClickDownloadRaw, this);
childSetAction("upload_raw_btn", onClickUploadRaw, this);
childSetAction("bake_terrain_btn", onClickBakeTerrain, this);
- return TRUE;
+ return LLPanelRegionInfo::postBuild();
}
// virtual
bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
{
- llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl;
-
BOOL owner_or_god = gAgent.isGodlike()
|| (region && (region->getOwner() == gAgent.getID()));
BOOL owner_or_god_or_manager = owner_or_god
|| (region && region->isEstateManager());
setCtrlsEnabled(owner_or_god_or_manager);
+
getChildView("apply_btn")->setEnabled(FALSE);
+ if (region)
+ {
+ getChild<LLUICtrl>("region_text")->setValue(LLSD(region->getName()));
+
+ LLVLComposition* compp = region->getComposition();
+ LLTextureCtrl* texture_ctrl;
+ std::string buffer;
+ for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
+ {
+ buffer = llformat("texture_detail_%d", i);
+ texture_ctrl = getChild<LLTextureCtrl>(buffer);
+ if(texture_ctrl)
+ {
+ lldebugs << "Detail Texture " << i << ": "
+ << compp->getDetailTextureID(i) << llendl;
+ LLUUID tmp_id(compp->getDetailTextureID(i));
+ texture_ctrl->setImageAssetID(tmp_id);
+ }
+ }
+
+ for(S32 i = 0; i < CORNER_COUNT; ++i)
+ {
+ buffer = llformat("height_start_spin_%d", i);
+ getChild<LLUICtrl>(buffer)->setValue(LLSD(compp->getStartHeight(i)));
+ buffer = llformat("height_range_spin_%d", i);
+ getChild<LLUICtrl>(buffer)->setValue(LLSD(compp->getHeightRange(i)));
+ }
+ }
+ else
+ {
+ lldebugs << "no region set" << llendl;
+ getChild<LLUICtrl>("region_text")->setValue(LLSD(""));
+ }
+
getChildView("download_raw_btn")->setEnabled(owner_or_god);
getChildView("upload_raw_btn")->setEnabled(owner_or_god);
getChildView("bake_terrain_btn")->setEnabled(owner_or_god);
@@ -1271,6 +1227,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
return LLPanelRegionInfo::refreshFromRegion(region);
}
+
// virtual
BOOL LLPanelRegionTerrainInfo::sendUpdate()
{
@@ -1279,76 +1236,62 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
strings_t strings;
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
- buffer = llformat("%f", (F32)getChild<LLUICtrl>("water_height_spin")->getValue().asReal());
- strings.push_back(buffer);
- buffer = llformat("%f", (F32)getChild<LLUICtrl>("terrain_raise_spin")->getValue().asReal());
- strings.push_back(buffer);
- buffer = llformat("%f", (F32)getChild<LLUICtrl>("terrain_lower_spin")->getValue().asReal());
- strings.push_back(buffer);
- buffer = llformat("%s", (getChild<LLUICtrl>("use_estate_sun_check")->getValue().asBoolean() ? "Y" : "N"));
- strings.push_back(buffer);
- buffer = llformat("%s", (getChild<LLUICtrl>("fixed_sun_check")->getValue().asBoolean() ? "Y" : "N"));
- strings.push_back(buffer);
- buffer = llformat("%f", (F32)getChild<LLUICtrl>("sun_hour_slider")->getValue().asReal() );
- strings.push_back(buffer);
-
- // Grab estate information in case the user decided to set the
- // region back to estate time. JC
- LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
- if (!floater) return true;
-
- LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
- if (!tab) return true;
+ // update the model
+ LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
+ region_info.mWaterHeight = (F32) getChild<LLUICtrl>("water_height_spin")->getValue().asReal();
+ region_info.mTerrainRaiseLimit = (F32) getChild<LLUICtrl>("terrain_raise_spin")->getValue().asReal();
+ region_info.mTerrainLowerLimit = (F32) getChild<LLUICtrl>("terrain_lower_spin")->getValue().asReal();
- LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
- if (!panel) return true;
+ // and sync the region with it
+ region_info.sendRegionTerrain(invoice);
+
+ // =======================================
+ // Assemble and send texturedetail message
- BOOL estate_global_time = panel->getGlobalTime();
- BOOL estate_fixed_sun = panel->getFixedSun();
- F32 estate_sun_hour;
- if (estate_global_time)
+ // Make sure user hasn't chosen wacky textures.
+ if (!validateTextureSizes())
{
- estate_sun_hour = 0.f;
+ return FALSE;
}
- else
+
+ LLTextureCtrl* texture_ctrl;
+ std::string id_str;
+ LLMessageSystem* msg = gMessageSystem;
+
+ for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
{
- estate_sun_hour = panel->getSunHour();
+ buffer = llformat("texture_detail_%d", i);
+ texture_ctrl = getChild<LLTextureCtrl>(buffer);
+ if(texture_ctrl)
+ {
+ LLUUID tmp_id(texture_ctrl->getImageAssetID());
+ tmp_id.toString(id_str);
+ buffer = llformat("%d %s", i, id_str.c_str());
+ strings.push_back(buffer);
+ }
}
+ sendEstateOwnerMessage(msg, "texturedetail", invoice, strings);
+ strings.clear();
- buffer = llformat("%s", (estate_global_time ? "Y" : "N") );
- strings.push_back(buffer);
- buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") );
- strings.push_back(buffer);
- buffer = llformat("%f", estate_sun_hour);
- strings.push_back(buffer);
-
- sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings);
- return TRUE;
-}
+ // ========================================
+ // Assemble and send textureheights message
-void LLPanelRegionTerrainInfo::onChangeUseEstateTime()
-{
- BOOL use_estate_sun = getChild<LLUICtrl>("use_estate_sun_check")->getValue().asBoolean();
- getChildView("fixed_sun_check")->setEnabled(!use_estate_sun);
- getChildView("sun_hour_slider")->setEnabled(!use_estate_sun);
- if (use_estate_sun)
+ for(S32 i = 0; i < CORNER_COUNT; ++i)
{
- getChild<LLUICtrl>("fixed_sun_check")->setValue(LLSD(FALSE));
- getChild<LLUICtrl>("sun_hour_slider")->setValue(LLSD(0.f));
+ buffer = llformat("height_start_spin_%d", i);
+ std::string buffer2 = llformat("height_range_spin_%d", i);
+ std::string buffer3 = llformat("%d %f %f", i, (F32)getChild<LLUICtrl>(buffer)->getValue().asReal(), (F32)getChild<LLUICtrl>(buffer2)->getValue().asReal());
+ strings.push_back(buffer3);
}
- getChildView("apply_btn")->setEnabled(TRUE);
-}
+ sendEstateOwnerMessage(msg, "textureheights", invoice, strings);
+ strings.clear();
-void LLPanelRegionTerrainInfo::onChangeFixedSun()
-{
- // Just enable the apply button. We let the sun-hour slider be enabled
- // for both fixed-sun and non-fixed-sun. JC
- getChildView("apply_btn")->setEnabled(TRUE);
-}
+ // ========================================
+ // Send texturecommit message
-void LLPanelRegionTerrainInfo::onChangeSunHour()
-{
- getChildView("apply_btn")->setEnabled(TRUE);
+ sendEstateOwnerMessage(msg, "texturecommit", invoice, strings);
+
+ return TRUE;
}
// static
@@ -1408,6 +1351,7 @@ bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, con
strings.push_back("bake");
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
+
return false;
}
@@ -1441,6 +1385,7 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
estate_dispatch_initialized = true;
}
+#ifndef TMP_DISABLE_WLES
// Disables the sun-hour slider and the use fixed time check if the use global time is check
void LLPanelEstateInfo::onChangeUseGlobalTime()
{
@@ -1459,23 +1404,13 @@ void LLPanelEstateInfo::onChangeFixedSun()
getChild<LLUICtrl>("use_global_time_check")->setValue(LLSD(FALSE));
enableButton("apply_btn");
}
-
+#endif // TMP_DISABLE_WLES
//---------------------------------------------------------------------------
// Add/Remove estate access button callbacks
//---------------------------------------------------------------------------
-void LLPanelEstateInfo::onClickEditSky()
-{
- LLFloaterReg::showInstance("env_windlight");
-}
-
-void LLPanelEstateInfo::onClickEditDayCycle()
-{
- LLFloaterReg::showInstance("env_day_cycle");
-}
-
void LLPanelEstateInfo::onClickAddAllowedAgent()
{
LLCtrlListInterface *list = childGetListInterface("allowed_avatar_name_list");
@@ -2032,7 +1967,6 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
BOOL manager = (region && region->isEstateManager());
setCtrlsEnabled(god || owner || manager);
- getChildView("apply_btn")->setEnabled(FALSE);
getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager);
getChildView("remove_allowed_avatar_btn")->setEnabled(god || owner || manager);
getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager);
@@ -2090,10 +2024,6 @@ void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl)
{
// do nothing
}
- else if (checkSunHourSlider(child_ctrl))
- {
- // do nothing
- }
}
bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
@@ -2107,18 +2037,11 @@ BOOL LLPanelEstateInfo::postBuild()
{
// set up the callbacks for the generic controls
initCtrl("externally_visible_check");
- initCtrl("use_global_time_check");
- initCtrl("fixed_sun_check");
initCtrl("allow_direct_teleport");
initCtrl("limit_payment");
initCtrl("limit_age_verified");
initCtrl("voice_chat_check");
- // set up the use global time checkbox
- getChild<LLUICtrl>("use_global_time_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeUseGlobalTime, this));
- getChild<LLUICtrl>("fixed_sun_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeFixedSun, this));
- getChild<LLUICtrl>("sun_hour_slider")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
-
getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
if (avatar_name_list)
@@ -2165,9 +2088,6 @@ BOOL LLPanelEstateInfo::postBuild()
childSetAction("message_estate_btn", boost::bind(&LLPanelEstateInfo::onClickMessageEstate, this));
childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this));
- childSetAction("WLEditSky", boost::bind(&LLPanelEstateInfo::onClickEditSky, this));
- childSetAction("WLEditDayCycle", boost::bind(&LLPanelEstateInfo::onClickEditDayCycle, this));
-
return LLPanelRegionInfo::postBuild();
}
@@ -2306,7 +2226,6 @@ bool LLPanelEstateInfo::commitEstateInfoCaps()
body["is_externally_visible"] = getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean();
body["allow_direct_teleport"] = getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean();
- body["is_sun_fixed" ] = getChild<LLUICtrl>("fixed_sun_check")->getValue().asBoolean();
body["deny_anonymous" ] = getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
body["deny_age_unverified" ] = getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
body["allow_voice_chat" ] = getChild<LLUICtrl>("voice_chat_check")->getValue().asBoolean();
@@ -2371,7 +2290,6 @@ void LLPanelEstateInfo::commitEstateInfoDataserver()
void LLPanelEstateInfo::setEstateFlags(U32 flags)
{
getChild<LLUICtrl>("externally_visible_check")->setValue(LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) );
- getChild<LLUICtrl>("fixed_sun_check")->setValue(LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) );
getChild<LLUICtrl>("voice_chat_check")->setValue(
LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE));
getChild<LLUICtrl>("allow_direct_teleport")->setValue(LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) );
@@ -2400,11 +2318,6 @@ U32 LLPanelEstateInfo::computeEstateFlags()
flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT;
}
- if (getChild<LLUICtrl>("fixed_sun_check")->getValue().asBoolean())
- {
- flags |= REGION_FLAGS_SUN_FIXED;
- }
-
if (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean())
{
flags |= REGION_FLAGS_DENY_ANONYMOUS;
@@ -2568,17 +2481,6 @@ BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
return (btn_name != "");
}
-BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl)
-{
- BOOL found_child_ctrl = FALSE;
- if (child_ctrl->getName() == "sun_hour_slider")
- {
- enableButton("apply_btn");
- found_child_ctrl = TRUE;
- }
- return found_child_ctrl;
-}
-
// static
void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
{
@@ -2980,6 +2882,8 @@ bool LLDispatchEstateUpdateInfo::operator()(
const LLUUID& invoice,
const sparam_t& strings)
{
+ lldebugs << "Received estate update" << llendl;
+
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
if (!panel) return true;
@@ -3006,10 +2910,12 @@ bool LLDispatchEstateUpdateInfo::operator()(
F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f;
if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE))
{
+ lldebugs << "Estate uses global time" << llendl;
panel->setGlobalTime(TRUE);
}
else
{
+ lldebugs << "Estate sun hour: " << sun_hour << llendl;
panel->setGlobalTime(FALSE);
panel->setSunHour(sun_hour);
}
@@ -3200,3 +3106,578 @@ bool LLDispatchSetEstateAccess::operator()(
return true;
}
+
+LLPanelEnvironmentInfo::LLPanelEnvironmentInfo()
+: mEnableEditing(false),
+ mRegionSettingsRadioGroup(NULL),
+ mDayCycleSettingsRadioGroup(NULL),
+ mWaterPresetCombo(NULL),
+ mSkyPresetCombo(NULL),
+ mDayCyclePresetCombo(NULL)
+{
+}
+
+// virtual
+BOOL LLPanelEnvironmentInfo::postBuild()
+{
+ mRegionSettingsRadioGroup = getChild<LLRadioGroup>("region_settings_radio_group");
+ mRegionSettingsRadioGroup->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSwitchRegionSettings, this));
+
+ mDayCycleSettingsRadioGroup = getChild<LLRadioGroup>("sky_dayc_settings_radio_group");
+ mDayCycleSettingsRadioGroup->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSwitchDayCycle, this));
+
+ mWaterPresetCombo = getChild<LLComboBox>("water_settings_preset_combo");
+ mWaterPresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectWaterPreset, this));
+
+ mSkyPresetCombo = getChild<LLComboBox>("sky_settings_preset_combo");
+ mSkyPresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectSkyPreset, this));
+
+ mDayCyclePresetCombo = getChild<LLComboBox>("dayc_settings_preset_combo");
+ mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectDayCycle, this));
+
+ childSetCommitCallback("apply_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this), NULL);
+ getChild<LLButton>("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance()));
+ childSetCommitCallback("cancel_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnCancel, this), NULL);
+ getChild<LLButton>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance()));
+
+ LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingschange, this));
+ LLEnvManagerNew::instance().setRegionSettingsAppliedCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingsApplied, this, _1));
+
+ LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLPanelEnvironmentInfo::populateDayCyclesList, this));
+ LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelEnvironmentInfo::populateSkyPresetsList, this));
+ LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelEnvironmentInfo::populateWaterPresetsList, this));
+
+ return TRUE;
+}
+
+// virtual
+void LLPanelEnvironmentInfo::onOpen(const LLSD& key)
+{
+ LL_DEBUGS("Windlight") << "Panel opened, refreshing" << LL_ENDL;
+ refresh();
+}
+
+// virtual
+void LLPanelEnvironmentInfo::handleVisibilityChange(BOOL new_visibility)
+{
+ // If hiding (user switched to another tab or closed the floater),
+ // display user's preferred environment.
+ if (!new_visibility)
+ {
+ LLEnvManagerNew::instance().usePrefs();
+ }
+}
+
+// virtual
+bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region)
+{
+ LL_DEBUGS("Windlight") << "Region updated, enabling/disabling controls" << LL_ENDL;
+ BOOL owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID()));
+ BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager());
+
+ // Don't refresh from region settings to avoid flicker after applying new region settings.
+ mEnableEditing = owner_or_god_or_manager;
+ setControlsEnabled(mEnableEditing);
+
+ return LLPanelRegionInfo::refreshFromRegion(region);
+}
+
+void LLPanelEnvironmentInfo::refresh()
+{
+ populateWaterPresetsList();
+ populateSkyPresetsList();
+ populateDayCyclesList();
+
+ // Init radio groups.
+ const LLEnvironmentSettings& settings = LLEnvManagerNew::instance().getRegionSettings();
+ const LLSD& dc = settings.getWLDayCycle();
+ LLSD::Real first_frame_time = dc.size() > 0 ? dc[0][0].asReal() : 0.0f;
+ const bool use_fixed_sky = dc.size() == 1 && first_frame_time < 0;
+ mRegionSettingsRadioGroup->setSelectedIndex(settings.getSkyMap().size() == 0 ? 0 : 1);
+ mDayCycleSettingsRadioGroup->setSelectedIndex(use_fixed_sky ? 0 : 1);
+
+ setControlsEnabled(mEnableEditing);
+
+ setDirty(false);
+}
+
+void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
+{
+ mRegionSettingsRadioGroup->setEnabled(enabled);
+ mDayCycleSettingsRadioGroup->setEnabled(enabled);
+
+ mWaterPresetCombo->setEnabled(enabled);
+ mSkyPresetCombo->setEnabled(enabled);
+ mDayCyclePresetCombo->setEnabled(enabled);
+
+ getChildView("apply_btn")->setEnabled(enabled);
+ getChildView("cancel_btn")->setEnabled(enabled);
+
+ if (enabled)
+ {
+ // Enable/disable some controls based on currently selected radio buttons.
+ bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0;
+ getChild<LLView>("user_environment_settings")->setEnabled(!use_defaults);
+
+ bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+ mSkyPresetCombo->setEnabled(is_fixed_sky);
+ mDayCyclePresetCombo->setEnabled(!is_fixed_sky);
+ }
+}
+
+void LLPanelEnvironmentInfo::setApplyProgress(bool started)
+{
+ LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("progress_indicator");
+
+ indicator->setVisible(started);
+
+ if (started)
+ {
+ indicator->start();
+ }
+ else
+ {
+ indicator->stop();
+ }
+}
+
+void LLPanelEnvironmentInfo::setDirty(bool dirty)
+{
+ getChildView("apply_btn")->setEnabled(dirty);
+ getChildView("cancel_btn")->setEnabled(dirty);
+}
+
+void LLPanelEnvironmentInfo::sendRegionSunUpdate()
+{
+ LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
+
+ // If the region is being switched to fixed sky,
+ // change the region's sun hour according to the (fixed) sun position.
+ // This is needed for llGetSunDirection() LSL function to work properly (STORM-1330).
+ const LLSD& sky_map = mNewRegionSettings.getSkyMap();
+ bool region_use_fixed_sky = sky_map.size() == 1;
+ if (region_use_fixed_sky)
+ {
+ LLWLParamSet param_set;
+ llassert(sky_map.isMap());
+ param_set.setAll(sky_map.beginMap()->second);
+ F32 sun_angle = param_set.getSunAngle();
+
+ LL_DEBUGS("Windlight Sync") << "Old sun hour: " << region_info.mSunHour << LL_ENDL;
+ // convert value range from 0..2pi to 6..30
+ region_info.mSunHour = fmodf((sun_angle / F_TWO_PI) * 24.f, 24.f) + 6.f;
+ }
+
+ region_info.setUseFixedSun(region_use_fixed_sky);
+ region_info.mUseEstateSun = !region_use_fixed_sky;
+ LL_DEBUGS("Windlight Sync") << "Sun hour: " << region_info.mSunHour << LL_ENDL;
+
+ region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice());
+}
+
+void LLPanelEnvironmentInfo::populateWaterPresetsList()
+{
+ mWaterPresetCombo->removeall();
+
+ // If the region already has water params, add them to the list.
+ const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings();
+ if (region_settings.getWaterParams().size() != 0)
+ {
+ const std::string& region_name = gAgent.getRegion()->getName();
+ mWaterPresetCombo->add(region_name, LLWLParamKey(region_name, LLEnvKey::SCOPE_REGION).toLLSD());
+ mWaterPresetCombo->addSeparator();
+ }
+
+ std::list<std::string> user_presets, system_presets;
+ LLWaterParamManager::instance().getPresetNames(user_presets, system_presets);
+
+ // Add local user presets first.
+ for (std::list<std::string>::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mWaterPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+
+ if (user_presets.size() > 0)
+ {
+ mWaterPresetCombo->addSeparator();
+ }
+
+ // Add local system presets.
+ for (std::list<std::string>::const_iterator it = system_presets.begin(); it != system_presets.end(); ++it)
+ {
+ mWaterPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
+ }
+
+ // There's no way to select current preset because its name is not stored on server.
+}
+
+void LLPanelEnvironmentInfo::populateSkyPresetsList()
+{
+ mSkyPresetCombo->removeall();
+
+ LLWLParamManager::preset_name_list_t region_presets;
+ LLWLParamManager::preset_name_list_t user_presets, sys_presets;
+ LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
+
+ // Add region presets.
+ std::string region_name = gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown");
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = region_presets.begin(); it != region_presets.end(); ++it)
+ {
+ std::string preset_name = *it;
+ std::string item_title = preset_name + " (" + region_name + ")";
+ mSkyPresetCombo->add(item_title, LLWLParamKey(preset_name, LLEnvKey::SCOPE_REGION).toStringVal());
+ }
+
+ if (!region_presets.empty())
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+
+ // Add user presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ if (!user_presets.empty())
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ // Select current preset.
+ LLSD sky_map = LLEnvManagerNew::instance().getRegionSettings().getSkyMap();
+ if (sky_map.size() == 1) // if the region is set to fixed sky
+ {
+ std::string preset_name = sky_map.beginMap()->first;
+ mSkyPresetCombo->selectByValue(LLWLParamKey(preset_name, LLEnvKey::SCOPE_REGION).toStringVal());
+ }
+}
+
+void LLPanelEnvironmentInfo::populateDayCyclesList()
+{
+ mDayCyclePresetCombo->removeall();
+
+ // If the region already has env. settings, add its day cycle to the list.
+ const LLSD& cur_region_dc = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
+ if (cur_region_dc.size() != 0)
+ {
+ LLViewerRegion* region = gAgent.getRegion();
+ llassert(region != NULL);
+
+ LLWLParamKey key(region->getName(), LLEnvKey::SCOPE_REGION);
+ mDayCyclePresetCombo->add(region->getName(), key.toStringVal());
+ mDayCyclePresetCombo->addSeparator();
+ }
+
+ // Add local user day cycles.
+ LLDayCycleManager::preset_name_list_t user_days, sys_days;
+ LLDayCycleManager::instance().getPresetNames(user_days, sys_days);
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
+ {
+ mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ if (user_days.size() > 0)
+ {
+ mDayCyclePresetCombo->addSeparator();
+ }
+
+ // Add local system day cycles.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it)
+ {
+ mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ // Current day cycle is already selected.
+}
+
+bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params)
+{
+ LLWLParamKey water_key(mWaterPresetCombo->getSelectedValue());
+
+ if (water_key.scope == LLEnvKey::SCOPE_REGION)
+ {
+ water_params = LLEnvManagerNew::instance().getRegionSettings().getWaterParams();
+ }
+ else
+ {
+ LLWaterParamSet param_set;
+ if (!LLWaterParamManager::instance().getParamSet(water_key.name, param_set))
+ {
+ llwarns << "Error getting water preset: " << water_key.name << llendl;
+ return false;
+ }
+
+ water_params = param_set.getAll();
+ }
+
+ return true;
+}
+
+bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string& preset_name)
+{
+ std::string preset_key(mSkyPresetCombo->getValue().asString());
+ LLWLParamKey preset(preset_key);
+
+ // Get the preset sky params.
+ LLWLParamSet param_set;
+ if (!LLWLParamManager::instance().getParamSet(preset, param_set))
+ {
+ llwarns << "Error getting sky params: " << preset.toLLSD() << llendl;
+ return false;
+ }
+
+ sky_params = param_set.getAll();
+ preset_name = preset.name;
+ return true;
+}
+
+bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sky_map, short& scope)
+{
+ std::string preset_key(mDayCyclePresetCombo->getValue().asString());
+ LLWLParamKey dc(preset_key);
+ LL_DEBUGS("Windlight") << "Use day cycle: " << dc.toLLSD() << LL_ENDL;
+
+ if (dc.scope == LLEnvKey::SCOPE_REGION) // current region day cycle
+ {
+ const LLEnvironmentSettings& cur_region_settings = LLEnvManagerNew::instance().getRegionSettings();
+ day_cycle = cur_region_settings.getWLDayCycle();
+ sky_map = cur_region_settings.getSkyMap();
+ }
+ else // a local day cycle
+ {
+ if (!LLDayCycleManager::instance().getPreset(dc.name, day_cycle))
+ {
+ llwarns << "Error getting day cycle " << dc.name << llendl;
+ return false;
+ }
+
+ // Create sky map from the day cycle.
+ {
+ LLWLDayCycle tmp_day;
+ tmp_day.loadDayCycle(day_cycle, dc.scope);
+ tmp_day.getSkyMap(sky_map);
+ }
+ }
+
+ scope = dc.scope;
+
+ return true;
+}
+void LLPanelEnvironmentInfo::onSwitchRegionSettings()
+{
+ bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0;
+ getChild<LLView>("user_environment_settings")->setEnabled(!use_defaults);
+
+ if (use_defaults)
+ {
+ LLEnvManagerNew::instance().useDefaults();
+ }
+ else
+ {
+ onSelectWaterPreset();
+ onSwitchDayCycle();
+ }
+
+ setDirty(true);
+}
+
+void LLPanelEnvironmentInfo::onSwitchDayCycle()
+{
+ bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+
+ mSkyPresetCombo->setEnabled(is_fixed_sky);
+ mDayCyclePresetCombo->setEnabled(!is_fixed_sky);
+
+ if (is_fixed_sky)
+ {
+ onSelectSkyPreset();
+ }
+ else
+ {
+ onSelectDayCycle();
+ }
+
+ setDirty(true);
+}
+
+void LLPanelEnvironmentInfo::onSelectWaterPreset()
+{
+ LLSD water_params;
+
+ if (getSelectedWaterParams(water_params))
+ {
+ LLEnvManagerNew::instance().useWaterParams(water_params);
+ }
+
+ setDirty(true);
+}
+
+void LLPanelEnvironmentInfo::onSelectSkyPreset()
+{
+ LLSD params;
+ std::string dummy;
+
+ if (getSelectedSkyParams(params, dummy))
+ {
+ LLEnvManagerNew::instance().useSkyParams(params);
+ }
+
+ setDirty(true);
+}
+
+void LLPanelEnvironmentInfo::onSelectDayCycle()
+{
+ LLSD day_cycle;
+ LLSD sky_map; // unused
+ short scope;
+
+ if (getSelectedDayCycleParams(day_cycle, sky_map, scope))
+ {
+ LLEnvManagerNew::instance().useDayCycleParams(day_cycle, (LLEnvKey::EScope) scope);
+ }
+
+ setDirty(true);
+}
+
+void LLPanelEnvironmentInfo::onBtnApply()
+{
+ const bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0;
+ const bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+
+ LLSD day_cycle;
+ LLSD sky_map;
+ LLSD water_params;
+
+ if (use_defaults)
+ {
+ // settings will be empty
+ LL_DEBUGS("Windlight") << "Defaults" << LL_ENDL;
+ }
+ else // use custom region settings
+ {
+ if (use_fixed_sky)
+ {
+ LL_DEBUGS("Windlight") << "Use fixed sky" << LL_ENDL;
+
+ // Get selected sky params.
+ LLSD params;
+ std::string preset_name;
+ if (!getSelectedSkyParams(params, preset_name))
+ {
+ return;
+ }
+
+ // Create a day cycle consisting of a single sky preset.
+ LLSD key(LLSD::emptyArray());
+ key.append(-1.0f); // indicate that user preference is actually fixed sky, not a day cycle
+ key.append(preset_name);
+ day_cycle.append(key);
+
+ // Create a sky map consisting of only the sky preset.
+ std::map<LLWLParamKey, LLWLParamSet> refs;
+ LLWLParamSet param_set;
+ param_set.setAll(params);
+ refs[LLWLParamKey(preset_name, LLEnvKey::SCOPE_LOCAL)] = param_set; // scope doesn't matter here
+ sky_map = LLWLParamManager::createSkyMap(refs);
+ }
+ else // use day cycle
+ {
+ LL_DEBUGS("Windlight") << "Use day cycle" << LL_ENDL;
+
+ short scope; // unused
+ if (!getSelectedDayCycleParams(day_cycle, sky_map, scope))
+ {
+ return;
+ }
+
+ // If it's a special single-preset day cycle meaning using a fixed sky,
+ // reset the frame time to a non-negative value,
+ // so that the region setting is displayed in the floater as
+ // a day cycle, not a preset. (STORM-1289)
+ if (day_cycle.size() == 1 && day_cycle[0][0].asReal() < 0.0f)
+ {
+ LL_DEBUGS("Windlight") << "Fixing negative time" << LL_ENDL;
+ day_cycle[0][0] = 0.0f;
+ }
+ }
+
+ // Get water params.
+ if (!getSelectedWaterParams(water_params))
+ {
+ // *TODO: show a notification?
+ return;
+ }
+ }
+
+ // Send settings apply request.
+ LLEnvironmentSettings new_region_settings;
+ new_region_settings.saveParams(day_cycle, sky_map, water_params, 0.0f);
+ if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings))
+ {
+ llwarns << "Error applying region environment settings" << llendl;
+ return;
+ }
+
+ // When the settings get applied, we'll also send the region sun position update.
+ // To determine the sun angle we're going to need the new settings.
+ mNewRegionSettings = new_region_settings;
+
+ // Start spinning the progress indicator.
+ setApplyProgress(true);
+}
+
+void LLPanelEnvironmentInfo::onBtnCancel()
+{
+ // Reload last saved region settings.
+ refresh();
+
+ // Apply them.
+ LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
+ const LLEnvironmentSettings& cur_settings = env_mgr.getRegionSettings();
+ const LLSD& region_day_cycle = cur_settings.getWLDayCycle();
+ const LLSD& region_water = cur_settings.getWaterParams();
+ env_mgr.useWaterParams(region_water);
+ env_mgr.useDayCycleParams(region_day_cycle, LLEnvKey::SCOPE_REGION);
+}
+
+void LLPanelEnvironmentInfo::onRegionSettingschange()
+{
+ LL_DEBUGS("Windlight") << "Region settings changed, refreshing" << LL_ENDL;
+ refresh();
+
+ // Stop applying progress indicator (it may be running if it's us who initiated settings update).
+ setApplyProgress(false);
+}
+
+void LLPanelEnvironmentInfo::onRegionSettingsApplied(bool ok)
+{
+ // If applying new settings has failed, stop the indicator right away.
+ // Otherwise it will be stopped when we receive the updated settings from server.
+ if (ok)
+ {
+ // Set the region sun phase/flags according to the chosen new preferences.
+ //
+ // If we do this earlier we may get jerky transition from fixed sky to a day cycle (STORM-1481).
+ // That is caused by the simulator re-sending the region info, which in turn makes us
+ // re-request and display old region environment settings while the new ones haven't been applied yet.
+ sendRegionSunUpdate();
+ }
+ else
+ {
+ setApplyProgress(false);
+
+ // We need to re-request environment setting here,
+ // otherwise our subsequent attempts to change region settings will fail with the following error:
+ // "Unable to update environment settings because the last update your viewer saw was not the same
+ // as the last update sent from the simulator. Try sending your update again, and if this
+ // does not work, try leaving and returning to the region."
+ LLEnvManagerNew::instance().requestRegionSettings();
+ }
+}
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 2b87c27fcf..e7917c382c 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -34,6 +34,8 @@
#include "llhost.h"
#include "llpanel.h"
+#include "llenvmanager.h" // for LLEnvironmentSettings
+
class LLAvatarName;
class LLDispatcher;
class LLLineEditor;
@@ -46,6 +48,7 @@ class LLInventoryItem;
class LLCheckBoxCtrl;
class LLComboBox;
class LLNameListCtrl;
+class LLRadioGroup;
class LLSliderCtrl;
class LLSpinCtrl;
class LLTextBox;
@@ -53,11 +56,17 @@ class LLVFS;
class LLPanelRegionGeneralInfo;
class LLPanelRegionDebugInfo;
-class LLPanelRegionTextureInfo;
class LLPanelRegionTerrainInfo;
class LLPanelEstateInfo;
class LLPanelEstateCovenant;
+class LLEventTimer;
+class LLEnvironmentSettings;
+class LLWLParamManager;
+class LLWaterParamManager;
+class LLWLParamSet;
+class LLWaterParamSet;
+
class LLFloaterRegionInfo : public LLFloater
{
friend class LLFloaterReg;
@@ -79,6 +88,7 @@ public:
static LLPanelEstateInfo* getPanelEstate();
static LLPanelEstateCovenant* getPanelCovenant();
+ static LLPanelRegionTerrainInfo* getPanelRegionTerrain();
// from LLPanel
virtual void refresh();
@@ -96,6 +106,7 @@ private:
boost::signals2::connection mConsoleReplySignalConnection;;
protected:
+ void onTabSelected(const LLSD& param);
void refreshFromRegion(LLViewerRegion* region);
// member data
@@ -208,44 +219,25 @@ private:
/////////////////////////////////////////////////////////////////////////////
-class LLPanelRegionTextureInfo : public LLPanelRegionInfo
+class LLPanelRegionTerrainInfo : public LLPanelRegionInfo
{
+ LOG_CLASS(LLPanelRegionTerrainInfo);
+
public:
- LLPanelRegionTextureInfo();
- ~LLPanelRegionTextureInfo() {}
-
- virtual bool refreshFromRegion(LLViewerRegion* region);
-
- // LLPanel && LLView
- virtual BOOL postBuild();
+ LLPanelRegionTerrainInfo() : LLPanelRegionInfo() {}
+ ~LLPanelRegionTerrainInfo() {}
-protected:
- virtual BOOL sendUpdate();
+ virtual BOOL postBuild(); // LLPanel
- static void onClickDump(void* data);
- BOOL validateTextureSizes();
-};
+ virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator
+ void setEnvControls(bool available); // Whether environment settings are available for this region
-/////////////////////////////////////////////////////////////////////////////
+ BOOL validateTextureSizes();
-class LLPanelRegionTerrainInfo : public LLPanelRegionInfo
-{
-public:
- LLPanelRegionTerrainInfo()
- : LLPanelRegionInfo() {}
- ~LLPanelRegionTerrainInfo() {}
- // LLPanel
- virtual BOOL postBuild();
+ //static void onChangeAnything(LLUICtrl* ctrl, void* userData); // callback for any change, to enable commit button
- virtual bool refreshFromRegion(LLViewerRegion* region);
-
-protected:
virtual BOOL sendUpdate();
- void onChangeUseEstateTime();
- void onChangeFixedSun();
- void onChangeSunHour();
-
static void onClickDownloadRaw(void*);
static void onClickUploadRaw(void*);
static void onClickBakeTerrain(void*);
@@ -319,10 +311,10 @@ public:
BOOL getGlobalTime();
void setGlobalTime(bool b);
- BOOL getFixedSun();
+ BOOL getFixedSun(); // *TODO: deprecated
- F32 getSunHour();
- void setSunHour(F32 sun_hour);
+ F32 getSunHour(); // *TODO: deprecated
+ void setSunHour(F32 sun_hour); // *TODO: deprecated
const std::string getEstateName() const;
void setEstateName(const std::string& name);
@@ -337,7 +329,6 @@ public:
// If visible from mainland, allowed agent and allowed groups
// are ignored, so must disable UI.
void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban);
-
protected:
virtual BOOL sendUpdate();
// confirmation dialog callback
@@ -417,4 +408,65 @@ protected:
EAssetStatus mAssetStatus;
};
+/////////////////////////////////////////////////////////////////////////////
+
+class LLPanelEnvironmentInfo : public LLPanelRegionInfo
+{
+ LOG_CLASS(LLPanelEnvironmentInfo);
+
+public:
+ LLPanelEnvironmentInfo();
+
+ // LLPanel
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ // LLView
+ /*virtual*/ void handleVisibilityChange(BOOL new_visibility);
+
+ // LLPanelRegionInfo
+ /*virtual*/ bool refreshFromRegion(LLViewerRegion* region);
+
+private:
+ void refresh();
+ void setControlsEnabled(bool enabled);
+ void setApplyProgress(bool started);
+ void setDirty(bool dirty);
+
+ void sendRegionSunUpdate();
+
+ void populateWaterPresetsList();
+ void populateSkyPresetsList();
+ void populateDayCyclesList();
+
+ bool getSelectedWaterParams(LLSD& water_params);
+ bool getSelectedSkyParams(LLSD& sky_params, std::string& preset_name);
+ bool getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sky_map, short& scope);
+
+ void onSwitchRegionSettings();
+ void onSwitchDayCycle();
+
+ void onSelectWaterPreset();
+ void onSelectSkyPreset();
+ void onSelectDayCycle();
+
+ void onBtnApply();
+ void onBtnCancel();
+
+ void onRegionSettingschange();
+ void onRegionSettingsApplied(bool ok);
+
+ /// New environment settings that are being applied to the region.
+ LLEnvironmentSettings mNewRegionSettings;
+
+ bool mEnableEditing;
+
+ LLRadioGroup* mRegionSettingsRadioGroup;
+ LLRadioGroup* mDayCycleSettingsRadioGroup;
+
+ LLComboBox* mWaterPresetCombo;
+ LLComboBox* mSkyPresetCombo;
+ LLComboBox* mDayCyclePresetCombo;
+};
+
#endif
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 8558a1277c..3434841d09 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -41,6 +41,7 @@
#include "llviewerparcelmgr.h"
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
+#include "lltrans.h"
class LLAvatarName;
@@ -451,7 +452,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
// Do a confirmation
S32 sale_price = self->getChild<LLUICtrl>("price")->getValue();
S32 area = parcel->getArea();
- std::string authorizedBuyerName = "Anyone";
+ std::string authorizedBuyerName = LLTrans::getString("Anyone");
bool sell_to_anyone = true;
if ("user" == self->getChild<LLUICtrl>("sell_to")->getValue().asString())
{
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index edcb96314b..33b7777d2e 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -86,6 +86,7 @@
#include "llvovolume.h"
#include "lluictrlfactory.h"
#include "llaccountingquotamanager.h"
+#include "llmeshrepository.h"
// Globals
LLFloaterTools *gFloaterTools = NULL;
@@ -423,7 +424,7 @@ void LLFloaterTools::refresh()
// Refresh object and prim count labels
LLLocale locale(LLLocale::USER_LOCALE);
- if ((gAgent.getRegion() && (gAgent.getRegion()->getCapability("GetMesh").empty() || gAgent.getRegion()->getCapability("ObjectAdd").empty())) || !gSavedSettings.getBOOL("MeshEnabled"))
+ if (!gMeshRepo.meshRezEnabled())
{
std::string obj_count_string;
LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
@@ -788,10 +789,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
getChildView("Strength:")->setVisible( land_visible);
}
- bool show_mesh_cost = gAgent.getRegion() &&
- !gAgent.getRegion()->getCapability("GetMesh").empty() &&
- gSavedSettings.getBOOL("MeshEnabled") &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty();
+ bool show_mesh_cost = gMeshRepo.meshRezEnabled();
getChildView("obj_count")->setVisible( !land_visible && !show_mesh_cost);
getChildView("prim_count")->setVisible( !land_visible && !show_mesh_cost);
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp
deleted file mode 100644
index be4b144f41..0000000000
--- a/indra/newview/llfloaterwater.cpp
+++ /dev/null
@@ -1,625 +0,0 @@
-/**
- * @file llfloaterwater.cpp
- * @brief LLFloaterWater class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterwater.h"
-
-#include "pipeline.h"
-#include "llsky.h"
-
-#include "llfloaterreg.h"
-#include "llsliderctrl.h"
-#include "llspinctrl.h"
-#include "llcolorswatch.h"
-#include "llcheckboxctrl.h"
-#include "lltexturectrl.h"
-#include "lluictrlfactory.h"
-#include "llviewercamera.h"
-#include "llcombobox.h"
-#include "lllineeditor.h"
-#include "llnotificationsutil.h"
-#include "llfloaterdaycycle.h"
-#include "llboost.h"
-#include "llmultisliderctrl.h"
-
-#include "v4math.h"
-#include "llviewerdisplay.h"
-#include "llviewercontrol.h"
-#include "llviewerwindow.h"
-#include "llsavedsettingsglue.h"
-
-#include "llwaterparamset.h"
-#include "llwaterparammanager.h"
-#include "llpostprocess.h"
-
-#undef max
-
-std::set<std::string> LLFloaterWater::sDefaultPresets;
-
-LLFloaterWater::LLFloaterWater(const LLSD& key)
- : LLFloater(key)
-{
-}
-
-LLFloaterWater::~LLFloaterWater()
-{
-}
-BOOL LLFloaterWater::postBuild()
-{
-
- std::string def_water = getString("WLDefaultWaterNames");
-
- // no editing or deleting of the blank string
- sDefaultPresets.insert("");
- boost_tokenizer tokens(def_water, boost::char_separator<char>(":"));
- for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
- {
- std::string tok(*token_iter);
- sDefaultPresets.insert(tok);
- }
-
- // add the combo boxes
- LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
-
- if(comboBox != NULL) {
-
- std::map<std::string, LLWaterParamSet>::iterator mIt =
- LLWaterParamManager::instance()->mParamList.begin();
- for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++)
- {
- comboBox->add(mIt->first);
- }
-
- // set defaults on combo boxes
- comboBox->selectByValue(LLSD("Default"));
- }
- // load it up
- initCallbacks();
- syncMenu();
- return TRUE;
-}
-void LLFloaterWater::initCallbacks(void) {
-
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
-
- getChild<LLUICtrl>("WaterFogColor")->setCommitCallback(boost::bind(&LLFloaterWater::onWaterFogColorMoved, this, _1, &param_mgr->mFogColor));
-
- //
- getChild<LLUICtrl>("WaterGlow")->setCommitCallback(boost::bind(&LLFloaterWater::onColorControlAMoved, this, _1, &param_mgr->mFogColor));
-
- // fog density
- getChild<LLUICtrl>("WaterFogDensity")->setCommitCallback(boost::bind(&LLFloaterWater::onExpFloatControlMoved, this, _1, &param_mgr->mFogDensity));
- getChild<LLUICtrl>("WaterUnderWaterFogMod")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mUnderWaterFogMod));
-
- // blue density
- getChild<LLUICtrl>("WaterNormalScaleX")->setCommitCallback(boost::bind(&LLFloaterWater::onVector3ControlXMoved, this, _1, &param_mgr->mNormalScale));
- getChild<LLUICtrl>("WaterNormalScaleY")->setCommitCallback(boost::bind(&LLFloaterWater::onVector3ControlYMoved, this, _1, &param_mgr->mNormalScale));
- getChild<LLUICtrl>("WaterNormalScaleZ")->setCommitCallback(boost::bind(&LLFloaterWater::onVector3ControlZMoved, this, _1, &param_mgr->mNormalScale));
-
- // fresnel
- getChild<LLUICtrl>("WaterFresnelScale")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mFresnelScale));
- getChild<LLUICtrl>("WaterFresnelOffset")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mFresnelOffset));
-
- // scale above/below
- getChild<LLUICtrl>("WaterScaleAbove")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mScaleAbove));
- getChild<LLUICtrl>("WaterScaleBelow")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mScaleBelow));
-
- // blur mult
- getChild<LLUICtrl>("WaterBlurMult")->setCommitCallback(boost::bind(&LLFloaterWater::onFloatControlMoved, this, _1, &param_mgr->mBlurMultiplier));
-
- // Load/save
-// getChild<LLUICtrl>("WaterLoadPreset")->setCommitCallback(boost::bind(&LLFloaterWater::onLoadPreset, this));
- getChild<LLUICtrl>("WaterNewPreset")->setCommitCallback(boost::bind(&LLFloaterWater::onNewPreset, this));
- getChild<LLUICtrl>("WaterSavePreset")->setCommitCallback(boost::bind(&LLFloaterWater::onSavePreset, this));
- getChild<LLUICtrl>("WaterDeletePreset")->setCommitCallback(boost::bind(&LLFloaterWater::onDeletePreset, this));
-
- // wave direction
- getChild<LLUICtrl>("WaterWave1DirX")->setCommitCallback(boost::bind(&LLFloaterWater::onVector2ControlXMoved, this, _1, &param_mgr->mWave1Dir));
- getChild<LLUICtrl>("WaterWave1DirY")->setCommitCallback(boost::bind(&LLFloaterWater::onVector2ControlYMoved, this, _1, &param_mgr->mWave1Dir));
- getChild<LLUICtrl>("WaterWave2DirX")->setCommitCallback(boost::bind(&LLFloaterWater::onVector2ControlXMoved, this, _1, &param_mgr->mWave2Dir));
- getChild<LLUICtrl>("WaterWave2DirY")->setCommitCallback(boost::bind(&LLFloaterWater::onVector2ControlYMoved, this, _1, &param_mgr->mWave2Dir));
-
- getChild<LLUICtrl>("WaterPresetsCombo")->setCommitCallback(boost::bind(&LLFloaterWater::onChangePresetName, this, _1));
-
- LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
- textCtrl->setDefaultImageAssetID(DEFAULT_WATER_NORMAL);
- getChild<LLUICtrl>("WaterNormalMap")->setCommitCallback(boost::bind(&LLFloaterWater::onNormalMapPicked, this, _1));
-}
-
-bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& response)
-{
- std::string text = response["message"].asString();
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- if(text == "")
- {
- return false;
- }
-
- if(option == 0) {
- LLComboBox* comboBox = getChild<LLComboBox>( "WaterPresetsCombo");
-
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
-
- // add the current parameters to the list
- // see if it's there first
- std::map<std::string, LLWaterParamSet>::iterator mIt =
- param_mgr->mParamList.find(text);
-
- // if not there, add a new one
- if(mIt == param_mgr->mParamList.end())
- {
- param_mgr->addParamSet(text, param_mgr->mCurParams);
- comboBox->add(text);
- comboBox->sortByName();
-
- comboBox->setSelectedByValue(text, true);
-
- param_mgr->savePreset(text);
-
- // otherwise, send a message to the user
- }
- else
- {
- LLNotificationsUtil::add("ExistsWaterPresetAlert");
- }
- }
- return false;
-}
-
-void LLFloaterWater::syncMenu()
-{
- bool err;
-
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
-
- LLWaterParamSet & current_params = param_mgr->mCurParams;
-
- // blue horizon
- param_mgr->mFogColor = current_params.getVector4(param_mgr->mFogColor.mName, err);
-
- LLColor4 col = param_mgr->getFogColor();
- getChild<LLUICtrl>("WaterGlow")->setValue(col.mV[3]);
- col.mV[3] = 1.0f;
- LLColorSwatchCtrl* colCtrl = getChild<LLColorSwatchCtrl>("WaterFogColor");
-
- colCtrl->set(col);
-
- // fog and wavelets
- param_mgr->mFogDensity.mExp =
- log(current_params.getFloat(param_mgr->mFogDensity.mName, err)) /
- log(param_mgr->mFogDensity.mBase);
- param_mgr->setDensitySliderValue(param_mgr->mFogDensity.mExp);
- getChild<LLUICtrl>("WaterFogDensity")->setValue(param_mgr->mFogDensity.mExp);
-
- param_mgr->mUnderWaterFogMod.mX =
- current_params.getFloat(param_mgr->mUnderWaterFogMod.mName, err);
- getChild<LLUICtrl>("WaterUnderWaterFogMod")->setValue(param_mgr->mUnderWaterFogMod.mX);
-
- param_mgr->mNormalScale = current_params.getVector3(param_mgr->mNormalScale.mName, err);
- getChild<LLUICtrl>("WaterNormalScaleX")->setValue(param_mgr->mNormalScale.mX);
- getChild<LLUICtrl>("WaterNormalScaleY")->setValue(param_mgr->mNormalScale.mY);
- getChild<LLUICtrl>("WaterNormalScaleZ")->setValue(param_mgr->mNormalScale.mZ);
-
- // Fresnel
- param_mgr->mFresnelScale.mX = current_params.getFloat(param_mgr->mFresnelScale.mName, err);
- getChild<LLUICtrl>("WaterFresnelScale")->setValue(param_mgr->mFresnelScale.mX);
- param_mgr->mFresnelOffset.mX = current_params.getFloat(param_mgr->mFresnelOffset.mName, err);
- getChild<LLUICtrl>("WaterFresnelOffset")->setValue(param_mgr->mFresnelOffset.mX);
-
- // Scale Above/Below
- param_mgr->mScaleAbove.mX = current_params.getFloat(param_mgr->mScaleAbove.mName, err);
- getChild<LLUICtrl>("WaterScaleAbove")->setValue(param_mgr->mScaleAbove.mX);
- param_mgr->mScaleBelow.mX = current_params.getFloat(param_mgr->mScaleBelow.mName, err);
- getChild<LLUICtrl>("WaterScaleBelow")->setValue(param_mgr->mScaleBelow.mX);
-
- // blur mult
- param_mgr->mBlurMultiplier.mX = current_params.getFloat(param_mgr->mBlurMultiplier.mName, err);
- getChild<LLUICtrl>("WaterBlurMult")->setValue(param_mgr->mBlurMultiplier.mX);
-
- // wave directions
- param_mgr->mWave1Dir = current_params.getVector2(param_mgr->mWave1Dir.mName, err);
- getChild<LLUICtrl>("WaterWave1DirX")->setValue(param_mgr->mWave1Dir.mX);
- getChild<LLUICtrl>("WaterWave1DirY")->setValue(param_mgr->mWave1Dir.mY);
-
- param_mgr->mWave2Dir = current_params.getVector2(param_mgr->mWave2Dir.mName, err);
- getChild<LLUICtrl>("WaterWave2DirX")->setValue(param_mgr->mWave2Dir.mX);
- getChild<LLUICtrl>("WaterWave2DirY")->setValue(param_mgr->mWave2Dir.mY);
-
- LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
- textCtrl->setImageAssetID(param_mgr->getNormalMapID());
-}
-
-
-// vector control callbacks
-void LLFloaterWater::onVector3ControlXMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vectorControl->mX = sldrCtrl->getValueF32();
-
- vectorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-// vector control callbacks
-void LLFloaterWater::onVector3ControlYMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vectorControl->mY = sldrCtrl->getValueF32();
-
- vectorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-// vector control callbacks
-void LLFloaterWater::onVector3ControlZMoved(LLUICtrl* ctrl, WaterVector3Control* vectorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vectorControl->mZ = sldrCtrl->getValueF32();
-
- vectorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-
-// vector control callbacks
-void LLFloaterWater::onVector2ControlXMoved(LLUICtrl* ctrl, WaterVector2Control* vectorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vectorControl->mX = sldrCtrl->getValueF32();
-
- vectorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-// vector control callbacks
-void LLFloaterWater::onVector2ControlYMoved(LLUICtrl* ctrl, WaterVector2Control* vectorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vectorControl->mY = sldrCtrl->getValueF32();
-
- vectorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-// color control callbacks
-void LLFloaterWater::onColorControlRMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->mR = sldrCtrl->getValueF32();
-
- // move i if it's the max
- if(colorControl->mR >= colorControl->mG
- && colorControl->mR >= colorControl->mB
- && colorControl->mHasSliderName)
- {
- colorControl->mI = colorControl->mR;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- getChild<LLUICtrl>(name)->setValue(colorControl->mR);
- }
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onColorControlGMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->mG = sldrCtrl->getValueF32();
-
- // move i if it's the max
- if(colorControl->mG >= colorControl->mR
- && colorControl->mG >= colorControl->mB
- && colorControl->mHasSliderName)
- {
- colorControl->mI = colorControl->mG;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- getChild<LLUICtrl>(name)->setValue(colorControl->mG);
-
- }
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onColorControlBMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->mB = sldrCtrl->getValueF32();
-
- // move i if it's the max
- if(colorControl->mB >= colorControl->mR
- && colorControl->mB >= colorControl->mG
- && colorControl->mHasSliderName)
- {
- colorControl->mI = colorControl->mB;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- getChild<LLUICtrl>(name)->setValue(colorControl->mB);
- }
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->mA = sldrCtrl->getValueF32();
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
-
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-
-void LLFloaterWater::onColorControlIMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->mI = sldrCtrl->getValueF32();
-
- // only for sliders where we pass a name
- if(colorControl->mHasSliderName)
- {
- // set it to the top
- F32 maxVal = std::max(std::max(colorControl->mR, colorControl->mG), colorControl->mB);
- F32 iVal;
-
- iVal = colorControl->mI;
-
- // get the names of the other sliders
- std::string rName = colorControl->mSliderName;
- rName.append("R");
- std::string gName = colorControl->mSliderName;
- gName.append("G");
- std::string bName = colorControl->mSliderName;
- bName.append("B");
-
- // handle if at 0
- if(iVal == 0)
- {
- colorControl->mR = 0;
- colorControl->mG = 0;
- colorControl->mB = 0;
-
- // if all at the start
- // set them all to the intensity
- }
- else if (maxVal == 0)
- {
- colorControl->mR = iVal;
- colorControl->mG = iVal;
- colorControl->mB = iVal;
- }
- else
- {
- // add delta amounts to each
- F32 delta = (iVal - maxVal) / maxVal;
- colorControl->mR *= (1.0f + delta);
- colorControl->mG *= (1.0f + delta);
- colorControl->mB *= (1.0f + delta);
- }
-
- // set the sliders to the new vals
- getChild<LLUICtrl>(rName)->setValue(colorControl->mR);
- getChild<LLUICtrl>(gName)->setValue(colorControl->mG);
- getChild<LLUICtrl>(bName)->setValue(colorControl->mB);
- }
-
- // now update the current parameters and send them to shaders
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onExpFloatControlMoved(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- F32 val = sldrCtrl->getValueF32();
- expFloatControl->mExp = val;
- LLWaterParamManager::instance()->setDensitySliderValue(val);
-
- expFloatControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onFloatControlMoved(LLUICtrl* ctrl, WaterFloatControl* floatControl)
-{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- floatControl->mX = sldrCtrl->getValueF32() / floatControl->mMult;
-
- floatControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-void LLFloaterWater::onWaterFogColorMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
-{
- LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
- *colorControl = swatch->get();
-
- colorControl->update(LLWaterParamManager::instance()->mCurParams);
- LLWaterParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWater::onNormalMapPicked(LLUICtrl* ctrl)
-{
- LLTextureCtrl* textCtrl = static_cast<LLTextureCtrl*>(ctrl);
- LLUUID textID = textCtrl->getImageAssetID();
- LLWaterParamManager::instance()->setNormalMapID(textID);
-}
-
-void LLFloaterWater::onNewPreset()
-{
- LLNotificationsUtil::add("NewWaterPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWater::newPromptCallback, this, _1, _2));
-}
-
-void LLFloaterWater::onSavePreset()
-{
- // get the name
- LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
-
- // don't save the empty name
- if(comboBox->getSelectedItemLabel() == "")
- {
- return;
- }
-
- LLWaterParamManager::instance()->mCurParams.mName =
- comboBox->getSelectedItemLabel();
-
- // check to see if it's a default and shouldn't be overwritten
- std::set<std::string>::iterator sIt = sDefaultPresets.find(
- comboBox->getSelectedItemLabel());
- if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets"))
- {
- LLNotificationsUtil::add("WLNoEditDefault");
- return;
- }
-
- LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWater::saveAlertCallback, this, _1, _2));
-}
-
-bool LLFloaterWater::saveAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- // if they choose save, do it. Otherwise, don't do anything
- if(option == 0)
- {
- LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
-
- param_mgr->setParamSet(
- param_mgr->mCurParams.mName,
- param_mgr->mCurParams);
-
- // comment this back in to save to file
- param_mgr->savePreset(param_mgr->mCurParams.mName);
- }
- return false;
-}
-
-void LLFloaterWater::onDeletePreset()
-{
- LLComboBox* combo_box = getChild<LLComboBox>("WaterPresetsCombo");
-
- if(combo_box->getSelectedValue().asString() == "")
- {
- return;
- }
-
- LLSD args;
- args["SKY"] = combo_box->getSelectedValue().asString();
- LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(), boost::bind(&LLFloaterWater::deleteAlertCallback, this, _1, _2));
-}
-
-bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- // if they choose delete, do it. Otherwise, don't do anything
- if(option == 0)
- {
- LLComboBox* combo_box = getChild<LLComboBox>("WaterPresetsCombo");
- LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
- LLComboBox* key_combo = NULL;
-
- if (day_cycle)
- {
- key_combo = day_cycle->getChild<LLComboBox>("WaterKeyPresets");
- }
-
- std::string name = combo_box->getSelectedValue().asString();
-
- // check to see if it's a default and shouldn't be deleted
- std::set<std::string>::iterator sIt = sDefaultPresets.find(name);
- if(sIt != sDefaultPresets.end())
- {
- LLNotificationsUtil::add("WaterNoEditDefault");
- return false;
- }
-
- LLWaterParamManager::instance()->removeParamSet(name, true);
-
- // remove and choose another
- S32 new_index = combo_box->getCurrentIndex();
-
- combo_box->remove(name);
-
- if(key_combo != NULL)
- {
- key_combo->remove(name);
-
- // remove from slider, as well
- day_cycle->deletePreset(name);
- }
-
- // pick the previously selected index after delete
- if(new_index > 0)
- {
- new_index--;
- }
-
- if(combo_box->getItemCount() > 0)
- {
- combo_box->setCurrentByIndex(new_index);
- }
- }
- return false;
-}
-
-
-void LLFloaterWater::onChangePresetName(LLUICtrl* ctrl)
-{
- std::string data = ctrl->getValue().asString();
- if(!data.empty())
- {
- LLWaterParamManager::instance()->loadPreset(data);
- syncMenu();
- }
-}
-
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 058567492b..43eecbf048 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -99,7 +99,7 @@ void LLFloaterWebContent::initializeURLHistory()
}
//static
-void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid )
+void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid, bool show_chrome, const LLRect& preferred_media_size)
{
lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl;
@@ -155,6 +155,20 @@ void LLFloaterWebContent::create( const std::string &url, const std::string& tar
// tell the browser instance to load the specified URL
browser->open_media(url, target);
LLViewerMedia::proxyWindowOpened(target, uuid);
+
+ browser->getChild<LLLayoutPanel>("status_bar")->setVisible(show_chrome);
+ browser->getChild<LLLayoutPanel>("nav_controls")->setVisible(show_chrome);
+
+ if (!show_chrome)
+ {
+ browser->setResizeLimits(100, 100);
+ }
+
+ if (!preferred_media_size.isEmpty())
+ {
+ //ignore x, y for now
+ browser->geometryChanged(browser->getRect().mLeft, browser->getRect().mBottom, preferred_media_size.getWidth(), preferred_media_size.getHeight());
+ }
}
}
@@ -210,7 +224,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
lldebugs << "geometry change: " << geom << llendl;
- handleReshape(geom,false);
+ setShape(geom);
}
void LLFloaterWebContent::open_media(const std::string& web_url, const std::string& target)
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index ecc7e970d8..56b6ef12c8 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -46,7 +46,7 @@ public:
void initializeURLHistory();
- static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
+ static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null, bool show_chrome = true, const LLRect& preferred_media_size = LLRect() );
static void closeRequest(const std::string &uuid);
static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp
deleted file mode 100644
index ae98b2cf99..0000000000
--- a/indra/newview/llfloaterwindlight.cpp
+++ /dev/null
@@ -1,875 +0,0 @@
-/**
- * @file llfloaterwindlight.cpp
- * @brief LLFloaterWindLight class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterwindlight.h"
-
-#include "pipeline.h"
-#include "llsky.h"
-
-#include "llfloaterreg.h"
-#include "llsliderctrl.h"
-#include "llmultislider.h"
-#include "llmultisliderctrl.h"
-#include "llnotificationsutil.h"
-#include "llspinctrl.h"
-#include "llcheckboxctrl.h"
-#include "lluictrlfactory.h"
-#include "llviewercamera.h"
-#include "llcombobox.h"
-#include "lllineeditor.h"
-#include "llfloaterdaycycle.h"
-#include "llboost.h"
-
-#include "v4math.h"
-#include "llviewerdisplay.h"
-#include "llviewercontrol.h"
-#include "llviewerwindow.h"
-#include "llsavedsettingsglue.h"
-
-#include "llwlparamset.h"
-#include "llwlparammanager.h"
-#include "llpostprocess.h"
-#include "lltabcontainer.h"
-
-
-#undef max
-
-std::set<std::string> LLFloaterWindLight::sDefaultPresets;
-
-static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f;
-
-LLFloaterWindLight::LLFloaterWindLight(const LLSD& key)
- : LLFloater(key)
-{
-}
-
-LLFloaterWindLight::~LLFloaterWindLight()
-{
-}
-
-BOOL LLFloaterWindLight::postBuild()
-{
- // add the list of presets
- std::string def_days = getString("WLDefaultSkyNames");
-
- // no editing or deleting of the blank string
- sDefaultPresets.insert("");
- boost_tokenizer tokens(def_days, boost::char_separator<char>(":"));
- for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
- {
- std::string tok(*token_iter);
- sDefaultPresets.insert(tok);
- }
-
- // add the combo boxes
- LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
-
- if(comboBox != NULL) {
-
- std::map<std::string, LLWLParamSet>::iterator mIt =
- LLWLParamManager::instance()->mParamList.begin();
- for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++)
- {
- comboBox->add(mIt->first);
- }
-
- // entry for when we're in estate time
- comboBox->add(LLStringUtil::null);
-
- // set defaults on combo boxes
- comboBox->selectByValue(LLSD("Default"));
- }
- // load it up
- initCallbacks();
-
- syncMenu();
-
- return TRUE;
-}
-void LLFloaterWindLight::initCallbacks(void) {
-
- LLWLParamManager * param_mgr = LLWLParamManager::instance();
-
- // blue horizon
- getChild<LLUICtrl>("WLBlueHorizonR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mBlueHorizon));
- getChild<LLUICtrl>("WLBlueHorizonG")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mBlueHorizon));
- getChild<LLUICtrl>("WLBlueHorizonB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mBlueHorizon));
- getChild<LLUICtrl>("WLBlueHorizonI")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlIMoved, this, _1, &param_mgr->mBlueHorizon));
-
- // haze density, horizon, mult, and altitude
- getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mHazeDensity));
- getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mHazeHorizon));
- getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mDensityMult));
- getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mMaxAlt));
-
- // blue density
- getChild<LLUICtrl>("WLBlueDensityR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mBlueDensity));
- getChild<LLUICtrl>("WLBlueDensityG")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mBlueDensity));
- getChild<LLUICtrl>("WLBlueDensityB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mBlueDensity));
- getChild<LLUICtrl>("WLBlueDensityI")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlIMoved, this, _1, &param_mgr->mBlueDensity));
-
- // Lighting
-
- // sunlight
- getChild<LLUICtrl>("WLSunlightR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mSunlight));
- getChild<LLUICtrl>("WLSunlightG")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mSunlight));
- getChild<LLUICtrl>("WLSunlightB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mSunlight));
- getChild<LLUICtrl>("WLSunlightI")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlIMoved, this, _1, &param_mgr->mSunlight));
-
- // glow
- getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onGlowRMoved, this, _1, &param_mgr->mGlow));
- getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onGlowBMoved, this, _1, &param_mgr->mGlow));
-
- // ambient
- getChild<LLUICtrl>("WLAmbientR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mAmbient));
- getChild<LLUICtrl>("WLAmbientG")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mAmbient));
- getChild<LLUICtrl>("WLAmbientB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mAmbient));
- getChild<LLUICtrl>("WLAmbientI")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlIMoved, this, _1, &param_mgr->mAmbient));
-
- // time of day
- getChild<LLUICtrl>("WLSunAngle")->setCommitCallback(boost::bind(&LLFloaterWindLight::onSunMoved, this, _1, &param_mgr->mLightnorm));
- getChild<LLUICtrl>("WLEastAngle")->setCommitCallback(boost::bind(&LLFloaterWindLight::onSunMoved, this, _1, &param_mgr->mLightnorm));
-
- // Clouds
-
- // Cloud Color
- getChild<LLUICtrl>("WLCloudColorR")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mCloudColor));
- getChild<LLUICtrl>("WLCloudColorG")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mCloudColor));
- getChild<LLUICtrl>("WLCloudColorB")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mCloudColor));
- getChild<LLUICtrl>("WLCloudColorI")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlIMoved, this, _1, &param_mgr->mCloudColor));
-
- // Cloud
- getChild<LLUICtrl>("WLCloudX")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mCloudMain));
- getChild<LLUICtrl>("WLCloudY")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mCloudMain));
- getChild<LLUICtrl>("WLCloudDensity")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mCloudMain));
-
- // Cloud Detail
- getChild<LLUICtrl>("WLCloudDetailX")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlRMoved, this, _1, &param_mgr->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailY")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlGMoved, this, _1, &param_mgr->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailDensity")->setCommitCallback(boost::bind(&LLFloaterWindLight::onColorControlBMoved, this, _1, &param_mgr->mCloudDetail));
-
- // Cloud extras
- getChild<LLUICtrl>("WLCloudCoverage")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mCloudCoverage));
- getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mCloudScale));
- getChild<LLUICtrl>("WLCloudLockX")->setCommitCallback(boost::bind(&LLFloaterWindLight::onCloudScrollXToggled, this, _1));
- getChild<LLUICtrl>("WLCloudLockY")->setCommitCallback(boost::bind(&LLFloaterWindLight::onCloudScrollYToggled, this, _1));
- getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterWindLight::onCloudScrollXMoved, this, _1));
- getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterWindLight::onCloudScrollYMoved, this, _1));
- getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mDistanceMult));
- getChild<LLUICtrl>("DrawClassicClouds")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "SkyUseClassicClouds"));
-
- // WL Top
- getChild<LLUICtrl>("WLDayCycleMenuButton")->setCommitCallback(boost::bind(&LLFloaterWindLight::onOpenDayCycle, this));
- // Load/save
- LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
-
- //childSetAction("WLLoadPreset", onLoadPreset, comboBox);
- getChild<LLUICtrl>("WLNewPreset")->setCommitCallback(boost::bind(&LLFloaterWindLight::onNewPreset, this));
- getChild<LLUICtrl>("WLSavePreset")->setCommitCallback(boost::bind(&LLFloaterWindLight::onSavePreset, this));
- getChild<LLUICtrl>("WLDeletePreset")->setCommitCallback(boost::bind(&LLFloaterWindLight::onDeletePreset, this));
-
- comboBox->setCommitCallback(boost::bind(&LLFloaterWindLight::onChangePresetName, this, _1));
-
-
- // Dome
- getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterWindLight::onFloatControlMoved, this, _1, &param_mgr->mWLGamma));
- getChild<LLUICtrl>("WLStarAlpha")->setCommitCallback(boost::bind(&LLFloaterWindLight::onStarAlphaMoved, this, _1));
-}
-
-bool LLFloaterWindLight::newPromptCallback(const LLSD& notification, const LLSD& response)
-{
- std::string text = response["message"].asString();
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- if(text == "")
- {
- return false;
- }
-
- if(option == 0) {
- LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
-
- LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
- LLComboBox* keyCombo = NULL;
- if(day_cycle)
- {
- keyCombo = day_cycle->getChild<LLComboBox>("WLKeyPresets");
- }
-
- // add the current parameters to the list
- // see if it's there first
- std::map<std::string, LLWLParamSet>::iterator mIt =
- LLWLParamManager::instance()->mParamList.find(text);
-
- // if not there, add a new one
- if(mIt == LLWLParamManager::instance()->mParamList.end())
- {
- LLWLParamManager::instance()->addParamSet(text,
- LLWLParamManager::instance()->mCurParams);
- comboBox->add(text);
- comboBox->sortByName();
-
- // add a blank to the bottom
- comboBox->selectFirstItem();
- if(comboBox->getSimple() == "")
- {
- comboBox->remove(0);
- }
- comboBox->add(LLStringUtil::null);
-
- comboBox->setSelectedByValue(text, true);
- if(keyCombo)
- {
- keyCombo->add(text);
- keyCombo->sortByName();
- }
- LLWLParamManager::instance()->savePreset(text);
-
- // otherwise, send a message to the user
- }
- else
- {
- LLNotificationsUtil::add("ExistsSkyPresetAlert");
- }
- }
- return false;
-}
-
-void LLFloaterWindLight::syncMenu()
-{
- bool err;
-
- LLWLParamManager * param_mgr = LLWLParamManager::instance();
-
- LLWLParamSet& currentParams = param_mgr->mCurParams;
- //std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;
-
- // blue horizon
- param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
- getChild<LLUICtrl>("WLBlueHorizonR")->setValue(param_mgr->mBlueHorizon.r / 2.0);
- getChild<LLUICtrl>("WLBlueHorizonG")->setValue(param_mgr->mBlueHorizon.g / 2.0);
- getChild<LLUICtrl>("WLBlueHorizonB")->setValue(param_mgr->mBlueHorizon.b / 2.0);
- getChild<LLUICtrl>("WLBlueHorizonI")->setValue(
- std::max(param_mgr->mBlueHorizon.r / 2.0,
- std::max(param_mgr->mBlueHorizon.g / 2.0,
- param_mgr->mBlueHorizon.b / 2.0)));
-
- // haze density, horizon, mult, and altitude
- param_mgr->mHazeDensity = currentParams.getVector(param_mgr->mHazeDensity.mName, err);
- getChild<LLUICtrl>("WLHazeDensity")->setValue(param_mgr->mHazeDensity.r);
- param_mgr->mHazeHorizon = currentParams.getVector(param_mgr->mHazeHorizon.mName, err);
- getChild<LLUICtrl>("WLHazeHorizon")->setValue(param_mgr->mHazeHorizon.r);
- param_mgr->mDensityMult = currentParams.getVector(param_mgr->mDensityMult.mName, err);
- getChild<LLUICtrl>("WLDensityMult")->setValue(param_mgr->mDensityMult.x *
- param_mgr->mDensityMult.mult);
- param_mgr->mMaxAlt = currentParams.getVector(param_mgr->mMaxAlt.mName, err);
- getChild<LLUICtrl>("WLMaxAltitude")->setValue(param_mgr->mMaxAlt.x);
-
- // blue density
- param_mgr->mBlueDensity = currentParams.getVector(param_mgr->mBlueDensity.mName, err);
- getChild<LLUICtrl>("WLBlueDensityR")->setValue(param_mgr->mBlueDensity.r / 2.0);
- getChild<LLUICtrl>("WLBlueDensityG")->setValue(param_mgr->mBlueDensity.g / 2.0);
- getChild<LLUICtrl>("WLBlueDensityB")->setValue(param_mgr->mBlueDensity.b / 2.0);
- getChild<LLUICtrl>("WLBlueDensityI")->setValue(
- std::max(param_mgr->mBlueDensity.r / 2.0,
- std::max(param_mgr->mBlueDensity.g / 2.0, param_mgr->mBlueDensity.b / 2.0)));
-
- // Lighting
-
- // sunlight
- param_mgr->mSunlight = currentParams.getVector(param_mgr->mSunlight.mName, err);
- getChild<LLUICtrl>("WLSunlightR")->setValue(param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLSunlightG")->setValue(param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLSunlightB")->setValue(param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLSunlightI")->setValue(
- std::max(param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE,
- std::max(param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
-
- // glow
- param_mgr->mGlow = currentParams.getVector(param_mgr->mGlow.mName, err);
- getChild<LLUICtrl>("WLGlowR")->setValue(2 - param_mgr->mGlow.r / 20.0f);
- getChild<LLUICtrl>("WLGlowB")->setValue(-param_mgr->mGlow.b / 5.0f);
-
- // ambient
- param_mgr->mAmbient = currentParams.getVector(param_mgr->mAmbient.mName, err);
- getChild<LLUICtrl>("WLAmbientR")->setValue(param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLAmbientG")->setValue(param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLAmbientB")->setValue(param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE);
- getChild<LLUICtrl>("WLAmbientI")->setValue(
- std::max(param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE,
- std::max(param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
-
- getChild<LLUICtrl>("WLSunAngle")->setValue(param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
- getChild<LLUICtrl>("WLEastAngle")->setValue(param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);
-
- // Clouds
-
- // Cloud Color
- param_mgr->mCloudColor = currentParams.getVector(param_mgr->mCloudColor.mName, err);
- getChild<LLUICtrl>("WLCloudColorR")->setValue(param_mgr->mCloudColor.r);
- getChild<LLUICtrl>("WLCloudColorG")->setValue(param_mgr->mCloudColor.g);
- getChild<LLUICtrl>("WLCloudColorB")->setValue(param_mgr->mCloudColor.b);
- getChild<LLUICtrl>("WLCloudColorI")->setValue(
- std::max(param_mgr->mCloudColor.r,
- std::max(param_mgr->mCloudColor.g, param_mgr->mCloudColor.b)));
-
- // Cloud
- param_mgr->mCloudMain = currentParams.getVector(param_mgr->mCloudMain.mName, err);
- getChild<LLUICtrl>("WLCloudX")->setValue(param_mgr->mCloudMain.r);
- getChild<LLUICtrl>("WLCloudY")->setValue(param_mgr->mCloudMain.g);
- getChild<LLUICtrl>("WLCloudDensity")->setValue(param_mgr->mCloudMain.b);
-
- // Cloud Detail
- param_mgr->mCloudDetail = currentParams.getVector(param_mgr->mCloudDetail.mName, err);
- getChild<LLUICtrl>("WLCloudDetailX")->setValue(param_mgr->mCloudDetail.r);
- getChild<LLUICtrl>("WLCloudDetailY")->setValue(param_mgr->mCloudDetail.g);
- getChild<LLUICtrl>("WLCloudDetailDensity")->setValue(param_mgr->mCloudDetail.b);
-
- // Cloud extras
- param_mgr->mCloudCoverage = currentParams.getVector(param_mgr->mCloudCoverage.mName, err);
- param_mgr->mCloudScale = currentParams.getVector(param_mgr->mCloudScale.mName, err);
- getChild<LLUICtrl>("WLCloudCoverage")->setValue(param_mgr->mCloudCoverage.x);
- getChild<LLUICtrl>("WLCloudScale")->setValue(param_mgr->mCloudScale.x);
-
- // cloud scrolling
- bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
- bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
- getChild<LLUICtrl>("WLCloudLockX")->setValue(lockX);
- getChild<LLUICtrl>("WLCloudLockY")->setValue(lockY);
- getChild<LLUICtrl>("DrawClassicClouds")->setValue(gSavedSettings.getBOOL("SkyUseClassicClouds"));
-
- // disable if locked, enable if not
- if(lockX)
- {
- getChildView("WLCloudScrollX")->setEnabled(FALSE);
- } else {
- getChildView("WLCloudScrollX")->setEnabled(TRUE);
- }
- if(lockY)
- {
- getChildView("WLCloudScrollY")->setEnabled(FALSE);
- } else {
- getChildView("WLCloudScrollY")->setEnabled(TRUE);
- }
-
- // *HACK cloud scrolling is off my an additive of 10
- getChild<LLUICtrl>("WLCloudScrollX")->setValue(param_mgr->mCurParams.getCloudScrollX() - 10.0f);
- getChild<LLUICtrl>("WLCloudScrollY")->setValue(param_mgr->mCurParams.getCloudScrollY() - 10.0f);
-
- param_mgr->mDistanceMult = currentParams.getVector(param_mgr->mDistanceMult.mName, err);
- getChild<LLUICtrl>("WLDistanceMult")->setValue(param_mgr->mDistanceMult.x);
-
- // Tweak extras
-
- param_mgr->mWLGamma = currentParams.getVector(param_mgr->mWLGamma.mName, err);
- getChild<LLUICtrl>("WLGamma")->setValue(param_mgr->mWLGamma.x);
-
- getChild<LLUICtrl>("WLStarAlpha")->setValue(param_mgr->mCurParams.getStarBrightness());
-
- LLTabContainer* tab = getChild<LLTabContainer>("WindLight Tabs");
- LLPanel* panel = getChild<LLPanel>("Scattering");
-
- tab->enableTabButton(tab->getIndexForPanel(panel), gSavedSettings.getBOOL("RenderDeferredGI"));
-}
-
-
-// color control callbacks
-void LLFloaterWindLight::onColorControlRMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->r = sldrCtrl->getValueF32();
- if(colorControl->isSunOrAmbientColor) {
- colorControl->r *= 3;
- }
- if(colorControl->isBlueHorizonOrDensity) {
- colorControl->r *= 2;
- }
-
- // move i if it's the max
- if(colorControl->r >= colorControl->g && colorControl->r >= colorControl->b
- && colorControl->hasSliderName) {
- colorControl->i = colorControl->r;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- if(colorControl->isSunOrAmbientColor) {
- getChild<LLUICtrl>(name)->setValue(colorControl->r / 3);
- } else if(colorControl->isBlueHorizonOrDensity) {
- getChild<LLUICtrl>(name)->setValue(colorControl->r / 2);
- } else {
- getChild<LLUICtrl>(name)->setValue(colorControl->r);
- }
- }
-
- colorControl->update(LLWLParamManager::instance()->mCurParams);
-
- LLWLParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWindLight::onColorControlGMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->g = sldrCtrl->getValueF32();
- if(colorControl->isSunOrAmbientColor) {
- colorControl->g *= 3;
- }
- if(colorControl->isBlueHorizonOrDensity) {
- colorControl->g *= 2;
- }
-
- // move i if it's the max
- if(colorControl->g >= colorControl->r && colorControl->g >= colorControl->b
- && colorControl->hasSliderName) {
- colorControl->i = colorControl->g;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- if(colorControl->isSunOrAmbientColor) {
- getChild<LLUICtrl>(name)->setValue(colorControl->g / 3);
- } else if(colorControl->isBlueHorizonOrDensity) {
- getChild<LLUICtrl>(name)->setValue(colorControl->g / 2);
- } else {
- getChild<LLUICtrl>(name)->setValue(colorControl->g);
- }
- }
-
- colorControl->update(LLWLParamManager::instance()->mCurParams);
-
- LLWLParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWindLight::onColorControlBMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->b = sldrCtrl->getValueF32();
- if(colorControl->isSunOrAmbientColor) {
- colorControl->b *= 3;
- }
- if(colorControl->isBlueHorizonOrDensity) {
- colorControl->b *= 2;
- }
-
- // move i if it's the max
- if(colorControl->b >= colorControl->r && colorControl->b >= colorControl->g
- && colorControl->hasSliderName) {
- colorControl->i = colorControl->b;
- std::string name = colorControl->mSliderName;
- name.append("I");
-
- if(colorControl->isSunOrAmbientColor) {
- getChild<LLUICtrl>(name)->setValue(colorControl->b / 3);
- } else if(colorControl->isBlueHorizonOrDensity) {
- getChild<LLUICtrl>(name)->setValue(colorControl->b / 2);
- } else {
- getChild<LLUICtrl>(name)->setValue(colorControl->b);
- }
- }
-
- colorControl->update(LLWLParamManager::instance()->mCurParams);
-
- LLWLParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWindLight::onColorControlIMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- colorControl->i = sldrCtrl->getValueF32();
-
- // only for sliders where we pass a name
- if(colorControl->hasSliderName) {
-
- // set it to the top
- F32 maxVal = std::max(std::max(colorControl->r, colorControl->g), colorControl->b);
- F32 iVal;
-
- if(colorControl->isSunOrAmbientColor)
- {
- iVal = colorControl->i * 3;
- }
- else if(colorControl->isBlueHorizonOrDensity)
- {
- iVal = colorControl->i * 2;
- }
- else
- {
- iVal = colorControl->i;
- }
-
- // get the names of the other sliders
- std::string rName = colorControl->mSliderName;
- rName.append("R");
- std::string gName = colorControl->mSliderName;
- gName.append("G");
- std::string bName = colorControl->mSliderName;
- bName.append("B");
-
- // handle if at 0
- if(iVal == 0) {
- colorControl->r = 0;
- colorControl->g = 0;
- colorControl->b = 0;
-
- // if all at the start
- // set them all to the intensity
- } else if (maxVal == 0) {
- colorControl->r = iVal;
- colorControl->g = iVal;
- colorControl->b = iVal;
-
- } else {
-
- // add delta amounts to each
- F32 delta = (iVal - maxVal) / maxVal;
- colorControl->r *= (1.0f + delta);
- colorControl->g *= (1.0f + delta);
- colorControl->b *= (1.0f + delta);
- }
-
- // divide sun color vals by three
- if(colorControl->isSunOrAmbientColor)
- {
- getChild<LLUICtrl>(rName)->setValue(colorControl->r/3);
- getChild<LLUICtrl>(gName)->setValue(colorControl->g/3);
- getChild<LLUICtrl>(bName)->setValue(colorControl->b/3);
-
- }
- else if(colorControl->isBlueHorizonOrDensity)
- {
- getChild<LLUICtrl>(rName)->setValue(colorControl->r/2);
- getChild<LLUICtrl>(gName)->setValue(colorControl->g/2);
- getChild<LLUICtrl>(bName)->setValue(colorControl->b/2);
-
- }
- else
- {
- // set the sliders to the new vals
- getChild<LLUICtrl>(rName)->setValue(colorControl->r);
- getChild<LLUICtrl>(gName)->setValue(colorControl->g);
- getChild<LLUICtrl>(bName)->setValue(colorControl->b);
- }
- }
-
- // now update the current parameters and send them to shaders
- colorControl->update(LLWLParamManager::instance()->mCurParams);
- LLWLParamManager::instance()->propagateParameters();
-}
-
-/// GLOW SPECIFIC CODE
-void LLFloaterWindLight::onGlowRMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- // scaled by 20
- colorControl->r = (2 - sldrCtrl->getValueF32()) * 20;
-
- colorControl->update(LLWLParamManager::instance()->mCurParams);
- LLWLParamManager::instance()->propagateParameters();
-}
-
-/// \NOTE that we want NEGATIVE (-) B
-void LLFloaterWindLight::onGlowBMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- /// \NOTE that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
- colorControl->b = -sldrCtrl->getValueF32() * 5;
-
- colorControl->update(LLWLParamManager::instance()->mCurParams);
- LLWLParamManager::instance()->propagateParameters();
-}
-
-void LLFloaterWindLight::onFloatControlMoved(LLUICtrl* ctrl, WLFloatControl* floatControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- floatControl->x = sldrCtrl->getValueF32() / floatControl->mult;
-
- floatControl->update(LLWLParamManager::instance()->mCurParams);
- LLWLParamManager::instance()->propagateParameters();
-}
-
-// Lighting callbacks
-
-// time of day
-void LLFloaterWindLight::onSunMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sunSldr = getChild<LLSliderCtrl>("WLSunAngle");
- LLSliderCtrl* eastSldr = getChild<LLSliderCtrl>("WLEastAngle");
-
- // get the two angles
- LLWLParamManager * param_mgr = LLWLParamManager::instance();
-
- param_mgr->mCurParams.setSunAngle(F_TWO_PI * sunSldr->getValueF32());
- param_mgr->mCurParams.setEastAngle(F_TWO_PI * eastSldr->getValueF32());
-
- // set the sun vector
- colorControl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
- cos(param_mgr->mCurParams.getSunAngle());
- colorControl->g = sin(param_mgr->mCurParams.getSunAngle());
- colorControl->b = cos(param_mgr->mCurParams.getEastAngle()) *
- cos(param_mgr->mCurParams.getSunAngle());
- colorControl->i = 1.f;
-
- colorControl->update(param_mgr->mCurParams);
- param_mgr->propagateParameters();
-}
-
-void LLFloaterWindLight::onStarAlphaMoved(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- LLWLParamManager::instance()->mCurParams.setStarBrightness(sldrCtrl->getValueF32());
-}
-
-void LLFloaterWindLight::onNewPreset()
-{
- LLNotificationsUtil::add("NewSkyPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::newPromptCallback, this, _1, _2));
-}
-
-void LLFloaterWindLight::onSavePreset()
-{
- // get the name
- LLComboBox* comboBox = getChild<LLComboBox>(
- "WLPresetsCombo");
-
- // don't save the empty name
- if(comboBox->getSelectedItemLabel() == "")
- {
- return;
- }
-
- // check to see if it's a default and shouldn't be overwritten
- std::set<std::string>::iterator sIt = sDefaultPresets.find(
- comboBox->getSelectedItemLabel());
- if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets"))
- {
- LLNotificationsUtil::add("WLNoEditDefault");
- return;
- }
-
- LLWLParamManager::instance()->mCurParams.mName =
- comboBox->getSelectedItemLabel();
-
- LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::saveAlertCallback, this, _1, _2));
-}
-
-bool LLFloaterWindLight::saveAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- // if they choose save, do it. Otherwise, don't do anything
- if(option == 0)
- {
- LLWLParamManager * param_mgr = LLWLParamManager::instance();
-
- param_mgr->setParamSet(param_mgr->mCurParams.mName, param_mgr->mCurParams);
-
- // comment this back in to save to file
- param_mgr->savePreset(param_mgr->mCurParams.mName);
- }
- return false;
-}
-
-void LLFloaterWindLight::onDeletePreset()
-{
- LLComboBox* combo_box = getChild<LLComboBox>(
- "WLPresetsCombo");
-
- if(combo_box->getSelectedValue().asString() == "")
- {
- return;
- }
-
- LLSD args;
- args["SKY"] = combo_box->getSelectedValue().asString();
- LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(),
- boost::bind(&LLFloaterWindLight::deleteAlertCallback, this, _1, _2));
-}
-
-bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- // if they choose delete, do it. Otherwise, don't do anything
- if(option == 0)
- {
- LLComboBox* combo_box = getChild<LLComboBox>("WLPresetsCombo");
- LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
- LLComboBox* key_combo = NULL;
-
- if (day_cycle)
- {
- key_combo = day_cycle->getChild<LLComboBox>("WLKeyPresets");
- }
-
- std::string name(combo_box->getSelectedValue().asString());
-
- // check to see if it's a default and shouldn't be deleted
- std::set<std::string>::iterator sIt = sDefaultPresets.find(name);
- if(sIt != sDefaultPresets.end())
- {
- LLNotificationsUtil::add("WLNoEditDefault");
- return false;
- }
-
- LLWLParamManager::instance()->removeParamSet(name, true);
-
- // remove and choose another
- S32 new_index = combo_box->getCurrentIndex();
-
- combo_box->remove(name);
- if(key_combo != NULL)
- {
- key_combo->remove(name);
-
- // remove from slider, as well
- day_cycle->deletePreset(name);
- }
-
- // pick the previously selected index after delete
- if(new_index > 0)
- {
- new_index--;
- }
-
- if(combo_box->getItemCount() > 0)
- {
- combo_box->setCurrentByIndex(new_index);
- }
- }
- return false;
-}
-
-
-void LLFloaterWindLight::onChangePresetName(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- std::string data = ctrl->getValue().asString();
- if(!data.empty())
- {
- LLWLParamManager::instance()->loadPreset( data);
- syncMenu();
- }
-}
-
-void LLFloaterWindLight::onOpenDayCycle()
-{
- LLFloaterReg::showInstance("env_day_cycle");
-}
-
-// Clouds
-void LLFloaterWindLight::onCloudScrollXMoved(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
- // *HACK all cloud scrolling is off by an additive of 10.
- LLWLParamManager::instance()->mCurParams.setCloudScrollX(sldrCtrl->getValueF32() + 10.0f);
-}
-
-void LLFloaterWindLight::onCloudScrollYMoved(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
-
- // *HACK all cloud scrolling is off by an additive of 10.
- LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f);
-}
-
-void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
-
- bool lock = cbCtrl->get();
- LLWLParamManager::instance()->mCurParams.setEnableCloudScrollX(!lock);
-
- LLSliderCtrl* sldr = getChild<LLSliderCtrl>(
- "WLCloudScrollX");
-
- if(cbCtrl->get())
- {
- sldr->setEnabled(false);
- }
- else
- {
- sldr->setEnabled(true);
- }
-
-}
-
-void LLFloaterWindLight::onCloudScrollYToggled(LLUICtrl* ctrl)
-{
- deactivateAnimator();
-
- LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
- bool lock = cbCtrl->get();
- LLWLParamManager::instance()->mCurParams.setEnableCloudScrollY(!lock);
-
- LLSliderCtrl* sldr = getChild<LLSliderCtrl>(
- "WLCloudScrollY");
-
- if(cbCtrl->get())
- {
- sldr->setEnabled(false);
- }
- else
- {
- sldr->setEnabled(true);
- }
-}
-
-void LLFloaterWindLight::deactivateAnimator()
-{
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-}
diff --git a/indra/newview/llfloaterwindlight.h b/indra/newview/llfloaterwindlight.h
deleted file mode 100644
index b43edc2c11..0000000000
--- a/indra/newview/llfloaterwindlight.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * @file llfloaterwindlight.h
- * @brief LLFloaterWindLight class definition
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/*
- * Menu for adjusting the atmospheric settings of the world
- */
-
-#ifndef LL_LLFLOATERWINDLIGHT_H
-#define LL_LLFLOATERWINDLIGHT_H
-
-#include "llfloater.h"
-
-#include <vector>
-#include "llwlparamset.h"
-
-struct WLColorControl;
-struct WLFloatControl;
-
-
-/// Menuing system for all of windlight's functionality
-class LLFloaterWindLight : public LLFloater
-{
-public:
-
- LLFloaterWindLight(const LLSD& key);
- virtual ~LLFloaterWindLight();
- /*virtual*/ BOOL postBuild();
- /// initialize all
- void initCallbacks(void);
-
- bool newPromptCallback(const LLSD& notification, const LLSD& response);
-
- /// general purpose callbacks for dealing with color controllers
- void onColorControlRMoved(LLUICtrl* ctrl, WLColorControl* userData);
- void onColorControlGMoved(LLUICtrl* ctrl, WLColorControl* userData);
- void onColorControlBMoved(LLUICtrl* ctrl, WLColorControl* userData);
- void onColorControlIMoved(LLUICtrl* ctrl, WLColorControl* userData);
- void onFloatControlMoved(LLUICtrl* ctrl, WLFloatControl* userData);
-
- /// lighting callbacks for glow
- void onGlowRMoved(LLUICtrl* ctrl, WLColorControl* userData);
- //static void onGlowGMoved(LLUICtrl* ctrl, void* userData);
- void onGlowBMoved(LLUICtrl* ctrl, WLColorControl* userData);
-
- /// lighting callbacks for sun
- void onSunMoved(LLUICtrl* ctrl, WLColorControl* userData);
-
- /// for handling when the star slider is moved to adjust the alpha
- void onStarAlphaMoved(LLUICtrl* ctrl);
-
- /// when user hits the load preset button
- void onNewPreset();
-
- /// when user hits the save preset button
- void onSavePreset();
-
- /// prompts a user when overwriting a preset
- bool saveAlertCallback(const LLSD& notification, const LLSD& response);
-
- /// when user hits the save preset button
- void onDeletePreset();
-
- /// prompts a user when overwriting a preset
- bool deleteAlertCallback(const LLSD& notification, const LLSD& response);
-
- /// what to do when you change the preset name
- void onChangePresetName(LLUICtrl* ctrl);
-
- /// when user hits the save preset button
- void onOpenDayCycle();
-
- /// handle cloud scrolling
- void onCloudScrollXMoved(LLUICtrl* ctrl);
- void onCloudScrollYMoved(LLUICtrl* ctrl);
- void onCloudScrollXToggled(LLUICtrl* ctrl);
- void onCloudScrollYToggled(LLUICtrl* ctrl);
-
- /// sync up sliders with parameters
- void syncMenu();
-
- /// turn off animated skies
- static void deactivateAnimator();
-
-private:
- static std::set<std::string> sDefaultPresets;
-};
-
-
-#endif
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index f8a4ce7ad0..eb3c7ee469 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -1070,7 +1070,7 @@ void LLFloaterWorldMap::onComboTextEntry()
// Reset the tracking whenever we start typing into any of the search fields,
// so that hitting <enter> does an auto-complete versus teleporting us to the
// previously selected landmark/friend.
- LLTracker::clearFocus();
+ LLTracker::stopTracking(NULL);
}
void LLFloaterWorldMap::onSearchTextEntry( )
@@ -1527,17 +1527,24 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
mCompletingRegionName = "";
}
- // if match found, highlight it and go
- if (!match.isUndefined())
+ if (num_results > 0)
{
- list->selectByValue(match);
+ // if match found, highlight it and go
+ if (!match.isUndefined())
+ {
+ list->selectByValue(match);
+ }
+ // else select first found item
+ else
+ {
+ list->selectFirstItem();
+ }
getChild<LLUICtrl>("search_results")->setFocus(TRUE);
onCommitSearchResult();
}
-
- // if we found nothing, say "none"
- if (num_results == 0)
+ else
{
+ // if we found nothing, say "none"
list->setCommentText(LLTrans::getString("worldmap_results_none_found"));
list->operateOnAll(LLCtrlListInterface::OP_DESELECT);
}
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 3884b94b60..e90b6c1c3d 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -167,13 +167,23 @@ void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
///----------------------------------------------------------------------------
/// Class LLFolderView
///----------------------------------------------------------------------------
+LLFolderView::Params::Params()
+: task_id("task_id"),
+ title("title"),
+ use_label_suffix("use_label_suffix"),
+ allow_multiselect("allow_multiselect", true),
+ show_load_status("show_load_status", true),
+ use_ellipses("use_ellipses", false)
+{
+}
+
// Default constructor
LLFolderView::LLFolderView(const Params& p)
: LLFolderViewFolder(p),
mScrollContainer( NULL ),
mPopupMenuHandle(),
- mAllowMultiSelect(TRUE),
+ mAllowMultiSelect(p.allow_multiselect),
mShowFolderHierarchy(FALSE),
mSourceID(p.task_id),
mRenameItem( NULL ),
@@ -194,10 +204,14 @@ LLFolderView::LLFolderView(const Params& p)
mDragAndDropThisFrame(FALSE),
mCallbackRegistrar(NULL),
mParentPanel(p.parent_panel),
- mUseEllipses(false),
+ mUseEllipses(p.use_ellipses),
mDraggingOverItem(NULL),
mStatusTextBox(NULL)
{
+ mRoot = this;
+
+ mShowLoadStatus = p.show_load_status();
+
LLRect rect = p.rect;
LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom);
setRect( rect );
@@ -263,6 +277,7 @@ LLFolderView::LLFolderView(const Params& p)
menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
mPopupMenuHandle = menu->getHandle();
+ mListener->openItem();
}
// Destroys the object
@@ -308,15 +323,10 @@ void LLFolderView::setSortOrder(U32 order)
if (order != mSortOrder)
{
LLFastTimer t(FTM_SORT);
+
mSortOrder = order;
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->sortBy(order);
- }
-
+ sortBy(order);
arrangeAll();
}
}
@@ -342,7 +352,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
{
recursiveIncrementNumDescendantsSelected(folder->numSelected());
}
- folder->setShowLoadStatus(true);
+ folder->setShowLoadStatus(mShowLoadStatus);
folder->setOrigin(0, 0);
folder->reshape(getRect().getWidth(), 0);
folder->setVisible(FALSE);
@@ -424,11 +434,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
(folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
}
- // Need to call arrange regardless of visibility, since children's visibility
- // might need to be changed too (e.g. even though a folder is invisible, its
- // children also need to be set invisible for state-tracking purposes, e.g.
- // llfolderviewitem::filter).
- // if (folderp->getVisible())
+ if (folderp->getVisible())
{
S32 child_height = 0;
S32 child_width = 0;
@@ -764,7 +770,7 @@ void LLFolderView::sanitizeSelection()
}
// Don't allow invisible items (such as root folders) to be selected.
- if (item->getHidden())
+ if (item == getRoot())
{
items_to_remove.push_back(item);
}
@@ -787,7 +793,7 @@ void LLFolderView::sanitizeSelection()
parent_folder;
parent_folder = parent_folder->getParentFolder())
{
- if (parent_folder->potentiallyVisible() && !parent_folder->getHidden())
+ if (parent_folder->potentiallyVisible())
{
// give initial selection to first ancestor folder that potentially passes the filter
if (!new_selection)
@@ -806,13 +812,7 @@ void LLFolderView::sanitizeSelection()
}
else
{
- // nothing selected to start with, so pick "My Inventory" as best guess
- new_selection = getItemByID(gInventory.getRootFolderID());
- // ... except if it's hidden from the UI.
- if (new_selection && new_selection->getHidden())
- {
- new_selection = NULL;
- }
+ new_selection = NULL;
}
if (new_selection)
@@ -931,14 +931,15 @@ void LLFolderView::draw()
if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration())
{
mStatusText = LLTrans::getString("Searching");
- //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
}
else
{
- LLStringUtil::format_map_t args;
- args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig());
- mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args);
- //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
+ if (getFilter())
+ {
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig());
+ mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args);
+ }
}
mStatusTextBox->setValue(mStatusText);
mStatusTextBox->setVisible( TRUE );
@@ -962,7 +963,9 @@ void LLFolderView::draw()
}
- LLFolderViewFolder::draw();
+ // skip over LLFolderViewFolder::draw since we don't want the folder icon, label,
+ // and arrow for the root folder
+ LLView::draw();
mDragAndDropThisFrame = FALSE;
}
@@ -1642,11 +1645,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
LLFolderViewItem* parent_folder = last_selected->getParentFolder();
if (!last_selected->isOpen() && parent_folder && parent_folder->getParentFolder())
{
- // Don't change selectin to hidden folder. See EXT-5328.
- if (!parent_folder->getHidden())
- {
- setSelection(parent_folder, FALSE, TRUE);
- }
+ setSelection(parent_folder, FALSE, TRUE);
}
else
{
@@ -1911,7 +1910,14 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// by the folder which is the hierarchy root.
if (!handled && !hasVisibleChildren())
{
- handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ if (mFolders.empty())
+ {
+ handled = handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
+ else
+ {
+ handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
}
if (handled)
@@ -1927,8 +1933,11 @@ void LLFolderView::deleteAllChildren()
closeRenamer();
LLView::deleteViewByHandle(mPopupMenuHandle);
mPopupMenuHandle = LLHandle<LLView>();
- mRenamer = NULL;
+ mScrollContainer = NULL;
mRenameItem = NULL;
+ mRenamer = NULL;
+ mStatusTextBox = NULL;
+
clearSelection();
LLView::deleteAllChildren();
}
@@ -2031,7 +2040,7 @@ void LLFolderView::removeItemID(const LLUUID& id)
LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
{
- if (id.isNull())
+ if (id == getListener()->getUUID())
{
return this;
}
@@ -2048,7 +2057,7 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id)
{
- if (id.isNull())
+ if (id == getListener()->getUUID())
{
return this;
}
@@ -2173,7 +2182,7 @@ void LLFolderView::doIdle()
// filter to determine visiblity before arranging
filterFromRoot();
- // automatically show matching items, and select first one
+ // automatically show matching items, and select first one if we had a selection
// do this every frame until user puts keyboard focus into the inventory window
// signaling the end of the automatic update
// only do this when mNeedsFilter is set, meaning filtered items have
@@ -2183,7 +2192,7 @@ void LLFolderView::doIdle()
LLFastTimer t3(FTM_AUTO_SELECT);
// select new item only if a filtered item not currently selected
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
- if ((!selected_itemp || !selected_itemp->getFiltered()) && !mAutoSelectOverride)
+ if ((selected_itemp && !selected_itemp->getFiltered()) && !mAutoSelectOverride)
{
// select first filtered item
LLSelectFirstFilteredItem filter;
@@ -2496,11 +2505,6 @@ BOOL LLFolderView::isFilterModified()
return mFilter->isNotDefault();
}
-BOOL LLFolderView::getAllowMultiSelect()
-{
- return mAllowMultiSelect;
-}
-
void delete_selected_item(void* user_data)
{
if(user_data)
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 1464a058d8..0b92548fd0 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -59,22 +59,6 @@ class LLUICtrl;
class LLTextBox;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFolderViewFunctor
-//
-// Simple abstract base class for applying a functor to folders and
-// items in a folder view hierarchy. This is suboptimal for algorithms
-// that only work folders or only work on items, but I'll worry about
-// that later when it's determined to be too slow.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLFolderViewFunctor
-{
-public:
- virtual ~LLFolderViewFunctor() {}
- virtual void doFolder(LLFolderViewFolder* folder) = 0;
- virtual void doItem(LLFolderViewItem* item) = 0;
-};
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderView
//
// Th LLFolderView represents the root level folder view object. It
@@ -89,7 +73,12 @@ public:
Mandatory<LLPanel*> parent_panel;
Optional<LLUUID> task_id;
Optional<std::string> title;
- Optional<bool> use_label_suffix;
+ Optional<bool> use_label_suffix,
+ allow_multiselect,
+ show_load_status,
+ use_ellipses;
+
+ Params();
};
LLFolderView(const Params&);
virtual ~LLFolderView( void );
@@ -102,7 +91,6 @@ public:
// and resort the items if necessary.
void setSortOrder(U32 order);
void setFilterPermMask(PermissionMask filter_perm_mask);
- void setAllowMultiSelect(BOOL allow) { mAllowMultiSelect = allow; }
typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;
void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); }
@@ -117,7 +105,6 @@ public:
//LLInventoryFilter::EFolderShow getShowFolderState();
U32 getSortOrder() const;
BOOL isFilterModified();
- BOOL getAllowMultiSelect();
// Close all folders in the view
void closeAllFolders();
@@ -238,7 +225,6 @@ public:
void setShowSingleSelection(BOOL show);
BOOL getShowSingleSelection() { return mShowSingleSelection; }
F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); }
- void setUseEllipses(bool use_ellipses) { mUseEllipses = use_ellipses; }
bool getUseEllipses() { return mUseEllipses; }
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index e9d1ad3a9e..6e4f55fb2f 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -30,8 +30,10 @@
// viewer includes
#include "llfolderview.h" // Items depend extensively on LLFolderViews
#include "llfoldervieweventlistener.h"
+#include "llviewerfoldertype.h"
#include "llinventorybridge.h" // for LLItemBridge in LLInventorySort::operator()
#include "llinventoryfilter.h"
+#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llpanel.h"
#include "llviewercontrol.h" // gSavedSettings
@@ -130,10 +132,14 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mIconOpen(p.icon_open),
mIconOverlay(p.icon_overlay),
mListener(p.listener),
- mHidden(false),
mShowLoadStatus(false)
{
+}
+
+BOOL LLFolderViewItem::postBuild()
+{
refresh();
+ return TRUE;
}
// Destroys the object
@@ -195,7 +201,7 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children)
LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children );
// Skip over items that are invisible or are hidden from the UI.
- while(itemp && (!itemp->getVisible() || itemp->getHidden()))
+ while(itemp && !itemp->getVisible())
{
LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children );
if (itemp == next_itemp)
@@ -351,7 +357,10 @@ void LLFolderViewItem::arrangeAndSet(BOOL set_selection,
BOOL take_keyboard_focus)
{
LLFolderView* root = getRoot();
+ if (getParentFolder())
+ {
getParentFolder()->requestArrange();
+ }
if(set_selection)
{
setSelectionFromRoot(this, TRUE, take_keyboard_focus);
@@ -442,23 +451,20 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
S32 LLFolderViewItem::getItemHeight()
{
- if (getHidden()) return 0;
-
return mItemHeight;
}
void LLFolderViewItem::filter( LLInventoryFilter& filter)
{
const BOOL previous_passed_filter = mPassedFilter;
- const BOOL passed_filter = mListener && filter.check(this);
+ const BOOL passed_filter = filter.check(this);
// If our visibility will change as a result of this filter, then
// we need to be rearranged in our parent folder
if (mParentFolder)
{
- if (getVisible() != passed_filter)
- mParentFolder->requestArrange();
- if (passed_filter != previous_passed_filter)
+ if (getVisible() != passed_filter
+ || previous_passed_filter != passed_filter )
mParentFolder->requestArrange();
}
@@ -863,11 +869,6 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
void LLFolderViewItem::draw()
{
- if (getHidden())
- {
- return;
- }
-
static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);
static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE);
@@ -891,8 +892,8 @@ void LLFolderViewItem::draw()
// Draw open folder arrow
//
const bool up_to_date = mListener && mListener->isUpToDate();
- const bool possibly_has_children = ((up_to_date && hasVisibleChildren()) || // we fetched our children and some of them have passed the filter...
- (!up_to_date && mListener && mListener->hasChildren())); // ...or we know we have children but haven't fetched them (doesn't obey filter)
+ const bool possibly_has_children = ((up_to_date && hasVisibleChildren()) // we fetched our children and some of them have passed the filter...
+ || (!up_to_date && mListener && mListener->hasChildren())); // ...or we know we have children but haven't fetched them (doesn't obey filter)
if (possibly_has_children)
{
LLUIImage* arrow_image = default_params.folder_arrow_image;
@@ -1054,8 +1055,11 @@ void LLFolderViewItem::draw()
{
root_is_loading = LLInventoryModelBackgroundFetch::instance().libraryFetchInProgress();
}
- if ((mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) ||
- (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && root_is_loading && (mShowLoadStatus || mHidden)))
+ if ((mIsLoading
+ && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime"))
+ || (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()
+ && root_is_loading
+ && mShowLoadStatus))
{
std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) ";
font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor,
@@ -1119,7 +1123,8 @@ LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):
mLastCalculatedWidth(0),
mCompletedFilterGeneration(-1),
mMostFilteredDescendantGeneration(-1),
- mNeedsSort(false)
+ mNeedsSort(false),
+ mPassedFolderFilter(FALSE)
{
}
@@ -1131,6 +1136,17 @@ LLFolderViewFolder::~LLFolderViewFolder( void )
gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
}
+void LLFolderViewFolder::setFilteredFolder(bool filtered, S32 filter_generation)
+{
+ mPassedFolderFilter = filtered;
+ mLastFilterGeneration = filter_generation;
+}
+
+bool LLFolderViewFolder::getFilteredFolder(S32 filter_generation)
+{
+ return mPassedFolderFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
+}
+
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
{
@@ -1157,8 +1173,6 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
mHasVisibleChildren = hasFilteredDescendants(filter_generation);
- LLInventoryFilter::EFolderShow show_folder_state = getRoot()->getFilter()->getShowFolderState();
-
// calculate height as a single item (without any children), and reshapes rectangle to match
LLFolderViewItem::arrange( width, height, filter_generation );
@@ -1190,8 +1204,10 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
}
else
{
- folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders?
- (folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
+ folderp->setVisible( folderp->getListener()
+ && (folderp->getFiltered(filter_generation)
+ || (folderp->getFilteredFolder(filter_generation)
+ && folderp->hasFilteredDescendants(filter_generation)))); // passed filter or has descendants that passed filter
}
if (folderp->getVisible())
@@ -1311,7 +1327,9 @@ void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recur
mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation);
mCompletedFilterGeneration = generation;
// only aggregate up if we are a lower (older) value
- if (recurse_up && mParentFolder && generation < mParentFolder->getCompletedFilterGeneration())
+ if (recurse_up
+ && mParentFolder
+ && generation < mParentFolder->getCompletedFilterGeneration())
{
mParentFolder->setCompletedFilterGeneration(generation, TRUE);
}
@@ -1336,21 +1354,19 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
// filter folder itself
if (getLastFilterGeneration() < filter_generation)
{
- if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter
- !mPassedFilter) // and did not pass the filter
+ if (getLastFilterGeneration() >= must_pass_generation // folder has been compared to a valid precursor filter
+ && !mPassedFilter) // and did not pass the filter
{
// go ahead and flag this folder as done
mLastFilterGeneration = filter_generation;
}
- else
+ else // filter self only on first pass through
{
- // filter self only on first pass through
+ // filter against folder rules
+ filterFolder(filter);
+ // and then item rules
LLFolderViewItem::filter( filter );
}
- if (mHidden)
- {
- setOpen();
- }
}
if (getRoot()->getDebugFilters())
@@ -1377,7 +1393,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
}
// when applying a filter, matching folders get their contents downloaded first
- if (filter.isNotDefault() && getFiltered(filter.getMinRequiredGeneration()) && (mListener && !gInventory.isCategoryComplete(mListener->getUUID())))
+ if (filter.isNotDefault()
+ && getFiltered(filter.getMinRequiredGeneration())
+ && (mListener
+ && !gInventory.isCategoryComplete(mListener->getUUID())))
{
LLInventoryModelBackgroundFetch::instance().start(mListener->getUUID());
}
@@ -1403,6 +1422,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (folder->getFiltered() || folder->hasFilteredDescendants(filter.getMinRequiredGeneration()))
{
mMostFilteredDescendantGeneration = filter_generation;
+ requestArrange();
}
// just skip it, it has already been filtered
continue;
@@ -1415,6 +1435,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (folder->getFiltered() || folder->hasFilteredDescendants(filter_generation))
{
mMostFilteredDescendantGeneration = filter_generation;
+ requestArrange();
if (getRoot()->needsAutoSelect() && autoopen_folders)
{
folder->setOpenArrangeRecursively(TRUE);
@@ -1436,6 +1457,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (item->getFiltered())
{
mMostFilteredDescendantGeneration = filter_generation;
+ requestArrange();
}
continue;
}
@@ -1454,6 +1476,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (item->getFiltered(filter.getMinRequiredGeneration()))
{
mMostFilteredDescendantGeneration = filter_generation;
+ requestArrange();
}
}
@@ -1467,6 +1490,31 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
}
}
+void LLFolderViewFolder::filterFolder(LLInventoryFilter& filter)
+{
+ const BOOL previous_passed_filter = mPassedFolderFilter;
+ const BOOL passed_filter = filter.checkFolder(this);
+
+ // If our visibility will change as a result of this filter, then
+ // we need to be rearranged in our parent folder
+ if (mParentFolder)
+ {
+ if (getVisible() != passed_filter
+ || previous_passed_filter != passed_filter )
+ {
+ mParentFolder->requestArrange();
+ }
+ }
+
+ setFilteredFolder(passed_filter, filter.getCurrentGeneration());
+ filter.decrementFilterCount();
+
+ if (getRoot()->getDebugFilters())
+ {
+ mStatusText = llformat("%d", mLastFilterGeneration);
+ }
+}
+
void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
{
// if this folder is now filtered, but wasn't before
@@ -1488,6 +1536,23 @@ void LLFolderViewFolder::dirtyFilter()
LLFolderViewItem::dirtyFilter();
}
+BOOL LLFolderViewFolder::getFiltered()
+{
+ return getFilteredFolder(getRoot()->getFilter()->getMinRequiredGeneration())
+ && LLFolderViewItem::getFiltered();
+}
+
+BOOL LLFolderViewFolder::getFiltered(S32 filter_generation)
+{
+ return getFilteredFolder(filter_generation) && LLFolderViewItem::getFiltered(filter_generation);
+}
+
+BOOL LLFolderViewFolder::hasFilteredDescendants(S32 filter_generation)
+{
+ return mMostFilteredDescendantGeneration >= filter_generation;
+}
+
+
BOOL LLFolderViewFolder::hasFilteredDescendants()
{
return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration();
@@ -1743,7 +1808,7 @@ void LLFolderViewFolder::destroyView()
folderp->destroyView(); // removes entry from mFolders
}
- deleteAllChildren();
+ //deleteAllChildren();
if (mParentFolder)
{
@@ -1843,8 +1908,12 @@ void LLFolderViewFolder::sortBy(U32 order)
(*fit)->sortBy(order);
}
- mFolders.sort(mSortFunction);
- mItems.sort(mSortFunction);
+ // Don't sort the topmost folders (My Inventory and Library)
+ if (mListener->getUUID().notNull())
+ {
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ }
if (order & LLInventoryFilter::SO_DATE)
{
@@ -1981,6 +2050,13 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
item->dirtyFilter();
requestArrange();
requestSort();
+ LLFolderViewFolder* parentp = getParentFolder();
+ while (parentp && parentp->mSortFunction.isByDate())
+ {
+ // parent folder doesn't have a time stamp yet, so get it from us
+ parentp->requestSort();
+ parentp = parentp->getParentFolder();
+ }
return TRUE;
}
@@ -2000,6 +2076,13 @@ BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
// rearrange all descendants too, as our indentation level might have changed
folder->requestArrange(TRUE);
requestSort();
+ LLFolderViewFolder* parentp = getParentFolder();
+ while (parentp && !parentp->mSortFunction.isByDate())
+ {
+ // parent folder doesn't have a time stamp yet, so get it from us
+ parentp->requestSort();
+ parentp = parentp->getParentFolder();
+ }
return TRUE;
}
@@ -2059,7 +2142,9 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r
(*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */
}
}
- if (mParentFolder && (recurse == RECURSE_UP || recurse == RECURSE_UP_DOWN))
+ if (mParentFolder
+ && (recurse == RECURSE_UP
+ || recurse == RECURSE_UP_DOWN))
{
mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP);
}
@@ -2301,13 +2386,16 @@ void LLFolderViewFolder::draw()
bool possibly_has_children = false;
bool up_to_date = mListener && mListener->isUpToDate();
- if(!up_to_date && mListener && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter)
+ if(!up_to_date
+ && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter)
{
possibly_has_children = true;
}
- BOOL loading = ( mIsOpen && possibly_has_children && !up_to_date );
+ BOOL loading = (mIsOpen
+ && possibly_has_children
+ && !up_to_date );
if ( loading && !mIsLoading )
{
@@ -2330,6 +2418,41 @@ void LLFolderViewFolder::draw()
time_t LLFolderViewFolder::getCreationDate() const
{
+ // folders have no creation date try to create one from an item somewhere in our folder hierarchy
+ if (!mCreationDate)
+ {
+ for (items_t::const_iterator iit = mItems.begin();
+ iit != mItems.end(); ++iit)
+ {
+ LLFolderViewItem* itemp = (*iit);
+
+ const time_t item_creation_date = itemp->getCreationDate();
+
+ if (item_creation_date)
+ {
+ mCreationDate = item_creation_date;
+ break;
+ }
+ }
+
+ if (!mCreationDate)
+ {
+ for (folders_t::const_iterator fit = mFolders.begin();
+ fit != mFolders.end(); ++fit)
+ {
+ LLFolderViewFolder* folderp = (*fit);
+
+ const time_t folder_creation_date = folderp->getCreationDate();
+
+ if (folder_creation_date)
+ {
+ mCreationDate = folder_creation_date;
+ break;
+ }
+ }
+ }
+ }
+
return llmax<time_t>(mCreationDate, mSubtreeCreationDate);
}
@@ -2573,7 +2696,8 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde
{
// ignore sort order for landmarks in the Favorites folder.
// they should be always sorted as in Favorites bar. See EXT-719
- if (a->getSortGroup() == SG_ITEM && b->getSortGroup() == SG_ITEM
+ if (a->getSortGroup() == SG_ITEM
+ && b->getSortGroup() == SG_ITEM
&& a->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK
&& b->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index fc941510ab..e2f94a2b63 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -66,6 +66,7 @@ public:
// Returns true if order has changed
bool updateSort(U32 order);
U32 getSort() { return mSortOrder; }
+ bool isByDate() { return mByDate; }
bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b);
private:
@@ -94,7 +95,7 @@ public:
Optional<LLUIImage*> icon_open; // used for folders
Optional<LLUIImage*> icon_overlay; // for links
Optional<LLFolderView*> root;
- Optional<LLFolderViewEventListener*> listener;
+ Mandatory<LLFolderViewEventListener*> listener;
Optional<LLUIImage*> folder_arrow_image;
Optional<S32> folder_indentation; // pixels
@@ -135,7 +136,7 @@ protected:
std::string mSearchableLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
- time_t mCreationDate;
+ mutable time_t mCreationDate;
LLFolderViewFolder* mParentFolder;
LLFolderViewEventListener* mListener;
BOOL mIsCurSelection;
@@ -157,7 +158,6 @@ protected:
BOOL mDragAndDropTarget;
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
- bool mHidden;
bool mShowLoadStatus;
// helper function to change the selection from the root.
@@ -167,13 +167,15 @@ protected:
void extendSelectionFromRoot(LLFolderViewItem* selection);
// this is an internal method used for adding items to folders. A
- // no-op at this leve, but reimplemented in derived classes.
+ // no-op at this level, but reimplemented in derived classes.
virtual BOOL addItem(LLFolderViewItem*) { return FALSE; }
virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; }
static LLFontGL* getLabelFontForStyle(U8 style);
public:
+ BOOL postBuild();
+
// This function clears the currently selected item, and records
// the specified selected item appropriately for display and use
// in the UI. If open is TRUE, then folders are opened up along
@@ -202,11 +204,6 @@ public:
virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
virtual S32 getItemHeight();
- // Hide the folder from the UI, such as if you want to hide the root
- // folder in an inventory panel.
- void setHidden(bool hidden) { mHidden = hidden; }
- bool getHidden() const { return mHidden; }
-
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
@@ -366,6 +363,9 @@ public:
UNKNOWN, TRASH, NOT_TRASH
} ETrash;
+ typedef std::list<LLFolderViewItem*> items_t;
+ typedef std::list<LLFolderViewFolder*> folders_t;
+
private:
S32 mNumDescendantsSelected;
@@ -374,8 +374,6 @@ public: // Accessed needed by LLFolderViewItem
S32 numSelected(void) const { return mNumDescendantsSelected + (isSelected() ? 1 : 0); }
protected:
- typedef std::list<LLFolderViewItem*> items_t;
- typedef std::list<LLFolderViewFolder*> folders_t;
items_t mItems;
folders_t mFolders;
LLInventorySort mSortFunction;
@@ -392,6 +390,8 @@ protected:
S32 mCompletedFilterGeneration;
S32 mMostFilteredDescendantGeneration;
bool mNeedsSort;
+ bool mPassedFolderFilter;
+
public:
typedef enum e_recurse_type
{
@@ -425,13 +425,21 @@ public:
virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up);
virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; }
- BOOL hasFilteredDescendants(S32 filter_generation) { return mMostFilteredDescendantGeneration >= filter_generation; }
+ BOOL hasFilteredDescendants(S32 filter_generation);
BOOL hasFilteredDescendants();
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
virtual void setFiltered(BOOL filtered, S32 filter_generation);
+ virtual BOOL getFiltered();
+ virtual BOOL getFiltered(S32 filter_generation);
+
virtual void dirtyFilter();
+
+ // folder-specific filtering (filter status propagates top down instead of bottom up)
+ void filterFolder(LLInventoryFilter& filter);
+ void setFilteredFolder(bool filtered, S32 filter_generation);
+ bool getFilteredFolder(S32 filter_generation);
// Passes selection information on to children and record
// selection information if necessary.
@@ -537,6 +545,10 @@ public:
time_t getCreationDate() const;
bool isTrash() const;
S32 getNumSelectedDescendants(void) const { return mNumDescendantsSelected; }
+
+ folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); }
+ folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); }
+ folders_t::size_type getFoldersCount() const { return mFolders.size(); }
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 86c8a1a9b5..75d4c4e80d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -40,6 +40,7 @@
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
+#include "llfolderview.h"
#include "llfriendcard.h"
#include "llgesturemgr.h"
#include "llgiveinventory.h"
@@ -571,8 +572,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
}
}
- // Don't allow items to be pasted directly into the COF.
- if (!isCOFFolder())
+ // Don't allow items to be pasted directly into the COF or the inbox
+ if (!isCOFFolder() && !isInboxFolder())
{
items.push_back(std::string("Paste"));
}
@@ -781,6 +782,18 @@ BOOL LLInvFVBridge::isCOFFolder() const
return LLAppearanceMgr::instance().getIsInCOF(mUUID);
}
+BOOL LLInvFVBridge::isInboxFolder() const
+{
+ const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false);
+
+ if (inbox_id.isNull())
+ {
+ return FALSE;
+ }
+
+ return gInventory.isObjectDescendentOf(mUUID, inbox_id);
+}
+
BOOL LLInvFVBridge::isItemPermissive() const
{
return FALSE;
@@ -1786,6 +1799,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
else
{
+ if (gInventory.isObjectDescendentOf(inv_cat->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false)))
+ {
+ set_dad_inbox_object(inv_cat->getUUID());
+ }
// Reparent the folder and restamp children if it's moving
// into trash.
@@ -2525,6 +2542,7 @@ void LLFolderBridge::folderOptionsMenu()
{
mItems.push_back(std::string("Add To Outfit"));
}
+
mItems.push_back(std::string("Replace Outfit"));
}
if (is_ensemble)
@@ -2614,15 +2632,17 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// Not sure what the right thing is to do here.
if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT))
{
- // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694.
- if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat))
- mItems.push_back(std::string("New Folder"));
- mItems.push_back(std::string("New Script"));
- mItems.push_back(std::string("New Note"));
- mItems.push_back(std::string("New Gesture"));
- mItems.push_back(std::string("New Clothes"));
- mItems.push_back(std::string("New Body Parts"));
-
+ if (!isInboxFolder()) // don't allow creation in inbox
+ {
+ // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694.
+ if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat))
+ mItems.push_back(std::string("New Folder"));
+ mItems.push_back(std::string("New Script"));
+ mItems.push_back(std::string("New Note"));
+ mItems.push_back(std::string("New Gesture"));
+ mItems.push_back(std::string("New Clothes"));
+ mItems.push_back(std::string("New Body Parts"));
+ }
#if SUPPORT_ENSEMBLES
// Changing folder types is an unfinished unsupported feature
// and can lead to unexpected behavior if enabled.
@@ -3161,6 +3181,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// (move the item, restamp if into trash)
else
{
+ // set up observer to select item once drag and drop from inbox is complete
+ if (gInventory.isObjectDescendentOf(inv_item->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false)))
+ {
+ set_dad_inbox_object(inv_item->getUUID());
+ }
+
LLInvFVBridge::changeItemParent(
model,
(LLViewerInventoryItem*)inv_item,
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 1e849c8812..15629c0c75 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -139,6 +139,7 @@ protected:
BOOL isAgentInventory() const; // false if lost or in the inventory library
BOOL isCOFFolder() const; // true if COF or descendent of
+ BOOL isInboxFolder() const; // true if COF or descendent of marketplace inbox
virtual BOOL isItemPermissive() const;
static void changeItemParent(LLInventoryModel* model,
LLViewerInventoryItem* item,
@@ -584,6 +585,9 @@ protected:
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Recent Inventory Panel related classes
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Overridden version of the Inventory-Folder-View-Bridge for Folders
class LLRecentItemsFolderBridge : public LLFolderBridge
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index dee15a1efd..d6278a5fda 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -107,6 +107,32 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item)
return passed;
}
+bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder)
+{
+ // we're showing all folders, overriding filter
+ if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ {
+ return true;
+ }
+
+ const LLFolderViewEventListener* listener = folder->getListener();
+ const LLUUID folder_id = listener->getUUID();
+
+ if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
+ {
+ // Can only filter categories for items in your inventory
+ // (e.g. versus in-world object contents).
+ const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id);
+ if (!cat)
+ return false;
+ LLFolderType::EType cat_type = cat->getPreferredType();
+ if (cat_type != LLFolderType::FT_NONE && (1LL << cat_type & mFilterOps.mFilterCategoryTypes) == U64(0))
+ return false;
+ }
+
+ return true;
+}
+
BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const
{
const LLFolderViewEventListener* listener = item->getListener();
@@ -137,30 +163,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con
}
}
-
- ////////////////////////////////////////////////////////////////////////////////
- // FILTERTYPE_CATEGORY
- // Pass if this item is a category of the filter type, or
- // if its parent is a category of the filter type.
- if (filterTypes & FILTERTYPE_CATEGORY)
- {
- // Can only filter categories for items in your inventory
- // (e.g. versus in-world object contents).
- if (!object) return FALSE;
-
- LLUUID cat_id = object_id;
- if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY)
- {
- cat_id = object->getParentUUID();
- }
- const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
- if (!cat)
- return FALSE;
- if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0))
- return FALSE;
- }
-
-
////////////////////////////////////////////////////////////////////////////////
// FILTERTYPE_UUID
// Pass if this item is the target UUID or if it links to the target UUID
@@ -172,7 +174,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con
return FALSE;
}
-
////////////////////////////////////////////////////////////////////////////////
// FILTERTYPE_DATE
// Pass if this item is within the date range.
@@ -293,15 +294,15 @@ BOOL LLInventoryFilter::isModifiedAndClear()
return ret;
}
-void LLInventoryFilter::setFilterObjectTypes(U64 types)
+void LLInventoryFilter::updateFilterTypes(U64 types, U64& current_types)
{
- if (mFilterOps.mFilterObjectTypes != types)
+ if (current_types != types)
{
// keep current items only if no type bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mFilterObjectTypes & ~types);
- BOOL more_bits_set = (~mFilterOps.mFilterObjectTypes & types);
+ bool fewer_bits_set = (current_types & ~types) != 0;
+ bool more_bits_set = (~current_types & types) != 0;
- mFilterOps.mFilterObjectTypes = types;
+ current_types = types;
if (more_bits_set && fewer_bits_set)
{
// neither less or more restrive, both simultaneously
@@ -318,62 +319,23 @@ void LLInventoryFilter::setFilterObjectTypes(U64 types)
setModified(FILTER_MORE_RESTRICTIVE);
}
}
+}
+
+void LLInventoryFilter::setFilterObjectTypes(U64 types)
+{
+ updateFilterTypes(types, mFilterOps.mFilterObjectTypes);
mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT;
}
void LLInventoryFilter::setFilterCategoryTypes(U64 types)
{
- if (mFilterOps.mFilterCategoryTypes != types)
- {
- // keep current items only if no type bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mFilterCategoryTypes & ~types);
- BOOL more_bits_set = (~mFilterOps.mFilterCategoryTypes & types);
-
- mFilterOps.mFilterCategoryTypes = types;
- if (more_bits_set && fewer_bits_set)
- {
- // neither less or more restrive, both simultaneously
- // so we need to filter from scratch
- setModified(FILTER_RESTART);
- }
- else if (more_bits_set)
- {
- // target is only one of all requested types so more type bits == less restrictive
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else if (fewer_bits_set)
- {
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- }
- mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT;
+ updateFilterTypes(types, mFilterOps.mFilterCategoryTypes);
+ mFilterOps.mFilterTypes |= FILTERTYPE_CATEGORY;
}
void LLInventoryFilter::setFilterWearableTypes(U64 types)
{
- if (mFilterOps.mFilterWearableTypes != types)
- {
- // keep current items only if no type bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mFilterWearableTypes & ~types);
- BOOL more_bits_set = (~mFilterOps.mFilterWearableTypes & types);
-
- mFilterOps.mFilterWearableTypes = types;
- if (more_bits_set && fewer_bits_set)
- {
- // neither less or more restrive, both simultaneously
- // so we need to filter from scratch
- setModified(FILTER_RESTART);
- }
- else if (more_bits_set)
- {
- // target is only one of all requested types so more type bits == less restrictive
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else if (fewer_bits_set)
- {
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- }
+ updateFilterTypes(types, mFilterOps.mFilterWearableTypes);
mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE;
}
@@ -898,11 +860,16 @@ void LLInventoryFilter::fromLLSD(LLSD& data)
}
}
-U32 LLInventoryFilter::getFilterObjectTypes() const
+U64 LLInventoryFilter::getFilterObjectTypes() const
{
return mFilterOps.mFilterObjectTypes;
}
+U64 LLInventoryFilter::getFilterCategoryTypes() const
+{
+ return mFilterOps.mFilterCategoryTypes;
+}
+
BOOL LLInventoryFilter::hasFilterString() const
{
return mFilterSubString.size() > 0;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 39e6f797a2..f9460822f7 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -31,6 +31,7 @@
#include "llpermissionsflags.h"
class LLFolderViewItem;
+class LLFolderViewFolder;
class LLInventoryFilter
{
@@ -81,11 +82,13 @@ public:
// + Parameters
// +-------------------------------------------------------------------+
void setFilterObjectTypes(U64 types);
- U32 getFilterObjectTypes() const;
+ U64 getFilterObjectTypes() const;
+ U64 getFilterCategoryTypes() const;
BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const;
void setFilterCategoryTypes(U64 types);
void setFilterUUID(const LLUUID &object_id);
void setFilterWearableTypes(U64 types);
+ void updateFilterTypes(U64 types, U64& current_types);
void setFilterSubString(const std::string& string);
const std::string& getFilterSubString(BOOL trim = FALSE) const;
@@ -110,6 +113,7 @@ public:
// + Execution And Results
// +-------------------------------------------------------------------+
BOOL check(const LLFolderViewItem* item);
+ bool checkFolder(const LLFolderViewFolder* folder);
BOOL checkAgainstFilterType(const LLFolderViewItem* item) const;
BOOL checkAgainstPermissions(const LLFolderViewItem* item) const;
BOOL checkAgainstFilterLinks(const LLFolderViewItem* item) const;
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index cfe1747fd4..2016b92666 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -28,9 +28,9 @@
#ifndef LL_LLINVENTORYFUNCTIONS_H
#define LL_LLINVENTORYFUNCTIONS_H
-#include "llinventorytype.h"
-#include "llfolderview.h"
-#include "llfolderviewitem.h"
+#include "llinventorymodel.h"
+#include "llinventory.h"
+#include "llwearabletype.h"
/********************************************************************************
** **
@@ -417,6 +417,24 @@ public:
/** Inventory Collector Functions
** **
*******************************************************************************/
+class LLFolderViewItem;
+class LLFolderViewFolder;
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFolderViewFunctor
+//
+// Simple abstract base class for applying a functor to folders and
+// items in a folder view hierarchy. This is suboptimal for algorithms
+// that only work folders or only work on items, but I'll worry about
+// that later when it's determined to be too slow.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLFolderViewFunctor
+{
+public:
+ virtual ~LLFolderViewFunctor() {}
+ virtual void doFolder(LLFolderViewFolder* folder) = 0;
+ virtual void doItem(LLFolderViewItem* item) = 0;
+};
class LLInventoryState
{
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index b5180854ef..21d5de9a5b 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -632,10 +632,12 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
}
// We're hiding mesh types
+#if 0
if (item->getType() == LLAssetType::AT_MESH)
{
return mask;
}
+#endif
LLViewerInventoryItem* old_item = getItem(item->getUUID());
LLPointer<LLViewerInventoryItem> new_item;
@@ -2587,7 +2589,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
LLInventoryState::sWearNewClothing = FALSE;
}
- if (tid == LLInventoryState::sWearNewClothingTransactionID)
+ if (tid.notNull() && tid == LLInventoryState::sWearNewClothingTransactionID)
{
count = wearable_ids.size();
for (i = 0; i < count; ++i)
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 7b1ff102e7..afaf660cb7 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -31,7 +31,9 @@
#include "llappviewer.h"
#include "llcallbacklist.h"
#include "llinventorypanel.h"
+#include "llinventorymodel.h"
#include "llviewercontrol.h"
+#include "llviewerinventory.h"
#include "llviewermessage.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 6bf19e346d..ceba4a0191 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -601,6 +601,34 @@ void LLInventoryAddedObserver::changed(U32 mask)
}
}
+void LLInventoryCategoryAddedObserver::changed(U32 mask)
+{
+ if (!(mask & LLInventoryObserver::ADD))
+ {
+ return;
+ }
+
+ const LLInventoryModel::changed_items_t& changed_ids = gInventory.getChangedIDs();
+
+ for (LLInventoryModel::changed_items_t::const_iterator cit = changed_ids.begin(); cit != changed_ids.end(); ++cit)
+ {
+ LLViewerInventoryCategory* cat = gInventory.getCategory(*cit);
+
+ if (cat)
+ {
+ mAddedCategories.push_back(cat);
+ }
+ }
+
+ if (!mAddedCategories.empty())
+ {
+ done();
+
+ mAddedCategories.clear();
+ }
+}
+
+
LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) :
mTransactionID(transaction_id)
{
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 2d9021961e..aa1eae84d7 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -219,6 +219,28 @@ protected:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryCategoryAddedObserver
+//
+// Base class for doing something when a new category is created in the
+// inventory.
+// It does not watch for a certain UUID, rather it acts when anything is added
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLInventoryCategoryAddedObserver : public LLInventoryObserver
+{
+public:
+
+ typedef std::vector<LLViewerInventoryCategory*> cat_vec_t;
+
+ LLInventoryCategoryAddedObserver() : mAddedCategories() {}
+ /*virtual*/ void changed(U32 mask);
+
+protected:
+ virtual void done() = 0;
+
+ cat_vec_t mAddedCategories;
+};
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryTransactionObserver
//
// Base class for doing something when an inventory transaction completes.
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 1dcb91ad4d..702e8d5a1f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -35,6 +35,7 @@
#include "llavataractions.h"
#include "llfloaterinventory.h"
#include "llfloaterreg.h"
+#include "llfolderview.h"
#include "llimfloater.h"
#include "llimview.h"
#include "llinventorybridge.h"
@@ -42,7 +43,6 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llsidepanelinventory.h"
#include "llsidetray.h"
-#include "llscrollcontainer.h"
#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
@@ -131,9 +131,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mInventory(p.inventory),
mAllowMultiSelect(p.allow_multi_select),
mShowItemLinkOverlays(p.show_item_link_overlays),
+ mShowLoadStatus(p.show_load_status),
mViewsInitialized(false),
- mStartFolderString(p.start_folder),
- mBuildDefaultHierarchy(true),
mInvFVBridgeBuilder(NULL)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -146,11 +145,88 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars));
+
+}
+
+void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
+{
+ // Determine the root folder in case specified, and
+ // build the views starting with that folder.
+
+ std::string start_folder_name(params.start_folder());
+
+ const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(start_folder_name);
+
+ LLUUID root_id;
+
+ if ("LIBRARY" == params.start_folder())
+ {
+ root_id = gInventory.getLibraryRootFolderID();
+ }
+ // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ else if (preferred_type == LLFolderType::FT_INBOX)
+ {
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == "Received Items")
+ {
+ root_id = cat->getUUID();
+ }
+ }
+ }
+ }
+ // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ else if (preferred_type == LLFolderType::FT_OUTBOX)
+ {
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == "Merchant Outbox")
+ {
+ root_id = cat->getUUID();
+ }
+ }
+ }
+ }
+ // leslie -- end temporary HACK
+ else
+ {
+ root_id = (preferred_type != LLFolderType::FT_NONE)
+ ? gInventory.findCategoryUUIDForType(preferred_type, false, false)
+ : LLUUID::null;
+ }
- if (mStartFolderString != "")
+ if ((root_id == LLUUID::null) && !start_folder_name.empty())
{
- mBuildDefaultHierarchy = false;
+ llwarns << "No category found that matches start_folder: " << start_folder_name << llendl;
+ root_id = LLUUID::generateNewID();
}
+
+ LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
+ LLAssetType::AT_CATEGORY,
+ LLInventoryType::IT_CATEGORY,
+ this,
+ NULL,
+ root_id);
+
+ mFolderRoot = createFolderView(new_listener, params.use_label_suffix());
}
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
@@ -159,22 +235,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
- // Create root folder
- {
- LLRect folder_rect(0,
- 0,
- getRect().getWidth(),
- 0);
- LLFolderView::Params p;
- p.name = getName();
- p.title = getLabel();
- p.rect = folder_rect;
- p.parent_panel = this;
- p.tool_tip = p.name;
- p.use_label_suffix = params.use_label_suffix;
- mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p);
- mFolderRoot->setAllowMultiSelect(mAllowMultiSelect);
- }
+ buildFolderView(params);
mCommitCallbackRegistrar.popScope();
@@ -184,13 +245,9 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
LLRect scroller_view_rect = getRect();
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
- LLScrollContainer::Params p;
- p.name("Inventory Scroller");
- p.rect(scroller_view_rect);
- p.follows.flags(FOLLOWS_ALL);
- p.reserve_scroll_corner(true);
- p.tab_stop(true);
- mScroller = LLUICtrlFactory::create<LLScrollContainer>(p);
+ LLScrollContainer::Params scroller_params(params.scroll());
+ scroller_params.rect(scroller_view_rect);
+ mScroller = LLUICtrlFactory::create<LLScrollContainer>(scroller_params);
addChild(mScroller);
mScroller->addChild(mFolderRoot);
mFolderRoot->setScrollContainer(mScroller);
@@ -206,7 +263,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
// Build view of inventory if we need default full hierarchy and inventory ready,
// otherwise wait for idle callback.
- if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mViewsInitialized)
+ if (mInventory->isInventoryUsable() && !mViewsInitialized)
{
initializeViews();
}
@@ -222,6 +279,9 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
}
mFolderRoot->setSortOrder(getFilter()->getSortOrder());
+ // hide inbox
+ getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX));
+
// Initialize base class params.
LLPanel::initFromParams(params);
}
@@ -264,6 +324,15 @@ LLInventoryFilter* LLInventoryPanel::getFilter()
return NULL;
}
+const LLInventoryFilter* LLInventoryPanel::getFilter() const
+{
+ if (mFolderRoot)
+ {
+ return mFolderRoot->getFilter();
+ }
+ return NULL;
+}
+
void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type)
{
if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT)
@@ -272,6 +341,17 @@ void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType
getFilter()->setFilterCategoryTypes(types);
}
+U32 LLInventoryPanel::getFilterObjectTypes() const
+{
+ return mFolderRoot->getFilterObjectTypes();
+}
+
+U32 LLInventoryPanel::getFilterPermMask() const
+{
+ return mFolderRoot->getFilterPermissions();
+}
+
+
void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
{
getFilter()->setFilterPermissions(filter_perm_mask);
@@ -287,6 +367,12 @@ void LLInventoryPanel::setFilterSubString(const std::string& string)
getFilter()->setFilterSubString(string);
}
+const std::string LLInventoryPanel::getFilterSubString()
+{
+ return mFolderRoot->getFilterSubString();
+}
+
+
void LLInventoryPanel::setSortOrder(U32 order)
{
getFilter()->setSortOrder(order);
@@ -298,6 +384,12 @@ void LLInventoryPanel::setSortOrder(U32 order)
}
}
+U32 LLInventoryPanel::getSortOrder() const
+{
+ return mFolderRoot->getSortOrder();
+}
+
+
void LLInventoryPanel::setSinceLogoff(BOOL sl)
{
getFilter()->setDateRangeLastLogoff(sl);
@@ -379,7 +471,8 @@ void LLInventoryPanel::modelChanged(U32 mask)
{
view_item->destroyView();
}
- buildNewViews(item_id);
+ view_item = buildNewViews(item_id);
+ view_folder = dynamic_cast<LLFolderViewFolder *>(view_item);
}
//////////////////////////////
@@ -432,11 +525,10 @@ void LLInventoryPanel::modelChanged(U32 mask)
//////////////////////////////
// STRUCTURE Operation
// This item already exists in both memory and UI. It was probably reparented.
- if (model_item && view_item)
+ else if (model_item && view_item)
{
- // Don't process the item if it's hanging from the root, since its
- // model_item's parent will be NULL.
- if (view_item->getRoot() != view_item->getParent())
+ // Don't process the item if it is the root
+ if (view_item->getRoot() != view_item)
{
LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolderRoot->getItemByID(model_item->getParentUUID());
// Item has been moved.
@@ -461,7 +553,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
//////////////////////////////
// REMOVE Operation
// This item has been removed from memory, but its associated UI element still exists.
- if (!model_item && view_item)
+ else if (!model_item && view_item)
{
// Remove the item's UI.
view_item->destroyView();
@@ -470,6 +562,12 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
+LLFolderView* LLInventoryPanel::getRootFolder()
+{
+ return mFolderRoot;
+}
+
+
// static
void LLInventoryPanel::onIdle(void *userdata)
{
@@ -488,23 +586,16 @@ void LLInventoryPanel::onIdle(void *userdata)
}
}
+const LLUUID& LLInventoryPanel::getRootFolderID() const
+{
+ return mFolderRoot->getListener()->getUUID();
+}
+
void LLInventoryPanel::initializeViews()
{
if (!gInventory.isInventoryUsable()) return;
- // Determine the root folder in case specified, and
- // build the views starting with that folder.
- const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
-
- if ("LIBRARY" == mStartFolderString)
- {
- mStartFolderID = gInventory.getLibraryRootFolderID();
- }
- else
- {
- mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
- }
- rebuildViewsFor(mStartFolderID);
+ rebuildViewsFor(getRootFolderID());
mViewsInitialized = true;
@@ -529,132 +620,155 @@ void LLInventoryPanel::initializeViews()
}
}
-void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
+LLFolderViewItem* LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
// Destroy the old view for this ID so we can rebuild it.
LLFolderViewItem* old_view = mFolderRoot->getItemByID(id);
- if (old_view && id.notNull())
+ if (old_view)
{
old_view->destroyView();
}
- buildNewViews(id);
+ return buildNewViews(id);
}
-void LLInventoryPanel::buildNewViews(const LLUUID& id)
+LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS);
- LLFolderViewItem* itemp = NULL;
- LLInventoryObject* objectp = gInventory.getObject(id);
- if (objectp)
+ LLRect folder_rect(0,
+ 0,
+ getRect().getWidth(),
+ 0);
+
+ LLFolderView::Params p;
+
+ p.name = getName();
+ p.title = getLabel();
+ p.rect = folder_rect;
+ p.parent_panel = this;
+ p.tool_tip = p.name;
+ p.listener = bridge;
+ p.use_label_suffix = useLabelSuffix;
+ p.allow_multiselect = mAllowMultiSelect;
+ p.show_load_status = mShowLoadStatus;
+
+ return LLUICtrlFactory::create<LLFolderView>(p);
+}
+
+LLFolderViewFolder * LLInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge)
+{
+ LLFolderViewFolder::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
{
- const LLUUID &parent_id = objectp->getParentUUID();
- LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolderRoot->getItemByID(parent_id);
- if (id == mStartFolderID)
- {
- parent_folder = mFolderRoot;
- }
- else if ((mStartFolderID != LLUUID::null) && (!gInventory.isObjectDescendentOf(id, mStartFolderID)))
- {
- // This item exists outside the inventory's hierarchy, so don't add it.
- return;
- }
-
- if (objectp->getType() <= LLAssetType::AT_NONE ||
- objectp->getType() >= LLAssetType::AT_COUNT)
- {
- llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : "
- << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID()
- << llendl;
- return;
- }
-
- if ((objectp->getType() == LLAssetType::AT_CATEGORY) &&
- (objectp->getActualType() != LLAssetType::AT_LINK_FOLDER))
- {
- LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(objectp->getType(),
- objectp->getType(),
- LLInventoryType::IT_CATEGORY,
- this,
- mFolderRoot,
- objectp->getUUID());
- if (new_listener)
- {
- LLFolderViewFolder::Params params;
- params.name = new_listener->getDisplayName();
- params.icon = new_listener->getIcon();
- params.icon_open = new_listener->getOpenIcon();
- if (mShowItemLinkOverlays) // if false, then links show up just like normal items
- {
- params.icon_overlay = LLUI::getUIImage("Inv_Link");
- }
- params.root = mFolderRoot;
- params.listener = new_listener;
- params.tool_tip = params.name;
- LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(params);
- folderp->setItemSortOrder(mFolderRoot->getSortOrder());
- itemp = folderp;
-
- // Hide the root folder, so we can show the contents of a folder flat
- // but still have the parent folder present for listener-related operations.
- if (id == mStartFolderID)
- {
- folderp->setHidden(TRUE);
- }
- const LLViewerInventoryCategory *cat = dynamic_cast<LLViewerInventoryCategory *>(objectp);
- if (cat && getIsHiddenFolderType(cat->getPreferredType()))
- {
- folderp->setHidden(TRUE);
- }
- }
- }
- else
- {
- // Build new view for item.
- LLInventoryItem* item = (LLInventoryItem*)objectp;
- LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(item->getType(),
- item->getActualType(),
- item->getInventoryType(),
- this,
- mFolderRoot,
- item->getUUID(),
- item->getFlags());
-
- if (new_listener)
- {
- LLFolderViewItem::Params params;
- params.name = new_listener->getDisplayName();
- params.icon = new_listener->getIcon();
- params.icon_open = new_listener->getOpenIcon();
- if (mShowItemLinkOverlays) // if false, then links show up just like normal items
- {
- params.icon_overlay = LLUI::getUIImage("Inv_Link");
- }
- params.creation_date = new_listener->getCreationDate();
- params.root = mFolderRoot;
- params.listener = new_listener;
- params.rect = LLRect (0, 0, 0, 0);
- params.tool_tip = params.name;
- itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
- }
- }
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.tool_tip = params.name;
- if (itemp)
- {
- itemp->addToFolder(parent_folder, mFolderRoot);
+ return LLUICtrlFactory::create<LLFolderViewFolder>(params);
+}
- // Don't add children of hidden folders unless this is the panel's root folder.
- if (itemp->getHidden() && (id != mStartFolderID))
- {
- return;
- }
+LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
+{
+ LLFolderViewItem::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.creation_date = bridge->getCreationDate();
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.rect = LLRect (0, 0, 0, 0);
+ params.tool_tip = params.name;
+
+ return LLUICtrlFactory::create<LLFolderViewItem>(params);
+}
+
+LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
+{
+ LLInventoryObject const* objectp = gInventory.getObject(id);
+ LLUUID root_id = mFolderRoot->getListener()->getUUID();
+ LLFolderViewFolder* parent_folder = NULL;
+ LLFolderViewItem* itemp = NULL;
+
+ if (id == root_id)
+ {
+ parent_folder = mFolderRoot;
+ }
+ else if (objectp)
+ {
+ const LLUUID &parent_id = objectp->getParentUUID();
+ parent_folder = (LLFolderViewFolder*)mFolderRoot->getItemByID(parent_id);
+
+ if (parent_folder)
+ {
+ if (objectp->getType() <= LLAssetType::AT_NONE ||
+ objectp->getType() >= LLAssetType::AT_COUNT)
+ {
+ llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : "
+ << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID()
+ << llendl;
+ return NULL;
+ }
+
+ if ((objectp->getType() == LLAssetType::AT_CATEGORY) &&
+ (objectp->getActualType() != LLAssetType::AT_LINK_FOLDER))
+ {
+ LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(objectp->getType(),
+ objectp->getType(),
+ LLInventoryType::IT_CATEGORY,
+ this,
+ mFolderRoot,
+ objectp->getUUID());
+ if (new_listener)
+ {
+ LLFolderViewFolder* folderp = createFolderViewFolder(new_listener);
+ folderp->setItemSortOrder(mFolderRoot->getSortOrder());
+ itemp = folderp;
+ }
+ }
+ else
+ {
+ // Build new view for item.
+ LLInventoryItem* item = (LLInventoryItem*)objectp;
+ LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(item->getType(),
+ item->getActualType(),
+ item->getInventoryType(),
+ this,
+ mFolderRoot,
+ item->getUUID(),
+ item->getFlags());
+
+ if (new_listener)
+ {
+ itemp = createFolderViewItem(new_listener);
+ }
+ }
+
+ if (itemp)
+ {
+ itemp->addToFolder(parent_folder, mFolderRoot);
+ }
}
}
// If this is a folder, add the children of the folder and recursively add any
// child folders.
- if ((id == mStartFolderID) ||
- (objectp && objectp->getType() == LLAssetType::AT_CATEGORY))
+ if (id.isNull()
+ || (objectp
+ && objectp->getType() == LLAssetType::AT_CATEGORY))
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
@@ -671,7 +785,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
}
}
- if(items)
+ if(items && parent_folder)
{
for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items->begin();
item_iter != items->end();
@@ -683,28 +797,25 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
}
mInventory->unlockDirectDescendentArrays(id);
}
+
+ return itemp;
}
// bit of a hack to make sure the inventory is open.
void LLInventoryPanel::openStartFolderOrMyInventory()
{
- if (mStartFolderString != "")
+ // Find My Inventory folder and open it up by name
+ for (LLView *child = mFolderRoot->getFirstChild(); child; child = mFolderRoot->findNextSibling(child))
{
- mFolderRoot->openFolder(mStartFolderString);
- }
- else
- {
- // Find My Inventory folder and open it up by name
- for (LLView *child = mFolderRoot->getFirstChild(); child; child = mFolderRoot->findNextSibling(child))
+ LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child);
+ if (fchild
+ && fchild->getListener()
+ && fchild->getListener()->getUUID() == gInventory.getRootFolderID())
{
- LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child);
- if (fchild && fchild->getListener() &&
- (fchild->getListener()->getUUID() == gInventory.getRootFolderID()))
- {
- const std::string& child_name = child->getName();
- mFolderRoot->openFolder(child_name);
- break;
- }
+ const std::string& child_name = child->getName();
+ mFolderRoot->openFolder(child_name);
+ mFolderRoot->clearSelection(); // No need to keep it selected though!
+ break;
}
}
}
@@ -723,6 +834,12 @@ void LLInventoryPanel::openSelected()
bridge->openItem();
}
+void LLInventoryPanel::unSelectAll()
+{
+ mFolderRoot->setSelection(NULL, FALSE, FALSE);
+}
+
+
BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleHover(x, y, mask);
@@ -802,7 +919,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
mFolderRoot->setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const LLFolderView::signal_t::slot_type& cb)
+void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb)
{
if (mFolderRoot)
{
@@ -1067,15 +1184,12 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type)
{
- if (!getIsHiddenFolderType(folder_type))
- {
- mHiddenFolderTypes.push_back(folder_type);
- }
+ getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << folder_type));
}
BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const
{
- return (std::find(mHiddenFolderTypes.begin(), mHiddenFolderTypes.end(), folder_type) != mHiddenFolderTypes.end());
+ return !(getFilter()->getFilterCategoryTypes() & (1ULL << folder_type));
}
@@ -1092,6 +1206,13 @@ public:
struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
{};
+ void initFromParams(const Params& p)
+ {
+ LLInventoryPanel::initFromParams(p);
+ // turn on inbox for recent items
+ getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX));
+ }
+
protected:
LLInventoryRecentItemsPanel (const Params&);
friend class LLUICtrlFactory;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 9da9f7d8ba..a4287a438e 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -33,11 +33,13 @@
#include "llfloater.h"
#include "llinventory.h"
#include "llinventoryfilter.h"
-#include "llfolderview.h"
#include "llinventorymodel.h"
+#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
#include <set>
+class LLFolderView;
+class LLFolderViewFolder;
class LLFolderViewItem;
class LLInventoryFilter;
class LLInventoryModel;
@@ -46,7 +48,6 @@ class LLInventoryFVBridgeBuilder;
class LLMenuBarGL;
class LLCheckBoxCtrl;
class LLSpinCtrl;
-class LLScrollContainer;
class LLTextBox;
class LLIconCtrl;
class LLSaveFolderState;
@@ -83,6 +84,8 @@ public:
Optional<Filter> filter;
Optional<std::string> start_folder;
Optional<bool> use_label_suffix;
+ Optional<bool> show_load_status;
+ Optional<LLScrollContainer::Params> scroll;
Params()
: sort_order_setting("sort_order_setting"),
@@ -91,7 +94,9 @@ public:
show_item_link_overlays("show_item_link_overlays", false),
filter("filter"),
start_folder("start_folder"),
- use_label_suffix("use_label_suffix", true)
+ use_label_suffix("use_label_suffix", true),
+ show_load_status("show_load_status"),
+ scroll("scroll")
{}
};
@@ -123,16 +128,17 @@ public:
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
- void setSelectCallback(const LLFolderView::signal_t::slot_type& cb);
+ void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);
void clearSelection();
LLInventoryFilter* getFilter();
+ const LLInventoryFilter* getFilter() const;
void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT);
- U32 getFilterObjectTypes() const { return mFolderRoot->getFilterObjectTypes(); }
+ U32 getFilterObjectTypes() const;
void setFilterPermMask(PermissionMask filter_perm_mask);
- U32 getFilterPermMask() const { return mFolderRoot->getFilterPermissions(); }
+ U32 getFilterPermMask() const;
void setFilterWearableTypes(U64 filter);
void setFilterSubString(const std::string& string);
- const std::string getFilterSubString() { return mFolderRoot->getFilterSubString(); }
+ const std::string getFilterSubString();
void setSinceLogoff(BOOL sl);
void setHoursAgo(U32 hours);
BOOL getSinceLogoff();
@@ -140,10 +146,9 @@ public:
void setShowFolderState(LLInventoryFilter::EFolderShow show);
LLInventoryFilter::EFolderShow getShowFolderState();
- void setAllowMultiSelect(BOOL allow) { mFolderRoot->setAllowMultiSelect(allow); }
// This method is called when something has changed about the inventory.
void modelChanged(U32 mask);
- LLFolderView* getRootFolder() { return mFolderRoot; }
+ LLFolderView* getRootFolder();
LLScrollContainer* getScrollableContainer() { return mScroller; }
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
@@ -158,7 +163,7 @@ public:
static void dumpSelectionInformation(void* user_data);
void openSelected();
- void unSelectAll() { mFolderRoot->setSelection(NULL, FALSE, FALSE); }
+ void unSelectAll();
static void onIdle(void* user_data);
@@ -175,6 +180,7 @@ protected:
LLInvPanelComplObserver* mCompletionObserver;
BOOL mAllowMultiSelect;
BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons
+ BOOL mShowLoadStatus;
LLFolderView* mFolderRoot;
LLScrollContainer* mScroller;
@@ -198,7 +204,7 @@ public:
static const std::string INHERIT_SORT_ORDER;
void setSortOrder(U32 order);
- U32 getSortOrder() const { return mFolderRoot->getSortOrder(); }
+ U32 getSortOrder() const;
private:
std::string mSortOrderSetting;
@@ -207,29 +213,27 @@ private:
//--------------------------------------------------------------------
public:
void addHideFolderType(LLFolderType::EType folder_type);
-protected:
- BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
-private:
- std::vector<LLFolderType::EType> mHiddenFolderTypes;
- //--------------------------------------------------------------------
- // Initialization routines for building up the UI ("views")
- //--------------------------------------------------------------------
public:
BOOL getIsViewsInitialized() const { return mViewsInitialized; }
- const LLUUID& getStartFolderID() const { return mStartFolderID; }
- const std::string& getStartFolderString() { return mStartFolderString; }
+ const LLUUID& getRootFolderID() const;
protected:
// Builds the UI. Call this once the inventory is usable.
void initializeViews();
- void rebuildViewsFor(const LLUUID& id); // Given the id and the parent, build all of the folder views.
- virtual void buildNewViews(const LLUUID& id);
+ LLFolderViewItem* rebuildViewsFor(const LLUUID& id); // Given the id and the parent, build all of the folder views.
+
+ virtual void buildFolderView(const LLInventoryPanel::Params& params);
+ LLFolderViewItem* buildNewViews(const LLUUID& id);
+ BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
+
+ virtual LLFolderView* createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix);
+ virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge);
+ virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge);
private:
BOOL mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild()
BOOL mViewsInitialized; // Views have been generated
// UUID of category from which hierarchy should be built. Set with the
// "start_folder" xml property. Default is LLUUID::null that means total Inventory hierarchy.
- std::string mStartFolderString;
LLUUID mStartFolderID;
};
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 5c65dcec34..1c8f6b6c98 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -190,6 +190,7 @@ LLLocationInputCtrl::Params::Params()
scripts_icon("scripts_icon"),
damage_icon("damage_icon"),
damage_text("damage_text"),
+ see_avatars_icon("see_avatars_icon"),
maturity_help_topic("maturity_help_topic")
{
}
@@ -342,6 +343,13 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mDamageText = LLUICtrlFactory::create<LLTextBox>(damage_text);
addChild(mDamageText);
+ LLIconCtrl::Params see_avatars_icon = p.see_avatars_icon;
+ see_avatars_icon.tool_tip = LLTrans::getString("LocationCtrlSeeAVsTooltip");
+ see_avatars_icon.mouse_opaque = true;
+ mParcelIcon[SEE_AVATARS_ICON] = LLUICtrlFactory::create<LLIconCtrl>(see_avatars_icon);
+ mParcelIcon[SEE_AVATARS_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, SEE_AVATARS_ICON));
+ addChild(mParcelIcon[SEE_AVATARS_ICON]);
+
// Register callbacks and load the location field context menu (NB: the order matters).
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Navbar.Action", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemClicked, this, _2));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Navbar.EnableMenuItem", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemEnabled, this, _2));
@@ -810,6 +818,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610.
bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel);
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
+ bool see_avs = current_parcel->getSeeAVs();
// Most icons are "block this ability"
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
@@ -819,6 +828,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
mDamageText->setVisible(allow_damage);
+ mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs );
// Padding goes to left of both landmark star and for sale btn
x -= mAddLandmarkHPad;
@@ -1175,6 +1185,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
case DAMAGE_ICON:
LLNotificationsUtil::add("NotSafe");
break;
+ case SEE_AVATARS_ICON:
+ LLNotificationsUtil::add("SeeAvatars");
+ break;
case ICON_COUNT:
break;
// no default to get compiler warning when a new icon gets added
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index 6368bf5cf2..ed47ba73e3 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -77,7 +77,8 @@ public:
push_icon,
build_icon,
scripts_icon,
- damage_icon;
+ damage_icon,
+ see_avatars_icon;
Optional<LLTextBox::Params> damage_text;
Params();
};
@@ -109,12 +110,13 @@ private:
enum EParcelIcon
{
VOICE_ICON = 0,
- FLY_ICON,
- PUSH_ICON,
- BUILD_ICON,
- SCRIPTS_ICON,
- DAMAGE_ICON,
- ICON_COUNT
+ FLY_ICON, // 1
+ PUSH_ICON, // 2
+ BUILD_ICON, // 3
+ SCRIPTS_ICON, // 4
+ DAMAGE_ICON, // 5
+ SEE_AVATARS_ICON, // 6
+ ICON_COUNT // 7 total
};
friend class LLUICtrlFactory;
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index efc4e23838..ebb5912ace 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -230,7 +230,7 @@ std::string LLLogChat::makeLogFileName(std::string filename)
std::string LLLogChat::cleanFileName(std::string filename)
{
- std::string invalidChars = "\"\'\\/?*:.<>|";
+ std::string invalidChars = "\"\'\\/?*:.<>|[]{}~"; // Cannot match glob or illegal filename chars
std::string::size_type position = filename.find_first_of(invalidChars);
while (position != filename.npos)
{
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 673f28e01f..4eb94dfb8e 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -58,6 +58,7 @@
#include "llworld.h"
#include "v2math.h"
#include "llvoavatar.h"
+#include "llmeshrepository.h"
const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f;
@@ -90,10 +91,7 @@ F32 get_default_max_prim_scale(bool is_flora)
{
// a bit of a hack, but if it's foilage, we don't want to use the
// new larger scale which would result in giant trees and grass
- if (gSavedSettings.getBOOL("MeshEnabled") &&
- gAgent.getRegion() &&
- !gAgent.getRegion()->getCapability("GetMesh").empty() &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty() &&
+ if (gMeshRepo.meshRezEnabled() &&
!is_flora)
{
return DEFAULT_MAX_PRIM_SCALE;
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index b3ad9efeb2..03ccabc994 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -38,6 +38,7 @@
#include "llviewermedia.h"
#include "llviewertexture.h"
#include "llviewerwindow.h"
+#include "lldebugmessagebox.h"
#include "llweb.h"
#include "llrender.h"
#include "llpluginclassmedia.h"
@@ -708,6 +709,8 @@ LLPluginClassMedia* LLMediaCtrl::getMediaPlugin()
//
void LLMediaCtrl::draw()
{
+ F32 alpha = getDrawContext().mAlpha;
+
if ( gRestoreGL == 1 )
{
LLRect r = getRect();
@@ -746,21 +749,11 @@ void LLMediaCtrl::draw()
}
}
-// if(mHidingInitialLoad)
-// {
-// // If we're hiding loading, don't draw at all.
-// draw_media = false;
-// }
-
bool background_visible = isBackgroundVisible();
bool background_opaque = isBackgroundOpaque();
if(draw_media)
{
- // alpha off for this
- LLGLSUIDefault gls_ui;
- LLGLDisable gls_alphaTest( GL_ALPHA_TEST );
-
gGL.pushUIMatrix();
{
if (mIgnoreUIScale)
@@ -775,7 +768,8 @@ void LLMediaCtrl::draw()
// scale texture to fit the space using texture coords
gGL.getTexUnit(0)->bind(media_texture);
- gGL.color4fv( LLColor4::white.mV );
+ LLColor4 media_color = LLColor4::white % alpha;
+ gGL.color4fv( media_color.mV );
F32 max_u = ( F32 )media_plugin->getWidth() / ( F32 )media_plugin->getTextureWidth();
F32 max_v = ( F32 )media_plugin->getHeight() / ( F32 )media_plugin->getTextureHeight();
@@ -827,7 +821,6 @@ void LLMediaCtrl::draw()
}
// draw the browser
- gGL.setSceneBlendType(LLRender::BT_REPLACE);
gGL.begin( LLRender::QUADS );
if (! media_plugin->getTextureCoordsOpenGL())
{
@@ -860,7 +853,6 @@ void LLMediaCtrl::draw()
gGL.vertex2i( x_offset + width, y_offset );
}
gGL.end();
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
gGL.popUIMatrix();
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 55145c6ad7..6e0722bcf9 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -61,6 +61,9 @@
#include "pipeline.h"
#include "llinventorymodel.h"
#include "llfoldertype.h"
+#include "llviewerparcelmgr.h"
+
+#include "boost/lexical_cast.hpp"
#ifndef LL_WINDOWS
#include "netdb.h"
@@ -85,7 +88,14 @@ U32 LLMeshRepository::sPeakKbps = 0;
const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5;
-void dumpLLSDToFile(const LLSD& content, std::string filename);
+static S32 dump_num = 0;
+std::string make_dump_name(std::string prefix, S32 num)
+{
+ return prefix + boost::lexical_cast<std::string>(num) + std::string(".xml");
+
+}
+void dump_llsd_to_file(const LLSD& content, std::string filename);
+LLSD llsd_from_file(std::string filename);
std::string header_lod[] =
{
@@ -459,6 +469,55 @@ public:
};
+void log_upload_error(S32 status, const LLSD& content, std::string stage, std::string model_name)
+{
+ // Add notification popup.
+ LLSD args;
+ std::string message = content["error"]["message"];
+ std::string identifier = content["error"]["identifier"];
+ args["MESSAGE"] = message;
+ args["IDENTIFIER"] = identifier;
+ args["LABEL"] = model_name;
+ gMeshRepo.uploadError(args);
+
+ // Log details.
+ llwarns << "stage: " << stage << " http status: " << status << llendl;
+ if (content.has("error"))
+ {
+ const LLSD& err = content["error"];
+ llwarns << "err: " << err << llendl;
+ llwarns << "mesh upload failed, stage '" << stage
+ << "' error '" << err["error"].asString()
+ << "', message '" << err["message"].asString()
+ << "', id '" << err["identifier"].asString()
+ << "'" << llendl;
+ if (err.has("errors"))
+ {
+ S32 error_num = 0;
+ const LLSD& err_list = err["errors"];
+ for (LLSD::array_const_iterator it = err_list.beginArray();
+ it != err_list.endArray();
+ ++it)
+ {
+ const LLSD& err_entry = *it;
+ llwarns << "error[" << error_num << "]:" << llendl;
+ for (LLSD::map_const_iterator map_it = err_entry.beginMap();
+ map_it != err_entry.endMap();
+ ++map_it)
+ {
+ llwarns << "\t" << map_it->first << ": "
+ << map_it->second << llendl;
+ }
+ error_num++;
+ }
+ }
+ }
+ else
+ {
+ llwarns << "bad mesh, no error information available" << llendl;
+ }
+}
+
class LLModelObjectUploadResponder: public LLCurl::Responder
{
LLSD mObjectAsset;
@@ -486,40 +545,82 @@ public:
class LLWholeModelFeeResponder: public LLCurl::Responder
{
LLMeshUploadThread* mThread;
+ LLSD mModelData;
public:
- LLWholeModelFeeResponder(LLMeshUploadThread* thread):
- mThread(thread)
+ LLWholeModelFeeResponder(LLMeshUploadThread* thread, LLSD& model_data):
+ mThread(thread),
+ mModelData(model_data)
{
}
virtual void completed(U32 status,
const std::string& reason,
const LLSD& content)
{
- //assert_main_thread();
+ LLSD cc = content;
+ if (gSavedSettings.getS32("MeshUploadFakeErrors")&1)
+ {
+ cc = llsd_from_file("fake_upload_error.xml");
+ }
+
llinfos << "completed" << llendl;
mThread->mPendingUploads--;
- dumpLLSDToFile(content,"whole_model_response.xml");
-
- mThread->mWholeModelUploadURL = content["uploader"].asString();
+ dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num));
+ if (isGoodStatus(status) &&
+ cc["state"].asString() == "upload")
+ {
+ llinfos << "fee request succeeded" << llendl;
+ mThread->mWholeModelUploadURL = cc["uploader"].asString();
+ }
+ else
+ {
+ llwarns << "fee request failed" << llendl;
+ log_upload_error(status,cc,"fee",mModelData["name"]);
+ mThread->mWholeModelUploadURL = "";
+ }
}
+
};
class LLWholeModelUploadResponder: public LLCurl::Responder
{
LLMeshUploadThread* mThread;
+ LLSD mModelData;
+
public:
- LLWholeModelUploadResponder(LLMeshUploadThread* thread):
- mThread(thread)
+ LLWholeModelUploadResponder(LLMeshUploadThread* thread, LLSD& model_data):
+ mThread(thread),
+ mModelData(model_data)
{
}
virtual void completed(U32 status,
const std::string& reason,
const LLSD& content)
{
+ LLSD cc = content;
+ if (gSavedSettings.getS32("MeshUploadFakeErrors")&2)
+ {
+ cc = llsd_from_file("fake_upload_error.xml");
+ }
+
//assert_main_thread();
- llinfos << "upload completed" << llendl;
mThread->mPendingUploads--;
- dumpLLSDToFile(content,"whole_model_upload_response.xml");
+ dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num));
+ llinfos << "LLWholeModelUploadResponder content: " << cc << llendl;
+ // requested "mesh" asset type isn't actually the type
+ // of the resultant object, fix it up here.
+ if (isGoodStatus(status) &&
+ cc["state"].asString() == "complete")
+ {
+ llinfos << "upload succeeded" << llendl;
+ mModelData["asset_type"] = "object";
+ gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mModelData,cc));
+ }
+ else
+ {
+ llwarns << "upload failed" << llendl;
+ std::string model_name = mModelData["name"].asString();
+ log_upload_error(status,cc,"upload",model_name);
+ }
}
};
@@ -694,10 +795,7 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
if (pending != mPendingLOD.end())
{ //append this lod request to existing header request
pending->second.push_back(lod);
- if (pending->second.size() > 4)
- {
- llerrs << "WTF?" << llendl;
- }
+ llassert(pending->second.size() <= LLModel::NUM_LODS)
}
else
{ //if no header request is pending, fetch header
@@ -817,8 +915,8 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (header_size > 0)
{
- S32 offset = header_size + mMeshHeader[mesh_id]["decomposition"]["offset"].asInteger();
- S32 size = mMeshHeader[mesh_id]["decomposition"]["size"].asInteger();
+ S32 offset = header_size + mMeshHeader[mesh_id]["physics_convex"]["offset"].asInteger();
+ S32 size = mMeshHeader[mesh_id]["physics_convex"]["size"].asInteger();
mHeaderMutex->unlock();
@@ -889,8 +987,8 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
if (header_size > 0)
{
- S32 offset = header_size + mMeshHeader[mesh_id]["physics_shape"]["offset"].asInteger();
- S32 size = mMeshHeader[mesh_id]["physics_shape"]["size"].asInteger();
+ S32 offset = header_size + mMeshHeader[mesh_id]["physics_mesh"]["offset"].asInteger();
+ S32 size = mMeshHeader[mesh_id]["physics_mesh"]["size"].asInteger();
mHeaderMutex->unlock();
@@ -1282,8 +1380,6 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mOrigin = gAgent.getPositionAgent();
mHost = gAgent.getRegionHost();
- mUploadObjectAssetCapability = gAgent.getRegion()->getCapability("UploadObjectAsset");
- mNewInventoryCapability = gAgent.getRegion()->getCapability("NewFileAgentInventoryVariablePrice");
mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
mOrigin += gAgent.getAtAxis() * scale.magVec();
@@ -1303,35 +1399,7 @@ LLMeshUploadThread::DecompRequest::DecompRequest(LLModel* mdl, LLModel* base_mod
mThread = thread;
//copy out positions and indices
- if (mdl)
- {
- U16 index_offset = 0;
-
- mPositions.clear();
- mIndices.clear();
-
- //queue up vertex positions and indices
- for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = mdl->getVolumeFace(i);
- if (mPositions.size() + face.mNumVertices > 65535)
- {
- continue;
- }
-
- for (U32 j = 0; j < face.mNumVertices; ++j)
- {
- mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr()));
- }
-
- for (U32 j = 0; j < face.mNumIndices; ++j)
- {
- mIndices.push_back(face.mIndices[j]+index_offset);
- }
-
- index_offset += face.mNumVertices;
- }
- }
+ assignData(mdl) ;
mThread->mFinalDecomp = this;
mThread->mPhysicsComplete = false;
@@ -1344,11 +1412,8 @@ void LLMeshUploadThread::DecompRequest::completed()
mThread->mPhysicsComplete = true;
}
- if (mHull.size() != 1)
- {
- llerrs << "WTF?" << llendl;
- }
-
+ llassert(mHull.size() == 1);
+
mThread->mHullMap[mBaseModel] = mHull[0];
}
@@ -1376,148 +1441,199 @@ BOOL LLMeshUploadThread::isDiscarded()
void LLMeshUploadThread::run()
{
- if (gSavedSettings.getBOOL("MeshUseWholeModelUpload"))
- {
- doWholeModelUpload();
- }
- else
+ doWholeModelUpload();
+}
+
+void dump_llsd_to_file(const LLSD& content, std::string filename)
+{
+ if (gSavedSettings.getBOOL("MeshUploadLogXML"))
{
- doIterativeUpload();
+ std::ofstream of(filename.c_str());
+ LLSDSerialize::toPrettyXML(content,of);
}
}
-#if 1
-void dumpLLSDToFile(const LLSD& content, std::string filename)
+LLSD llsd_from_file(std::string filename)
{
- std::ofstream of(filename.c_str());
- LLSDSerialize::toPrettyXML(content,of);
+ std::ifstream ifs(filename.c_str());
+ LLSD result;
+ LLSDSerialize::fromXML(result,ifs);
+ return result;
}
-#endif
void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
{
- // TODO where do textures go?
-
LLSD result;
LLSD res;
result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
result["asset_type"] = "mesh";
result["inventory_type"] = "object";
- result["name"] = "your name here";
+ result["name"] = "mesh model";
result["description"] = "your description here";
- // TODO "optional" fields from the spec
-
res["mesh_list"] = LLSD::emptyArray();
-// TODO Textures
- //res["texture_list"] = LLSD::emptyArray();
+ res["texture_list"] = LLSD::emptyArray();
+ res["instance_list"] = LLSD::emptyArray();
S32 mesh_num = 0;
S32 texture_num = 0;
std::set<LLViewerTexture* > textures;
+ std::map<LLViewerTexture*,S32> texture_index;
+
+ std::map<LLModel*,S32> mesh_index;
+ S32 instance_num = 0;
+
for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
{
LLMeshUploadData data;
data.mBaseModel = iter->first;
-
- LLModelInstance& instance = *(iter->second.begin());
-
+ LLModelInstance& first_instance = *(iter->second.begin());
for (S32 i = 0; i < 5; i++)
{
- data.mModel[i] = instance.mLOD[i];
+ data.mModel[i] = first_instance.mLOD[i];
}
- std::stringstream ostr;
-
- LLModel::Decomposition& decomp =
- data.mModel[LLModel::LOD_PHYSICS].notNull() ?
- data.mModel[LLModel::LOD_PHYSICS]->mPhysics :
- data.mBaseModel->mPhysics;
-
- decomp.mBaseHull = mHullMap[data.mBaseModel];
-
- LLSD mesh_header = LLModel::writeModel(
- ostr,
- data.mModel[LLModel::LOD_PHYSICS],
- data.mModel[LLModel::LOD_HIGH],
- data.mModel[LLModel::LOD_MEDIUM],
- data.mModel[LLModel::LOD_LOW],
- data.mModel[LLModel::LOD_IMPOSTOR],
- decomp,
- mUploadSkin,
- mUploadJoints);
-
- data.mAssetData = ostr.str();
+ if (mesh_index.find(data.mBaseModel) == mesh_index.end())
+ {
+ // Have not seen this model before - create a new mesh_list entry for it.
+ std::string model_name = data.mBaseModel->getName();
+ if (!model_name.empty())
+ {
+ result["name"] = model_name;
+ }
- LLSD mesh_entry;
+ std::stringstream ostr;
+
+ LLModel::Decomposition& decomp =
+ data.mModel[LLModel::LOD_PHYSICS].notNull() ?
+ data.mModel[LLModel::LOD_PHYSICS]->mPhysics :
+ data.mBaseModel->mPhysics;
- LLVector3 pos, scale;
- LLQuaternion rot;
- LLMatrix4 transformation = instance.mTransform;
- decomposeMeshMatrix(transformation,pos,rot,scale);
+ decomp.mBaseHull = mHullMap[data.mBaseModel];
-#if 0
- mesh_entry["childpos"] = ll_sd_from_vector3(pos);
- mesh_entry["childrot"] = ll_sd_from_quaternion(rot);
- mesh_entry["scale"] = ll_sd_from_vector3(scale);
-#endif
- mesh_entry["position"] = ll_sd_from_vector3(LLVector3());
- mesh_entry["rotation"] = ll_sd_from_quaternion(rot);
- mesh_entry["scale"] = ll_sd_from_vector3(scale);
+ LLSD mesh_header = LLModel::writeModel(
+ ostr,
+ data.mModel[LLModel::LOD_PHYSICS],
+ data.mModel[LLModel::LOD_HIGH],
+ data.mModel[LLModel::LOD_MEDIUM],
+ data.mModel[LLModel::LOD_LOW],
+ data.mModel[LLModel::LOD_IMPOSTOR],
+ decomp,
+ mUploadSkin,
+ mUploadJoints);
- // TODO should be binary.
- std::string str = ostr.str();
- mesh_entry["mesh_data"] = LLSD::Binary(str.begin(),str.end());
+ data.mAssetData = ostr.str();
+ std::string str = ostr.str();
- res["mesh_list"][mesh_num] = mesh_entry;
+ res["mesh_list"][mesh_num] = LLSD::Binary(str.begin(),str.end());
+ mesh_index[data.mBaseModel] = mesh_num;
+ mesh_num++;
+ }
- // TODO how do textures in the list map to textures in the meshes?
- if (mUploadTextures)
+ // For all instances that use this model
+ for (instance_list::iterator instance_iter = iter->second.begin();
+ instance_iter != iter->second.end();
+ ++instance_iter)
{
- for (std::vector<LLImportMaterial>::iterator material_iter = instance.mMaterial.begin();
- material_iter != instance.mMaterial.end(); ++material_iter)
- {
- if (textures.find(material_iter->mDiffuseMap.get()) == textures.end())
+ LLModelInstance& instance = *instance_iter;
+
+ LLSD instance_entry;
+
+ for (S32 i = 0; i < 5; i++)
+ {
+ data.mModel[i] = instance.mLOD[i];
+ }
+
+ LLVector3 pos, scale;
+ LLQuaternion rot;
+ LLMatrix4 transformation = instance.mTransform;
+ decomposeMeshMatrix(transformation,pos,rot,scale);
+ instance_entry["position"] = ll_sd_from_vector3(pos);
+ instance_entry["rotation"] = ll_sd_from_quaternion(rot);
+ instance_entry["scale"] = ll_sd_from_vector3(scale);
+
+ instance_entry["material"] = LL_MCODE_WOOD;
+ LLPermissions perm;
+ perm.setOwnerAndGroup(gAgent.getID(), gAgent.getID(), LLUUID::null, false);
+ perm.setCreator(gAgent.getID());
+
+ perm.initMasks(PERM_ITEM_UNRESTRICTED | PERM_MOVE, //base
+ PERM_ITEM_UNRESTRICTED | PERM_MOVE, //owner
+ LLFloaterPerms::getEveryonePerms(),
+ LLFloaterPerms::getGroupPerms(),
+ LLFloaterPerms::getNextOwnerPerms());
+ instance_entry["permissions"] = ll_create_sd_from_permissions(perm);
+ instance_entry["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
+ instance_entry["mesh"] = mesh_index[data.mBaseModel];
+
+ instance_entry["face_list"] = LLSD::emptyArray();
+
+ for (S32 face_num = 0; face_num < data.mBaseModel->getNumVolumeFaces(); face_num++)
+ {
+ LLImportMaterial& material = instance.mMaterial[face_num];
+ LLSD face_entry = LLSD::emptyMap();
+ LLViewerFetchedTexture *texture = material.mDiffuseMap.get();
+
+ if ((texture != NULL) &&
+ (textures.find(texture) == textures.end()))
{
- textures.insert(material_iter->mDiffuseMap.get());
+ textures.insert(texture);
+ }
- std::stringstream ostr;
- if (include_textures) // otherwise data is blank.
- {
- LLTextureUploadData data(material_iter->mDiffuseMap.get(), material_iter->mDiffuseMapLabel);
- if (!data.mTexture->isRawImageValid())
- {
- data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel());
- }
-
+ std::stringstream texture_str;
+ if (texture != NULL && include_textures && mUploadTextures)
+ {
+ if(texture->hasSavedRawImage())
+ {
LLPointer<LLImageJ2C> upload_file =
- LLViewerTextureList::convertToUploadFile(data.mTexture->getRawImage());
- ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage());
+ texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
}
- LLSD texture_entry;
- texture_entry["texture_data"] = ostr.str();
- res["texture_list"][texture_num] = texture_entry;
+ }
+
+ if (texture != NULL &&
+ mUploadTextures &&
+ texture_index.find(texture) == texture_index.end())
+ {
+ texture_index[texture] = texture_num;
+ std::string str = texture_str.str();
+ res["texture_list"][texture_num] = LLSD::Binary(str.begin(),str.end());
texture_num++;
}
- }
- }
- mesh_num++;
+ // Subset of TextureEntry fields.
+ if (texture != NULL && mUploadTextures)
+ {
+ face_entry["image"] = texture_index[texture];
+ face_entry["scales"] = 1.0;
+ face_entry["scalet"] = 1.0;
+ face_entry["offsets"] = 0.0;
+ face_entry["offsett"] = 0.0;
+ face_entry["imagerot"] = 0.0;
+ }
+ face_entry["diffuse_color"] = ll_sd_from_color4(material.mDiffuseColor);
+ face_entry["fullbright"] = material.mFullbright;
+ instance_entry["face_list"][face_num] = face_entry;
+ }
+
+ res["instance_list"][instance_num] = instance_entry;
+ instance_num++;
+ }
}
result["asset_resources"] = res;
-#if 1
- dumpLLSDToFile(result,"whole_model.xml");
-#endif
+ dump_llsd_to_file(result,make_dump_name("whole_model_",dump_num));
dest = result;
}
void LLMeshUploadThread::doWholeModelUpload()
{
+ dump_num++;
+
mCurlRequest = new LLCurlRequest();
// Queue up models for hull generation (viewer-side)
@@ -1549,13 +1665,13 @@ void LLMeshUploadThread::doWholeModelUpload()
physics = data.mModel[LLModel::LOD_HIGH];
}
- if (!physics)
- {
- llerrs << "WTF?" << llendl;
- }
-
+ llassert(physics != NULL);
+
DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
- gMeshRepo.mDecompThread->submitRequest(request);
+ if(request->isValid())
+ {
+ gMeshRepo.mDecompThread->submitRequest(request);
+ }
}
while (!mPhysicsComplete)
@@ -1563,183 +1679,44 @@ void LLMeshUploadThread::doWholeModelUpload()
apr_sleep(100);
}
- bool do_include_textures = false; // not needed for initial cost/validation check.
LLSD model_data;
- wholeModelToLLSD(model_data, do_include_textures);
+ wholeModelToLLSD(model_data,false);
+ dump_llsd_to_file(model_data,make_dump_name("whole_model_fee_request_",dump_num));
mPendingUploads++;
LLCurlRequest::headers_t headers;
mCurlRequest->post(mWholeModelFeeCapability, headers, model_data,
- new LLWholeModelFeeResponder(this));
+ new LLWholeModelFeeResponder(this,model_data));
do
{
mCurlRequest->process();
} while (mCurlRequest->getQueued() > 0);
- mCurlRequest->post(mWholeModelUploadURL, headers, model_data["asset_resources"], new LLWholeModelUploadResponder(this));
-
- do
- {
- mCurlRequest->process();
- } while (mCurlRequest->getQueued() > 0);
-
- delete mCurlRequest;
- mCurlRequest = NULL;
-
- // Currently a no-op.
- mFinished = true;
-}
-
-void LLMeshUploadThread::doIterativeUpload()
-{
- if(isDiscarded())
- {
- mFinished = true;
- return ;
- }
-
- mCurlRequest = new LLCurlRequest();
-
- std::set<LLViewerTexture* > textures;
-
- //populate upload queue with relevant models
- for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
- {
- LLMeshUploadData data;
- data.mBaseModel = iter->first;
-
- LLModelInstance& instance = *(iter->second.begin());
-
- for (S32 i = 0; i < 5; i++)
- {
- data.mModel[i] = instance.mLOD[i];
- }
-
- uploadModel(data);
-
- if (mUploadTextures)
- {
- for (std::vector<LLImportMaterial>::iterator material_iter = instance.mMaterial.begin();
- material_iter != instance.mMaterial.end(); ++material_iter)
- {
-
- if (textures.find(material_iter->mDiffuseMap.get()) == textures.end())
- {
- textures.insert(material_iter->mDiffuseMap.get());
-
- LLTextureUploadData data(material_iter->mDiffuseMap.get(), material_iter->mDiffuseMapLabel);
- uploadTexture(data);
- }
- }
- }
-
- //queue up models for hull generation
- DecompRequest* request = new DecompRequest(data.mModel[LLModel::LOD_HIGH], data.mBaseModel, this);
- gMeshRepo.mDecompThread->submitRequest(request);
- }
- while (!mPhysicsComplete)
+ if (mWholeModelUploadURL.empty())
{
- apr_sleep(100);
- }
-
- //upload textures
- bool done = false;
- do
- {
- if (!mTextureQ.empty())
- {
- sendCostRequest(mTextureQ.front());
- mTextureQ.pop();
- }
-
- if (!mConfirmedTextureQ.empty())
- {
- doUploadTexture(mConfirmedTextureQ.front());
- mConfirmedTextureQ.pop();
- }
-
- mCurlRequest->process();
-
- done = mTextureQ.empty() && mConfirmedTextureQ.empty();
+ llinfos << "unable to upload, fee request failed" << llendl;
}
- while (!done || mCurlRequest->getQueued() > 0);
-
- LLSD object_asset;
- object_asset["objects"] = LLSD::emptyArray();
-
- done = false;
- do
+ else
{
- static S32 count = 0;
- static F32 last_hundred = gFrameTimeSeconds;
- if (gFrameTimeSeconds - last_hundred > 1.f)
+ LLSD full_model_data;
+ wholeModelToLLSD(full_model_data, true);
+ LLSD body = full_model_data["asset_resources"];
+ dump_llsd_to_file(body,make_dump_name("whole_model_body_",dump_num));
+ mCurlRequest->post(mWholeModelUploadURL, headers, body,
+ new LLWholeModelUploadResponder(this, model_data));
+ do
{
- last_hundred = gFrameTimeSeconds;
- count = 0;
- }
-
- //how many requests to push before calling process
- const S32 PUSH_PER_PROCESS = 32;
-
- S32 tcount = llmin(count+PUSH_PER_PROCESS, 100);
-
- while (!mUploadQ.empty() && count < tcount)
- { //send any pending upload requests
- mMutex->lock();
- LLMeshUploadData data = mUploadQ.front();
- mUploadQ.pop();
- mMutex->unlock();
- sendCostRequest(data);
- count++;
- }
-
- tcount = llmin(count+PUSH_PER_PROCESS, 100);
-
- while (!mConfirmedQ.empty() && count < tcount)
- { //process any meshes that have been confirmed for upload
- LLMeshUploadData& data = mConfirmedQ.front();
- doUploadModel(data);
- mConfirmedQ.pop();
- count++;
- }
-
- tcount = llmin(count+PUSH_PER_PROCESS, 100);
-
- while (!mInstanceQ.empty() && count < tcount && !isDiscarded())
- { //create any objects waiting for upload
- count++;
- object_asset["objects"].append(createObject(mInstanceQ.front()));
- mInstanceQ.pop();
- }
-
- mCurlRequest->process();
-
- done = isDiscarded() || (mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty());
+ mCurlRequest->process();
+ } while (mCurlRequest->getQueued() > 0);
}
- while (!done || mCurlRequest->getQueued() > 0);
delete mCurlRequest;
mCurlRequest = NULL;
- // now upload the object asset
- std::string url = mUploadObjectAssetCapability;
-
- if (object_asset["objects"][0].has("permissions"))
- { //copy permissions from first available object to be used for coalesced object
- object_asset["permissions"] = object_asset["objects"][0]["permissions"];
- }
-
- if(!isDiscarded())
- {
- mPendingUploads++;
- LLHTTPClient::post(url, object_asset, new LLModelObjectUploadResponder(this,object_asset));
- }
- else
- {
- mFinished = true;
- }
+ // Currently a no-op.
+ mFinished = true;
}
void LLMeshUploadThread::uploadModel(LLMeshUploadData& data)
@@ -2170,7 +2147,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
//just in case skin info or decomposition is at the end of the file (which it shouldn't be)
lod_bytes = llmax(lod_bytes, header["skin"]["offset"].asInteger() + header["skin"]["size"].asInteger());
- lod_bytes = llmax(lod_bytes, header["decomposition"]["offset"].asInteger() + header["decomposition"]["size"].asInteger());
+ lod_bytes = llmax(lod_bytes, header["physics_convex"]["offset"].asInteger() + header["physics_convex"]["size"].asInteger());
S32 header_bytes = (S32) gMeshRepo.mThread->mMeshHeaderSize[mesh_id];
S32 bytes = lod_bytes + header_bytes;
@@ -2387,10 +2364,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
group->derefLOD(lod);
}
}
- else
- {
- llerrs << "WTF?" << llendl;
- }
}
return detail;
@@ -2462,7 +2435,6 @@ void LLMeshRepository::notifyLoadedMeshes()
if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
{
region_name = gAgent.getRegion()->getName();
-
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
}
}
@@ -2570,6 +2542,20 @@ void LLMeshRepository::notifyLoadedMeshes()
void LLMeshRepository::notifySkinInfoReceived(LLMeshSkinInfo& info)
{
mSkinMap[info.mMeshID] = info;
+
+ skin_load_map::iterator iter = mLoadingSkins.find(info.mMeshID);
+ if (iter != mLoadingSkins.end())
+ {
+ for (std::set<LLUUID>::iterator obj_id = iter->second.begin(); obj_id != iter->second.end(); ++obj_id)
+ {
+ LLVOVolume* vobj = (LLVOVolume*) gObjectList.findObject(*obj_id);
+ if (vobj)
+ {
+ vobj->notifyMeshLoaded();
+ }
+ }
+ }
+
mLoadingSkins.erase(info.mMeshID);
}
@@ -2685,7 +2671,7 @@ U32 LLMeshRepository::getResourceCost(const LLUUID& mesh_id)
return mThread->getResourceCost(mesh_id);
}
-const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id)
+const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj)
{
if (mesh_id.notNull())
{
@@ -2699,12 +2685,12 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id)
{
LLMutexLock lock(mMeshMutex);
//add volume to list of loading meshes
- std::set<LLUUID>::iterator iter = mLoadingSkins.find(mesh_id);
+ skin_load_map::iterator iter = mLoadingSkins.find(mesh_id);
if (iter == mLoadingSkins.end())
{ //no request pending for this skin info
- mLoadingSkins.insert(mesh_id);
mPendingSkinRequests.push(mesh_id);
}
+ mLoadingSkins[mesh_id].insert(requesting_obj->getID());
}
}
@@ -2786,7 +2772,18 @@ void LLMeshRepository::buildHull(const LLVolumeParams& params, S32 detail)
bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)
{
LLSD mesh = mThread->getMeshHeader(mesh_id);
- return mesh.has("physics_shape") && mesh["physics_shape"].has("size") && (mesh["physics_shape"]["size"].asInteger() > 0);
+ if (mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0))
+ {
+ return true;
+ }
+
+ LLModel::Decomposition* decomp = getDecomposition(mesh_id);
+ if (decomp && !decomp->mHull.empty())
+ {
+ return true;
+ }
+
+ return false;
}
LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id)
@@ -2842,102 +2839,6 @@ S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod)
}
-void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data)
-{
- if(isDiscarded())
- {
- return ;
- }
-
- //write model file to memory buffer
- std::stringstream ostr;
-
- LLModel::Decomposition& decomp =
- data.mModel[LLModel::LOD_PHYSICS].notNull() ?
- data.mModel[LLModel::LOD_PHYSICS]->mPhysics :
- data.mBaseModel->mPhysics;
-
- LLSD header = LLModel::writeModel(
- ostr,
- data.mModel[LLModel::LOD_PHYSICS],
- data.mModel[LLModel::LOD_HIGH],
- data.mModel[LLModel::LOD_MEDIUM],
- data.mModel[LLModel::LOD_LOW],
- data.mModel[LLModel::LOD_IMPOSTOR],
- decomp,
- mUploadSkin,
- mUploadJoints,
- true);
-
- std::string desc = data.mBaseModel->mLabel;
-
- // Grab the total vertex count of the model
- // along with other information for the "asset_resources" map
- // to send to the server.
- LLSD asset_resources = LLSD::emptyMap();
-
-
- std::string url = mNewInventoryCapability;
-
- if (!url.empty())
- {
- LLSD body = generate_new_resource_upload_capability_body(
- LLAssetType::AT_MESH,
- desc,
- desc,
- LLFolderType::FT_MESH,
- LLInventoryType::IT_MESH,
- LLFloaterPerms::getNextOwnerPerms(),
- LLFloaterPerms::getGroupPerms(),
- LLFloaterPerms::getEveryonePerms());
-
- body["asset_resources"] = asset_resources;
-
- mPendingConfirmations++;
- LLCurlRequest::headers_t headers;
-
- data.mPostData = body;
-
- mCurlRequest->post(url, headers, body, new LLMeshCostResponder(data, this));
- }
-}
-
-void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data)
-{
- if(isDiscarded())
- {
- return ;
- }
-
- if (data.mTexture && data.mTexture->getDiscardLevel() >= 0)
- {
- LLSD asset_resources = LLSD::emptyMap();
-
- std::string url = mNewInventoryCapability;
-
- if (!url.empty())
- {
- LLSD body = generate_new_resource_upload_capability_body(
- LLAssetType::AT_TEXTURE,
- data.mLabel,
- data.mLabel,
- LLFolderType::FT_TEXTURE,
- LLInventoryType::IT_TEXTURE,
- LLFloaterPerms::getNextOwnerPerms(),
- LLFloaterPerms::getGroupPerms(),
- LLFloaterPerms::getEveryonePerms());
-
- body["asset_resources"] = asset_resources;
-
- mPendingConfirmations++;
- LLCurlRequest::headers_t headers;
-
- data.mPostData = body;
- mCurlRequest->post(url, headers, body, new LLTextureCostResponder(data, this));
- }
- }
-}
-
void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data)
{
@@ -2993,9 +2894,12 @@ void LLMeshUploadThread::doUploadTexture(LLTextureUploadData& data)
data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel());
}
- LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(data.mTexture->getRawImage());
+ if(data.mTexture->hasSavedRawImage())
+ {
+ LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(data.mTexture->getSavedRawImage());
- ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ }
data.mAssetData = ostr.str();
@@ -3075,11 +2979,8 @@ LLSD LLMeshUploadThread::createObject(LLModelInstance& instance)
{
LLMatrix4 transformation = instance.mTransform;
- if (instance.mMeshID.isNull())
- {
- llerrs << "WTF?" << llendl;
- }
-
+ llassert(instance.mMeshID.notNull());
+
// check for reflection
BOOL reflected = (transformation.determinant() < 0);
@@ -3243,6 +3144,8 @@ bool LLImportMaterial::operator<(const LLImportMaterial &rhs) const
void LLMeshRepository::updateInventory(inventory_data data)
{
LLMutexLock lock(mMeshMutex);
+ dump_llsd_to_file(data.mPostData,make_dump_name("update_inventory_post_data_",dump_num));
+ dump_llsd_to_file(data.mResponse,make_dump_name("update_inventory_response_",dump_num));
mInventoryQ.push(data);
}
@@ -3400,15 +3303,18 @@ void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh)
mesh.mNumTriangles = mCurRequest->mIndices.size()/3;
- LLCDResult ret = LLCD_OK;
- if (LLConvexDecomposition::getInstance() != NULL)
+ if (mesh.mNumTriangles > 0 && mesh.mNumVertices > 2)
{
- ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh);
- }
+ LLCDResult ret = LLCD_OK;
+ if (LLConvexDecomposition::getInstance() != NULL)
+ {
+ ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh);
+ }
- if (ret)
- {
- llerrs << "Convex Decomposition thread valid but could not set mesh data" << llendl;
+ if (ret)
+ {
+ llerrs << "Convex Decomposition thread valid but could not set mesh data" << llendl;
+ }
}
}
@@ -3472,11 +3378,6 @@ void LLPhysicsDecomp::doDecomposition()
{
ret = LLConvexDecomposition::getInstance()->setParam(param->mName, value.asBoolean());
}
-
- if (ret)
- {
- llerrs << "WTF?" << llendl;
- }
}
mCurRequest->setStatusMessage("Executing.");
@@ -3771,6 +3672,81 @@ void LLPhysicsDecomp::run()
mDone = true;
}
+void LLPhysicsDecomp::Request::assignData(LLModel* mdl)
+{
+ if (!mdl)
+ {
+ return ;
+ }
+
+ U16 index_offset = 0;
+ U16 tri[3] ;
+
+ mPositions.clear();
+ mIndices.clear();
+ mBBox[1] = LLVector3(F32_MIN, F32_MIN, F32_MIN) ;
+ mBBox[0] = LLVector3(F32_MAX, F32_MAX, F32_MAX) ;
+
+ //queue up vertex positions and indices
+ for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
+ {
+ const LLVolumeFace& face = mdl->getVolumeFace(i);
+ if (mPositions.size() + face.mNumVertices > 65535)
+ {
+ continue;
+ }
+
+ for (U32 j = 0; j < face.mNumVertices; ++j)
+ {
+ mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr()));
+ for(U32 k = 0 ; k < 3 ; k++)
+ {
+ mBBox[0].mV[k] = llmin(mBBox[0].mV[k], mPositions[j].mV[k]) ;
+ mBBox[1].mV[k] = llmax(mBBox[1].mV[k], mPositions[j].mV[k]) ;
+ }
+ }
+
+ updateTriangleAreaThreshold() ;
+
+ for (U32 j = 0; j+2 < face.mNumIndices; j += 3)
+ {
+ tri[0] = face.mIndices[j] + index_offset ;
+ tri[1] = face.mIndices[j + 1] + index_offset ;
+ tri[2] = face.mIndices[j + 2] + index_offset ;
+
+ if(isValidTriangle(tri[0], tri[1], tri[2]))
+ {
+ mIndices.push_back(tri[0]);
+ mIndices.push_back(tri[1]);
+ mIndices.push_back(tri[2]);
+ }
+ }
+
+ index_offset += face.mNumVertices;
+ }
+
+ return ;
+}
+
+void LLPhysicsDecomp::Request::updateTriangleAreaThreshold()
+{
+ F32 range = mBBox[1].mV[0] - mBBox[0].mV[0] ;
+ range = llmin(range, mBBox[1].mV[1] - mBBox[0].mV[1]) ;
+ range = llmin(range, mBBox[1].mV[2] - mBBox[0].mV[2]) ;
+
+ mTriangleAreaThreshold = llmin(0.0002f, range * 0.000002f) ;
+}
+
+//check if the triangle area is large enough to qualify for a valid triangle
+bool LLPhysicsDecomp::Request::isValidTriangle(U16 idx1, U16 idx2, U16 idx3)
+{
+ LLVector3 a = mPositions[idx2] - mPositions[idx1] ;
+ LLVector3 b = mPositions[idx3] - mPositions[idx1] ;
+ F32 c = a * b ;
+
+ return ((a*a) * (b*b) - c * c) > mTriangleAreaThreshold ;
+}
+
void LLPhysicsDecomp::Request::setStatusMessage(const std::string& msg)
{
mStatusMessage = msg;
@@ -3868,3 +3844,27 @@ void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp)
}
}
}
+
+
+bool LLMeshRepository::meshUploadEnabled()
+{
+ LLViewerRegion *region = gAgent.getRegion();
+ if(gSavedSettings.getBOOL("MeshEnabled") &&
+ LLViewerParcelMgr::getInstance()->allowAgentBuild() &&
+ region)
+ {
+ return region->meshUploadEnabled();
+ }
+ return false;
+}
+
+bool LLMeshRepository::meshRezEnabled()
+{
+ LLViewerRegion *region = gAgent.getRegion();
+ if(gSavedSettings.getBOOL("MeshEnabled") &&
+ region)
+ {
+ return region->meshRezEnabled();
+ }
+ return false;
+}
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index f859e29c07..f237c3a60e 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -152,7 +152,7 @@ public:
std::string mStatusMessage;
std::vector<LLModel::PhysicsMesh> mHullMesh;
LLModel::convex_hull_decomposition mHull;
-
+
//status message callback, called from decomposition thread
virtual S32 statusCallback(const char* status, S32 p1, S32 p2) = 0;
@@ -160,6 +160,17 @@ public:
virtual void completed() = 0;
virtual void setStatusMessage(const std::string& msg);
+
+ bool isValid() const {return mPositions.size() > 2 && mIndices.size() > 2 ;}
+
+ protected:
+ //internal use
+ LLVector3 mBBox[2] ;
+ F32 mTriangleAreaThreshold ;
+
+ void assignData(LLModel* mdl) ;
+ void updateTriangleAreaThreshold() ;
+ bool isValidTriangle(U16 idx1, U16 idx2, U16 idx3) ;
};
LLCondition* mSignal;
@@ -385,8 +396,6 @@ public:
BOOL mDiscarded ;
LLHost mHost;
- std::string mUploadObjectAssetCapability;
- std::string mNewInventoryCapability;
std::string mWholeModelFeeCapability;
std::string mWholeModelUploadURL;
@@ -405,12 +414,10 @@ public:
void uploadTexture(LLTextureUploadData& data);
void doUploadTexture(LLTextureUploadData& data);
- void sendCostRequest(LLTextureUploadData& data);
void priceResult(LLTextureUploadData& data, const LLSD& content);
void onTextureUploaded(LLTextureUploadData& data);
void uploadModel(LLMeshUploadData& data);
- void sendCostRequest(LLMeshUploadData& data);
void doUploadModel(LLMeshUploadData& data);
void onModelUploaded(LLMeshUploadData& data);
void createObjects(LLMeshUploadData& data);
@@ -424,7 +431,6 @@ public:
BOOL isDiscarded();
void doWholeModelUpload();
- void doIterativeUpload();
void wholeModelToLLSD(LLSD& dest, bool include_textures);
@@ -467,13 +473,17 @@ public:
static S32 getActualMeshLOD(LLSD& header, S32 lod);
U32 calcResourceCost(LLSD& header);
U32 getResourceCost(const LLUUID& mesh_params);
- const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id);
+ const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj);
LLModel::Decomposition* getDecomposition(const LLUUID& mesh_id);
void fetchPhysicsShape(const LLUUID& mesh_id);
bool hasPhysicsShape(const LLUUID& mesh_id);
void buildHull(const LLVolumeParams& params, S32 detail);
void buildPhysicsMesh(LLModel::Decomposition& decomp);
+
+ bool meshUploadEnabled();
+ bool meshRezEnabled();
+
LLSD& getMeshHeader(const LLUUID& mesh_id);
@@ -496,7 +506,8 @@ public:
std::vector<LLMeshRepoThread::LODRequest> mPendingRequests;
//list of mesh ids awaiting skin info
- std::set<LLUUID> mLoadingSkins;
+ typedef std::map<LLUUID, std::set<LLUUID> > skin_load_map;
+ skin_load_map mLoadingSkins;
//list of mesh ids that need to send skin info fetch requests
std::queue<LLUUID> mPendingSkinRequests;
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 11dc496311..957b6d5f94 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -268,6 +268,9 @@ bool LLNearbyChatScreenChannel::createPoolToast()
toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1));
+ // If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352).
+ toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false));
+
LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl;
m_toast_pool.push_back(toast->getHandle());
return true;
@@ -369,8 +372,10 @@ void LLNearbyChatScreenChannel::arrangeToasts()
}
}
-int sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second)
+static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second)
{
+ if (!first.get() || !second.get()) return false; // STORM-1352
+
F32 v1 = first.get()->getTimeLeftToLive();
F32 v2 = second.get()->getTimeLeftToLive();
return v1 > v2;
@@ -396,7 +401,11 @@ void LLNearbyChatScreenChannel::showToastsBottom()
for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
{
LLToast* toast = it->get();
- if (!toast) continue;
+ if (!toast)
+ {
+ llwarns << "NULL found in the active chat toasts list!" << llendl;
+ continue;
+ }
S32 toast_top = bottom + toast->getRect().getHeight() + margin;
@@ -472,7 +481,8 @@ void LLNearbyChatHandler::initChannel()
-void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
+void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText
+ const LLSD &args)
{
if(chat_msg.mMuted == TRUE)
return;
@@ -480,7 +490,17 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
if(chat_msg.mText.empty())
return;//don't process empty messages
+ // Handle irc styled messages for toast panel
+ // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
+ std::string original_message = tmp_chat.mText; // Save un-modified version of chat text
+ if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
+ {
+ if(!tmp_chat.mFromName.empty())
+ tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
+ else
+ tmp_chat.mText = tmp_chat.mText.substr(3);
+ }
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
{
@@ -531,7 +551,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
LLViewerChat::getChatColor(chat_msg,txt_color);
- LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
+ LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix
chat_msg.mFromName,
txt_color,
chat_msg.mFromID);
@@ -562,15 +582,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
|| !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
- // Handle irc styled messages for toast panel
- if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
- {
- if(!tmp_chat.mFromName.empty())
- tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
- else
- tmp_chat.mText = tmp_chat.mText.substr(3);
- }
-
// arrange a channel on a screen
if(!mChannel->getVisible())
{
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 6435126fc0..10887aa53a 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -364,8 +364,8 @@ LLOutfitsList::~LLOutfitsList()
if (gInventory.containsObserver(mCategoriesObserver))
{
gInventory.removeObserver(mCategoriesObserver);
- delete mCategoriesObserver;
}
+ delete mCategoriesObserver;
}
BOOL LLOutfitsList::postBuild()
diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp
index 9910a3a2ac..8fa8867c69 100644
--- a/indra/newview/llpanelappearancetab.cpp
+++ b/indra/newview/llpanelappearancetab.cpp
@@ -31,6 +31,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
+#include "llviewerinventory.h"
//virtual
bool LLPanelAppearanceTab::canTakeOffSelected()
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 0cc5dcda82..e370f2f622 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -71,7 +71,7 @@ void LLPanelChatControlPanel::onChange(EStatusType status, const std::string &ch
void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
- updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
+ updateButtons(new_state);
}
void LLPanelChatControlPanel::updateCallButton()
@@ -96,11 +96,15 @@ void LLPanelChatControlPanel::updateCallButton()
getChildView("call_btn")->setEnabled(enable_connect);
}
-void LLPanelChatControlPanel::updateButtons(bool is_call_started)
+void LLPanelChatControlPanel::updateButtons(LLVoiceChannel::EState state)
{
+ bool is_call_started = state >= LLVoiceChannel::STATE_CALL_STARTED;
getChildView("end_call_btn_panel")->setVisible( is_call_started);
- getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started);
+ getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started && findChild<LLView>("voice_ctrls_btn_panel"));
getChildView("call_btn_panel")->setVisible( ! is_call_started);
+
+ getChildView("volume_ctrl_panel")->setVisible(state == LLVoiceChannel::STATE_CONNECTED);
+
updateCallButton();
}
@@ -135,7 +139,7 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)
mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
//call (either p2p, group or ad-hoc) can be already in started state
- updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
+ updateButtons(voice_channel->getState());
}
}
@@ -156,6 +160,13 @@ BOOL LLPanelIMControlPanel::postBuild()
childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this));
childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this));
childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this));
+
+ childSetAction("mute_btn", boost::bind(&LLPanelIMControlPanel::onClickMuteVolume, this));
+ childSetAction("block_btn", boost::bind(&LLPanelIMControlPanel::onClickBlock, this));
+ childSetAction("unblock_btn", boost::bind(&LLPanelIMControlPanel::onClickUnblock, this));
+
+ getChild<LLUICtrl>("volume_slider")->setCommitCallback(boost::bind(&LLPanelIMControlPanel::onVolumeChange, this, _2));
+
getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()));
setFocusReceivedCallback(boost::bind(&LLPanelIMControlPanel::onFocusReceived, this));
@@ -163,6 +174,79 @@ BOOL LLPanelIMControlPanel::postBuild()
return LLPanelChatControlPanel::postBuild();
}
+void LLPanelIMControlPanel::draw()
+{
+ bool is_muted = LLMuteList::getInstance()->isMuted(mAvatarID);
+
+ getChild<LLUICtrl>("block_btn_panel")->setVisible(!is_muted);
+ getChild<LLUICtrl>("unblock_btn_panel")->setVisible(is_muted);
+
+ if (getChildView("volume_ctrl_panel")->getVisible())
+ {
+
+ bool is_muted_voice = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat);
+
+ LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn");
+ mute_btn->setValue( is_muted_voice );
+
+ LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider");
+ volume_slider->setEnabled( !is_muted_voice );
+
+ F32 volume;
+
+ if (is_muted_voice)
+ {
+ // it's clearer to display their volume as zero
+ volume = 0.f;
+ }
+ else
+ {
+ // actual volume
+ volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID);
+ }
+ volume_slider->setValue( (F64)volume );
+ }
+
+ LLPanelChatControlPanel::draw();
+}
+
+void LLPanelIMControlPanel::onClickMuteVolume()
+{
+ // By convention, we only display and toggle voice mutes, not all mutes
+ LLMuteList* mute_list = LLMuteList::getInstance();
+ bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat);
+
+ LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT);
+ if (!is_muted)
+ {
+ mute_list->add(mute, LLMute::flagVoiceChat);
+ }
+ else
+ {
+ mute_list->remove(mute, LLMute::flagVoiceChat);
+ }
+}
+
+void LLPanelIMControlPanel::onClickBlock()
+{
+ LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT);
+
+ LLMuteList::getInstance()->add(mute);
+}
+
+void LLPanelIMControlPanel::onClickUnblock()
+{
+ LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT);
+
+ LLMuteList::getInstance()->remove(mute);
+}
+
+void LLPanelIMControlPanel::onVolumeChange(const LLSD& data)
+{
+ F32 volume = (F32)data.asReal();
+ LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume);
+}
+
void LLPanelIMControlPanel::onTeleportButtonClicked()
{
LLAvatarActions::offerTeleport(mAvatarID);
@@ -262,6 +346,9 @@ void LLPanelIMControlPanel::onNameCache(const LLUUID& id, const std::string& ful
std::string avatar_name = full_name;
getChild<LLTextBox>("avatar_name")->setValue(avatar_name);
getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name);
+
+ bool is_linden = LLStringUtil::endsWith(full_name, " Linden");
+ getChild<LLUICtrl>("mute_btn")->setEnabled( !is_linden);
}
}
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index 3bbe24ecb9..bba847b5d4 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -54,7 +54,7 @@ public:
virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
- void updateButtons(bool is_call_started);
+ void updateButtons(LLVoiceChannel::EState state);
// Enables/disables call button depending on voice availability
void updateCallButton();
@@ -94,6 +94,12 @@ private:
void onPayButtonClicked();
void onFocusReceived();
+ void onClickMuteVolume();
+ void onClickBlock();
+ void onClickUnblock();
+ /*virtual*/ void draw();
+ void onVolumeChange(const LLSD& data);
+
LLUUID mAvatarID;
};
diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp
index f9730d9b71..e7bdc51b4a 100644
--- a/indra/newview/llpanellandaudio.cpp
+++ b/indra/newview/llpanellandaudio.cpp
@@ -91,6 +91,12 @@ BOOL LLPanelLandAudio::postBuild()
mMusicURLEdit = getChild<LLLineEditor>("music_url");
childSetCommitCallback("music_url", onCommitAny, this);
+ mCheckAVSoundAny = getChild<LLCheckBoxCtrl>("all av sound check");
+ childSetCommitCallback("all av sound check", onCommitAny, this);
+
+ mCheckAVSoundGroup = getChild<LLCheckBoxCtrl>("group av sound check");
+ childSetCommitCallback("group av sound check", onCommitAny, this);
+
return TRUE;
}
@@ -144,6 +150,13 @@ void LLPanelLandAudio::refresh()
mMusicURLEdit->setText(parcel->getMusicURL());
mMusicURLEdit->setEnabled( can_change_media );
+
+ BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData();
+ mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds());
+ mCheckAVSoundAny->setEnabled(can_change_av_sounds);
+
+ mCheckAVSoundGroup->set(parcel->getAllowGroupAVSounds() || parcel->getAllowAnyAVSounds()); // On if "Everyone" is on
+ mCheckAVSoundGroup->setEnabled(can_change_av_sounds && !parcel->getAllowAnyAVSounds()); // Enabled if "Everyone" is off
}
}
// static
@@ -164,6 +177,13 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
BOOL voice_enabled = self->mCheckParcelEnableVoice->get();
BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get();
+ BOOL any_av_sound = self->mCheckAVSoundAny->get();
+ BOOL group_av_sound = TRUE; // If set to "Everyone" then group is checked as well
+ if (!any_av_sound)
+ { // If "Everyone" is off, use the value from the checkbox
+ group_av_sound = self->mCheckAVSoundGroup->get();
+ }
+
// Remove leading/trailing whitespace (common when copying/pasting)
LLStringUtil::trim(music_url);
@@ -172,6 +192,8 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan);
parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
parcel->setMusicURL(music_url);
+ parcel->setAllowAnyAVSounds(any_av_sound);
+ parcel->setAllowGroupAVSounds(group_av_sound);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h
index 4b0953bdc1..32a45100f4 100644
--- a/indra/newview/llpanellandaudio.h
+++ b/indra/newview/llpanellandaudio.h
@@ -52,6 +52,8 @@ private:
LLCheckBoxCtrl* mCheckParcelVoiceLocal;
LLLineEditor* mMusicURLEdit;
LLCheckBoxCtrl* mMusicUrlCheck;
+ LLCheckBoxCtrl* mCheckAVSoundAny;
+ LLCheckBoxCtrl* mCheckAVSoundGroup;
LLSafeHandle<LLParcelSelection>& mParcel;
};
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 80f6862169..a9cc247d1b 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -46,6 +46,7 @@
#include "llfolderviewitem.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
+#include "llinventoryfunctions.h"
#include "lllandmarkactions.h"
#include "llmenubutton.h"
#include "llplacesinventorybridge.h"
@@ -299,7 +300,7 @@ void LLLandmarksPanel::onTeleport()
}
LLFolderViewEventListener* listenerp = current_item->getListener();
- if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ if (listenerp && listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
listenerp->openItem();
}
@@ -529,7 +530,7 @@ void LLLandmarksPanel::setParcelID(const LLUUID& parcel_id)
// virtual
void LLLandmarksPanel::setErrorStatus(U32 status, const std::string& reason)
{
- llerrs<< "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
+ llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
}
@@ -645,7 +646,7 @@ void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLPlacesI
// Start background fetch, mostly for My Inventory and Library
if (expanded)
{
- const LLUUID &cat_id = inventory_list->getStartFolderID();
+ const LLUUID &cat_id = inventory_list->getRootFolderID();
// Just because the category itself has been fetched, doesn't mean its child folders have.
/*
if (!gInventory.isCategoryComplete(cat_id))
@@ -1414,7 +1415,7 @@ static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::strin
static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list)
{
- LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getStartFolderID());
+ LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getRootFolderID());
if (category)
{
return category->getDescendentCount() > 0;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index d0810d0772..27f341b4f6 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -34,7 +34,6 @@
#include "llmd5.h"
#include "llsecondlifeurls.h"
#include "v4color.h"
-#include "llversionviewer.h"
#include "llappviewer.h"
#include "llbutton.h"
@@ -748,20 +747,12 @@ void LLPanelLogin::loadLoginPage()
LLVersionInfo::getShortVersion().c_str(),
LLVersionInfo::getBuild());
- char* curl_channel ;
+ char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0);
char* curl_version = curl_escape(version.c_str(), 0);
- if(strcmp(LLVersionInfo::getChannel().c_str(), LL_CHANNEL))
- {
- curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0);
- }
- else //if LL_CHANNEL, direct it to "Second Life Beta Viewer".
- {
- curl_channel = curl_escape("Second Life Beta Viewer", 0);
- }
oStr << "&channel=" << curl_channel;
oStr << "&version=" << curl_version;
-
+
curl_free(curl_channel);
curl_free(curl_version);
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index bc4998dd0c..1920cc2940 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1,6 +1,6 @@
/**
- * @file llsidepanelmaininventory.cpp
- * @brief Implementation of llsidepanelmaininventory.
+ * @file llpanelmaininventory.cpp
+ * @brief Implementation of llpanelmaininventory.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -95,8 +95,8 @@ private:
/// LLPanelMainInventory
///----------------------------------------------------------------------------
-LLPanelMainInventory::LLPanelMainInventory()
- : LLPanel(),
+LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
+ : LLPanel(p),
mActivePanel(NULL),
mSavedFolderState(NULL),
mFilterText(""),
@@ -193,6 +193,9 @@ BOOL LLPanelMainInventory::postBuild()
mMenuAdd->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", upload_cost);
mMenuAdd->getChild<LLMenuItemGL>("Bulk Upload")->setLabelArg("[COST]", upload_cost);
+ // Trigger callback for focus received so we can deselect items in inbox/outbox
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this));
+
return TRUE;
}
@@ -572,6 +575,27 @@ void LLPanelMainInventory::updateItemcountText()
getChild<LLUICtrl>("ItemcountText")->setValue(text);
}
+void LLPanelMainInventory::onFocusReceived()
+{
+ LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
+
+ LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
+
+ if (inbox_panel)
+ {
+ inbox_panel->clearSelection();
+ }
+
+ LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
+
+ if (outbox_panel)
+ {
+ outbox_panel->clearSelection();
+ }
+
+ sidepanel_inventory->updateVerbs();
+}
+
void LLPanelMainInventory::setFilterTextFromFilter()
{
mFilterText = mActivePanel->getFilter()->getFilterText();
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 2b2ee1c0c9..899931aa89 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -57,7 +57,7 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
public:
friend class LLFloaterInventoryFinder;
- LLPanelMainInventory();
+ LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams());
~LLPanelMainInventory();
BOOL postBuild();
@@ -114,6 +114,8 @@ protected:
bool isSaveTextureEnabled(const LLSD& userdata);
void updateItemcountText();
+ void onFocusReceived();
+
private:
LLFloaterInventoryFinder* getFinder();
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
new file mode 100644
index 0000000000..af74f8f261
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -0,0 +1,248 @@
+/**
+ * @file llpanelmarketplaceinbox.cpp
+ * @brief Panel for marketplace inbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceinbox.h"
+
+#include "llappviewer.h"
+#include "llbutton.h"
+#include "llinventorypanel.h"
+#include "llfolderview.h"
+#include "llsidepanelinventory.h"
+
+
+#define SUPPORTING_FRESH_ITEM_COUNT 0
+
+
+static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
+
+const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
+{
+ return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceInbox>();
+}
+
+// protected
+LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
+ : LLPanel(p)
+ , mInventoryPanel(NULL)
+{
+}
+
+LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
+{
+}
+
+// virtual
+BOOL LLPanelMarketplaceInbox::postBuild()
+{
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this));
+
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
+
+ return TRUE;
+}
+
+void LLPanelMarketplaceInbox::onSelectionChange()
+{
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+
+ sidepanel_inventory->updateVerbs();
+}
+
+
+void LLPanelMarketplaceInbox::handleLoginComplete()
+{
+ // Set us up as the class to drive the badge value for the sidebar_inventory button
+ LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this);
+}
+
+void LLPanelMarketplaceInbox::setupInventoryPanel()
+{
+ LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
+ LLView * inbox_inventory_parent = inbox_inventory_placeholder->getParent();
+
+ mInventoryPanel =
+ LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_inbox_inventory.xml",
+ inbox_inventory_parent,
+ LLInventoryPanel::child_registry_t::instance());
+
+ // Reshape the inventory to the proper size
+ LLRect inventory_placeholder_rect = inbox_inventory_placeholder->getRect();
+ mInventoryPanel->setShape(inventory_placeholder_rect);
+
+ // Set the sort order newest to oldest, and a selection change callback
+ mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
+
+ // Set up the note to display when the inbox is empty
+ mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems");
+
+ // Hide the placeholder text
+ inbox_inventory_placeholder->setVisible(FALSE);
+}
+
+void LLPanelMarketplaceInbox::onFocusReceived()
+{
+ LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
+
+ if (sidepanel_inventory)
+ {
+ LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
+
+ if (inv_panel)
+ {
+ inv_panel->clearSelection();
+ }
+
+ LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
+
+ if (outbox_panel)
+ {
+ outbox_panel->clearSelection();
+ }
+
+ sidepanel_inventory->updateVerbs();
+ }
+}
+
+BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
+{
+ *accept = ACCEPT_NO;
+ return TRUE;
+}
+
+U32 LLPanelMarketplaceInbox::getFreshItemCount() const
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+
+ //
+ // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably
+ // will return "2" for the Inventory and LIBRARY top-levels when that happens.
+ //
+
+ U32 fresh_item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ LLFolderViewFolder::folders_t::const_iterator folders_it = inbox_folder->getFoldersBegin();
+ LLFolderViewFolder::folders_t::const_iterator folders_end = inbox_folder->getFoldersEnd();
+
+ for (; folders_it != folders_end; ++folders_it)
+ {
+ const LLFolderViewFolder * folder = *folders_it;
+
+ // TODO: Replace this check with new "fresh" flag
+ if (folder->getCreationDate() > 1500)
+ {
+ fresh_item_count++;
+ }
+ }
+ }
+ }
+
+ return fresh_item_count;
+#else
+ return getTotalItemCount();
+#endif
+}
+
+U32 LLPanelMarketplaceInbox::getTotalItemCount() const
+{
+ U32 item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ item_count += inbox_folder->getFoldersCount();
+ }
+ }
+
+ return item_count;
+}
+
+std::string LLPanelMarketplaceInbox::getBadgeString() const
+{
+ std::string item_count_str("");
+
+ // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
+ if (getParent()->getVisible() &&
+ (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
+ {
+ U32 item_count = getFreshItemCount();
+
+ if (item_count)
+ {
+ item_count_str = llformat("%d", item_count);
+ }
+ }
+
+ return item_count_str;
+}
+
+void LLPanelMarketplaceInbox::draw()
+{
+ U32 item_count = getTotalItemCount();
+
+ LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count");
+
+ if (item_count > 0)
+ {
+ std::string item_count_str = llformat("%d", item_count);
+
+ LLStringUtil::format_map_t args;
+ args["[NUM]"] = item_count_str;
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args));
+
+#if SUPPORTING_FRESH_ITEM_COUNT
+ // set green text to fresh item count
+ U32 fresh_item_count = getFreshItemCount();
+ fresh_new_count_view->setVisible((fresh_item_count > 0));
+
+ if (fresh_item_count > 0)
+ {
+ getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count));
+ }
+#else
+ fresh_new_count_view->setVisible(FALSE);
+#endif
+ }
+ else
+ {
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg"));
+
+ fresh_new_count_view->setVisible(FALSE);
+ }
+
+ LLPanel::draw();
+}
diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h
new file mode 100644
index 0000000000..4ecea29304
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceinbox.h
@@ -0,0 +1,78 @@
+/**
+ * @file llpanelmarketplaceinbox.h
+ * @brief Panel for marketplace inbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELMARKETPLACEINBOX_H
+#define LL_LLPANELMARKETPLACEINBOX_H
+
+#include "llpanel.h"
+#include "llsidetray.h"
+
+class LLInventoryPanel;
+
+class LLPanelMarketplaceInbox : public LLPanel, public LLSideTrayTabBadgeDriver
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Params() {}
+ };
+
+ LOG_CLASS(LLPanelMarketplaceInbox);
+
+ // RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
+ static const LLPanelMarketplaceInbox::Params& getDefaultParams();
+
+ LLPanelMarketplaceInbox(const Params& p = getDefaultParams());
+ ~LLPanelMarketplaceInbox();
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
+
+ /*virtual*/ void draw();
+
+ void setupInventoryPanel();
+
+ U32 getFreshItemCount() const;
+ U32 getTotalItemCount() const;
+
+ std::string getBadgeString() const;
+
+private:
+ void handleLoginComplete();
+
+ void onSelectionChange();
+
+ void onFocusReceived();
+
+private:
+ LLInventoryPanel* mInventoryPanel;
+};
+
+
+#endif //LL_LLPANELMARKETPLACEINBOX_H
+
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
new file mode 100644
index 0000000000..b644f0e5cb
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -0,0 +1,167 @@
+/**
+ * @file llpanelmarketplaceinboxinventory.cpp
+ * @brief LLInboxInventoryPanel class definition
+ *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceinboxinventory.h"
+
+#include "llfolderview.h"
+#include "llfoldervieweventlistener.h"
+#include "llinventorybridge.h"
+#include "llinventoryfunctions.h"
+#include "llpanellandmarks.h"
+#include "llplacesinventorybridge.h"
+#include "llviewerfoldertype.h"
+
+
+//
+// statics
+//
+
+static LLDefaultChildRegistry::Register<LLInboxInventoryPanel> r1("inbox_inventory_panel");
+static LLDefaultChildRegistry::Register<LLInboxFolderViewFolder> r2("inbox_folder_view_folder");
+
+
+//
+// LLInboxInventoryPanel Implementation
+//
+
+LLInboxInventoryPanel::LLInboxInventoryPanel(const LLInboxInventoryPanel::Params& p)
+ : LLInventoryPanel(p)
+{
+}
+
+LLInboxInventoryPanel::~LLInboxInventoryPanel()
+{
+}
+
+// virtual
+void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
+{
+ // Determine the root folder in case specified, and
+ // build the views starting with that folder.
+
+ LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false);
+
+ // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ if (root_id.isNull())
+ {
+ std::string start_folder_name(params.start_folder());
+
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == start_folder_name)
+ {
+ root_id = cat->getUUID();
+ break;
+ }
+ }
+ }
+
+ if (root_id == LLUUID::null)
+ {
+ llwarns << "No category found that matches inbox inventory panel start_folder: " << start_folder_name << llendl;
+ }
+ }
+ // leslie -- end temporary HACK
+
+ if (root_id == LLUUID::null)
+ {
+ llwarns << "Inbox inventory panel has no root folder!" << llendl;
+ root_id = LLUUID::generateNewID();
+ }
+
+ LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
+ LLAssetType::AT_CATEGORY,
+ LLInventoryType::IT_CATEGORY,
+ this,
+ NULL,
+ root_id);
+
+ mFolderRoot = createFolderView(new_listener, params.use_label_suffix());
+}
+
+LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge)
+{
+ LLInboxFolderViewFolder::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.tool_tip = params.name;
+
+ return LLUICtrlFactory::create<LLInboxFolderViewFolder>(params);
+}
+
+
+//
+// LLInboxFolderViewFolder Implementation
+//
+
+LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p)
+ : LLFolderViewFolder(p)
+ , LLBadgeOwner(getHandle())
+ , mFresh(false)
+{
+ initBadgeParams(p.new_badge());
+}
+
+LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
+{
+}
+
+// virtual
+void LLInboxFolderViewFolder::draw()
+{
+ if (!badgeHasParent())
+ {
+ addBadgeToParentPanel();
+ }
+
+ setBadgeVisibility(mFresh);
+
+ LLFolderViewFolder::draw();
+}
+
+
+// eof
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
new file mode 100644
index 0000000000..8f198c41c1
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -0,0 +1,77 @@
+/**
+ * @file llpanelmarketplaceinboxinventory.h
+ * @brief LLInboxInventoryPanel class declaration
+ *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_INBOXINVENTORYPANEL_H
+#define LL_INBOXINVENTORYPANEL_H
+
+
+#include "llbadgeowner.h"
+#include "llinventorypanel.h"
+#include "llfolderviewitem.h"
+
+class LLInboxInventoryPanel : public LLInventoryPanel
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
+ {
+ Params() {}
+ };
+
+ LLInboxInventoryPanel(const Params& p);
+ ~LLInboxInventoryPanel();
+
+ // virtual
+ void buildFolderView(const LLInventoryPanel::Params& params);
+
+ // virtual
+ class LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge);
+};
+
+
+class LLInboxFolderViewFolder : public LLFolderViewFolder, public LLBadgeOwner
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params>
+ {
+ Optional<LLBadge::Params> new_badge;
+
+ Params()
+ : new_badge("new_badge")
+ {
+ }
+ };
+
+ LLInboxFolderViewFolder(const Params& p);
+ ~LLInboxFolderViewFolder();
+
+ void draw();
+
+protected:
+ bool mFresh;
+};
+
+
+#endif //LL_INBOXINVENTORYPANEL_H
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
new file mode 100644
index 0000000000..74d0de3b30
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -0,0 +1,209 @@
+/**
+ * @file llpanelmarketplaceoutbox.cpp
+ * @brief Panel for marketplace outbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceoutbox.h"
+
+#include "llappviewer.h"
+#include "llbutton.h"
+#include "llcoros.h"
+#include "lleventcoro.h"
+#include "llinventorypanel.h"
+#include "llloadingindicator.h"
+#include "llpanelmarketplaceinbox.h"
+#include "llsidepanelinventory.h"
+#include "llsidetray.h"
+#include "lltimer.h"
+
+
+static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox");
+
+const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultParams()
+{
+ return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceOutbox>();
+}
+
+// protected
+LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox(const Params& p)
+ : LLPanel(p)
+ , mInventoryPanel(NULL)
+ , mSyncButton(NULL)
+ , mSyncIndicator(NULL)
+ , mSyncInProgress(false)
+{
+}
+
+LLPanelMarketplaceOutbox::~LLPanelMarketplaceOutbox()
+{
+}
+
+// virtual
+BOOL LLPanelMarketplaceOutbox::postBuild()
+{
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceOutbox::handleLoginComplete, this));
+
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceOutbox::onFocusReceived, this));
+
+ return TRUE;
+}
+
+void LLPanelMarketplaceOutbox::handleLoginComplete()
+{
+ mSyncButton = getChild<LLButton>("outbox_sync_btn");
+ mSyncButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onSyncButtonClicked, this));
+ mSyncButton->setEnabled(!isOutboxEmpty());
+
+ mSyncIndicator = getChild<LLLoadingIndicator>("outbox_sync_indicator");
+}
+
+void LLPanelMarketplaceOutbox::onFocusReceived()
+{
+ LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
+
+ if (sidepanel_inventory)
+ {
+ LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
+
+ if (inv_panel)
+ {
+ inv_panel->clearSelection();
+ }
+
+ LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
+
+ if (inbox_panel)
+ {
+ inbox_panel->clearSelection();
+ }
+
+ sidepanel_inventory->updateVerbs();
+ }
+}
+
+void LLPanelMarketplaceOutbox::onSelectionChange()
+{
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+
+ sidepanel_inventory->updateVerbs();
+}
+
+void LLPanelMarketplaceOutbox::setupInventoryPanel()
+{
+ LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder");
+ LLView * outbox_inventory_parent = outbox_inventory_placeholder->getParent();
+
+ mInventoryPanel =
+ LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_outbox_inventory.xml",
+ outbox_inventory_parent,
+ LLInventoryPanel::child_registry_t::instance());
+
+ // Reshape the inventory to the proper size
+ LLRect inventory_placeholder_rect = outbox_inventory_placeholder->getRect();
+ mInventoryPanel->setShape(inventory_placeholder_rect);
+
+ // Set the sort order newest to oldest, and a selection change callback
+ mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this));
+
+ // Set up the note to display when the outbox is empty
+ mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryOutboxNoItems");
+
+ // Hide the placeholder text
+ outbox_inventory_placeholder->setVisible(FALSE);
+}
+
+bool LLPanelMarketplaceOutbox::isOutboxEmpty() const
+{
+ // TODO: Check for contents of outbox
+
+ return false;
+}
+
+bool LLPanelMarketplaceOutbox::isSyncInProgress() const
+{
+ return mSyncInProgress;
+}
+
+
+std::string gTimeDelayDebugFunc = "";
+
+void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel)
+{
+ waitForEventOn(self, "mainloop");
+
+ LLTimer delayTimer;
+ delayTimer.reset();
+ delayTimer.setTimerExpirySec(5.0f);
+
+ while (!delayTimer.hasExpired())
+ {
+ waitForEventOn(self, "mainloop");
+ }
+
+ outboxPanel->onSyncComplete();
+
+ gTimeDelayDebugFunc = "";
+}
+
+void LLPanelMarketplaceOutbox::onSyncButtonClicked()
+{
+ // TODO: Actually trigger sync to marketplace
+
+ mSyncInProgress = true;
+ updateSyncButtonStatus();
+
+ // Set a timer (for testing only)
+
+ gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this));
+}
+
+void LLPanelMarketplaceOutbox::onSyncComplete()
+{
+ mSyncInProgress = false;
+
+ updateSyncButtonStatus();
+}
+
+void LLPanelMarketplaceOutbox::updateSyncButtonStatus()
+{
+ if (isSyncInProgress())
+ {
+ mSyncButton->setVisible(false);
+
+ mSyncIndicator->setVisible(true);
+ mSyncIndicator->reset();
+ mSyncIndicator->start();
+ }
+ else
+ {
+ mSyncIndicator->stop();
+ mSyncIndicator->setVisible(false);
+
+ mSyncButton->setVisible(true);
+ mSyncButton->setEnabled(!isOutboxEmpty());
+ }
+}
diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h
new file mode 100644
index 0000000000..1b502127ef
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceoutbox.h
@@ -0,0 +1,82 @@
+/**
+ * @file llpanelmarketplaceoutbox.h
+ * @brief Panel for marketplace outbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELMARKETPLACEOUTBOX_H
+#define LL_LLPANELMARKETPLACEOUTBOX_H
+
+#include "llpanel.h"
+
+
+class LLButton;
+class LLInventoryPanel;
+class LLLoadingIndicator;
+
+
+class LLPanelMarketplaceOutbox : public LLPanel
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Params() {}
+ };
+
+ LOG_CLASS(LLPanelMarketplaceOutbox);
+
+ // RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
+ static const LLPanelMarketplaceOutbox::Params& getDefaultParams();
+
+ LLPanelMarketplaceOutbox(const Params& p = getDefaultParams());
+ ~LLPanelMarketplaceOutbox();
+
+ /*virtual*/ BOOL postBuild();
+
+ void setupInventoryPanel();
+
+ bool isOutboxEmpty() const;
+ bool isSyncInProgress() const;
+
+ void onSyncComplete();
+
+protected:
+ void onSyncButtonClicked();
+ void updateSyncButtonStatus();
+
+ void handleLoginComplete();
+ void onFocusReceived();
+ void onSelectionChange();
+
+private:
+ LLInventoryPanel * mInventoryPanel;
+
+ LLButton * mSyncButton;
+ LLLoadingIndicator * mSyncIndicator;
+ bool mSyncInProgress;
+};
+
+
+#endif //LL_LLPANELMARKETPLACEOUTBOX_H
+
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index b4d0ada196..52917ff20b 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1740,26 +1740,11 @@ void LLPanelObject::refresh()
mRootObject = NULL;
}
- bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") &&
- gAgent.getRegion() &&
- !gAgent.getRegion()->getCapability("GetMesh").empty() &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty();
-
F32 max_scale = get_default_max_prim_scale(LLPickInfo::isFlora(mObject));
getChild<LLSpinCtrl>("Scale X")->setMaxValue(max_scale);
getChild<LLSpinCtrl>("Scale Y")->setMaxValue(max_scale);
getChild<LLSpinCtrl>("Scale Z")->setMaxValue(max_scale);
-
- BOOL found = mCtrlSculptType->itemExists("Mesh");
- if (enable_mesh && !found)
- {
- mCtrlSculptType->add("Mesh");
- }
- else if (!enable_mesh && found)
- {
- mCtrlSculptType->remove("Mesh");
- }
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index bfe6cab52f..e3b61f695a 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -44,6 +44,7 @@
#include "llcallbacklist.h"
#include "llbuycurrencyhtml.h"
#include "llfloaterreg.h"
+#include "llfolderview.h"
#include "llinventorybridge.h"
#include "llinventorydefines.h"
#include "llinventoryfilter.h"
@@ -58,8 +59,10 @@
#include "llselectmgr.h"
#include "llsidetray.h"
#include "llstatusbar.h"
+#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llviewerassettype.h"
+#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h"
@@ -761,7 +764,7 @@ void LLTaskCategoryBridge::openItem()
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
- if(mPanel)
+ if(mPanel && mUUID.notNull())
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
@@ -1349,79 +1352,81 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*
LLTaskInvFVBridge* new_bridge = NULL;
const LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(object);
const U32 itemflags = ( NULL == item ? 0 : item->getFlags() );
- LLAssetType::EType type = object->getType();
+ LLAssetType::EType type = object ? object->getType() : LLAssetType::AT_CATEGORY;
+ LLUUID object_id = object ? object->getUUID() : LLUUID::null;
+ std::string object_name = object ? object->getName() : std::string();
switch(type)
{
case LLAssetType::AT_TEXTURE:
new_bridge = new LLTaskTextureBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_SOUND:
new_bridge = new LLTaskSoundBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_LANDMARK:
new_bridge = new LLTaskLandmarkBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_CALLINGCARD:
new_bridge = new LLTaskCallingCardBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_SCRIPT:
// OLD SCRIPTS DEPRECATED - JC
llwarns << "Old script" << llendl;
//new_bridge = new LLTaskOldScriptBridge(panel,
- // object->getUUID(),
- // object->getName());
+ // object_id,
+ // object_name);
break;
case LLAssetType::AT_OBJECT:
new_bridge = new LLTaskObjectBridge(panel,
- object->getUUID(),
- object->getName(),
+ object_id,
+ object_name,
itemflags);
break;
case LLAssetType::AT_NOTECARD:
new_bridge = new LLTaskNotecardBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_ANIMATION:
new_bridge = new LLTaskAnimationBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_GESTURE:
new_bridge = new LLTaskGestureBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
new_bridge = new LLTaskWearableBridge(panel,
- object->getUUID(),
- object->getName(),
+ object_id,
+ object_name,
itemflags);
break;
case LLAssetType::AT_CATEGORY:
new_bridge = new LLTaskCategoryBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_LSL_TEXT:
new_bridge = new LLTaskLSLBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_MESH:
new_bridge = new LLTaskMeshBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
default:
llinfos << "Unhandled inventory type (llassetstorage.h): "
@@ -1521,6 +1526,7 @@ void LLPanelObjectInventory::reset()
p.task_id = getTaskUUID();
p.parent_panel = this;
p.tool_tip= LLTrans::getString("PanelContentsTooltip");
+ p.listener = LLTaskInvFVBridge::createObjectBridge(this, NULL);
mFolders = LLUICtrlFactory::create<LLFolderView>(p);
// this ensures that we never say "searching..." or "no items found"
mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 62f582c343..35e2e96bab 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -36,7 +36,7 @@
#include "lloutfitobserver.h"
#include "llcofwearables.h"
#include "llfilteredwearablelist.h"
-#include "llfolderviewitem.h"
+#include "llfolderview.h"
#include "llinventory.h"
#include "llinventoryitemslist.h"
#include "llviewercontrol.h"
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 68ecb0165c..1e9ce58237 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -70,6 +70,8 @@ static std::string icon_scripts;
static std::string icon_scripts_no;
static std::string icon_damage;
static std::string icon_damage_no;
+static std::string icon_see_avs_on;
+static std::string icon_see_avs_off;
LLPanelPlaceProfile::LLPanelPlaceProfile()
: LLPanelPlaceInfo(),
@@ -114,6 +116,8 @@ BOOL LLPanelPlaceProfile::postBuild()
mScriptsText = getChild<LLTextBox>("scripts_value");
mDamageIcon = getChild<LLIconCtrl>("damage_icon");
mDamageText = getChild<LLTextBox>("damage_value");
+ mSeeAVsIcon = getChild<LLIconCtrl>("see_avatars_icon");
+ mSeeAVsText = getChild<LLTextBox>("see_avatars_value");
mRegionNameText = getChild<LLTextBox>("region_name");
mRegionTypeText = getChild<LLTextBox>("region_type");
@@ -153,6 +157,8 @@ BOOL LLPanelPlaceProfile::postBuild()
icon_scripts_no = getString("icon_ScriptsNo");
icon_damage = getString("icon_Damage");
icon_damage_no = getString("icon_DamageNo");
+ icon_see_avs_on = getString("icon_SeeAVs_On");
+ icon_see_avs_off = getString("icon_SeeAVs_Off");
return TRUE;
}
@@ -182,6 +188,8 @@ void LLPanelPlaceProfile::resetLocation()
mScriptsText->setText(loading);
mDamageIcon->setValue(loading);
mDamageText->setText(loading);
+ mSeeAVsIcon->setValue(loading);
+ mSeeAVsText->setText(loading);
mRegionNameText->setValue(loading);
mRegionTypeText->setValue(loading);
@@ -414,6 +422,17 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mDamageText->setText(off);
}
+ if (parcel->getSeeAVs())
+ {
+ mSeeAVsIcon->setValue(icon_see_avs_on);
+ mSeeAVsText->setText(on);
+ }
+ else
+ {
+ mSeeAVsIcon->setValue(icon_see_avs_off);
+ mSeeAVsText->setText(off);
+ }
+
mRegionNameText->setText(region->getName());
mRegionTypeText->setText(region->getSimProductName());
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index f28b3b3832..a33fc12ce4 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -91,6 +91,8 @@ private:
LLTextBox* mScriptsText;
LLIconCtrl* mDamageIcon;
LLTextBox* mDamageText;
+ LLIconCtrl* mSeeAVsIcon;
+ LLTextBox* mSeeAVsText;
LLTextBox* mRegionNameText;
LLTextBox* mRegionTypeText;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 46262832dc..1e510a2d7b 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -584,6 +584,13 @@ void LLPanelPlaces::onTeleportButtonClicked()
{
if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
+ if (mItem.isNull())
+ {
+ llwarns << "NULL landmark item" << llendl;
+ llassert(mItem.notNull());
+ return;
+ }
+
LLSD payload;
payload["asset_id"] = mItem->getAssetUUID();
LLSD args;
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 30949f8f02..7087541fc8 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -102,6 +102,7 @@ void LLPanelTopInfoBar::initParcelIcons()
mParcelIcon[BUILD_ICON] = getChild<LLIconCtrl>("build_icon");
mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon");
mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon");
+ mParcelIcon[SEE_AVATARS_ICON] = getChild<LLIconCtrl>("see_avatars_icon");
mParcelIcon[VOICE_ICON]->setToolTip(LLTrans::getString("LocationCtrlVoiceTooltip"));
mParcelIcon[FLY_ICON]->setToolTip(LLTrans::getString("LocationCtrlFlyTooltip"));
@@ -109,6 +110,7 @@ void LLPanelTopInfoBar::initParcelIcons()
mParcelIcon[BUILD_ICON]->setToolTip(LLTrans::getString("LocationCtrlBuildTooltip"));
mParcelIcon[SCRIPTS_ICON]->setToolTip(LLTrans::getString("LocationCtrlScriptsTooltip"));
mParcelIcon[DAMAGE_ICON]->setToolTip(LLTrans::getString("LocationCtrlDamageTooltip"));
+ mParcelIcon[SEE_AVATARS_ICON]->setToolTip(LLTrans::getString("LocationCtrlSeeAVsTooltip"));
mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON));
mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON));
@@ -116,6 +118,7 @@ void LLPanelTopInfoBar::initParcelIcons()
mParcelIcon[BUILD_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, BUILD_ICON));
mParcelIcon[SCRIPTS_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, SCRIPTS_ICON));
mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, DAMAGE_ICON));
+ mParcelIcon[SEE_AVATARS_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, SEE_AVATARS_ICON));
mDamageText->setText(LLStringExplicit("100%"));
}
@@ -295,6 +298,7 @@ void LLPanelTopInfoBar::updateParcelIcons()
bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610.
bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel);
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
+ bool see_avs = current_parcel->getSeeAVs();
// Most icons are "block this ability"
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
@@ -304,6 +308,7 @@ void LLPanelTopInfoBar::updateParcelIcons()
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
mDamageText->setVisible(allow_damage);
+ mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs );
layoutParcelIcons();
}
@@ -409,6 +414,9 @@ void LLPanelTopInfoBar::onParcelIconClick(EParcelIcon icon)
case DAMAGE_ICON:
LLNotificationsUtil::add("NotSafe");
break;
+ case SEE_AVATARS_ICON:
+ LLNotificationsUtil::add("SeeAvatars");
+ break;
case ICON_COUNT:
break;
// no default to get compiler warning when a new icon gets added
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index db922ef424..583e91d15e 100644
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -65,12 +65,13 @@ private:
enum EParcelIcon
{
VOICE_ICON = 0,
- FLY_ICON,
- PUSH_ICON,
- BUILD_ICON,
- SCRIPTS_ICON,
- DAMAGE_ICON,
- ICON_COUNT
+ FLY_ICON, // 1
+ PUSH_ICON, // 2
+ BUILD_ICON, // 3
+ SCRIPTS_ICON, // 4
+ DAMAGE_ICON, // 5
+ SEE_AVATARS_ICON, // 6
+ ICON_COUNT // 7 total
};
/**
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 7839cdd811..bb87601d20 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -530,17 +530,24 @@ void LLPanelVolume::refresh()
getChildView("Light Ambiance")->setVisible( visible);
getChildView("light texture control")->setVisible( visible);
- bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") &&
- gAgent.getRegion() &&
- !gAgent.getRegion()->getCapability("GetMesh").empty() &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty();
+ bool enable_mesh = false;
+ LLSD sim_features;
+ LLViewerRegion *region = gAgent.getRegion();
+ if(region)
+ {
+ LLSD sim_features;
+ region->getSimulatorFeatures(sim_features);
+ enable_mesh = sim_features.has("PhysicsShapeTypes");
+ }
getChildView("label physicsshapetype")->setVisible(enable_mesh);
getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh);
getChildView("Physics Gravity")->setVisible(enable_mesh);
getChildView("Physics Friction")->setVisible(enable_mesh);
getChildView("Physics Density")->setVisible(enable_mesh);
getChildView("Physics Restitution")->setVisible(enable_mesh);
+
+ /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */
}
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 911a9e5dda..0645fd8a54 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -174,8 +174,8 @@ LLPanelWearing::~LLPanelWearing()
if (gInventory.containsObserver(mCategoriesObserver))
{
gInventory.removeObserver(mCategoriesObserver);
- delete mCategoriesObserver;
}
+ delete mCategoriesObserver;
}
BOOL LLPanelWearing::postBuild()
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 29e262199e..f7823f4fe8 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -35,6 +35,7 @@
#include "llinventoryfunctions.h"
#include "llpanellandmarks.h"
#include "llplacesinventorybridge.h"
+#include "llviewerfoldertype.h"
static LLDefaultChildRegistry::Register<LLPlacesInventoryPanel> r("places_inventory_panel");
@@ -56,72 +57,44 @@ LLPlacesInventoryPanel::~LLPlacesInventoryPanel()
delete mSavedFolderState;
}
-BOOL LLPlacesInventoryPanel::postBuild()
+void LLPlacesInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
- LLInventoryPanel::postBuild();
+ // Determine the root folder in case specified, and
+ // build the views starting with that folder.
+ const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(params.start_folder);
- // clear Contents();
- {
- mFolderRoot->destroyView();
- mFolderRoot->getParent()->removeChild(mFolderRoot);
- mFolderRoot->die();
-
- if( mScroller )
- {
- removeChild( mScroller );
- mScroller->die();
- mScroller = NULL;
- }
- mFolderRoot = NULL;
- }
-
-
- mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
+ LLUUID root_id;
- // create root folder
+ if ("LIBRARY" == params.start_folder())
{
- LLRect folder_rect(0,
- 0,
- getRect().getWidth(),
- 0);
- LLPlacesFolderView::Params p;
- p.name = getName();
- p.title = getLabel();
- p.rect = folder_rect;
- p.parent_panel = this;
- mFolderRoot = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p);
- mFolderRoot->setAllowMultiSelect(mAllowMultiSelect);
+ root_id = gInventory.getLibraryRootFolderID();
}
-
- mCommitCallbackRegistrar.popScope();
-
- mFolderRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
-
- // scroller
+ else
{
- LLRect scroller_view_rect = getRect();
- scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
- LLScrollContainer::Params p;
- p.name("Inventory Scroller");
- p.rect(scroller_view_rect);
- p.follows.flags(FOLLOWS_ALL);
- p.reserve_scroll_corner(true);
- p.tab_stop(true);
- mScroller = LLUICtrlFactory::create<LLScrollContainer>(p);
+ root_id = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
}
- addChild(mScroller);
- mScroller->addChild(mFolderRoot);
-
- mFolderRoot->setScrollContainer(mScroller);
- mFolderRoot->addChild(mFolderRoot->mStatusTextBox);
-
- // cut subitems
- mFolderRoot->setUseEllipses(true);
-
- return TRUE;
+ LLRect folder_rect(0,
+ 0,
+ getRect().getWidth(),
+ 0);
+ LLPlacesFolderView::Params p;
+ p.name = getName();
+ p.title = getLabel();
+ p.rect = folder_rect;
+ p.listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
+ LLAssetType::AT_CATEGORY,
+ LLInventoryType::IT_CATEGORY,
+ this,
+ NULL,
+ root_id);
+ p.parent_panel = this;
+ p.allow_multiselect = mAllowMultiSelect;
+ p.use_ellipses = true; // truncate inventory item text so remove horizontal scroller
+ mFolderRoot = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p);
}
+
// save current folder open state
void LLPlacesInventoryPanel::saveFolderState()
{
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 6641871a0b..f647e7f970 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -46,7 +46,7 @@ public:
LLPlacesInventoryPanel(const Params& p);
~LLPlacesInventoryPanel();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ void buildFolderView(const LLInventoryPanel::Params& params);
void saveFolderState();
void restoreFolderState();
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 9f5c55bad1..f47928b131 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -42,6 +42,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
+#include "llkeyboard.h"
#include "llmultigesture.h"
#include "llnotificationsutil.h"
#include "llradiogroup.h"
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 9f3ee6ac5d..4974dde282 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -401,15 +401,14 @@ struct LLSaveNotecardInfo
bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
{
- if(!gAssetStorage)
+ LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
+
+ if(!editor)
{
- llwarns << "Not connected to an asset storage system." << llendl;
+ llwarns << "Cannot get handle to the notecard editor." << llendl;
return false;
}
-
- LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
if(!editor->isPristine())
{
// We need to update the asset information
@@ -436,8 +435,15 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
// save it out to database
if (item)
{
- std::string agent_url = gAgent.getRegion()->getCapability("UpdateNotecardAgentInventory");
- std::string task_url = gAgent.getRegion()->getCapability("UpdateNotecardTaskInventory");
+ const LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ {
+ llwarns << "Not connected to a region, cannot save notecard." << llendl;
+ return false;
+ }
+ std::string agent_url = region->getCapability("UpdateNotecardAgentInventory");
+ std::string task_url = region->getCapability("UpdateNotecardTaskInventory");
+
if (mObjectUUID.isNull() && !agent_url.empty())
{
// Saving into agent inventory
@@ -472,6 +478,11 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
(void*)info,
FALSE);
}
+ else // !gAssetStorage
+ {
+ llwarns << "Not connected to an asset storage system." << llendl;
+ return false;
+ }
}
}
return true;
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 31fde5d58a..028891a90e 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -55,23 +55,18 @@ LLProgressView* LLProgressView::sInstance = NULL;
S32 gStartImageWidth = 1;
S32 gStartImageHeight = 1;
-const F32 FADE_IN_TIME = 1.f;
-
-const std::string ANIMATION_FILENAME = "Login Sequence ";
-const std::string ANIMATION_SUFFIX = ".jpg";
-const F32 TOTAL_LOGIN_TIME = 10.f; // seconds, wild guess at time from GL context to actual world view
-S32 gLastStartAnimationFrame = 0; // human-style indexing, first image = 1
-const S32 ANIMATION_FRAMES = 1; //13;
+const F32 FADE_TO_WORLD_TIME = 1.0f;
static LLRegisterPanelClassWrapper<LLProgressView> r("progress_view");
-
// XUI: Translate
LLProgressView::LLProgressView()
: LLPanel(),
mPercentDone( 0.f ),
+ mMediaCtrl( NULL ),
mMouseDownInActiveArea( false ),
- mUpdateEvents("LLProgressView")
+ mUpdateEvents("LLProgressView"),
+ mFadeToWorldTimer()
{
mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1));
}
@@ -80,9 +75,14 @@ BOOL LLProgressView::postBuild()
{
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
+ // media control that is used to play intro video
+ mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
+ mMediaCtrl->setVisible( false ); // hidden initially
+ mMediaCtrl->addObserver( this ); // watch events
+
mCancelBtn = getChild<LLButton>("cancel_btn");
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL );
- mFadeTimer.stop();
+ mFadeToWorldTimer.stop();
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
@@ -125,24 +125,43 @@ BOOL LLProgressView::handleKeyHere(KEY key, MASK mask)
return TRUE;
}
+void LLProgressView::revealIntroPanel()
+{
+ // if user hasn't yet seen intro video
+ std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL");
+ if ( intro_url.length() > 0 &&
+ gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == FALSE )
+ {
+ // navigate to intro URL and reveal widget
+ mMediaCtrl->navigateTo( intro_url );
+ mMediaCtrl->setVisible( TRUE );
+
+ // flag as having seen the new user post login intro
+ gSavedSettings.setBOOL("PostFirstLoginIntroViewed", TRUE );
+ }
+ else
+ {
+ // start the timer that will control the fade through to the world view
+ mFadeToWorldTimer.start();
+ }
+}
+
void LLProgressView::setVisible(BOOL visible)
{
// hiding progress view
if (getVisible() && !visible)
{
- mFadeTimer.start();
+ LLPanel::setVisible(FALSE);
}
// showing progress view
- else if (visible && (!getVisible() || mFadeTimer.getStarted()))
+ else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted()))
{
setFocus(TRUE);
- mFadeTimer.stop();
- mProgressTimer.start();
+ mFadeToWorldTimer.stop();
LLPanel::setVisible(TRUE);
}
}
-
void LLProgressView::draw()
{
static LLTimer timer;
@@ -153,7 +172,7 @@ void LLProgressView::draw()
{
LLGLSUIDefault gls_ui;
gGL.getTexUnit(0)->bind(gStartTexture.get());
- gGL.color4f(1.f, 1.f, 1.f, mFadeTimer.getStarted() ? clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, FADE_IN_TIME, 1.f, 0.f) : 1.f);
+ gGL.color4f(1.f, 1.f, 1.f, 1.f);
F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight;
S32 width = getRect().getWidth();
S32 height = getRect().getHeight();
@@ -180,16 +199,36 @@ void LLProgressView::draw()
}
glPopMatrix();
- // Handle fade-in animation
- if (mFadeTimer.getStarted())
+ // handle fade out to world view when we're asked to
+ if (mFadeToWorldTimer.getStarted())
{
+ // draw fading panel
+ F32 alpha = clamp_rescale(mFadeToWorldTimer.getElapsedTimeF32(), 0.f, FADE_TO_WORLD_TIME, 1.f, 0.f);
+ LLViewDrawContext context(alpha);
LLPanel::draw();
- if (mFadeTimer.getElapsedTimeF32() > FADE_IN_TIME)
+
+ // faded out completely - remove panel and reveal world
+ if (mFadeToWorldTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME )
{
+ mFadeToWorldTimer.stop();
+
// Fade is complete, release focus
gFocusMgr.releaseFocusIfNeeded( this );
+
+ // turn off panel that hosts intro so we see the world
LLPanel::setVisible(FALSE);
- mFadeTimer.stop();
+
+ // stop observing events since we no longer care
+ mMediaCtrl->remObserver( this );
+
+ // hide the intro
+ mMediaCtrl->setVisible( false );
+
+ // navigate away from intro page to something innocuous since 'unload' is broken right now
+ //mMediaCtrl->navigateTo( "about:blank" );
+
+ // FIXME: this causes a crash that i haven't been able to fix
+ mMediaCtrl->unloadMediaSource();
gStartTexture = NULL;
}
@@ -307,3 +346,12 @@ bool LLProgressView::onAlertModal(const LLSD& notify)
}
return false;
}
+
+void LLProgressView::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
+{
+ if( event == MEDIA_EVENT_CLOSE_REQUEST )
+ {
+ // the intro web content calls javascript::window.close() when it's done
+ mFadeToWorldTimer.start();
+ }
+}
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index be1744f08a..73dd478e98 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -28,6 +28,7 @@
#define LL_LLPROGRESSVIEW_H
#include "llpanel.h"
+#include "llmediactrl.h"
#include "llframetimer.h"
#include "llevents.h"
@@ -35,7 +36,10 @@ class LLImageRaw;
class LLButton;
class LLProgressBar;
-class LLProgressView : public LLPanel
+class LLProgressView :
+ public LLPanel,
+ public LLViewerMediaObserver
+
{
public:
LLProgressView();
@@ -49,25 +53,35 @@ public:
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
/*virtual*/ void setVisible(BOOL visible);
+ // inherited from LLViewerMediaObserver
+ /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+
void setText(const std::string& text);
void setPercent(const F32 percent);
// Set it to NULL when you want to eliminate the message.
void setMessage(const std::string& msg);
+ // turns on (under certain circumstances) the into video after login
+ void revealIntroPanel();
+
void setCancelButtonVisible(BOOL b, const std::string& label);
static void onCancelButtonClicked( void* );
static void onClickMessage(void*);
bool onAlertModal(const LLSD& sd);
+ // note - this is not just hiding the intro panel - it also hides the parent panel
+ // and is used when the intro is finished and we want to show the world
+ void removeIntroPanel();
+
protected:
LLProgressBar* mProgressBar;
+ LLMediaCtrl* mMediaCtrl;
F32 mPercentDone;
std::string mMessage;
LLButton* mCancelBtn;
- LLFrameTimer mFadeTimer;
- LLFrameTimer mProgressTimer;
+ LLFrameTimer mFadeToWorldTimer;
LLRect mOutlineRect;
bool mMouseDownInActiveArea;
diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp
new file mode 100644
index 0000000000..698c4f9bb9
--- /dev/null
+++ b/indra/newview/llregioninfomodel.cpp
@@ -0,0 +1,217 @@
+/**
+ * @file llregioninfomodel.cpp
+ * @brief Region info model
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llregioninfomodel.h"
+
+// libs
+#include "message.h"
+#include "llregionflags.h"
+
+// viewer
+#include "llagent.h"
+#include "llviewerregion.h"
+
+void LLRegionInfoModel::reset()
+{
+ mSimAccess = 0;
+ mAgentLimit = 0;
+
+ mRegionFlags = 0;
+ mEstateID = 0;
+ mParentEstateID = 0;
+
+ mPricePerMeter = 0;
+ mRedirectGridX = 0;
+ mRedirectGridY = 0;
+
+ mBillableFactor = 0.0f;
+ mObjectBonusFactor = 0.0f;
+ mWaterHeight = 0.0f;
+ mTerrainRaiseLimit = 0.0f;
+ mTerrainLowerLimit = 0.0f;
+ mSunHour = 0.0f;
+
+ mUseEstateSun = false;
+
+ mSimType.clear();
+ mSimName.clear();
+}
+
+LLRegionInfoModel::LLRegionInfoModel()
+{
+ reset();
+}
+
+boost::signals2::connection LLRegionInfoModel::setUpdateCallback(const update_signal_t::slot_type& cb)
+{
+ return mUpdateSignal.connect(cb);
+}
+
+void LLRegionInfoModel::sendRegionTerrain(const LLUUID& invoice) const
+{
+ std::string buffer;
+ std::vector<std::string> strings;
+
+ // ==========================================
+ // Assemble and send setregionterrain message
+ // "setregionterrain"
+ // strings[0] = float water height
+ // strings[1] = float terrain raise
+ // strings[2] = float terrain lower
+ // strings[3] = 'Y' use estate time
+ // strings[4] = 'Y' fixed sun
+ // strings[5] = float sun_hour
+ // strings[6] = from estate, 'Y' use global time
+ // strings[7] = from estate, 'Y' fixed sun
+ // strings[8] = from estate, float sun_hour
+
+ // *NOTE: this resets estate sun info.
+ BOOL estate_global_time = true;
+ BOOL estate_fixed_sun = false;
+ F32 estate_sun_hour = 0.f;
+
+ buffer = llformat("%f", mWaterHeight);
+ strings.push_back(buffer);
+ buffer = llformat("%f", mTerrainRaiseLimit);
+ strings.push_back(buffer);
+ buffer = llformat("%f", mTerrainLowerLimit);
+ strings.push_back(buffer);
+ buffer = llformat("%s", (mUseEstateSun ? "Y" : "N"));
+ strings.push_back(buffer);
+ buffer = llformat("%s", (getUseFixedSun() ? "Y" : "N"));
+ strings.push_back(buffer);
+ buffer = llformat("%f", mSunHour);
+ strings.push_back(buffer);
+ buffer = llformat("%s", (estate_global_time ? "Y" : "N") );
+ strings.push_back(buffer);
+ buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") );
+ strings.push_back(buffer);
+ buffer = llformat("%f", estate_sun_hour);
+ strings.push_back(buffer);
+
+ sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings);
+}
+
+bool LLRegionInfoModel::getUseFixedSun() const
+{
+ return mRegionFlags & REGION_FLAGS_SUN_FIXED;
+}
+
+void LLRegionInfoModel::setUseFixedSun(bool fixed)
+{
+ if (fixed)
+ {
+ mRegionFlags |= REGION_FLAGS_SUN_FIXED;
+ }
+ else
+ {
+ mRegionFlags &= ~REGION_FLAGS_SUN_FIXED;
+ }
+}
+
+void LLRegionInfoModel::update(LLMessageSystem* msg)
+{
+ reset();
+
+ msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, mSimName);
+ msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, mEstateID);
+ msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, mParentEstateID);
+ msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_RegionFlags, mRegionFlags);
+ msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_SimAccess, mSimAccess);
+ msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_MaxAgents, mAgentLimit);
+ msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, mObjectBonusFactor);
+ msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, mBillableFactor);
+ msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, mWaterHeight);
+ msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, mTerrainRaiseLimit);
+ msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, mTerrainLowerLimit);
+ msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_PricePerMeter, mPricePerMeter);
+ msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_RedirectGridX, mRedirectGridX);
+ msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_RedirectGridY, mRedirectGridY);
+
+ msg->getBOOL(_PREHASH_RegionInfo, _PREHASH_UseEstateSun, mUseEstateSun);
+
+ // actually the "last set" sun hour, not the current sun hour. JC
+ msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour);
+ LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL;
+
+ // the only reasonable way to decide if we actually have any data is to
+ // check to see if any of these fields have nonzero sizes
+ if (msg->getSize(_PREHASH_RegionInfo2, _PREHASH_ProductSKU) > 0 ||
+ msg->getSize(_PREHASH_RegionInfo2, "ProductName") > 0)
+ {
+ msg->getString(_PREHASH_RegionInfo2, "ProductName", mSimType);
+ }
+
+ // Let interested parties know that region info has been updated.
+ mUpdateSignal();
+}
+
+// static
+void LLRegionInfoModel::sendEstateOwnerMessage(
+ LLMessageSystem* msg,
+ const std::string& request,
+ const LLUUID& invoice,
+ const std::vector<std::string>& strings)
+{
+ LLViewerRegion* cur_region = gAgent.getRegion();
+
+ if (!cur_region)
+ {
+ llwarns << "Agent region not set" << llendl;
+ return;
+ }
+
+ llinfos << "Sending estate request '" << request << "'" << llendl;
+ msg->newMessage("EstateOwnerMessage");
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
+ msg->nextBlock("MethodData");
+ msg->addString("Method", request);
+ msg->addUUID("Invoice", invoice);
+
+ if (strings.empty())
+ {
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", NULL);
+ }
+ else
+ {
+ std::vector<std::string>::const_iterator it = strings.begin();
+ std::vector<std::string>::const_iterator end = strings.end();
+ for (unsigned i = 0; it != end; ++it, ++i)
+ {
+ lldebugs << "- [" << i << "] " << (*it) << llendl;
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", *it);
+ }
+ }
+
+ msg->sendReliable(cur_region->getHost());
+}
diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h
new file mode 100644
index 0000000000..89efd82767
--- /dev/null
+++ b/indra/newview/llregioninfomodel.h
@@ -0,0 +1,99 @@
+/**
+ * @file llregioninfomodel.h
+ * @brief Region info model
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLREGIONINFOMODEL_H
+#define LL_LLREGIONINFOMODEL_H
+
+class LLMessageSystem;
+
+#include "llsingleton.h"
+
+/**
+ * Contains region info, notifies interested parties of its changes.
+ */
+class LLRegionInfoModel : public LLSingleton<LLRegionInfoModel>
+{
+ LOG_CLASS(LLRegionInfoModel);
+
+public:
+ typedef boost::signals2::signal<void()> update_signal_t;
+ boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb);
+
+ void sendRegionTerrain(const LLUUID& invoice) const; /// upload region terrain data
+
+ bool getUseFixedSun() const;
+
+ void setUseFixedSun(bool fixed);
+
+ // *TODO: Add getters and make the data private.
+ U8 mSimAccess;
+ U8 mAgentLimit;
+
+ U32 mRegionFlags;
+ U32 mEstateID;
+ U32 mParentEstateID;
+
+ S32 mPricePerMeter;
+ S32 mRedirectGridX;
+ S32 mRedirectGridY;
+
+ F32 mBillableFactor;
+ F32 mObjectBonusFactor;
+ F32 mWaterHeight;
+ F32 mTerrainRaiseLimit;
+ F32 mTerrainLowerLimit;
+ F32 mSunHour; // 6..30
+
+ BOOL mUseEstateSun;
+
+ std::string mSimName;
+ std::string mSimType;
+
+protected:
+ friend class LLSingleton<LLRegionInfoModel>;
+ friend class LLViewerRegion;
+
+ LLRegionInfoModel();
+
+ /**
+ * Refresh model with data from the incoming server message.
+ */
+ void update(LLMessageSystem* msg);
+
+private:
+ void reset();
+
+ // *FIXME: Duplicated code from LLPanelRegionInfo
+ static void sendEstateOwnerMessage(
+ LLMessageSystem* msg,
+ const std::string& request,
+ const LLUUID& invoice,
+ const std::vector<std::string>& strings);
+
+ update_signal_t mUpdateSignal;
+};
+
+#endif // LL_LLREGIONINFOMODEL_H
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 16729f045a..28ec11d1c7 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -32,6 +32,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfolderview.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 31ea542743..65655f82cd 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -29,33 +29,147 @@
#include "llagent.h"
#include "llappearancemgr.h"
+#include "llappviewer.h"
#include "llavataractions.h"
#include "llbutton.h"
+#include "lldate.h"
#include "llfirstuse.h"
+#include "llfoldertype.h"
+#include "llhttpclient.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
+#include "llinventorymodelbackgroundfetch.h"
+#include "llinventoryobserver.h"
#include "llinventorypanel.h"
+#include "lllayoutstack.h"
#include "lloutfitobserver.h"
#include "llpanelmaininventory.h"
+#include "llpanelmarketplaceinbox.h"
+#include "llpanelmarketplaceoutbox.h"
+#include "llselectmgr.h"
#include "llsidepaneliteminfo.h"
#include "llsidepaneltaskinfo.h"
+#include "llstring.h"
#include "lltabcontainer.h"
-#include "llselectmgr.h"
+#include "llviewermedia.h"
#include "llweb.h"
static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory");
-LLSidepanelInventory::LLSidepanelInventory()
- : LLPanel(),
- mItemPanel(NULL),
- mPanelMainInventory(NULL)
+//
+// Constants
+//
+
+static const char * const INBOX_EXPAND_TIME_SETTING = "LastInventoryInboxExpand";
+
+static const char * const INBOX_BUTTON_NAME = "inbox_btn";
+static const char * const OUTBOX_BUTTON_NAME = "outbox_btn";
+
+static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel";
+static const char * const OUTBOX_LAYOUT_PANEL_NAME = "outbox_layout_panel";
+static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel";
+
+static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox";
+static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox";
+
+static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack";
+
+static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
+static const char * const MARKETPLACE_OUTBOX_PANEL = "marketplace_outbox";
+
+//
+// Helpers
+//
+
+class LLInboxOutboxAddedObserver : public LLInventoryCategoryAddedObserver
{
+public:
+ LLInboxOutboxAddedObserver(LLSidepanelInventory * sidepanelInventory)
+ : LLInventoryCategoryAddedObserver()
+ , mSidepanelInventory(sidepanelInventory)
+ {
+ }
+
+ void done()
+ {
+ for (cat_vec_t::iterator it = mAddedCategories.begin(); it != mAddedCategories.end(); ++it)
+ {
+ LLViewerInventoryCategory* added_category = *it;
+
+ LLFolderType::EType added_category_type = added_category->getPreferredType();
+
+ switch (added_category_type)
+ {
+ case LLFolderType::FT_INBOX:
+ mSidepanelInventory->observeInboxModifications(added_category->getUUID());
+ break;
+ case LLFolderType::FT_OUTBOX:
+ mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
+ break;
+ case LLFolderType::FT_NONE:
+ // HACK until sim update to properly create folder with system type
+ if (added_category->getName() == "Received Items")
+ {
+ mSidepanelInventory->observeInboxModifications(added_category->getUUID());
+ }
+ else if (added_category->getName() == "Merchant Outbox")
+ {
+ mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
+ }
+ default:
+ break;
+ }
+ }
+ }
+
+private:
+ LLSidepanelInventory * mSidepanelInventory;
+};
+//
+// Implementation
+//
+
+LLSidepanelInventory::LLSidepanelInventory()
+ : LLPanel()
+ , mItemPanel(NULL)
+ , mPanelMainInventory(NULL)
+ , mInboxEnabled(false)
+ , mOutboxEnabled(false)
+ , mCategoriesObserver(NULL)
+ , mInboxOutboxAddedObserver(NULL)
+{
//buildFromFile( "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
}
LLSidepanelInventory::~LLSidepanelInventory()
{
+ if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver))
+ {
+ gInventory.removeObserver(mCategoriesObserver);
+ }
+ delete mCategoriesObserver;
+
+ if (mInboxOutboxAddedObserver && gInventory.containsObserver(mInboxOutboxAddedObserver))
+ {
+ gInventory.removeObserver(mInboxOutboxAddedObserver);
+ }
+ delete mInboxOutboxAddedObserver;
+}
+
+void handleInventoryDisplayInboxChanged()
+{
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+
+ sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+}
+
+void handleInventoryDisplayOutboxChanged()
+{
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+
+ sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
}
BOOL LLSidepanelInventory::postBuild()
@@ -85,7 +199,7 @@ BOOL LLSidepanelInventory::postBuild()
mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn");
mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this));
- mPanelMainInventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
+ mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs");
tabs->setCommitCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this));
@@ -103,7 +217,7 @@ BOOL LLSidepanelInventory::postBuild()
// UI elements from item panel
{
- mItemPanel = findChild<LLSidepanelItemInfo>("sidepanel__item_panel");
+ mItemPanel = getChild<LLSidepanelItemInfo>("sidepanel__item_panel");
LLButton* back_btn = mItemPanel->getChild<LLButton>("back_btn");
back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this));
@@ -119,13 +233,263 @@ BOOL LLSidepanelInventory::postBuild()
}
}
+ // Marketplace inbox/outbox setup
+ {
+ LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
+
+ // Disable user_resize on main inventory panel by default
+ stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false);
+ stack->setPanelUserResize(INBOX_LAYOUT_PANEL_NAME, false);
+ stack->setPanelUserResize(OUTBOX_LAYOUT_PANEL_NAME, false);
+
+ // Collapse both inbox and outbox panels
+ stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
+ stack->collapsePanel(getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME), true);
+
+ // Set up button states and callbacks
+ LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME);
+ LLButton * outbox_button = getChild<LLButton>(OUTBOX_BUTTON_NAME);
+
+ inbox_button->setToggleState(false);
+ outbox_button->setToggleState(false);
+
+ inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
+ outbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this));
+
+ // Set the inbox and outbox visible based on debug settings (final setting comes from http request below)
+ enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+ enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
+
+ // Trigger callback for after login so we can setup to track inbox and outbox changes after initial inventory load
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::handleLoginComplete, this));
+ }
+
+ gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
+ gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged));
+
return TRUE;
}
+void LLSidepanelInventory::handleLoginComplete()
+{
+ //
+ // Track inbox and outbox folder changes
+ //
+
+ const bool do_not_create_folder = false;
+ const bool do_not_find_in_library = false;
+
+ const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder, do_not_find_in_library);
+ const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library);
+
+ // Set up observer to listen for creation of inbox and outbox if at least one of them doesn't exist
+ if (inbox_id.isNull() || outbox_id.isNull())
+ {
+ observeInboxOutboxCreation();
+ }
+
+ // Set up observer for inbox changes, if we have an inbox already
+ if (!inbox_id.isNull())
+ {
+ observeInboxModifications(inbox_id);
+
+ // Enable the display of the inbox if it exists
+ enableInbox(true);
+ }
+
+ // Set up observer for outbox changes, if we have an outbox already
+ if (!outbox_id.isNull())
+ {
+ observeOutboxModifications(outbox_id);
+
+ // Enable the display of the outbox if it exists
+ //enableOutbox(true);
+ // leslie NOTE: Disabling outbox until we support it officially.
+ }
+}
+
+void LLSidepanelInventory::observeInboxOutboxCreation()
+{
+ //
+ // Set up observer to track inbox and outbox folder creation
+ //
+
+ if (mInboxOutboxAddedObserver == NULL)
+ {
+ mInboxOutboxAddedObserver = new LLInboxOutboxAddedObserver(this);
+
+ gInventory.addObserver(mInboxOutboxAddedObserver);
+ }
+}
+
+void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
+{
+ //
+ // Track inbox and outbox folder changes
+ //
+
+ if (inboxID.isNull())
+ {
+ llwarns << "Attempting to track modifications to non-existant inbox" << llendl;
+ return;
+ }
+
+ if (mCategoriesObserver == NULL)
+ {
+ mCategoriesObserver = new LLInventoryCategoriesObserver();
+ gInventory.addObserver(mCategoriesObserver);
+ }
+
+ mCategoriesObserver->addCategory(inboxID, boost::bind(&LLSidepanelInventory::onInboxChanged, this, inboxID));
+
+ //
+ // Trigger a load for the entire contents of the Inbox
+ //
+
+ LLInventoryModelBackgroundFetch::instance().start(inboxID);
+
+ //
+ // Set up the inbox inventory view
+ //
+
+ LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
+ inbox->setupInventoryPanel();
+}
+
+
+void LLSidepanelInventory::observeOutboxModifications(const LLUUID& outboxID)
+{
+ //
+ // Track outbox folder changes
+ //
+
+ if (outboxID.isNull())
+ {
+ llwarns << "Attempting to track modifications to non-existant outbox" << llendl;
+ return;
+ }
+
+ if (mCategoriesObserver == NULL)
+ {
+ mCategoriesObserver = new LLInventoryCategoriesObserver();
+ gInventory.addObserver(mCategoriesObserver);
+ }
+
+ mCategoriesObserver->addCategory(outboxID, boost::bind(&LLSidepanelInventory::onOutboxChanged, this, outboxID));
+
+ //
+ // Set up the outbox inventory view
+ //
+
+ LLPanelMarketplaceOutbox * outbox = getChild<LLPanelMarketplaceOutbox>(MARKETPLACE_OUTBOX_PANEL);
+ outbox->setupInventoryPanel();
+}
+
+void LLSidepanelInventory::enableInbox(bool enabled)
+{
+ mInboxEnabled = enabled;
+ getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME)->setVisible(enabled);
+}
+
+void LLSidepanelInventory::enableOutbox(bool enabled)
+{
+ mOutboxEnabled = enabled;
+ getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME)->setVisible(enabled);
+}
+
+void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id)
+{
+ // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting
+ LLInventoryModelBackgroundFetch::instance().start(inbox_id);
+
+ // Expand the inbox since we have fresh items
+ LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
+ if (inbox && (inbox->getFreshItemCount() > 0))
+ {
+ getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
+ onToggleInboxBtn();
+ }
+}
+
+void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id)
+{
+ // Perhaps use this to track outbox changes?
+}
+
+bool manageInboxOutboxPanels(LLLayoutStack * stack,
+ LLButton * pressedButton, LLLayoutPanel * pressedPanel,
+ LLButton * otherButton, LLLayoutPanel * otherPanel)
+{
+ bool expand = pressedButton->getToggleState();
+ bool otherExpanded = otherButton->getToggleState();
+
+ //
+ // NOTE: Ideally we could have two panel sizes stored for a collapsed and expanded minimum size.
+ // For now, leave this code disabled because it creates some bad artifacts when expanding
+ // and collapsing the inbox/outbox.
+ //
+ //S32 smallMinSize = (expand ? pressedPanel->getMinDim() : otherPanel->getMinDim());
+ //S32 pressedMinSize = (expand ? 2 * smallMinSize : smallMinSize);
+ //otherPanel->setMinDim(smallMinSize);
+ //pressedPanel->setMinDim(pressedMinSize);
+
+ if (expand && otherExpanded)
+ {
+ // Reshape pressedPanel to the otherPanel's height so we preserve the marketplace panel size
+ pressedPanel->reshape(pressedPanel->getRect().getWidth(), otherPanel->getRect().getHeight());
+
+ stack->collapsePanel(otherPanel, true);
+ otherButton->setToggleState(false);
+ }
+
+ stack->collapsePanel(pressedPanel, !expand);
+
+ // Enable user_resize on main inventory panel only when a marketplace box is expanded
+ stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand);
+
+ return expand;
+}
+
+void LLSidepanelInventory::onToggleInboxBtn()
+{
+ LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
+ LLButton* pressedButton = getChild<LLButton>(INBOX_BUTTON_NAME);
+ LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ LLButton* otherButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
+ LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
+
+ bool inboxExpanded = manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
+
+ if (inboxExpanded)
+ {
+ // Save current time as a setting for future new-ness tests
+ gSavedSettings.setString(INBOX_EXPAND_TIME_SETTING, LLDate::now().asString());
+ }
+}
+
+void LLSidepanelInventory::onToggleOutboxBtn()
+{
+ LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
+ LLButton* pressedButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
+ LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
+ LLButton* otherButton = getChild<LLButton>(INBOX_BUTTON_NAME);
+ LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+
+ manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
+}
+
void LLSidepanelInventory::onOpen(const LLSD& key)
{
LLFirstUse::newInventory(false);
+ // Expand the inbox if we have fresh items
+ LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
+ if (inbox && (inbox->getFreshItemCount() > 0))
+ {
+ getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
+ onToggleInboxBtn();
+ }
+
if(key.size() == 0)
return;
@@ -171,26 +535,29 @@ void LLSidepanelInventory::onShopButtonClicked()
void LLSidepanelInventory::performActionOnSelection(const std::string &action)
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
+ LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
if (!current_item)
{
- return;
+ LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+ if (inbox)
+ {
+ current_item = inbox->getRootFolder()->getCurSelectedItem();
+ }
+
+ if (!current_item)
+ {
+ return;
+ }
}
+
current_item->getListener()->performAction(panel_main_inventory->getActivePanel()->getModel(), action);
}
void LLSidepanelInventory::onWearButtonClicked()
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
- if (!panel_main_inventory)
- {
- llassert(panel_main_inventory != NULL);
- return;
- }
-
// Get selected items set.
- const std::set<LLUUID> selected_uuids_set = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList();
+ const std::set<LLUUID> selected_uuids_set = LLAvatarActions::getInventorySelectedUUIDs();
if (selected_uuids_set.empty()) return; // nothing selected
// Convert the set to a vector.
@@ -329,31 +696,28 @@ bool LLSidepanelInventory::canShare()
LLPanelMainInventory* panel_main_inventory =
mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
- if (!panel_main_inventory)
+ LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+
+ // Avoid flicker in the Recent tab while inventory is being loaded.
+ if ( (!inbox || inbox->getRootFolder()->getSelectionList().empty())
+ && (panel_main_inventory && !panel_main_inventory->getActivePanel()->getRootFolder()->hasVisibleChildren()) )
{
- llwarns << "Failed to get the main inventory panel" << llendl;
return false;
}
- LLInventoryPanel* active_panel = panel_main_inventory->getActivePanel();
- // Avoid flicker in the Recent tab while inventory is being loaded.
- if (!active_panel->getRootFolder()->hasVisibleChildren()) return false;
-
- return LLAvatarActions::canShareSelectedItems(active_panel);
+ return ( (panel_main_inventory ? LLAvatarActions::canShareSelectedItems(panel_main_inventory->getActivePanel()) : false)
+ || (inbox ? LLAvatarActions::canShareSelectedItems(inbox) : false) );
}
+
bool LLSidepanelInventory::canWearSelected()
{
- LLPanelMainInventory* panel_main_inventory =
- mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
- if (!panel_main_inventory)
- {
- llassert(panel_main_inventory != NULL);
+ std::set<LLUUID> selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
+
+ if (selected_uuids.empty())
return false;
- }
- std::set<LLUUID> selected_uuids = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList();
for (std::set<LLUUID>::const_iterator it = selected_uuids.begin();
it != selected_uuids.end();
++it)
@@ -366,11 +730,20 @@ bool LLSidepanelInventory::canWearSelected()
LLInventoryItem *LLSidepanelInventory::getSelectedItem()
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
+ LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
if (!current_item)
{
- return NULL;
+ LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+ if (inbox)
+ {
+ current_item = inbox->getRootFolder()->getCurSelectedItem();
+ }
+
+ if (!current_item)
+ {
+ return NULL;
+ }
}
const LLUUID &item_id = current_item->getListener()->getUUID();
LLInventoryItem *item = gInventory.getItem(item_id);
@@ -379,9 +752,20 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem()
U32 LLSidepanelInventory::getSelectedCount()
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
+ int count = 0;
+
+ LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList();
- return selection_list.size();
+ count += selection_list.size();
+
+ LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+ if (inbox)
+ {
+ selection_list = inbox->getRootFolder()->getSelectionList();
+ count += selection_list.size();
+ }
+
+ return count;
}
LLInventoryPanel *LLSidepanelInventory::getActivePanel()
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 32c98bc034..9117e3bf27 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -30,6 +30,8 @@
#include "llpanel.h"
class LLFolderViewItem;
+class LLInboxOutboxAddedObserver;
+class LLInventoryCategoriesObserver;
class LLInventoryItem;
class LLInventoryPanel;
class LLPanelMainInventory;
@@ -42,6 +44,14 @@ public:
LLSidepanelInventory();
virtual ~LLSidepanelInventory();
+private:
+ void handleLoginComplete();
+
+public:
+ void observeInboxOutboxCreation();
+ void observeInboxModifications(const LLUUID& inboxID);
+ void observeOutboxModifications(const LLUUID& outboxID);
+
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
@@ -56,6 +66,17 @@ public:
// checks can share selected item(s)
bool canShare();
+ void onToggleInboxBtn();
+ void onToggleOutboxBtn();
+
+ void enableInbox(bool enabled);
+ void enableOutbox(bool enabled);
+
+ bool isInboxEnabled() const { return mInboxEnabled; }
+ bool isOutboxEnabled() const { return mOutboxEnabled; }
+
+ void updateVerbs();
+
protected:
// Tracks highlighted (selected) item in inventory panel.
LLInventoryItem *getSelectedItem();
@@ -63,10 +84,12 @@ protected:
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
// "wear", "teleport", etc.
void performActionOnSelection(const std::string &action);
- void updateVerbs();
bool canWearSelected(); // check whether selected items can be worn
+ void onInboxChanged(const LLUUID& inbox_id);
+ void onOutboxChanged(const LLUUID& outbox_id);
+
//
// UI Elements
//
@@ -85,6 +108,7 @@ protected:
void onTeleportButtonClicked();
void onOverflowButtonClicked();
void onBackButtonClicked();
+
private:
LLButton* mInfoBtn;
LLButton* mShareBtn;
@@ -94,6 +118,11 @@ private:
LLButton* mOverflowBtn;
LLButton* mShopBtn;
+ bool mInboxEnabled;
+ bool mOutboxEnabled;
+
+ LLInventoryCategoriesObserver* mCategoriesObserver;
+ LLInboxOutboxAddedObserver* mInboxOutboxAddedObserver;
};
#endif //LL_LLSIDEPANELINVENTORY_H
diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp
index 37b10b592f..2918bb388a 100644
--- a/indra/newview/llsidepanelinventorysubpanel.cpp
+++ b/indra/newview/llsidepanelinventorysubpanel.cpp
@@ -46,8 +46,8 @@
///----------------------------------------------------------------------------
// Default constructor
-LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel()
- : LLPanel(),
+LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel(const LLPanel::Params& p)
+ : LLPanel(p),
mIsDirty(TRUE),
mIsEditing(FALSE),
mCancelBtn(NULL),
diff --git a/indra/newview/llsidepanelinventorysubpanel.h b/indra/newview/llsidepanelinventorysubpanel.h
index b2de7d3b0b..b5cf3aaf17 100644
--- a/indra/newview/llsidepanelinventorysubpanel.h
+++ b/indra/newview/llsidepanelinventorysubpanel.h
@@ -40,7 +40,7 @@ class LLInventoryItem;
class LLSidepanelInventorySubpanel : public LLPanel
{
public:
- LLSidepanelInventorySubpanel();
+ LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams());
virtual ~LLSidepanelInventorySubpanel();
/*virtual*/ void setVisible(BOOL visible);
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index fbd2f7ca83..1ce05da849 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -130,9 +130,10 @@ void LLObjectInventoryObserver::inventoryChanged(LLViewerObject* object,
static LLRegisterPanelClassWrapper<LLSidepanelItemInfo> t_item_info("sidepanel_item_info");
// Default constructor
-LLSidepanelItemInfo::LLSidepanelItemInfo()
- : mItemID(LLUUID::null)
- , mObjectInventoryObserver(NULL)
+LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p)
+ : LLSidepanelInventorySubpanel(p)
+ , mItemID(LLUUID::null)
+ , mObjectInventoryObserver(NULL)
{
mPropertiesObserver = new LLItemPropertiesObserver(this);
}
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index 25be145f64..12aaca923e 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -44,7 +44,7 @@ class LLPermissions;
class LLSidepanelItemInfo : public LLSidepanelInventorySubpanel
{
public:
- LLSidepanelItemInfo();
+ LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams());
virtual ~LLSidepanelItemInfo();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 631b244785..651897a217 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -30,6 +30,7 @@
#include "llagentcamera.h"
#include "llappviewer.h"
+#include "llbadge.h"
#include "llbottomtray.h"
#include "llfloaterreg.h"
#include "llfirstuse.h"
@@ -40,6 +41,7 @@
#include "llfocusmgr.h"
#include "llrootview.h"
#include "llnavigationbar.h"
+#include "llpanelmarketplaceinbox.h"
#include "llaccordionctrltab.h"
@@ -113,11 +115,14 @@ public:
Optional<std::string> image_selected;
Optional<std::string> tab_title;
Optional<std::string> description;
+ Optional<LLBadge::Params> badge;
+
Params()
: image("image"),
image_selected("image_selected"),
tab_title("tab_title","no title"),
- description("description","no description")
+ description("description","no description"),
+ badge("badge")
{};
};
protected:
@@ -140,7 +145,6 @@ public:
static LLSideTrayTab* createInstance ();
const std::string& getDescription () const { return mDescription;}
- const std::string& getTabTitle() const { return mTabTitle;}
void onOpen (const LLSD& key);
@@ -150,7 +154,10 @@ public:
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- LLPanel *getPanel();
+ LLPanel* getPanel();
+
+ LLButton* createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback);
+
private:
std::string mTabTitle;
std::string mImage;
@@ -158,6 +165,9 @@ private:
std::string mDescription;
LLView* mMainPanel;
+
+ bool mHasBadge;
+ LLBadge::Params mBadgeParams;
};
LLSideTrayTab::LLSideTrayTab(const Params& p)
@@ -166,8 +176,10 @@ LLSideTrayTab::LLSideTrayTab(const Params& p)
mImage(p.image),
mImageSelected(p.image_selected),
mDescription(p.description),
- mMainPanel(NULL)
+ mMainPanel(NULL),
+ mBadgeParams(p.badge)
{
+ mHasBadge = p.badge.isProvided();
}
LLSideTrayTab::~LLSideTrayTab()
@@ -182,8 +194,6 @@ bool LLSideTrayTab::addChild(LLView* view, S32 tab_group)
//return res;
}
-
-
//virtual
BOOL LLSideTrayTab::postBuild()
{
@@ -196,7 +206,7 @@ BOOL LLSideTrayTab::postBuild()
getChild<LLButton>("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, false));
getChild<LLButton>("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, true));
- return true;
+ return LLPanel::postBuild();
}
static const S32 splitter_margin = 1;
@@ -523,18 +533,36 @@ public:
return FALSE;
}
+ void setBadgeDriver(LLSideTrayTabBadgeDriver* driver)
+ {
+ mBadgeDriver = driver;
+ }
+
protected:
LLSideTrayButton(const LLButton::Params& p)
- : LLButton(p)
- , mDragLastScreenX(0)
- , mDragLastScreenY(0)
+ : LLButton(p)
+ , mDragLastScreenX(0)
+ , mDragLastScreenY(0)
+ , mBadgeDriver(NULL)
{}
friend class LLUICtrlFactory;
+ void draw()
+ {
+ if (mBadgeDriver)
+ {
+ setBadgeLabel(mBadgeDriver->getBadgeString());
+ }
+
+ LLButton::draw();
+ }
+
private:
S32 mDragLastScreenX;
S32 mDragLastScreenY;
+
+ LLSideTrayTabBadgeDriver* mBadgeDriver;
};
//////////////////////////////////////////////////////////////////////////////
@@ -615,11 +643,31 @@ BOOL LLSideTray::postBuild()
return true;
}
+void LLSideTray::setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver)
+{
+ mTabButtonBadgeDrivers[tabName] = driver;
+}
+
void LLSideTray::handleLoginComplete()
{
//reset tab to "home" tab if it was changesd during login process
selectTabByName("sidebar_home");
+ for (badge_map_t::iterator it = mTabButtonBadgeDrivers.begin(); it != mTabButtonBadgeDrivers.end(); ++it)
+ {
+ LLButton* button = mTabButtons[it->first];
+ LLSideTrayButton* side_button = dynamic_cast<LLSideTrayButton*>(button);
+
+ if (side_button)
+ {
+ side_button->setBadgeDriver(it->second);
+ }
+ else
+ {
+ llwarns << "Unable to find button " << it->first << " to set the badge driver. " << llendl;
+ }
+ }
+
detachTabs();
}
@@ -766,51 +814,6 @@ bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible
return true;
}
-LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,const std::string& tooltip,
- LLUICtrl::commit_callback_t callback)
-{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- LLButton::Params bparams;
-
- LLRect rect;
- rect.setOriginAndSize(0, 0, sidetray_params.default_button_width, sidetray_params.default_button_height);
-
- bparams.name(name);
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP);
- bparams.rect (rect);
- bparams.tab_stop(false);
- bparams.image_unselected(sidetray_params.tab_btn_image_normal);
- bparams.image_selected(sidetray_params.tab_btn_image_selected);
- bparams.image_disabled(sidetray_params.tab_btn_image_normal);
- bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected);
-
- LLButton* button;
- if (name == "sidebar_openclose")
- {
- // "Open/Close" button shouldn't allow "tear off"
- // hence it is created as LLButton instance.
- button = LLUICtrlFactory::create<LLButton>(bparams);
- }
- else
- {
- button = LLUICtrlFactory::create<LLSideTrayButton>(bparams);
- }
-
- button->setClickedCallback(callback);
-
- button->setToolTip(tooltip);
-
- if(image.length())
- {
- button->setImageOverlay(image);
- }
-
- mButtonsPanel->addChildInBack(button);
-
- return button;
-}
-
bool LLSideTray::addChild(LLView* view, S32 tab_group)
{
LLSideTrayTab* tab_panel = dynamic_cast<LLSideTrayTab*>(view);
@@ -938,7 +941,56 @@ bool LLSideTray::addTab(LLSideTrayTab* tab)
return true;
}
-void LLSideTray::createButtons ()
+LLButton* LLSideTrayTab::createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback)
+{
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
+
+ LLRect rect;
+ rect.setOriginAndSize(0, 0, sidetray_params.default_button_width, sidetray_params.default_button_height);
+
+ LLButton::Params bparams;
+
+ // Append "_button" to the side tray tab name
+ std::string button_name = getName() + "_button";
+ bparams.name(button_name);
+ bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP);
+ bparams.rect (rect);
+ bparams.tab_stop(false);
+ bparams.image_unselected(sidetray_params.tab_btn_image_normal);
+ bparams.image_selected(sidetray_params.tab_btn_image_selected);
+ bparams.image_disabled(sidetray_params.tab_btn_image_normal);
+ bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected);
+
+ if (mHasBadge)
+ {
+ bparams.badge = mBadgeParams;
+ }
+
+ LLButton* button;
+ if (allowTearOff)
+ {
+ button = LLUICtrlFactory::create<LLSideTrayButton>(bparams);
+ }
+ else
+ {
+ // "Open/Close" button shouldn't allow "tear off"
+ // hence it is created as LLButton instance.
+ button = LLUICtrlFactory::create<LLButton>(bparams);
+ }
+
+ button->setClickedCallback(callback);
+
+ button->setToolTip(mTabTitle);
+
+ if(mImage.length())
+ {
+ button->setImageOverlay(mImage);
+ }
+
+ return button;
+}
+
+void LLSideTray::createButtons()
{
//create buttons for tabs
child_vector_const_iter_t child_it = mTabs.begin();
@@ -951,17 +1003,22 @@ void LLSideTray::createButtons ()
// The "OpenClose" button will open/close the whole panel
if (name == "sidebar_openclose")
{
- mCollapseButton = createButton(name,sidebar_tab->mImage,sidebar_tab->getTabTitle(),
- boost::bind(&LLSideTray::onToggleCollapse, this));
+ mCollapseButton = sidebar_tab->createButton(false, boost::bind(&LLSideTray::onToggleCollapse, this));
+
+ mButtonsPanel->addChildInBack(mCollapseButton);
+
LLHints::registerHintTarget("side_panel_btn", mCollapseButton->getHandle());
}
else
{
- LLButton* button = createButton(name,sidebar_tab->mImage,sidebar_tab->getTabTitle(),
- boost::bind(&LLSideTray::onTabButtonClick, this, name));
+ LLButton* button = sidebar_tab->createButton(true, boost::bind(&LLSideTray::onTabButtonClick, this, name));
+
+ mButtonsPanel->addChildInBack(button);
+
mTabButtons[name] = button;
}
}
+
LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle());
}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 24882411f4..17158329dc 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -33,6 +33,13 @@
class LLAccordionCtrl;
class LLSideTrayTab;
+// Define an interface for side tab button badge values
+class LLSideTrayTabBadgeDriver
+{
+public:
+ virtual std::string getBadgeString() const = 0;
+};
+
// Deal with LLSideTrayTab being opaque. Generic do-nothing cast...
template <class T>
T tab_cast(LLSideTrayTab* tab) { return tab; }
@@ -166,6 +173,8 @@ public:
bool getCollapsed() { return mCollapsed; }
+ void setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver);
+
public:
virtual ~LLSideTray(){};
@@ -204,8 +213,6 @@ protected:
void createButtons ();
- LLButton* createButton (const std::string& name,const std::string& image,const std::string& tooltip,
- LLUICtrl::commit_callback_t callback);
void arrange ();
void detachTabs ();
void reflectCollapseChange();
@@ -234,6 +241,8 @@ private:
LLPanel* mButtonsPanel;
typedef std::map<std::string,LLButton*> button_map_t;
button_map_t mTabButtons;
+ typedef std::map<std::string,LLSideTrayTabBadgeDriver*> badge_map_t;
+ badge_map_t mTabButtonBadgeDrivers;
child_vector_t mTabs;
child_vector_t mDetachedTabs;
tab_order_vector_t mOriginalTabOrder;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index fa329eb0ae..f99afa923b 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -35,6 +35,7 @@
#include "llvolumeoctree.h"
#include "llviewercamera.h"
#include "llface.h"
+#include "llfloatertools.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
#include "llcamera.h"
@@ -69,6 +70,7 @@ U32 LLSpatialGroup::sNodeCount = 0;
std::set<GLuint> LLSpatialGroup::sPendingQueries;
+U32 gOctreeMaxCapacity;
BOOL LLSpatialGroup::sNoDelete = FALSE;
@@ -630,7 +632,7 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
if (mOctreeNode->isInside(drawablep->getPositionGroup()) &&
(mOctreeNode->contains(drawablep) ||
(drawablep->getBinRadius() > mOctreeNode->getSize()[0] &&
- parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY)))
+ parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{
unbound();
setState(OBJECT_DIRTY);
@@ -689,17 +691,8 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt");
void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
{
- /*if (!gPipeline.hasRenderType(mDrawableType))
- {
- return;
- }*/
-
if (group->isDead() || !group->isState(LLSpatialGroup::GEOM_DIRTY))
{
- /*if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && mRenderByGroup)
- {
- llerrs << "WTF?" << llendl;
- }*/
return;
}
@@ -961,21 +954,15 @@ void LLSpatialGroup::setState(U32 state)
{
mState |= state;
- if (state > LLSpatialGroup::STATE_MASK)
- {
- llerrs << "WTF?" << llendl;
- }
+ llassert(state <= LLSpatialGroup::STATE_MASK);
}
void LLSpatialGroup::setState(U32 state, S32 mode)
{
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
- if (state > LLSpatialGroup::STATE_MASK)
- {
- llerrs << "WTF?" << llendl;
- }
-
+ llassert(state <= LLSpatialGroup::STATE_MASK);
+
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1021,20 +1008,14 @@ public:
void LLSpatialGroup::clearState(U32 state)
{
- if (state > LLSpatialGroup::STATE_MASK)
- {
- llerrs << "WTF?" << llendl;
- }
+ llassert(state <= LLSpatialGroup::STATE_MASK);
mState &= ~state;
}
void LLSpatialGroup::clearState(U32 state, S32 mode)
{
- if (state > LLSpatialGroup::STATE_MASK)
- {
- llerrs << "WTF?" << llendl;
- }
+ llassert(state <= LLSpatialGroup::STATE_MASK);
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
@@ -1059,10 +1040,7 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
BOOL LLSpatialGroup::isState(U32 state) const
{
- if (state > LLSpatialGroup::STATE_MASK)
- {
- llerrs << "WTF?" << llendl;
- }
+ llassert(state <= LLSpatialGroup::STATE_MASK);
return mState & state ? TRUE : FALSE;
}
@@ -1250,7 +1228,8 @@ void LLSpatialGroup::updateDistance(LLCamera &camera)
{
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
- llerrs << "WTF?" << llendl;
+ llwarns << "Attempted to update distance for camera other than world camera!" << llendl;
+ return;
}
#if !LL_RELEASE_FOR_DOWNLOAD
@@ -2064,11 +2043,8 @@ public:
virtual void processGroup(LLSpatialGroup* group)
{
- if (group->isState(LLSpatialGroup::DIRTY) || group->getData().empty())
- {
- llerrs << "WTF?" << llendl;
- }
-
+ llassert(!group->isState(LLSpatialGroup::DIRTY) && !group->getData().empty())
+
if (mRes < 2)
{
if (mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]) > 0)
@@ -2541,7 +2517,7 @@ void renderOctree(LLSpatialGroup* group)
//coded by buffer usage and activity
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
LLVector4 col;
- if (group->mBuilt > 0.f)
+ /*if (group->mBuilt > 0.f)
{
group->mBuilt -= 2.f * gFrameIntervalSeconds;
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
@@ -2610,7 +2586,7 @@ void renderOctree(LLSpatialGroup* group)
gGL.color4f(1,1,1,1);
}
}
- else
+ else*/
{
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->getData().empty()
&& group->mSpatialPartition->mRenderByGroup)
@@ -2630,33 +2606,24 @@ void renderOctree(LLSpatialGroup* group)
size.mul(1.01f);
size.add(fudge);
- {
- LLGLDepthTest depth(GL_TRUE, GL_FALSE);
- drawBox(group->mObjectBounds[0], fudge);
- }
+ //{
+ // LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ // drawBox(group->mObjectBounds[0], fudge);
+ //}
gGL.setSceneBlendType(LLRender::BT_ALPHA);
- if (group->mBuilt <= 0.f)
+ //if (group->mBuilt <= 0.f)
{
//draw opaque outline
- gGL.color4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
- drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
+ //gGL.color4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
+ //drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
- if (group->mOctreeNode->isLeaf())
- {
- gGL.color4f(1,1,1,1);
- }
- else
- {
- gGL.color4f(0,1,1,1);
- }
-
+ gGL.color4f(0,1,1,1);
drawBoxOutline(group->mBounds[0],group->mBounds[1]);
-
-
+
//draw bounding box for draw info
- if (group->mSpatialPartition->mRenderByGroup)
+ /*if (group->mSpatialPartition->mRenderByGroup)
{
gGL.color4f(1.0f, 0.75f, 0.25f, 0.6f);
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
@@ -2673,7 +2640,7 @@ void renderOctree(LLSpatialGroup* group)
drawBoxOutline(center, size);
}
}
- }
+ }*/
}
// LLSpatialGroup::OctreeNode* node = group->mOctreeNode;
@@ -2716,7 +2683,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
gGL.color4f(0.f, 0.75f, 0.f, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
- else if (camera && group->mOcclusionVerts.notNull())
+ /*else if (camera && group->mOcclusionVerts.notNull())
{
LLVertexBuffer::unbind();
group->mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -2728,7 +2695,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
glColor4f(1.0f, 1.f, 1.f, 1.0f);
group->mOcclusionVerts->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, group->mBounds[0]));
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- }
+ }*/
}
}
@@ -2818,7 +2785,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
gGL.color4f(0,1,1,1);
break;
case LLViewerObject::LL_VO_CLOUDS:
- gGL.color4f(0.5f,0.5f,0.5f,1.0f);
+ // no longer used
break;
case LLViewerObject::LL_VO_PART_GROUP:
case LLViewerObject::LL_VO_HUD_PART_GROUP:
@@ -3002,13 +2969,6 @@ void render_hull(LLModel::PhysicsMesh& mesh, const LLColor4& color, const LLColo
void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
{
- if (volume->isSelected())
- {
- LLVector3 construct_me(5,5,5);
- construct_me.normalize();
- }
-
-
U8 physics_type = volume->getPhysicsShapeType();
if (physics_type == LLViewerObject::PHYSICS_SHAPE_NONE || volume->isFlexible())
@@ -3473,6 +3433,8 @@ void renderTextureAnim(LLDrawInfo* params)
void renderBatchSize(LLDrawInfo* params)
{
+ LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(-1.f, 1.f);
glColor3ubv((GLubyte*) &(params->mDebugColor));
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3910,6 +3872,28 @@ public:
renderAgentTarget(avatar);
}
+ if (gDebugGL)
+ {
+ for (U32 i = 0; i < drawable->getNumFaces(); ++i)
+ {
+ LLFace* facep = drawable->getFace(i);
+ U8 index = facep->getTextureIndex();
+ if (facep->mDrawInfo)
+ {
+ if (index < 255)
+ {
+ if (facep->mDrawInfo->mTextureList.size() <= index)
+ {
+ llerrs << "Face texture index out of bounds." << llendl;
+ }
+ else if (facep->mDrawInfo->mTextureList[index] != facep->getTexture())
+ {
+ llerrs << "Face texture index incorrect." << llendl;
+ }
+ }
+ }
+ }
+ }
}
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
@@ -4282,7 +4266,29 @@ public:
if (vobj)
{
LLVector3 intersection;
- if (vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal))
+ bool skip_check = false;
+ if (vobj->isAvatar())
+ {
+ LLVOAvatar* avatar = (LLVOAvatar*) vobj;
+ if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools))
+ {
+ LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal);
+ if (hit)
+ {
+ mEnd = intersection;
+ if (mIntersection)
+ {
+ *mIntersection = intersection;
+ }
+
+ mHit = hit->mDrawable;
+ skip_check = true;
+ }
+
+ }
+ }
+
+ if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal))
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
if (mIntersection)
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 0d9cad914a..54d5d36f6e 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -91,6 +91,8 @@ public:
LLPointer<LLVertexBuffer> mVertexBuffer;
LLPointer<LLViewerTexture> mTexture;
+ std::vector<LLPointer<LLViewerTexture> > mTextureList;
+
LLColor4U mGlowColor;
S32 mDebugColor;
const LLMatrix4* mTextureMatrix;
@@ -207,7 +209,7 @@ public:
typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t;
typedef std::map<U32, drawmap_elem_t > draw_map_t;
typedef std::vector<LLPointer<LLVertexBuffer> > buffer_list_t;
- typedef std::map<LLPointer<LLViewerTexture>, buffer_list_t> buffer_texture_map_t;
+ typedef std::map<LLFace*, buffer_list_t> buffer_texture_map_t;
typedef std::map<U32, buffer_texture_map_t> buffer_map_t;
typedef LLOctreeListener<LLDrawable> BaseType;
@@ -399,7 +401,7 @@ protected:
public:
bridge_list_t mBridgeList;
- buffer_map_t mBufferMap; //used by volume buffers to store unique buffers per texture
+ buffer_map_t mBufferMap; //used by volume buffers to attempt to reuse vertex buffers
F32 mBuilt;
OctreeNode* mOctreeNode;
@@ -662,13 +664,6 @@ public:
LLGrassPartition();
};
-//spatial partition for clouds (implemented in LLVOClouds.cpp)
-class LLCloudPartition : public LLParticlePartition
-{
-public:
- LLCloudPartition();
-};
-
//class for wrangling geometry out of volumes (implemented in LLVOVolume.cpp)
class LLVolumeGeometryManager: public LLGeometryManager
{
@@ -684,7 +679,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
virtual void rebuildGeom(LLSpatialGroup* group);
virtual void rebuildMesh(LLSpatialGroup* group);
virtual void getGeometry(LLSpatialGroup* group);
- void genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort = FALSE);
+ void genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE);
void registerFace(LLSpatialGroup* group, LLFace* facep, U32 type);
};
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 86b09473ab..4dfcb85295 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -76,6 +76,7 @@
#include "lluserrelations.h"
#include "llversioninfo.h"
#include "llviewercontrol.h"
+#include "llviewerhelp.h"
#include "llvfs.h"
#include "llxorcipher.h" // saved password, MAC address
#include "llwindow.h"
@@ -163,7 +164,6 @@
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llvoclouds.h"
#include "llweb.h"
#include "llworld.h"
#include "llworldmapmessage.h"
@@ -1171,8 +1171,6 @@ bool idle_startup()
// init the shader managers
LLPostProcess::initClass();
- LLWLParamManager::initClass();
- LLWaterParamManager::initClass();
LLViewerObject::initVOClasses();
@@ -1692,11 +1690,22 @@ bool idle_startup()
gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
}
+ if (gSavedSettings.getBOOL("ShowHelpOnFirstLogin"))
+ {
+ gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+ }
+
// Set the show start location to true, now that the user has logged
// on with this install.
gSavedSettings.setBOOL("ShowStartLocation", TRUE);
}
+ if (gSavedSettings.getBOOL("HelpFloaterOpen"))
+ {
+ // show default topic
+ LLViewerHelp::instance().showTopic("");
+ }
+
// We're successfully logged in.
gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE);
@@ -1953,7 +1962,8 @@ bool idle_startup()
gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->revealIntroPanel();
+ //gViewerWindow->setShowProgress(FALSE); // reveal intro video now handles this
gViewerWindow->setProgressCancelButtonVisible(FALSE);
// We're not away from keyboard, even though login might have taken
@@ -3150,11 +3160,6 @@ bool process_login_success_response()
gMoonTextureID = id;
}
- id = global_textures["cloud_texture_id"];
- if(id.notNull())
- {
- gCloudTextureID = id;
- }
}
// Set the location of the snapshot sharing config endpoint
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 1023a4339b..de22f2ae6b 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -420,7 +420,6 @@ BOOL LLFloaterTexturePicker::postBuild()
mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask);
mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2));
mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mInventoryPanel->setAllowMultiSelect(FALSE);
// Disable auto selecting first filtered item because it takes away
// selection from the item set by LLTextureCtrl owning this floater.
@@ -1093,7 +1092,7 @@ public:
BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
{
- getWindow()->setCursor(UI_CURSOR_HAND);
+ getWindow()->setCursor(mBorder->parentPointInView(x,y) ? UI_CURSOR_HAND : UI_CURSOR_ARROW);
return TRUE;
}
@@ -1102,7 +1101,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLUICtrl::handleMouseDown( x, y , mask );
- if( !handled )
+ if (!handled && mBorder->parentPointInView(x, y))
{
showPicker(FALSE);
//grab textures first...
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 9ec4d33036..c38c8bad80 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -639,6 +639,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
if (click_action == CLICK_ACTION_NONE // not doing 1-click action
&& gSavedSettings.getBOOL("ClickToWalk") // click to walk enabled
&& !gAgent.getFlying() // don't auto-navigate while flying until that works
+ && gAgentAvatarp
&& !gAgentAvatarp->isSitting()
&& !mBlockClickToWalk // another behavior hasn't cancelled click to walk
&& !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 379bbe614d..87ca80260f 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -57,6 +57,7 @@
#include "llworld.h"
#include "pipeline.h"
#include "llviewerjoystick.h"
+#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llparcel.h"
#include "llkeyboard.h"
@@ -183,6 +184,21 @@ static bool handleReleaseGLBufferChanged(const LLSD& newvalue)
return true;
}
+static bool handleFSAASamplesChanged(const LLSD& newvalue)
+{
+ if (gPipeline.isInit())
+ {
+ gPipeline.releaseGLBuffers();
+ gPipeline.createGLBuffers();
+
+ if (LLPipeline::sRenderDeferred)
+ {
+ LLViewerShaderMgr::instance()->setShaders();
+ }
+ }
+ return true;
+}
+
static bool handleAnisotropicChanged(const LLSD& newvalue)
{
LLImageGL::sGlobalUseAnisotropic = newvalue.asBoolean();
@@ -357,6 +373,16 @@ static bool handleResetVertexBuffersChanged(const LLSD&)
return true;
}
+static bool handleRepartition(const LLSD&)
+{
+ if (gPipeline.isInit())
+ {
+ gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
+ gObjectList.repartitionObjects();
+ }
+ return true;
+}
+
static bool handleRenderDynamicLODChanged(const LLSD& newvalue)
{
LLPipeline::sDynamicLOD = newvalue.asBoolean();
@@ -560,6 +586,12 @@ void settings_setup_listeners()
gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _2));
gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _2));
gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _2));
+ gSavedSettings.getControl("OctreeStaticObjectSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
+ gSavedSettings.getControl("OctreeDistanceFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
+ gSavedSettings.getControl("OctreeMaxNodeCapacity")->getSignal()->connect(boost::bind(&handleRepartition, _2));
+ gSavedSettings.getControl("OctreeAlphaDistanceFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
+ gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
+ gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
@@ -568,7 +600,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderSpecularResX")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularResY")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularExponent")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
- gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+ gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleFSAASamplesChanged, _2));
gSavedSettings.getControl("RenderAnisotropic")->getSignal()->connect(boost::bind(&handleAnisotropicChanged, _2));
gSavedSettings.getControl("RenderShadowResolutionScale")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e41773d273..911fc8e1ed 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -178,8 +178,8 @@ void display_update_camera()
gViewerWindow->setup3DRender();
// update all the sky/atmospheric/water settings
- LLWLParamManager::instance()->update(LLViewerCamera::getInstance());
- LLWaterParamManager::instance()->update(LLViewerCamera::getInstance());
+ LLWLParamManager::getInstance()->update(LLViewerCamera::getInstance());
+ LLWaterParamManager::getInstance()->update(LLViewerCamera::getInstance());
// Update land visibility too
LLWorld::getInstance()->setLandFarClip(final_far);
@@ -582,6 +582,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM);
const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
gPipeline.createObjects(max_geom_update_time);
+ gPipeline.processPartitionQ();
gPipeline.updateGeom(max_geom_update_time);
stop_glerror();
}
@@ -836,7 +837,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
gPipeline.mDeferredScreen.bindTarget();
- glClearColor(0,0,0,0);
+ glClearColor(1,0,1,1);
gPipeline.mDeferredScreen.clear();
}
else
@@ -995,8 +996,7 @@ void render_hud_attachments()
S32 use_occlusion = LLPipeline::sUseOcclusion;
LLPipeline::sUseOcclusion = 0;
- LLPipeline::sDisableShaders = TRUE;
-
+
//cull, sort, and render hud objects
static LLCullResult result;
LLSpatialGroup::sNoDelete = TRUE;
@@ -1036,7 +1036,6 @@ void render_hud_attachments()
gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
LLPipeline::sUseOcclusion = use_occlusion;
- LLPipeline::sDisableShaders = FALSE;
}
glMatrixMode(GL_PROJECTION);
glPopMatrix();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index a1c2c926af..6ae8e79be4 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -48,11 +48,14 @@
#include "llfloaterbulkpermission.h"
#include "llfloaterbump.h"
#include "llfloatercamera.h"
-#include "llfloaterdaycycle.h"
+#include "llfloaterdeleteenvpreset.h"
#include "llfloaterdisplayname.h"
+#include "llfloatereditdaycycle.h"
+#include "llfloatereditsky.h"
+#include "llfloatereditwater.h"
+#include "llfloaterenvironmentsettings.h"
#include "llfloaterevent.h"
#include "llfloatersearch.h"
-#include "llfloaterenvsettings.h"
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
@@ -101,9 +104,7 @@
#include "llfloatertopobjects.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
-#include "llfloaterwater.h"
#include "llfloaterwhitelistentry.h"
-#include "llfloaterwindlight.h"
#include "llfloaterwindowsize.h"
#include "llfloaterworldmap.h"
#include "llimfloatercontainer.h"
@@ -179,11 +180,12 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
- LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDayCycle>);
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
- LLFloaterReg::add("env_settings", "floater_env_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvSettings>);
- LLFloaterReg::add("env_water", "floater_water.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWater>);
- LLFloaterReg::add("env_windlight", "floater_windlight_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWindLight>);
+ LLFloaterReg::add("env_settings", "floater_environment_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvironmentSettings>);
+ LLFloaterReg::add("env_delete_preset", "floater_delete_env_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeleteEnvPreset>);
+ LLFloaterReg::add("env_edit_sky", "floater_edit_sky_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditSky>);
+ LLFloaterReg::add("env_edit_water", "floater_edit_water_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditWater>);
+ LLFloaterReg::add("env_edit_day_cycle", "floater_edit_day_cycle.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditDayCycle>);
LLFloaterReg::add("event", "floater_event.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEvent>);
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index 42f780a8a3..9101222393 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -128,8 +128,10 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE));
addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE));
-
addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+
+ addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE));
addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default"));
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 9fe8c142b9..3a3d4f3881 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -101,8 +101,9 @@ void LLViewerHelp::showTopic(const std::string &topic)
// work out the URL for this topic and display it
showHelp();
+
std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic );
- setRawURL( helpURL );
+ setRawURL(helpURL);
}
std::string LLViewerHelp::defaultTopic()
@@ -148,18 +149,7 @@ std::string LLViewerHelp::getTopicFromFocus()
// static
void LLViewerHelp::showHelp()
{
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- if (helpbrowser)
- {
- BOOL visible = TRUE;
- BOOL take_focus = TRUE;
- helpbrowser->setVisible(visible);
- helpbrowser->setFrontmost(take_focus);
- }
- else
- {
- llwarns << "Eep, help_browser floater not found" << llendl;
- }
+ LLFloaterReg::showInstance("help_browser");
}
// static
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9e58acdcd3..22666cec0d 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1269,7 +1269,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons
{
std::string type_name = userdata.asString();
- if (("category" == type_name) || ("current" == type_name) || ("outfit" == type_name) || ("my_otfts" == type_name))
+ if (("inbox" == type_name) || ("outbox" == type_name) || ("category" == type_name) || ("current" == type_name) || ("outfit" == type_name) || ("my_otfts" == type_name))
{
LLFolderType::EType preferred_type = LLFolderType::lookup(type_name);
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1e53274cd6..1be58eae45 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -64,8 +64,10 @@
#include "llappviewer.h"
#include "lllogininstance.h"
//#include "llfirstuse.h"
+#include "llviewernetwork.h"
#include "llwindow.h"
+
#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows.
#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
@@ -1360,6 +1362,34 @@ void LLViewerMedia::removeCookie(const std::string &name, const std::string &dom
}
+class LLInventoryUserStatusResponder : public LLHTTPClient::Responder
+{
+public:
+ LLInventoryUserStatusResponder()
+ : LLCurl::Responder()
+ {
+ }
+
+ void completed(U32 status, const std::string& reason, const LLSD& content)
+ {
+ if (isGoodStatus(status))
+ {
+ // Complete success
+ gSavedSettings.setBOOL("InventoryDisplayInbox", true);
+ }
+ else if (status == 401)
+ {
+ // API is available for use but OpenID authorization failed
+ gSavedSettings.setBOOL("InventoryDisplayInbox", true);
+ }
+ else
+ {
+ // API in unavailable
+ llinfos << "Marketplace API is unavailable -- Inbox may be disabled, status = " << status << ", reason = " << reason << llendl;
+ }
+ }
+};
+
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setOpenIDCookie()
@@ -1406,6 +1436,25 @@ void LLViewerMedia::setOpenIDCookie()
LLHTTPClient::get(profile_url,
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
+
+ std::string url = "https://marketplace.secondlife.com/";
+
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
+ url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str());
+ }
+
+ url += "api/1/users/";
+ url += gAgent.getID().getString();
+ url += "/user_status";
+
+ headers = LLSD::emptyMap();
+ headers["Accept"] = "*/*";
+ headers["Cookie"] = sOpenIDCookie;
+ headers["User-Agent"] = getCurrentUserAgent();
+
+ LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), headers);
}
}
@@ -2349,15 +2398,13 @@ void LLViewerMediaImpl::updateJavascriptObject()
if ( mMediaSource )
{
// flag to expose this information to internal browser or not.
- bool expose_javascript_object = gSavedSettings.getBOOL("BrowserEnableJSObject");
- mMediaSource->jsExposeObjectEvent( expose_javascript_object );
+ bool enable = gSavedSettings.getBOOL("BrowserEnableJSObject");
+ mMediaSource->jsEnableObject( enable );
- // indicate if the values we have are valid (currently do this blanket-fashion for
- // everything depending on whether you are logged in or not - this may require a
- // more granular approach once variables are added that ARE valid before login
+ // these values are only menaingful after login so don't set them before
bool logged_in = LLLoginInstance::getInstance()->authSuccess();
- mMediaSource->jsValuesValidEvent( logged_in );
-
+ if ( logged_in )
+ {
// current location within a region
LLVector3 agent_pos = gAgent.getPositionAgent();
double x = agent_pos.mV[ VX ];
@@ -2386,6 +2433,7 @@ void LLViewerMediaImpl::updateJavascriptObject()
region_name = region->getName();
};
mMediaSource->jsAgentRegionEvent( region_name );
+ }
// language code the viewer is set to
mMediaSource->jsAgentLanguageEvent( LLUI::getLanguage() );
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 41d8b57f36..a37f8ad0d8 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -45,6 +45,7 @@
#include "llcompilequeue.h"
#include "llconsole.h"
#include "lldebugview.h"
+#include "llenvmanager.h"
#include "llfilepicker.h"
#include "llfirstuse.h"
#include "llfloaterbuy.h"
@@ -107,6 +108,7 @@
#include "lltrans.h"
#include "lleconomy.h"
#include "lltoolgrab.h"
+#include "llwindow.h"
#include "boost/unordered_map.hpp"
using namespace LLVOAvatarDefines;
@@ -7582,74 +7584,85 @@ class LLWorldEnvSettings : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string tod = userdata.asString();
- LLVector3 sun_direction;
if (tod == "editor")
{
- // if not there or is hidden, show it
LLFloaterReg::toggleInstance("env_settings");
return true;
}
-
+
if (tod == "sunrise")
{
- // set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.25);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Sunrise");
}
else if (tod == "noon")
{
- // set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.567);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Midday");
}
else if (tod == "sunset")
{
- // set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.75);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Sunset");
}
else if (tod == "midnight")
{
- // set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.0);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
-
- // then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Midnight");
}
else
{
- LLWLParamManager::instance()->mAnimator.mIsRunning = true;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
+ LLEnvManagerNew::instance().setUseDayCycle(LLEnvManagerNew::instance().getDayCycleName());
}
+
return true;
}
};
-/// Water Menu callbacks
-class LLWorldWaterSettings : public view_listener_t
-{
+class LLWorldEnvPreset : public view_listener_t
+{
bool handleEvent(const LLSD& userdata)
{
- LLFloaterReg::toggleInstance("env_water");
+ std::string item = userdata.asString();
+
+ if (item == "new_water")
+ {
+ LLFloaterReg::showInstance("env_edit_water", "new");
+ }
+ else if (item == "edit_water")
+ {
+ LLFloaterReg::showInstance("env_edit_water", "edit");
+ }
+ else if (item == "delete_water")
+ {
+ LLFloaterReg::showInstance("env_delete_preset", "water");
+ }
+ else if (item == "new_sky")
+ {
+ LLFloaterReg::showInstance("env_edit_sky", "new");
+ }
+ else if (item == "edit_sky")
+ {
+ LLFloaterReg::showInstance("env_edit_sky", "edit");
+ }
+ else if (item == "delete_sky")
+ {
+ LLFloaterReg::showInstance("env_delete_preset", "sky");
+ }
+ else if (item == "new_day_cycle")
+ {
+ LLFloaterReg::showInstance("env_edit_day_cycle", "new");
+ }
+ else if (item == "edit_day_cycle")
+ {
+ LLFloaterReg::showInstance("env_edit_day_cycle", "edit");
+ }
+ else if (item == "delete_day_cycle")
+ {
+ LLFloaterReg::showInstance("env_delete_preset", "day_cycle");
+ }
+ else
+ {
+ llwarns << "Unknown item selected" << llendl;
+ }
+
return true;
}
};
@@ -7664,16 +7677,6 @@ class LLWorldPostProcess : public view_listener_t
}
};
-/// Day Cycle callbacks
-class LLWorldDayCycle : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterReg::showInstance("env_day_cycle");
- return true;
- }
-};
-
class LLWorldToggleMovementControls : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -7902,9 +7905,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
- view_listener_t::addMenu(new LLWorldWaterSettings(), "World.WaterSettings");
+ view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset");
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
- view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle");
view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls");
view_listener_t::addMenu(new LLWorldToggleCameraControls(), "World.Toggle.CameraControls");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 37640ad0d4..b9293b3b31 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -107,9 +107,7 @@ class LLMeshUploadVisible : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- return gSavedSettings.getBOOL("MeshEnabled") &&
- LLViewerParcelMgr::getInstance()->allowAgentBuild() &&
- !gAgent.getRegion()->getCapability("ObjectAdd").empty();
+ return gMeshRepo.meshUploadEnabled();
}
};
@@ -1203,78 +1201,6 @@ void upload_new_resource(
}
}
-BOOL upload_new_variable_price_resource(
- const LLTransactionID &tid,
- LLAssetType::EType asset_type,
- std::string name,
- std::string desc,
- LLFolderType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms,
- U32 group_perms,
- U32 everyone_perms,
- const std::string& display_name,
- const LLSD& asset_resources)
-{
- LLAssetID uuid =
- upload_new_resource_prep(
- tid,
- asset_type,
- inv_type,
- name,
- display_name,
- desc);
-
- llinfos << "*** Uploading: " << llendl;
- llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl;
- llinfos << "UUID: " << uuid << llendl;
- llinfos << "Name: " << name << llendl;
- llinfos << "Desc: " << desc << llendl;
- lldebugs << "Folder: "
- << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? (LLFolderType::EType)asset_type : destination_folder_type) << llendl;
- lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl;
-
- std::string url = gAgent.getRegion()->getCapability(
- "NewFileAgentInventoryVariablePrice");
-
- if ( !url.empty() )
- {
- lldebugs
- << "New Agent Inventory variable price upload" << llendl;
-
- // Each of the two capabilities has similar data, so
- // let's reuse that code
-
- LLSD body;
-
- body = generate_new_resource_upload_capability_body(
- asset_type,
- name,
- desc,
- destination_folder_type,
- inv_type,
- next_owner_perms,
- group_perms,
- everyone_perms);
-
- body["asset_resources"] = asset_resources;
-
- LLHTTPClient::post(
- url,
- body,
- new LLNewAgentInventoryVariablePriceResponder(
- uuid,
- asset_type,
- body));
-
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid)
{
if ( gDisconnected )
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 1597821504..3136358b83 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -68,23 +68,6 @@ void upload_new_resource(
S32 expected_upload_cost,
void *userdata);
-// TODO* : Move all uploads to use this new function
-// since at some point, that upload path will be deprecated and no longer
-// used
-
-// We make a new function here to ensure that previous code is not broken
-BOOL upload_new_variable_price_resource(
- const LLTransactionID& tid,
- LLAssetType::EType type,
- std::string name,
- std::string desc,
- LLFolderType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms,
- U32 group_perms,
- U32 everyone_perms,
- const std::string& display_name,
- const LLSD& asset_resources);
LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid);
void increase_new_upload_stats(LLAssetType::EType asset_type);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3832be727f..e934c38c22 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -37,6 +37,7 @@
#include "lleconomy.h"
#include "lleventtimer.h"
#include "llfloaterreg.h"
+#include "llfolderview.h"
#include "llfollowcamparams.h"
#include "llinventorydefines.h"
#include "lllslconstants.h"
@@ -87,6 +88,7 @@
#include "lluri.h"
#include "llviewergenericmessage.h"
#include "llviewermenu.h"
+#include "llviewerinventory.h"
#include "llviewerjoystick.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
@@ -96,7 +98,6 @@
#include "llviewerwindow.h"
#include "llvlmanager.h"
#include "llvoavatarself.h"
-#include "llvotextbubble.h"
#include "llworld.h"
#include "pipeline.h"
#include "llfloaterworldmap.h"
@@ -695,7 +696,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
return false;
}
-static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items, LLInventoryPanel *inventory_panel)
+static void highlight_inventory_objects_in_panel(const std::vector<LLUUID>& items, LLInventoryPanel *inventory_panel)
{
if (NULL == inventory_panel) return;
@@ -709,7 +710,7 @@ static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items,
continue;
}
- LLInventoryItem* item = gInventory.getItem(item_id);
+ LLInventoryObject* item = gInventory.getObject(item_id);
llassert(item);
if (!item) {
continue;
@@ -788,7 +789,6 @@ class LLViewerInventoryMoveFromWorldObserver : public LLInventoryAddItemByAssetO
public:
LLViewerInventoryMoveFromWorldObserver()
: LLInventoryAddItemByAssetObserver()
- , mActivePanel(NULL)
{
}
@@ -799,13 +799,16 @@ private:
/*virtual */void onAssetAdded(const LLUUID& asset_id)
{
// Store active Inventory panel.
- mActivePanel = LLInventoryPanel::getActiveInventoryPanel();
+ if (LLInventoryPanel::getActiveInventoryPanel())
+ {
+ mActivePanel = LLInventoryPanel::getActiveInventoryPanel()->getHandle();
+ }
// Store selected items (without destination folder)
mSelectedItems.clear();
- if (mActivePanel)
+ if (LLInventoryPanel::getActiveInventoryPanel())
{
- mSelectedItems = mActivePanel->getRootFolder()->getSelectionList();
+ mSelectedItems = LLInventoryPanel::getActiveInventoryPanel()->getRootFolder()->getSelectionList();
}
mSelectedItems.erase(mMoveIntoFolderID);
}
@@ -816,12 +819,14 @@ private:
*/
void done()
{
+ LLInventoryPanel* active_panel = dynamic_cast<LLInventoryPanel*>(mActivePanel.get());
+
// if selection is not changed since watch started lets hightlight new items.
- if (mActivePanel && !isSelectionChanged())
+ if (active_panel && !isSelectionChanged())
{
LL_DEBUGS("Inventory_Move") << "Selecting new items..." << LL_ENDL;
- mActivePanel->clearSelection();
- highlight_inventory_items_in_panel(mAddedItems, mActivePanel);
+ active_panel->clearSelection();
+ highlight_inventory_objects_in_panel(mAddedItems, active_panel);
}
}
@@ -829,16 +834,16 @@ private:
* Returns true if selected inventory items were changed since moved inventory items were started to watch.
*/
bool isSelectionChanged()
- {
- const LLInventoryPanel * const current_active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ {
+ LLInventoryPanel* active_panel = dynamic_cast<LLInventoryPanel*>(mActivePanel.get());
- if (NULL == mActivePanel || current_active_panel != mActivePanel)
+ if (NULL == active_panel)
{
return true;
}
// get selected items (without destination folder)
- selected_items_t selected_items = mActivePanel->getRootFolder()->getSelectionList();
+ selected_items_t selected_items = active_panel->getRootFolder()->getSelectionList();
selected_items.erase(mMoveIntoFolderID);
// compare stored & current sets of selected items
@@ -852,7 +857,7 @@ private:
return different_items.size() > 0;
}
- LLInventoryPanel *mActivePanel;
+ LLHandle<LLPanel> mActivePanel;
typedef std::set<LLUUID> selected_items_t;
selected_items_t mSelectedItems;
@@ -881,6 +886,75 @@ void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder
gInventoryMoveObserver->watchAsset(inv_item->getAssetUUID());
}
+
+/**
+ * Class to observe moving of items and to select them in inventory.
+ *
+ * Used currently for dragging from inbox to regular inventory folders
+ */
+
+class LLViewerInventoryMoveObserver : public LLInventoryObserver
+{
+public:
+
+ LLViewerInventoryMoveObserver(const LLUUID& object_id)
+ : LLInventoryObserver()
+ , mObjectID(object_id)
+ {
+ if (LLInventoryPanel::getActiveInventoryPanel())
+ {
+ mActivePanel = LLInventoryPanel::getActiveInventoryPanel()->getHandle();
+ }
+ }
+
+ virtual ~LLViewerInventoryMoveObserver() {}
+ virtual void changed(U32 mask);
+
+private:
+ LLUUID mObjectID;
+ LLHandle<LLPanel> mActivePanel;
+
+};
+
+void LLViewerInventoryMoveObserver::changed(U32 mask)
+{
+ LLInventoryPanel* active_panel = dynamic_cast<LLInventoryPanel*>(mActivePanel.get());
+
+ if (NULL == active_panel)
+ {
+ gInventory.removeObserver(this);
+ return;
+ }
+
+ if((mask & (LLInventoryObserver::STRUCTURE)) != 0)
+ {
+ const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
+
+ std::set<LLUUID>::const_iterator id_it = changed_items.begin();
+ std::set<LLUUID>::const_iterator id_end = changed_items.end();
+ for (;id_it != id_end; ++id_it)
+ {
+ if ((*id_it) == mObjectID)
+ {
+ active_panel->clearSelection();
+ std::vector<LLUUID> items;
+ items.push_back(mObjectID);
+ highlight_inventory_objects_in_panel(items, active_panel);
+ active_panel->getRootFolder()->scrollToShowSelection();
+
+ gInventory.removeObserver(this);
+ break;
+ }
+ }
+ }
+}
+
+void set_dad_inbox_object(const LLUUID& object_id)
+{
+ LLViewerInventoryMoveObserver* move_observer = new LLViewerInventoryMoveObserver(object_id);
+ gInventory.addObserver(move_observer);
+}
+
//unlike the FetchObserver for AgentOffer, we only make one
//instance of the AddedObserver for TaskOffers
//and it never dies. We do this because we don't know the UUID of
@@ -937,7 +1011,6 @@ protected:
//one global instance to bind them
LLOpenTaskOffer* gNewInventoryObserver=NULL;
-
class LLNewInventoryHintObserver : public LLInventoryAddedObserver
{
protected:
@@ -947,6 +1020,8 @@ protected:
}
};
+LLNewInventoryHintObserver* gNewInventoryHintObserver=NULL;
+
void start_new_inventory_observer()
{
if (!gNewInventoryObserver) //task offer observer
@@ -963,7 +1038,12 @@ void start_new_inventory_observer()
gInventory.addObserver(gInventoryMoveObserver);
}
- gInventory.addObserver(new LLNewInventoryHintObserver());
+ if (!gNewInventoryHintObserver)
+ {
+ // Observer is deleted by gInventory
+ gNewInventoryHintObserver = new LLNewInventoryHintObserver();
+ gInventory.addObserver(gNewInventoryHintObserver);
+ }
}
class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
@@ -1502,7 +1582,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString(".");
LLSD args;
args["MESSAGE"] = log_message;
- LLNotificationsUtil::add("SystemMessage", args);
+ LLNotificationsUtil::add("SystemMessageTip", args);
}
break;
@@ -1676,7 +1756,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString(".");
LLSD args;
args["MESSAGE"] = log_message;
- LLNotificationsUtil::add("SystemMessage", args);
+ LLNotificationsUtil::add("SystemMessageTip", args);
}
// we will want to open this item when it comes back.
@@ -1727,7 +1807,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
LLSD args;
args["MESSAGE"] = log_message;
- LLNotificationsUtil::add("SystemMessage", args);
+ LLNotificationsUtil::add("SystemMessageTip", args);
}
if (busy && (!mFromGroup && !mFromObject))
@@ -4228,15 +4308,8 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
// Display green bubble on kill
if ( gShowObjectUpdates )
{
- LLViewerObject* newobject;
- newobject = gObjectList.createObjectViewer(LL_PCODE_LEGACY_TEXT_BUBBLE, objectp->getRegion());
-
- LLVOTextBubble* bubble = (LLVOTextBubble*) newobject;
-
- bubble->mColor.setVec(0.f, 1.f, 0.f, 1.f);
- bubble->setScale( 2.0f * bubble->getScale() );
- bubble->setPositionGlobal(objectp->getPositionGlobal());
- gPipeline.addObject(bubble);
+ LLColor4 color(0.f,1.f,0.f,1.f);
+ gPipeline.addDebugBlip(objectp->getPositionAgent(), color);
}
// Do the kill
@@ -4273,8 +4346,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
- //LL_DEBUGS("Messaging") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
- // << ", " << phase << LL_ENDL;
+ LL_DEBUGS("Windlight Sync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
gSky.setSunPhase(phase);
gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
@@ -4333,6 +4405,12 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
return;
}
+ // Don't play sounds from gestures if they are not enabled.
+ if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds"))
+ {
+ return;
+ }
+
gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
}
@@ -6266,6 +6344,18 @@ void send_group_notice(const LLUUID& group_id,
bool handle_lure_callback(const LLSD& notification, const LLSD& response)
{
+ static const unsigned OFFER_RECIPIENT_LIMIT = 250;
+ if(notification["payload"]["ids"].size() > OFFER_RECIPIENT_LIMIT)
+ {
+ // More than OFFER_RECIPIENT_LIMIT targets will overload the message
+ // producing an llerror.
+ LLSD args;
+ args["OFFERS"] = notification["payload"]["ids"].size();
+ args["LIMIT"] = static_cast<int>(OFFER_RECIPIENT_LIMIT);
+ LLNotificationsUtil::add("TooManyTeleportOffers", args);
+ return false;
+ }
+
std::string text = response["message"].asString();
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
@@ -6483,10 +6573,14 @@ void process_script_dialog(LLMessageSystem* msg, void**)
LLSD payload;
LLUUID object_id;
- LLUUID owner_id;
-
msg->getUUID("Data", "ObjectID", object_id);
+
+// For compability with OS grids first check for presence of extended packet before fetching data.
+ LLUUID owner_id;
+ if (gMessageSystem->getNumberOfBlocks("OwnerData") > 0)
+ {
msg->getUUID("OwnerData", "OwnerID", owner_id);
+ }
if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id))
{
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index b4a9b8e677..9d09d9c01a 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -203,6 +203,8 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
bool highlight_offered_object(const LLUUID& obj_id);
void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid);
+void set_dad_inbox_object(const LLUUID& object_id);
+
class LLOfferInfo : public LLNotificationResponderInterface
{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e7878d8adf..972993202a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -81,7 +81,6 @@
#include "llviewerwindow.h" // For getSpinAxis
#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llvoclouds.h"
#include "llvograss.h"
#include "llvoground.h"
#include "llvolume.h"
@@ -89,7 +88,6 @@
#include "llvopartgroup.h"
#include "llvosky.h"
#include "llvosurfacepatch.h"
-#include "llvotextbubble.h"
#include "llvotree.h"
#include "llvovolume.h"
#include "llvowater.h"
@@ -168,10 +166,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
// llwarns << "Creating new tree!" << llendl;
// res = new LLVOTree(id, pcode, regionp); break;
res = NULL; break;
- case LL_PCODE_LEGACY_TEXT_BUBBLE:
- res = new LLVOTextBubble(id, pcode, regionp); break;
- case LL_VO_CLOUDS:
- res = new LLVOClouds(id, pcode, regionp); break;
case LL_VO_SURFACE_PATCH:
res = new LLVOSurfacePatch(id, pcode, regionp); break;
case LL_VO_SKY:
@@ -1894,7 +1888,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
//
- // WTF? If we're going to skip this message, why are we
+ // If we're going to skip this message, why are we
// doing all the parenting, etc above?
U32 packet_id = mesgsys->getCurrentRecvPacketID();
if (packet_id < mLatestRecvPacketID &&
@@ -1973,23 +1967,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if ( gShowObjectUpdates )
{
- if (!((mPrimitiveCode == LL_PCODE_LEGACY_AVATAR) && (((LLVOAvatar *) this)->isSelf()))
- && mRegionp)
+ LLColor4 color;
+ if (update_type == OUT_TERSE_IMPROVED)
{
- LLViewerObject* object = gObjectList.createObjectViewer(LL_PCODE_LEGACY_TEXT_BUBBLE, mRegionp);
- LLVOTextBubble* bubble = (LLVOTextBubble*) object;
-
- if (update_type == OUT_TERSE_IMPROVED)
- {
- bubble->mColor.setVec(0.f, 0.f, 1.f, 1.f);
- }
- else
- {
- bubble->mColor.setVec(1.f, 0.f, 0.f, 1.f);
- }
- object->setPositionGlobal(getPositionGlobal());
- gPipeline.addObject(object);
+ color.setVec(0.f, 0.f, 1.f, 1.f);
+ }
+ else
+ {
+ color.setVec(1.f, 0.f, 0.f, 1.f);
}
+ gPipeline.addDebugBlip(getPositionAgent(), color);
}
if ((0.0f == vel_mag_sq) &&
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index a0ad52df6b..7ebcee7b74 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -547,7 +547,7 @@ public:
//
typedef enum e_vo_types
{
- LL_VO_CLOUDS = LL_PCODE_APP | 0x20,
+ LL_VO_CLOUDS = LL_PCODE_APP | 0x20, // no longer used
LL_VO_SURFACE_PATCH = LL_PCODE_APP | 0x30,
LL_VO_WL_SKY = LL_PCODE_APP | 0x40,
LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50,
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 007b3416f1..9f882ee732 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -957,8 +957,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
iter != idle_list.end(); iter++)
{
objectp = *iter;
- if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS ||
- objectp->isAvatar())
+ if (objectp->isAvatar())
{
objectp->idleUpdate(agent, world, frame_time);
}
@@ -1418,12 +1417,12 @@ void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id)
mPendingObjectCost.erase(object_id);
}
-void LLViewerObjectList::updateQuotaCost( const LLUUID& objectId, const SelectionQuota& quota )
+void LLViewerObjectList::updateQuota( const LLUUID& objectId, const SelectionQuota& quota )
{
LLViewerObject* pVO = findObject( objectId );
if ( pVO )
{
- //pVO->updateQuota( quota );
+ pVO->updateQuota( quota );
}
}
@@ -1497,6 +1496,24 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
LLWorld::getInstance()->shiftRegions(offset);
}
+void LLViewerObjectList::repartitionObjects()
+{
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
+ {
+ LLViewerObject* objectp = *iter;
+ if (!objectp->isDead())
+ {
+ LLDrawable* drawable = objectp->mDrawable;
+ if (drawable && !drawable->isDead())
+ {
+ drawable->updateBinRadius();
+ drawable->updateSpatialExtents();
+ drawable->movePartition();
+ }
+ }
+ }
+}
+
//debug code
bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp)
{
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 8e211eaf73..9d1b5cb56f 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -102,9 +102,10 @@ public:
F32 restitution,
F32 gravity_multiplier);
- void updateQuotaCost( const LLUUID& objectId, const SelectionQuota& costs );
+ void updateQuota( const LLUUID& objectId, const SelectionQuota& costs );
void shiftObjects(const LLVector3 &offset);
+ void repartitionObjects();
bool hasMapObjectInRegion(LLViewerRegion* regionp) ;
void clearAllMapObjectsInRegion(LLViewerRegion* regionp) ;
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index faa86d43dd..252183b6d7 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -33,6 +33,8 @@
// in viewer.
// It is used to precompile headers for improved build speed.
+#include <boost/coroutine/coroutine.hpp>
+
#include "linden_common.h"
// Work around stupid Microsoft STL warning
@@ -118,8 +120,8 @@
// Library includes from llvfs
#include "lldir.h"
-
-// Library includes from llmessage project
+
+// Library includes from llmessage project
#include "llcachename.h"
#endif
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 590c82856d..bb7170e0f7 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -54,6 +54,7 @@
#include "llfloaterreporter.h"
#include "llfloaterregioninfo.h"
#include "llhttpnode.h"
+#include "llregioninfomodel.h"
#include "llsdutil.h"
#include "llstartup.h"
#include "lltrans.h"
@@ -64,11 +65,11 @@
#include "llvlmanager.h"
#include "llvlcomposition.h"
#include "llvocache.h"
-#include "llvoclouds.h"
#include "llworld.h"
#include "llspatialpartition.h"
#include "stringize.h"
#include "llviewercontrol.h"
+#include "llsdserialize.h"
#ifdef LL_WINDOWS
#pragma warning(disable:4355)
@@ -314,7 +315,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mImpl->mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER
mImpl->mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE
mImpl->mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE
- mImpl->mObjectPartition.push_back(new LLCloudPartition()); //PARTITION_CLOUD
mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
@@ -349,7 +349,6 @@ LLViewerRegion::~LLViewerRegion()
// Can't do this on destruction, because the neighbor pointers might be invalid.
// This should be reference counted...
disconnectAllNeighbors();
- mCloudLayer.destroy();
LLViewerPartSim::getInstance()->cleanupRegion(this);
gObjectList.killObjects(this);
@@ -485,7 +484,6 @@ void LLViewerRegion::setOriginGlobal(const LLVector3d &origin_global)
updateRenderMatrix();
mImpl->mLandp->setOriginGlobal(origin_global);
mWind.setOriginGlobal(origin_global);
- mCloudLayer.setOriginGlobal(origin_global);
calculateCenterGlobal();
}
@@ -646,6 +644,9 @@ std::string LLViewerRegion::accessToShortString(U8 sim_access)
void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**)
{
// send it to 'observers'
+ // *TODO: switch the floaters to using LLRegionInfoModel
+ llinfos << "Processing region info" << llendl;
+ LLRegionInfoModel::instance().update(msg);
LLFloaterGodTools::processRegionInfo(msg);
LLFloaterRegionInfo::processRegionInfo(msg);
LLFloaterReporter::processRegionInfo(msg);
@@ -708,14 +709,12 @@ void LLViewerRegion::forceUpdate()
void LLViewerRegion::connectNeighbor(LLViewerRegion *neighborp, U32 direction)
{
mImpl->mLandp->connectNeighbor(neighborp->mImpl->mLandp, direction);
- mCloudLayer.connectNeighbor(&(neighborp->mCloudLayer), direction);
}
void LLViewerRegion::disconnectAllNeighbors()
{
mImpl->mLandp->disconnectAllNeighbors();
- mCloudLayer.disconnectAllNeighbors();
}
LLVLComposition * LLViewerRegion::getComposition() const
@@ -1140,6 +1139,20 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
+void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features)
+{
+ sim_features = mSimulatorFeatures;
+}
+
+void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
+{
+ std::stringstream str;
+
+ LLSDSerialize::toPrettyXML(sim_features, str);
+ llinfos << str.str() << llendl;
+ mSimulatorFeatures = sim_features;
+}
+
LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp)
{
U32 local_id = objectp->getLocalID();
@@ -1480,6 +1493,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
LLSD capabilityNames = LLSD::emptyArray();
+ capabilityNames.append("AccountingParcel");
+ capabilityNames.append("AccountingSelection");
capabilityNames.append("AttachmentResources");
capabilityNames.append("AvatarPickerSearch");
capabilityNames.append("ChatSessionRequest");
@@ -1487,6 +1502,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("DispatchRegionInfo");
capabilityNames.append("EstateChangeInfo");
capabilityNames.append("EventQueueGet");
+ capabilityNames.append("EnvironmentSettings");
capabilityNames.append("ObjectMedia");
capabilityNames.append("ObjectMediaNavigate");
@@ -1509,8 +1525,6 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("MapLayer");
capabilityNames.append("MapLayerGod");
capabilityNames.append("NewFileAgentInventory");
- capabilityNames.append("NewFileAgentInventoryVariablePrice");
- capabilityNames.append("ObjectAdd");
capabilityNames.append("ParcelPropertiesUpdate");
capabilityNames.append("ParcelMediaURLFilterList");
capabilityNames.append("ParcelNavigateMedia");
@@ -1541,7 +1555,6 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("UpdateNotecardTaskInventory");
capabilityNames.append("UpdateScriptTask");
capabilityNames.append("UploadBakedTexture");
- capabilityNames.append("UploadObjectAsset");
capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");
@@ -1559,6 +1572,42 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
LLHTTPClient::post(url, capabilityNames, mImpl->mHttpResponderPtr);
}
+class SimulatorFeaturesReceived : public LLHTTPClient::Responder
+{
+ LOG_CLASS(SimulatorFeaturesReceived);
+public:
+ SimulatorFeaturesReceived(LLViewerRegion* region)
+ : mRegion(region)
+ { }
+
+
+ void error(U32 statusNum, const std::string& reason)
+ {
+ LL_WARNS2("AppInit", "SimulatorFeatures") << statusNum << ": " << reason << LL_ENDL;
+ }
+
+ void result(const LLSD& content)
+ {
+ if(!mRegion) //region is removed or responder is not created.
+ {
+ return ;
+ }
+
+ mRegion->setSimulatorFeatures(content);
+ }
+
+ static boost::intrusive_ptr<SimulatorFeaturesReceived> build(
+ LLViewerRegion* region)
+ {
+ return boost::intrusive_ptr<SimulatorFeaturesReceived>(
+ new SimulatorFeaturesReceived(region));
+ }
+
+private:
+ LLViewerRegion* mRegion;
+};
+
+
void LLViewerRegion::setCapability(const std::string& name, const std::string& url)
{
if(name == "EventQueueGet")
@@ -1571,6 +1620,11 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u
{
LLHTTPSender::setSender(mImpl->mHost, new LLCapHTTPSender(url));
}
+ else if (name == "SimulatorFeatures")
+ {
+ // kick off a request for simulator features
+ LLHTTPClient::get(url, new SimulatorFeaturesReceived(this));
+ }
else
{
mImpl->mCapabilities[name] = url;
@@ -1605,6 +1659,21 @@ bool LLViewerRegion::capabilitiesReceived() const
void LLViewerRegion::setCapabilitiesReceived(bool received)
{
mCapabilitiesReceived = received;
+
+ // Tell interested parties that we've received capabilities,
+ // so that they can safely use getCapability().
+ if (received)
+ {
+ mCapabilitiesReceivedSignal(getRegionID());
+
+ // This is a single-shot signal. Forget callbacks to save resources.
+ mCapabilitiesReceivedSignal.disconnect_all_slots();
+ }
+}
+
+boost::signals2::connection LLViewerRegion::setCapabilitiesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+ return mCapabilitiesReceivedSignal.connect(cb);
}
void LLViewerRegion::logActiveCapabilities() const
@@ -1664,3 +1733,16 @@ std::string LLViewerRegion::getDescription() const
return stringize(*this);
}
+bool LLViewerRegion::meshUploadEnabled() const
+{
+ return (mSimulatorFeatures.has("MeshUploadEnabled") &&
+ mSimulatorFeatures["MeshUploadEnabled"].asBoolean());
+}
+
+bool LLViewerRegion::meshRezEnabled() const
+{
+ return (mSimulatorFeatures.has("MeshRezEnabled") &&
+ mSimulatorFeatures["MeshRezEnabled"].asBoolean());
+}
+
+
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index a6e5c47b86..f68b51ea65 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -30,10 +30,10 @@
// A ViewerRegion is a class that contains a bunch of objects and surfaces
// that are in to a particular region.
#include <string>
+#include <boost/signals2.hpp>
#include "lldarray.h"
#include "llwind.h"
-#include "llcloud.h"
#include "llstat.h"
#include "v3dmath.h"
#include "llstring.h"
@@ -81,7 +81,6 @@ public:
PARTITION_WATER,
PARTITION_TREE,
PARTITION_PARTICLE,
- PARTITION_CLOUD,
PARTITION_GRASS,
PARTITION_VOLUME,
PARTITION_BRIDGE,
@@ -90,6 +89,8 @@ public:
NUM_PARTITIONS
} eObjectPartitions;
+ typedef boost::signals2::signal<void(const LLUUID& region_id)> caps_received_signal_t;
+
LLViewerRegion(const U64 &handle,
const LLHost &host,
const U32 surface_grid_width,
@@ -237,6 +238,7 @@ public:
// has region received its final (not seed) capability list?
bool capabilitiesReceived() const;
void setCapabilitiesReceived(bool received);
+ boost::signals2::connection setCapabilitiesReceivedCallback(const caps_received_signal_t::slot_type& cb);
static bool isSpecialCapabilityName(const std::string &name);
void logActiveCapabilities() const;
@@ -276,6 +278,11 @@ public:
void getInfo(LLSD& info);
+ bool meshRezEnabled() const;
+ bool meshUploadEnabled() const;
+
+ void getSimulatorFeatures(LLSD& info);
+ void setSimulatorFeatures(const LLSD& info);
typedef enum
{
@@ -331,7 +338,6 @@ protected:
public:
LLWind mWind;
- LLCloudLayer mCloudLayer;
LLViewerParcelOverlay *mParcelOverlay;
LLStat mBitStat;
@@ -399,8 +405,11 @@ private:
bool mAlive; // can become false if circuit disconnects
bool mCapabilitiesReceived;
+ caps_received_signal_t mCapabilitiesReceivedSignal;
BOOL mReleaseNotesRequested;
+
+ LLSD mSimulatorFeatures;
};
inline BOOL LLViewerRegion::getAllowDamage() const
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 3e85802ba6..e473901609 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -66,12 +66,20 @@ LLGLSLShader gObjectSimpleProgram;
LLGLSLShader gObjectSimpleWaterProgram;
LLGLSLShader gObjectFullbrightProgram;
LLGLSLShader gObjectFullbrightWaterProgram;
-
LLGLSLShader gObjectFullbrightShinyProgram;
LLGLSLShader gObjectFullbrightShinyWaterProgram;
LLGLSLShader gObjectShinyProgram;
LLGLSLShader gObjectShinyWaterProgram;
+LLGLSLShader gObjectSimpleNonIndexedProgram;
+LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
+LLGLSLShader gObjectFullbrightNonIndexedProgram;
+LLGLSLShader gObjectFullbrightNonIndexedWaterProgram;
+LLGLSLShader gObjectFullbrightShinyNonIndexedProgram;
+LLGLSLShader gObjectFullbrightShinyNonIndexedWaterProgram;
+LLGLSLShader gObjectShinyNonIndexedProgram;
+LLGLSLShader gObjectShinyNonIndexedWaterProgram;
+
//object hardware skinning shaders
LLGLSLShader gSkinnedObjectSimpleProgram;
LLGLSLShader gSkinnedObjectFullbrightProgram;
@@ -113,6 +121,7 @@ LLGLSLShader gDeferredImpostorProgram;
LLGLSLShader gDeferredEdgeProgram;
LLGLSLShader gDeferredWaterProgram;
LLGLSLShader gDeferredDiffuseProgram;
+LLGLSLShader gDeferredNonIndexedDiffuseProgram;
LLGLSLShader gDeferredSkinnedDiffuseProgram;
LLGLSLShader gDeferredSkinnedBumpProgram;
LLGLSLShader gDeferredSkinnedAlphaProgram;
@@ -132,13 +141,16 @@ LLGLSLShader gDeferredShadowProgram;
LLGLSLShader gDeferredAvatarShadowProgram;
LLGLSLShader gDeferredAttachmentShadowProgram;
LLGLSLShader gDeferredAlphaProgram;
+LLGLSLShader gDeferredAvatarEyesProgram;
LLGLSLShader gDeferredFullbrightProgram;
LLGLSLShader gDeferredGIProgram;
LLGLSLShader gDeferredGIFinalProgram;
LLGLSLShader gDeferredPostGIProgram;
LLGLSLShader gDeferredPostProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
-
+LLGLSLShader gDeferredWLSkyProgram;
+LLGLSLShader gDeferredWLCloudProgram;
+LLGLSLShader gDeferredStarProgram;
LLGLSLShader gLuminanceGatherProgram;
@@ -160,6 +172,10 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightProgram);
mShaderList.push_back(&gObjectFullbrightShinyProgram);
mShaderList.push_back(&gObjectFullbrightShinyWaterProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedProgram);
+ mShaderList.push_back(&gObjectFullbrightNonIndexedProgram);
+ mShaderList.push_back(&gObjectFullbrightShinyNonIndexedProgram);
+ mShaderList.push_back(&gObjectFullbrightShinyNonIndexedWaterProgram);
mShaderList.push_back(&gSkinnedObjectSimpleProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightShinyProgram);
@@ -183,6 +199,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredAlphaProgram);
mShaderList.push_back(&gDeferredSkinnedAlphaProgram);
mShaderList.push_back(&gDeferredFullbrightProgram);
+ mShaderList.push_back(&gDeferredAvatarEyesProgram);
mShaderList.push_back(&gDeferredPostGIProgram);
mShaderList.push_back(&gDeferredEdgeProgram);
mShaderList.push_back(&gDeferredPostProgram);
@@ -190,6 +207,9 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredGIFinalProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
+ mShaderList.push_back(&gDeferredWLSkyProgram);
+ mShaderList.push_back(&gDeferredWLCloudProgram);
+ mShaderList.push_back(&gDeferredStarProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -347,6 +367,10 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ //setup preprocessor definitions
+ LLShaderMgr::instance()->mDefinitions["samples"] = llformat("%d", gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples")));
+ LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
+
reentrance = true;
// Make sure the compiled shader map is cleared before we recompile shaders.
@@ -577,6 +601,16 @@ void LLViewerShaderMgr::unloadShaders()
gObjectFullbrightShinyWaterProgram.unload();
gObjectShinyWaterProgram.unload();
+ gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedWaterProgram.unload();
+ gObjectFullbrightNonIndexedProgram.unload();
+ gObjectFullbrightNonIndexedWaterProgram.unload();
+
+ gObjectShinyNonIndexedProgram.unload();
+ gObjectFullbrightShinyNonIndexedProgram.unload();
+ gObjectFullbrightShinyNonIndexedWaterProgram.unload();
+ gObjectShinyNonIndexedWaterProgram.unload();
+
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
gSkinnedObjectFullbrightShinyProgram.unload();
@@ -607,6 +641,7 @@ void LLViewerShaderMgr::unloadShaders()
gPostNightVisionProgram.unload();
gDeferredDiffuseProgram.unload();
+ gDeferredNonIndexedDiffuseProgram.unload();
gDeferredSkinnedDiffuseProgram.unload();
gDeferredSkinnedBumpProgram.unload();
gDeferredSkinnedAlphaProgram.unload();
@@ -685,24 +720,40 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
shaders.clear();
shaders.reserve(13);
- shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
- shaders.push_back( make_pair( "windlight/gammaF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT]) );
- shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
- shaders.push_back( make_pair( "windlight/transportF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
- shaders.push_back( make_pair( "environment/waterFogF.glsl", mVertexShaderLevel[SHADER_WATER] ) );
- shaders.push_back( make_pair( "lighting/lightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightFullbrightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightFullbrightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightFullbrightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
- shaders.push_back( make_pair( "lighting/lightFullbrightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ S32 ch = gGLManager.mNumTextureImageUnits-1;
+
+ if (gGLManager.mGLVersion < 3.1f)
+ { //force to 1 texture index channel for old drivers
+ ch = 1;
+ }
+
+ std::vector<S32> index_channels;
+ index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/gammaF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT]) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/transportF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "environment/waterFogF.glsl", mVertexShaderLevel[SHADER_WATER] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightShinyNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightShinyNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightShinyWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightShinyWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
for (U32 i = 0; i < shaders.size(); i++)
{
// Note usage of GL_FRAGMENT_SHADER_ARB
- if (loadShaderFile(shaders[i].first, shaders[i].second, GL_FRAGMENT_SHADER_ARB) == 0)
+ if (loadShaderFile(shaders[i].first, shaders[i].second, GL_FRAGMENT_SHADER_ARB, index_channels[i]) == 0)
{
return FALSE;
}
@@ -833,6 +884,9 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
{
BOOL success = TRUE;
+ U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+ bool multisample = samples > 1 && LLPipeline::sRenderDeferred && gGLManager.mHasTextureMultisample;
+
if (mVertexShaderLevel[SHADER_EFFECT] == 0)
{
gGlowProgram.unload();
@@ -858,10 +912,21 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "effects/glowExtractMSF.glsl";
+ }
+ else
+ {
+ fragment = "effects/glowExtractF.glsl";
+ }
+
gGlowExtractProgram.mName = "Glow Extract Shader (Post)";
gGlowExtractProgram.mShaderFiles.clear();
gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER_ARB));
- gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gGlowExtractProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gGlowExtractProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
success = gGlowExtractProgram.createShader(NULL, &mGlowExtractUniforms);
if (!success)
@@ -925,6 +990,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
gDeferredTreeProgram.unload();
gDeferredDiffuseProgram.unload();
+ gDeferredNonIndexedDiffuseProgram.unload();
gDeferredSkinnedDiffuseProgram.unload();
gDeferredSkinnedBumpProgram.unload();
gDeferredSkinnedAlphaProgram.unload();
@@ -945,6 +1011,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.unload();
gDeferredAlphaProgram.unload();
gDeferredFullbrightProgram.unload();
+ gDeferredAvatarEyesProgram.unload();
gDeferredPostGIProgram.unload();
gDeferredEdgeProgram.unload();
gDeferredPostProgram.unload();
@@ -952,6 +1019,9 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredGIProgram.unload();
gDeferredGIFinalProgram.unload();
gDeferredWaterProgram.unload();
+ gDeferredWLSkyProgram.unload();
+ gDeferredWLCloudProgram.unload();
+ gDeferredStarProgram.unload();
return TRUE;
}
@@ -959,18 +1029,33 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
BOOL success = TRUE;
+ U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+ bool multisample = samples > 1 && gGLManager.mHasTextureMultisample;
+
if (success)
{
gDeferredDiffuseProgram.mName = "Deferred Diffuse Shader";
gDeferredDiffuseProgram.mShaderFiles.clear();
gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredDiffuseProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
gDeferredDiffuseProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredDiffuseProgram.createShader(NULL, NULL);
}
if (success)
{
+ gDeferredNonIndexedDiffuseProgram.mName = "Non Indexed Deferred Diffuse Shader";
+ gDeferredNonIndexedDiffuseProgram.mShaderFiles.clear();
+ gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredNonIndexedDiffuseProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredNonIndexedDiffuseProgram.createShader(NULL, NULL);
+ }
+
+
+ if (success)
+ {
gDeferredSkinnedDiffuseProgram.mName = "Deferred Skinned Diffuse Shader";
gDeferredSkinnedDiffuseProgram.mFeatures.hasObjectSkinning = true;
gDeferredSkinnedDiffuseProgram.mShaderFiles.clear();
@@ -1000,9 +1085,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSkinnedAlphaProgram.mFeatures.hasGamma = true;
gDeferredSkinnedAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredSkinnedAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredSkinnedAlphaProgram.mShaderFiles.clear();
gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredSkinnedAlphaProgram.createShader(NULL, NULL);
}
@@ -1039,40 +1125,83 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "deferred/pointLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/pointLightF.glsl";
+ }
+
gDeferredLightProgram.mName = "Deferred Light Shader";
gDeferredLightProgram.mShaderFiles.clear();
gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredLightProgram.createShader(NULL, NULL);
}
if (success)
{
+ std::string fragment;
+ if (multisample)
+ {
+ fragment = "deferred/multiPointLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/multiPointLightF.glsl";
+ }
+
gDeferredMultiLightProgram.mName = "Deferred MultiLight Shader";
gDeferredMultiLightProgram.mShaderFiles.clear();
gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredMultiLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredMultiLightProgram.createShader(NULL, NULL);
}
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "deferred/spotLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/multiSpotLightF.glsl";
+ }
+
gDeferredSpotLightProgram.mName = "Deferred SpotLight Shader";
gDeferredSpotLightProgram.mShaderFiles.clear();
gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredSpotLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredSpotLightProgram.createShader(NULL, NULL);
}
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "deferred/multiSpotLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/multiSpotLightF.glsl";
+ }
+
gDeferredMultiSpotLightProgram.mName = "Deferred MultiSpotLight Shader";
gDeferredMultiSpotLightProgram.mShaderFiles.clear();
gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredMultiSpotLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredMultiSpotLightProgram.createShader(NULL, NULL);
}
@@ -1083,11 +1212,25 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
{
- fragment = "deferred/sunLightSSAOF.glsl";
+ if (multisample)
+ {
+ fragment = "deferred/sunLightSSAOMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/sunLightSSAOF.glsl";
+ }
}
else
{
- fragment = "deferred/sunLightF.glsl";
+ if (multisample)
+ {
+ fragment = "deferred/sunLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/sunLightF.glsl";
+ }
}
gDeferredSunProgram.mName = "Deferred Sun Shader";
@@ -1100,10 +1243,21 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "deferred/blurLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/blurLightF.glsl";
+ }
+
gDeferredBlurLightProgram.mName = "Deferred Blur Light Shader";
gDeferredBlurLightProgram.mShaderFiles.clear();
gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredBlurLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredBlurLightProgram.createShader(NULL, NULL);
}
@@ -1116,6 +1270,16 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mFeatures.hasGamma = true;
gDeferredAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredAlphaProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
+ if (mVertexShaderLevel[SHADER_DEFERRED] < 1)
+ {
+ gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
+ }
+ else
+ { //shave off some texture units for shadow maps
+ gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits - 6;
+ }
+
gDeferredAlphaProgram.mShaderFiles.clear();
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1125,11 +1289,25 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gDeferredAvatarEyesProgram.mName = "Deferred Avatar Eyes Shader";
+ gDeferredAvatarEyesProgram.mFeatures.calculatesAtmospherics = true;
+ gDeferredAvatarEyesProgram.mFeatures.hasGamma = true;
+ gDeferredAvatarEyesProgram.mFeatures.hasTransport = true;
+ gDeferredAvatarEyesProgram.mFeatures.disableTextureIndex = true;
+ gDeferredAvatarEyesProgram.mShaderFiles.clear();
+ gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/avatarEyesV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredAvatarEyesProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredAvatarEyesProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gDeferredFullbrightProgram.mName = "Deferred Fullbright Shader";
gDeferredFullbrightProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightProgram.mFeatures.hasGamma = true;
gDeferredFullbrightProgram.mFeatures.hasTransport = true;
- gDeferredFullbrightProgram.mFeatures.isFullbright = true;
+ gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
gDeferredFullbrightProgram.mShaderFiles.clear();
gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1153,10 +1331,21 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ std::string fragment;
+
+ if (multisample)
+ {
+ fragment = "deferred/softenLightMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/softenLightF.glsl";
+ }
+
gDeferredSoftenProgram.mName = "Deferred Soften Shader";
gDeferredSoftenProgram.mShaderFiles.clear();
gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredSoftenProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredSoftenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
@@ -1230,41 +1419,106 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true;
gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredAvatarAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarAlphaProgram.mShaderFiles.clear();
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredAvatarAlphaProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
}
if (success)
{
+ std::string fragment;
+ if (multisample)
+ {
+ fragment = "deferred/postDeferredMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/postDeferredF.glsl";
+ }
+
gDeferredPostProgram.mName = "Deferred Post Shader";
gDeferredPostProgram.mShaderFiles.clear();
gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredPostProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredPostProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredPostProgram.createShader(NULL, NULL);
}
if (success)
{
+ std::string fragment;
+ if (multisample)
+ {
+ fragment = "deferred/postDeferredNoDoFMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/postDeferredNoDoFF.glsl";
+ }
+
gDeferredPostNoDoFProgram.mName = "Deferred Post Shader";
gDeferredPostNoDoFProgram.mShaderFiles.clear();
gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoDoFF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredPostNoDoFProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredPostNoDoFProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gDeferredWLSkyProgram.mName = "Deferred Windlight Sky Shader";
+ //gWLSkyProgram.mFeatures.hasGamma = true;
+ gDeferredWLSkyProgram.mShaderFiles.clear();
+ gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredWLSkyProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gDeferredWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gDeferredWLSkyProgram.createShader(NULL, &mWLUniforms);
+ }
+
+ if (success)
+ {
+ gDeferredWLCloudProgram.mName = "Deferred Windlight Cloud Program";
+ gDeferredWLCloudProgram.mShaderFiles.clear();
+ gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredWLCloudProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gDeferredWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gDeferredWLCloudProgram.createShader(NULL, &mWLUniforms);
+ }
+
+ if (success)
+ {
+ gDeferredStarProgram.mName = "Deferred Star Program";
+ gDeferredStarProgram.mShaderFiles.clear();
+ gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredStarProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gDeferredStarProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
+ }
+
if (mVertexShaderLevel[SHADER_DEFERRED] > 1)
{
if (success)
{
+ std::string fragment;
+ if (multisample)
+ {
+ fragment = "deferred/edgeMSF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/edgeF.glsl";
+ }
+
gDeferredEdgeProgram.mName = "Deferred Edge Shader";
gDeferredEdgeProgram.mShaderFiles.clear();
gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredEdgeProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredEdgeProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredEdgeProgram.createShader(NULL, NULL);
}
@@ -1272,8 +1526,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (mVertexShaderLevel[SHADER_DEFERRED] > 2)
{
-
-
if (success)
{
gDeferredPostGIProgram.mName = "Deferred Post GI Shader";
@@ -1321,7 +1573,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
BOOL LLViewerShaderMgr::loadShadersObject()
{
BOOL success = TRUE;
-
+
if (mVertexShaderLevel[SHADER_OBJECT] == 0)
{
gObjectShinyProgram.unload();
@@ -1332,6 +1584,14 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectSimpleWaterProgram.unload();
gObjectFullbrightProgram.unload();
gObjectFullbrightWaterProgram.unload();
+ gObjectShinyNonIndexedProgram.unload();
+ gObjectFullbrightShinyNonIndexedProgram.unload();
+ gObjectFullbrightShinyNonIndexedWaterProgram.unload();
+ gObjectShinyNonIndexedWaterProgram.unload();
+ gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedWaterProgram.unload();
+ gObjectFullbrightNonIndexedProgram.unload();
+ gObjectFullbrightNonIndexedWaterProgram.unload();
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
gSkinnedObjectFullbrightShinyProgram.unload();
@@ -1346,12 +1606,144 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectSimpleNonIndexedProgram.mName = "Non indexed Shader";
+ gObjectSimpleNonIndexedProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectSimpleNonIndexedProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectSimpleNonIndexedProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectSimpleNonIndexedWaterProgram.mName = "Non indexed Water Shader";
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectSimpleNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectSimpleNonIndexedWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightNonIndexedProgram.mName = "Non Indexed Fullbright Shader";
+ gObjectFullbrightNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectFullbrightNonIndexedProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightNonIndexedProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightNonIndexedProgram.mShaderFiles.clear();
+ gObjectFullbrightNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectFullbrightNonIndexedProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightNonIndexedWaterProgram.mName = "Non Indexed Fullbright Water Shader";
+ gObjectFullbrightNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightNonIndexedWaterProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectFullbrightNonIndexedWaterProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectFullbrightNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectFullbrightNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectFullbrightNonIndexedWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectShinyNonIndexedProgram.mName = "Non Indexed Shiny Shader";
+ gObjectShinyNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectShinyNonIndexedProgram.mFeatures.calculatesLighting = true;
+ gObjectShinyNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectShinyNonIndexedProgram.mFeatures.hasAtmospherics = true;
+ gObjectShinyNonIndexedProgram.mFeatures.isShiny = true;
+ gObjectShinyNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectShinyNonIndexedProgram.mShaderFiles.clear();
+ gObjectShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectShinyNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectShinyNonIndexedProgram.createShader(NULL, &mShinyUniforms);
+ }
+
+ if (success)
+ {
+ gObjectShinyNonIndexedWaterProgram.mName = "Non Indexed Shiny Water Shader";
+ gObjectShinyNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectShinyNonIndexedWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectShinyNonIndexedWaterProgram.mFeatures.isShiny = true;
+ gObjectShinyNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectShinyNonIndexedWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectShinyNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectShinyNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectShinyNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectShinyNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectShinyNonIndexedWaterProgram.createShader(NULL, &mShinyUniforms);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightShinyNonIndexedProgram.mName = "Non Indexed Fullbright Shiny Shader";
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.isShiny = true;
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightShinyNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightShinyNonIndexedProgram.mShaderFiles.clear();
+ gObjectFullbrightShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightShinyNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectFullbrightShinyNonIndexedProgram.createShader(NULL, &mShinyUniforms);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightShinyNonIndexedWaterProgram.mName = "Non Indexed Fullbright Shiny Water Shader";
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.isShiny = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.hasGamma = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightShinyNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectFullbrightShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightShinyNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectFullbrightShinyNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectFullbrightShinyNonIndexedWaterProgram.createShader(NULL, &mShinyUniforms);
+ }
+
+ if (success)
+ {
gObjectSimpleProgram.mName = "Simple Shader";
gObjectSimpleProgram.mFeatures.calculatesLighting = true;
gObjectSimpleProgram.mFeatures.calculatesAtmospherics = true;
gObjectSimpleProgram.mFeatures.hasGamma = true;
gObjectSimpleProgram.mFeatures.hasAtmospherics = true;
gObjectSimpleProgram.mFeatures.hasLighting = true;
+ gObjectSimpleProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectSimpleProgram.mShaderFiles.clear();
gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1367,6 +1759,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectSimpleWaterProgram.mFeatures.hasWaterFog = true;
gObjectSimpleWaterProgram.mFeatures.hasAtmospherics = true;
gObjectSimpleWaterProgram.mFeatures.hasLighting = true;
+ gObjectSimpleWaterProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectSimpleWaterProgram.mShaderFiles.clear();
gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1382,6 +1775,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightProgram.mFeatures.hasGamma = true;
gObjectFullbrightProgram.mFeatures.hasTransport = true;
gObjectFullbrightProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectFullbrightProgram.mShaderFiles.clear();
gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1396,6 +1790,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightWaterProgram.mFeatures.isFullbright = true;
gObjectFullbrightWaterProgram.mFeatures.hasWaterFog = true;
gObjectFullbrightWaterProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightWaterProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectFullbrightWaterProgram.mShaderFiles.clear();
gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1412,6 +1807,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyProgram.mFeatures.hasGamma = true;
gObjectShinyProgram.mFeatures.hasAtmospherics = true;
gObjectShinyProgram.mFeatures.isShiny = true;
+ gObjectShinyProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectShinyProgram.mShaderFiles.clear();
gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1427,6 +1823,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyWaterProgram.mFeatures.isShiny = true;
gObjectShinyWaterProgram.mFeatures.hasWaterFog = true;
gObjectShinyWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectShinyWaterProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectShinyWaterProgram.mShaderFiles.clear();
gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1443,6 +1840,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyProgram.mFeatures.isShiny = true;
gObjectFullbrightShinyProgram.mFeatures.hasGamma = true;
gObjectFullbrightShinyProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectFullbrightShinyProgram.mShaderFiles.clear();
gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1459,6 +1857,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyWaterProgram.mFeatures.hasGamma = true;
gObjectFullbrightShinyWaterProgram.mFeatures.hasTransport = true;
gObjectFullbrightShinyWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectFullbrightShinyWaterProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectFullbrightShinyWaterProgram.mShaderFiles.clear();
gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1478,6 +1877,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectSimpleProgram.mFeatures.hasAtmospherics = true;
gSkinnedObjectSimpleProgram.mFeatures.hasLighting = true;
gSkinnedObjectSimpleProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectSimpleProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectSimpleProgram.mShaderFiles.clear();
gSkinnedObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1493,6 +1893,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightProgram.mFeatures.hasTransport = true;
gSkinnedObjectFullbrightProgram.mFeatures.isFullbright = true;
gSkinnedObjectFullbrightProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectFullbrightProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectFullbrightProgram.mShaderFiles.clear();
gSkinnedObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1509,6 +1910,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightShinyProgram.mFeatures.isShiny = true;
gSkinnedObjectFullbrightShinyProgram.mFeatures.isFullbright = true;
gSkinnedObjectFullbrightShinyProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectFullbrightShinyProgram.mShaderFiles.clear();
gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1525,6 +1927,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectShinySimpleProgram.mFeatures.hasAtmospherics = true;
gSkinnedObjectShinySimpleProgram.mFeatures.hasObjectSkinning = true;
gSkinnedObjectShinySimpleProgram.mFeatures.isShiny = true;
+ gSkinnedObjectShinySimpleProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectShinySimpleProgram.mShaderFiles.clear();
gSkinnedObjectShinySimpleProgram.mShaderFiles.push_back(make_pair("objects/shinySimpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectShinySimpleProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1540,9 +1943,11 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectSimpleWaterProgram.mFeatures.hasGamma = true;
gSkinnedObjectSimpleWaterProgram.mFeatures.hasAtmospherics = true;
gSkinnedObjectSimpleWaterProgram.mFeatures.hasLighting = true;
+ gSkinnedObjectSimpleWaterProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectSimpleWaterProgram.mFeatures.hasWaterFog = true;
gSkinnedObjectSimpleWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
gSkinnedObjectSimpleWaterProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectSimpleWaterProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectSimpleWaterProgram.mShaderFiles.clear();
gSkinnedObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1559,6 +1964,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightWaterProgram.mFeatures.isFullbright = true;
gSkinnedObjectFullbrightWaterProgram.mFeatures.hasObjectSkinning = true;
gSkinnedObjectFullbrightWaterProgram.mFeatures.hasWaterFog = true;
+ gSkinnedObjectFullbrightWaterProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectFullbrightWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
gSkinnedObjectFullbrightWaterProgram.mShaderFiles.clear();
gSkinnedObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1577,6 +1983,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightShinyWaterProgram.mFeatures.isFullbright = true;
gSkinnedObjectFullbrightShinyWaterProgram.mFeatures.hasObjectSkinning = true;
gSkinnedObjectFullbrightShinyWaterProgram.mFeatures.hasWaterFog = true;
+ gSkinnedObjectFullbrightShinyWaterProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectFullbrightShinyWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
gSkinnedObjectFullbrightShinyWaterProgram.mShaderFiles.clear();
gSkinnedObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1595,6 +2002,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectShinySimpleWaterProgram.mFeatures.hasObjectSkinning = true;
gSkinnedObjectShinySimpleWaterProgram.mFeatures.isShiny = true;
gSkinnedObjectShinySimpleWaterProgram.mFeatures.hasWaterFog = true;
+ gSkinnedObjectShinySimpleWaterProgram.mFeatures.disableTextureIndex = true;
gSkinnedObjectShinySimpleWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
gSkinnedObjectShinySimpleWaterProgram.mShaderFiles.clear();
gSkinnedObjectShinySimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/shinySimpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1635,6 +2043,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarProgram.mFeatures.hasGamma = true;
gAvatarProgram.mFeatures.hasAtmospherics = true;
gAvatarProgram.mFeatures.hasLighting = true;
+ gAvatarProgram.mFeatures.disableTextureIndex = true;
gAvatarProgram.mShaderFiles.clear();
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1650,6 +2059,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarWaterProgram.mFeatures.hasWaterFog = true;
gAvatarWaterProgram.mFeatures.hasAtmospherics = true;
gAvatarWaterProgram.mFeatures.hasLighting = true;
+ gAvatarWaterProgram.mFeatures.disableTextureIndex = true;
gAvatarWaterProgram.mShaderFiles.clear();
gAvatarWaterProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1670,6 +2080,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
{
gAvatarPickProgram.mName = "Avatar Pick Shader";
gAvatarPickProgram.mFeatures.hasSkinning = true;
+ gAvatarPickProgram.mFeatures.disableTextureIndex = true;
gAvatarPickProgram.mShaderFiles.clear();
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1686,6 +2097,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarEyeballProgram.mFeatures.hasGamma = true;
gAvatarEyeballProgram.mFeatures.hasAtmospherics = true;
gAvatarEyeballProgram.mFeatures.hasLighting = true;
+ gAvatarEyeballProgram.mFeatures.disableTextureIndex = true;
gAvatarEyeballProgram.mShaderFiles.clear();
gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1777,6 +2189,16 @@ std::string LLViewerShaderMgr::getShaderDirPrefix(void)
void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader)
{
- LLWLParamManager::instance()->updateShaderUniforms(shader);
- LLWaterParamManager::instance()->updateShaderUniforms(shader);
+ LLWLParamManager::getInstance()->updateShaderUniforms(shader);
+ LLWaterParamManager::getInstance()->updateShaderUniforms(shader);
+}
+
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::beginShaders() const
+{
+ return mShaderList.begin();
+}
+
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::endShaders() const
+{
+ return mShaderList.end();
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 72ac5e02ee..efef9ec5b2 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -241,20 +241,12 @@ public:
base_iter_t mIter;
};
- shader_iter beginShaders() const
- {
- return mShaderList.begin();
- }
-
- shader_iter endShaders() const
- {
- return mShaderList.end();
- }
+ shader_iter beginShaders() const;
+ shader_iter endShaders() const;
+ /* virtual */ std::string getShaderDirPrefix(void);
- /* virtual */ std::string getShaderDirPrefix(void); // Virtual
-
- /* virtual */ void updateShaderUniforms(LLGLSLShader * shader); // Virtual
+ /* virtual */ void updateShaderUniforms(LLGLSLShader * shader);
private:
@@ -298,16 +290,25 @@ extern LLVector4 gShinyOrigin;
//object shaders
extern LLGLSLShader gObjectSimpleProgram;
extern LLGLSLShader gObjectSimpleWaterProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
extern LLGLSLShader gObjectFullbrightProgram;
extern LLGLSLShader gObjectFullbrightWaterProgram;
+extern LLGLSLShader gObjectFullbrightNonIndexedProgram;
+extern LLGLSLShader gObjectFullbrightNonIndexedWaterProgram;
extern LLGLSLShader gObjectSimpleLODProgram;
extern LLGLSLShader gObjectFullbrightLODProgram;
extern LLGLSLShader gObjectFullbrightShinyProgram;
extern LLGLSLShader gObjectFullbrightShinyWaterProgram;
+extern LLGLSLShader gObjectFullbrightShinyNonIndexedProgram;
+extern LLGLSLShader gObjectFullbrightShinyNonIndexedWaterProgram;
+
extern LLGLSLShader gObjectShinyProgram;
extern LLGLSLShader gObjectShinyWaterProgram;
+extern LLGLSLShader gObjectShinyNonIndexedProgram;
+extern LLGLSLShader gObjectShinyNonIndexedWaterProgram;
extern LLGLSLShader gSkinnedObjectSimpleProgram;
extern LLGLSLShader gSkinnedObjectFullbrightProgram;
@@ -349,6 +350,7 @@ extern LLGLSLShader gDeferredImpostorProgram;
extern LLGLSLShader gDeferredEdgeProgram;
extern LLGLSLShader gDeferredWaterProgram;
extern LLGLSLShader gDeferredDiffuseProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseProgram;
extern LLGLSLShader gDeferredSkinnedDiffuseProgram;
extern LLGLSLShader gDeferredSkinnedBumpProgram;
extern LLGLSLShader gDeferredSkinnedAlphaProgram;
@@ -373,8 +375,11 @@ extern LLGLSLShader gDeferredAvatarShadowProgram;
extern LLGLSLShader gDeferredAttachmentShadowProgram;
extern LLGLSLShader gDeferredAlphaProgram;
extern LLGLSLShader gDeferredFullbrightProgram;
+extern LLGLSLShader gDeferredAvatarEyesProgram;
extern LLGLSLShader gDeferredAvatarAlphaProgram;
-
+extern LLGLSLShader gDeferredWLSkyProgram;
+extern LLGLSLShader gDeferredWLCloudProgram;
+extern LLGLSLShader gDeferredStarProgram;
extern LLGLSLShader gLuminanceGatherProgram;
//current avatar shader parameter pointer
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index af06421bf9..4da0f80a00 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1168,6 +1168,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mSavedRawDiscardLevel = -1 ;
mDesiredSavedRawDiscardLevel = -1 ;
mLastReferencedSavedRawImageTime = 0.0f ;
+ mKeptSavedRawImageTime = 0.f ;
mLastCallBackActiveTime = 0.f;
}
@@ -2696,8 +2697,16 @@ void LLViewerFetchedTexture::saveRawImage()
mLastReferencedSavedRawImageTime = sCurrentTime ;
}
-void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard)
+void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_time)
{
+ mKeptSavedRawImageTime = kept_time ;
+ mLastReferencedSavedRawImageTime = sCurrentTime ;
+
+ if(mSavedRawDiscardLevel > -1 && mSavedRawDiscardLevel <= desired_discard)
+ {
+ return ; //raw imge is ready.
+ }
+
if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)
{
mForceToSaveRawImage = TRUE ;
@@ -2713,11 +2722,16 @@ void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard)
mRawImage = NULL ;
mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
- }
+ }
}
}
void LLViewerFetchedTexture::destroySavedRawImage()
{
+ if(mLastReferencedSavedRawImageTime < mKeptSavedRawImageTime)
+ {
+ return ; //keep the saved raw image.
+ }
+
mForceToSaveRawImage = FALSE ;
mSaveRawImage = FALSE ;
@@ -2729,6 +2743,7 @@ void LLViewerFetchedTexture::destroySavedRawImage()
mSavedRawDiscardLevel = -1 ;
mDesiredSavedRawDiscardLevel = -1 ;
mLastReferencedSavedRawImageTime = 0.0f ;
+ mKeptSavedRawImageTime = 0.f ;
}
LLImageRaw* LLViewerFetchedTexture::getSavedRawImage()
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index d512f8ec3a..c5b8c8923a 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -465,7 +465,7 @@ public:
S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;}
BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;}
BOOL isRawImageValid()const { return mIsRawImageValid ; }
- void forceToSaveRawImage(S32 desired_discard = 0) ;
+ void forceToSaveRawImage(S32 desired_discard = 0, F32 kept_time = 0.f) ;
/*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
void destroySavedRawImage() ;
LLImageRaw* getSavedRawImage() ;
@@ -550,6 +550,7 @@ protected:
S32 mSavedRawDiscardLevel;
S32 mDesiredSavedRawDiscardLevel;
F32 mLastReferencedSavedRawImageTime ;
+ F32 mKeptSavedRawImageTime ;
//a small version of the copy of the raw image (<= 64 * 64)
LLPointer<LLImageRaw> mCachedRawImage;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 1ffae7ce83..d24174adea 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -76,7 +76,6 @@ LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE);
LLViewerTextureList gTextureList;
static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
-U32 LLViewerTextureList::sRenderThreadID = 0 ;
///////////////////////////////////////////////////////////////////////////////
LLViewerTextureList::LLViewerTextureList()
@@ -90,7 +89,6 @@ LLViewerTextureList::LLViewerTextureList()
void LLViewerTextureList::init()
{
- sRenderThreadID = LLThread::currentID() ;
mInitialized = TRUE ;
sNumImages = 0;
mUpdateStats = TRUE;
@@ -281,6 +279,8 @@ void LLViewerTextureList::shutdown()
mUUIDMap.clear();
mImageList.clear();
+
+ mInitialized = FALSE ; //prevent loading textures again.
}
void LLViewerTextureList::dump()
@@ -328,6 +328,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
+ if(!mInitialized)
+ {
+ return NULL ;
+ }
+
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
@@ -348,6 +353,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
+ if(!mInitialized)
+ {
+ return NULL ;
+ }
+
// generate UUID based on hash of filename
LLUUID new_id;
if (force_id.notNull())
@@ -407,6 +417,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
LLGLenum primary_format,
LLHost request_from_host)
{
+ if(!mInitialized)
+ {
+ return NULL ;
+ }
+
// Return the image with ID image_id
// If the image is not found, creates new image and
// enqueues a request for transmission
@@ -485,10 +500,9 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id)
return iter->second;
}
-void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thread_id)
+void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
{
llassert_always(mInitialized) ;
- llassert_always(sRenderThreadID == thread_id);
llassert(image);
if (image->isInImageList())
{
@@ -502,10 +516,9 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thre
image->setInImageList(TRUE) ;
}
-void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id)
+void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
{
llassert_always(mInitialized) ;
- llassert_always(sRenderThreadID == thread_id);
llassert(image);
if (!image->isInImageList())
{
@@ -642,10 +655,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding
const F32 MAX_INACTIVE_TIME = 50.f; // actually delete
S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
- if (imagep->hasCallbacks())
- {
- min_refs++; // Add an extra reference if we're on the loaded callback list
- }
+
S32 num_refs = imagep->getNumRefs();
if (num_refs == min_refs)
{
@@ -702,9 +712,9 @@ void LLViewerTextureList::updateImagesDecodePriorities()
if ((decode_priority_test < old_priority_test * .8f) ||
(decode_priority_test > old_priority_test * 1.25f))
{
- removeImageFromList(imagep, sRenderThreadID);
+ removeImageFromList(imagep);
imagep->setDecodePriority(decode_priority);
- addImageToList(imagep, sRenderThreadID);
+ addImageToList(imagep);
}
update_counter--;
}
@@ -876,8 +886,6 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
{
LLTimer timer;
- llassert_always(sRenderThreadID == LLThread::currentID());
-
// Update texture stats and priorities
std::vector<LLPointer<LLViewerFetchedTexture> > image_list;
for (image_priority_list_t::iterator iter = mImageList.begin();
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index d02b6be6b5..7f4dd0ae88 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -121,8 +121,8 @@ private:
void addImage(LLViewerFetchedTexture *image);
void deleteImage(LLViewerFetchedTexture *image);
- void addImageToList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID());
- void removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID());
+ void addImageToList(LLViewerFetchedTexture *image);
+ void removeImageFromList(LLViewerFetchedTexture *image);
LLViewerFetchedTexture * getImage(const LLUUID &image_id,
BOOL usemipmap = TRUE,
@@ -208,9 +208,6 @@ public:
private:
static S32 sNumImages;
static void (*sUUIDCallback)(void**, const LLUUID &);
-
- //debug use
- static U32 sRenderThreadID;
};
class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList>
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 34d15a597e..cff166b825 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -601,7 +601,7 @@ public:
ypos += y_inc;
- if (gSavedSettings.getBOOL("MeshEnabled"))
+ if (gMeshRepo.meshRezEnabled())
{
addText(xpos, ypos, llformat("%.3f MB Mesh Data Received", LLMeshRepository::sBytesReceived/(1024.f*1024.f)));
@@ -1979,7 +1979,10 @@ void LLViewerWindow::shutdownViews()
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
+ if (LLNavigationBar::instanceExists())
+ {
delete LLNavigationBar::getInstance();
+ }
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
@@ -4512,6 +4515,14 @@ void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset)
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
}
+void LLViewerWindow::revealIntroPanel()
+{
+ if (mProgressView)
+ {
+ mProgressView->revealIntroPanel();
+ }
+}
+
void LLViewerWindow::setShowProgress(const BOOL show)
{
if (mProgressView)
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index df6928aa1d..ff49ed1f62 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -271,6 +271,7 @@ public:
void setProgressMessage(const std::string& msg);
void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null );
LLProgressView *getProgressView() const;
+ void revealIntroPanel();
void updateObjectUnderCursor();
diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp
index 25f2687fe2..d8de979f56 100644
--- a/indra/newview/llvlmanager.cpp
+++ b/indra/newview/llvlmanager.cpp
@@ -94,7 +94,7 @@ void LLVLManager::unpackData(const S32 num_packets)
}
else if (CLOUD_LAYER_CODE == datap->mType)
{
- datap->mRegionp->mCloudLayer.decompress(bit_pack, &goph);
+
}
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ec2b5a4c98..3f98df9eb9 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -56,6 +56,7 @@
#include "lleditingmotion.h"
#include "llemote.h"
//#include "llfirstuse.h"
+#include "llfloatertools.h"
#include "llheadrotmotion.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
@@ -1541,7 +1542,35 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
return TRUE;
}
}
+
+ if (isSelf())
+ {
+ for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment* attachment = iter->second;
+
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
+ {
+ LLViewerObject* attached_object = (*attachment_iter);
+
+ if (attached_object && !attached_object->isDead() && attachment->getValid())
+ {
+ LLDrawable* drawable = attached_object->mDrawable;
+ if (drawable->isState(LLDrawable::RIGGED))
+ { //regenerate octree for rigged attachment
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_RIGGED, TRUE);
+ }
+ }
+ }
+ }
+ }
}
+
+
LLVector3 position;
if (mNameText.notNull() && mNameText->lineSegmentIntersect(start, end, position))
@@ -1557,6 +1586,56 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
return FALSE;
}
+LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector3& start, const LLVector3& end,
+ S32 face,
+ BOOL pick_transparent,
+ S32* face_hit,
+ LLVector3* intersection,
+ LLVector2* tex_coord,
+ LLVector3* normal,
+ LLVector3* bi_normal)
+{
+ if (isSelf() && !gAgent.needsRenderAvatar())
+ {
+ return NULL;
+ }
+
+ LLViewerObject* hit = NULL;
+
+ if (lineSegmentBoundingBox(start, end))
+ {
+ LLVector3 local_end = end;
+ LLVector3 local_intersection;
+
+ for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment* attachment = iter->second;
+
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
+ {
+ LLViewerObject* attached_object = (*attachment_iter);
+
+ if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, bi_normal))
+ {
+ local_end = local_intersection;
+ if (intersection)
+ {
+ *intersection = local_intersection;
+ }
+
+ hit = attached_object;
+ }
+ }
+ }
+ }
+
+ return hit;
+}
+
//-----------------------------------------------------------------------------
// parseSkeletonFile()
//-----------------------------------------------------------------------------
@@ -4968,19 +5047,6 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name )
//-----------------------------------------------------------------------------
void LLVOAvatar::resetJointPositionsToDefault( void )
{
- const LLVector3& avPos = getCharacterPosition();
-
- //Reposition the pelvis
- LLJoint* pPelvis = mRoot.findJoint("mPelvis");
- if ( pPelvis )
- {
- pPelvis->setPosition( avPos + pPelvis->getPosition() );
- }
- else
- {
- llwarns<<"Can't get pelvis joint."<<llendl;
- return;
- }
//Subsequent joints are relative to pelvis
for( S32 i = 0; i < (S32)mNumJoints; ++i )
@@ -4991,7 +5057,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
pJoint->setId( LLUUID::null );
//restore joints to default positions, however skip over the pelvis
- if ( pJoint && pPelvis != pJoint )
+ if ( pJoint )
{
pJoint->restoreOldXform();
}
@@ -6017,7 +6083,7 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
LLVOVolume* pVObj = pVO->mDrawable->getVOVolume();
if ( pVObj )
{
- const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID() );
+ const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj );
if ( pSkinData )
{
const int jointCnt = pSkinData->mJointNames.size();
@@ -6028,6 +6094,14 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
if ( bindCnt > 0 )
{
LLVOAvatar::resetJointPositionsToDefault();
+ //Need to handle the repositioning of the cam, updating rig data etc during outfit editing
+ //This handles the case where we detach a replacement rig.
+ if ( gAgentCamera.cameraCustomizeAvatar() )
+ {
+ gAgent.unpauseAnimation();
+ //Still want to refocus on head bone
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
}
}
}
@@ -7196,9 +7270,9 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl;
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
mRuthTimer.reset();
- }
- else
- {
+ }
+ else
+ {
llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl;
// we don't really care.
}
@@ -8168,6 +8242,8 @@ U32 LLVOAvatar::getPartitionType() const
//static
void LLVOAvatar::updateImpostors()
{
+ LLCharacter::sAllowInstancesChange = FALSE ;
+
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -8177,6 +8253,8 @@ void LLVOAvatar::updateImpostors()
gPipeline.generateImpostor(avatar);
}
}
+
+ LLCharacter::sAllowInstancesChange = TRUE ;
}
BOOL LLVOAvatar::isImpostor() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 295799fd24..03c0498a2a 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -145,6 +145,14 @@ public:
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector3* normal = NULL, // return the surface normal at the intersection point
LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point
+ LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector3& start, const LLVector3& end,
+ S32 face = -1, // which face to check, -1 = ALL_SIDES
+ BOOL pick_transparent = FALSE,
+ S32* face_hit = NULL, // which face was hit
+ LLVector3* intersection = NULL, // return the intersection point
+ LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
+ LLVector3* normal = NULL, // return the surface normal at the intersection point
+ LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point
//--------------------------------------------------------------------
// LLCharacter interface and related
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index bbb19a63f1..f0b5b50feb 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -137,10 +137,6 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
LLVOCacheEntry::~LLVOCacheEntry()
{
- if(mBuffer != mDP.getBuffer())
- {
- delete[] mBuffer ; //just in case
- }
mDP.freeBuffer();
}
diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp
deleted file mode 100644
index 78aa6e6ab8..0000000000
--- a/indra/newview/llvoclouds.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * @file llvoclouds.cpp
- * @brief Implementation of LLVOClouds class which is a derivation fo LLViewerObject
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llvoclouds.h"
-
-#include "lldrawpoolalpha.h"
-
-#include "llviewercontrol.h"
-
-#include "llagent.h" // to get camera position
-#include "lldrawable.h"
-#include "llface.h"
-#include "llprimitive.h"
-#include "llsky.h"
-#include "llviewercamera.h"
-#include "llviewertexturelist.h"
-#include "llviewerobjectlist.h"
-#include "llviewerregion.h"
-#include "llvosky.h"
-#include "llworld.h"
-#include "pipeline.h"
-#include "llspatialpartition.h"
-
-LLUUID gCloudTextureID = IMG_CLOUD_POOF;
-
-
-LLVOClouds::LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLAlphaObject(id, LL_VO_CLOUDS, regionp)
-{
- mCloudGroupp = NULL;
- mbCanSelect = FALSE;
- setNumTEs(1);
- LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID);
- image->setBoostLevel(LLViewerTexture::BOOST_CLOUDS);
- setTEImage(0, image);
-}
-
-
-LLVOClouds::~LLVOClouds()
-{
-}
-
-
-BOOL LLVOClouds::isActive() const
-{
- return TRUE;
-}
-
-BOOL LLVOClouds::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
-{
- static LLFastTimer::DeclareTimer ftm("Idle Clouds");
- LLFastTimer t(ftm);
-
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
- {
- return TRUE;
- }
-
- // Set dirty flag (so renderer will rebuild primitive)
- if (mDrawable)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- }
-
- return TRUE;
-}
-
-
-void LLVOClouds::setPixelAreaAndAngle(LLAgent &agent)
-{
- mAppAngle = 50;
- mPixelArea = 1500*100;
-}
-
-void LLVOClouds::updateTextures()
-{
- getTEImage(0)->addTextureStats(mPixelArea);
-}
-
-LLDrawable* LLVOClouds::createDrawable(LLPipeline *pipeline)
-{
- pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_CLOUDS);
-
- return mDrawable;
-}
-
-static LLFastTimer::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds");
-
-BOOL LLVOClouds::updateGeometry(LLDrawable *drawable)
-{
- LLFastTimer ftm(FTM_UPDATE_CLOUDS);
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
- {
- return TRUE;
- }
-
- if (drawable->isVisible())
- {
- dirtySpatialGroup(TRUE);
- }
-
- LLFace *facep;
-
- S32 num_faces = mCloudGroupp->getNumPuffs();
-
- if (num_faces > drawable->getNumFaces())
- {
- drawable->setNumFacesFast(num_faces, NULL, getTEImage(0));
- }
-
- mDepth = (getPositionAgent()-LLViewerCamera::getInstance()->getOrigin())*LLViewerCamera::getInstance()->getAtAxis();
-
- S32 face_indx = 0;
- for ( ; face_indx < num_faces; face_indx++)
- {
- facep = drawable->getFace(face_indx);
- if (!facep)
- {
- llwarns << "No facep for index " << face_indx << llendl;
- continue;
- }
-
- facep->setSize(4, 6);
-
- facep->setTEOffset(face_indx);
- facep->setTexture(getTEImage(0));
- const LLCloudPuff &puff = mCloudGroupp->getPuff(face_indx);
- const LLVector3 puff_pos_agent = gAgent.getPosAgentFromGlobal(puff.getPositionGlobal());
- facep->mCenterLocal = puff_pos_agent;
- /// Update cloud color based on sun color.
- LLColor4 float_color(LLColor3(gSky.getSunDiffuseColor() + gSky.getSunAmbientColor()),puff.getAlpha());
- facep->setFaceColor(float_color);
- }
- for ( ; face_indx < drawable->getNumFaces(); face_indx++)
- {
- facep = drawable->getFace(face_indx);
- if (!facep)
- {
- llwarns << "No facep for index " << face_indx << llendl;
- continue;
- }
-
- facep->setTEOffset(face_indx);
- facep->setSize(0,0);
- }
-
- drawable->movePartition();
-
- return TRUE;
-}
-
-F32 LLVOClouds::getPartSize(S32 idx)
-{
- return (CLOUD_PUFF_HEIGHT+CLOUD_PUFF_WIDTH)*0.5f;
-}
-
-void LLVOClouds::getGeometry(S32 te,
- LLStrider<LLVector3>& verticesp,
- LLStrider<LLVector3>& normalsp,
- LLStrider<LLVector2>& texcoordsp,
- LLStrider<LLColor4U>& colorsp,
- LLStrider<U16>& indicesp)
-{
-
- if (te >= mCloudGroupp->getNumPuffs())
- {
- return;
- }
-
- LLDrawable* drawable = mDrawable;
- LLFace *facep = drawable->getFace(te);
-
- if (!facep->hasGeometry())
- {
- return;
- }
-
- LLVector3 normal(0.f,0.f,-1.f);
-
- const LLCloudPuff &puff = mCloudGroupp->getPuff(te);
- S32 index_offset = facep->getGeomIndex();
- LLColor4 float_color(LLColor3(gSky.getSunDiffuseColor() + gSky.getSunAmbientColor()),puff.getAlpha());
- LLColor4U color;
- color.setVec(float_color);
- facep->setFaceColor(float_color);
-
-
- LLVector3 up;
- LLVector3 right;
- LLVector3 at;
-
- const LLVector3& puff_pos_agent = facep->mCenterLocal;
- LLVector2 uvs[4];
-
- uvs[0].setVec(0.f, 1.f);
- uvs[1].setVec(0.f, 0.f);
- uvs[2].setVec(1.f, 1.f);
- uvs[3].setVec(1.f, 0.f);
-
- LLVector3 vtx[4];
-
- at = LLViewerCamera::getInstance()->getAtAxis();
- right = at % LLVector3(0.f, 0.f, 1.f);
- right.normVec();
- up = right % at;
- up.normVec();
- right *= 0.5f*CLOUD_PUFF_WIDTH;
- up *= 0.5f*CLOUD_PUFF_HEIGHT;;
-
- *colorsp++ = color;
- *colorsp++ = color;
- *colorsp++ = color;
- *colorsp++ = color;
-
- vtx[0] = puff_pos_agent - right + up;
- vtx[1] = puff_pos_agent - right - up;
- vtx[2] = puff_pos_agent + right + up;
- vtx[3] = puff_pos_agent + right - up;
-
- *verticesp++ = vtx[0];
- *verticesp++ = vtx[1];
- *verticesp++ = vtx[2];
- *verticesp++ = vtx[3];
-
- *texcoordsp++ = uvs[0];
- *texcoordsp++ = uvs[1];
- *texcoordsp++ = uvs[2];
- *texcoordsp++ = uvs[3];
-
- *normalsp++ = normal;
- *normalsp++ = normal;
- *normalsp++ = normal;
- *normalsp++ = normal;
-
- *indicesp++ = index_offset + 0;
- *indicesp++ = index_offset + 1;
- *indicesp++ = index_offset + 2;
-
- *indicesp++ = index_offset + 1;
- *indicesp++ = index_offset + 3;
- *indicesp++ = index_offset + 2;
-}
-
-U32 LLVOClouds::getPartitionType() const
-{
- return LLViewerRegion::PARTITION_CLOUD;
-}
-
-// virtual
-void LLVOClouds::updateDrawable(BOOL force_damped)
-{
- // Force an immediate rebuild on any update
- if (mDrawable.notNull())
- {
- mDrawable->updateXform(TRUE);
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
- }
- clearChanged(SHIFTED);
-}
-
-LLCloudPartition::LLCloudPartition()
-{
- mDrawableType = LLPipeline::RENDER_TYPE_CLOUDS;
- mPartitionType = LLViewerRegion::PARTITION_CLOUD;
-}
-
diff --git a/indra/newview/llvoclouds.h b/indra/newview/llvoclouds.h
deleted file mode 100644
index 430923a108..0000000000
--- a/indra/newview/llvoclouds.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file llvoclouds.h
- * @brief Description of LLVOClouds class
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOCLOUDS_H
-#define LL_LLVOCLOUDS_H
-
-#include "llviewerobject.h"
-#include "lltable.h"
-#include "v4coloru.h"
-
-class LLViewerTexture;
-class LLViewerCloudGroup;
-
-class LLCloudGroup;
-
-
-class LLVOClouds : public LLAlphaObject
-{
-public:
- LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp );
-
- // Initialize data that's only inited once per class.
- static void initClass();
-
- void updateDrawable(BOOL force_damped);
-
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
- /*virtual*/ void getGeometry(S32 te,
- LLStrider<LLVector3>& verticesp,
- LLStrider<LLVector3>& normalsp,
- LLStrider<LLVector2>& texcoordsp,
- LLStrider<LLColor4U>& colorsp,
- LLStrider<U16>& indicesp);
-
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- F32 getPartSize(S32 idx);
-
- /*virtual*/ void updateTextures();
- /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area
-
- void updateFaceSize(S32 idx) { }
- BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- virtual U32 getPartitionType() const;
-
- void setCloudGroup(LLCloudGroup *cgp) { mCloudGroupp = cgp; }
-protected:
- virtual ~LLVOClouds();
-
- LLCloudGroup *mCloudGroupp;
-};
-
-extern LLUUID gCloudTextureID;
-
-#endif // LL_VO_CLOUDS_H
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 6ee6822e2f..cd2bbad620 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -195,12 +195,13 @@ static LLVivoxVoiceClientFriendsObserver *friendslist_listener = NULL;
class LLVivoxVoiceClientCapResponder : public LLHTTPClient::Responder
{
public:
- LLVivoxVoiceClientCapResponder(void){};
+ LLVivoxVoiceClientCapResponder(LLVivoxVoiceClient::state requesting_state) : mRequestingState(requesting_state) {};
virtual void error(U32 status, const std::string& reason); // called with bad status codes
virtual void result(const LLSD& content);
private:
+ LLVivoxVoiceClient::state mRequestingState; // state
};
void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason)
@@ -208,6 +209,7 @@ void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason
LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder::error("
<< status << ": " << reason << ")"
<< LL_ENDL;
+ LLVivoxVoiceClient::getInstance()->sessionTerminate();
}
void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
@@ -216,12 +218,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL;
+ std::string uri;
+ std::string credentials;
+
if ( content.has("voice_credentials") )
{
LLSD voice_credentials = content["voice_credentials"];
- std::string uri;
- std::string credentials;
-
if ( voice_credentials.has("channel_uri") )
{
uri = voice_credentials["channel_uri"].asString();
@@ -231,7 +233,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
credentials =
voice_credentials["channel_credentials"].asString();
}
-
+ }
+
+ // set the spatial channel. If no voice credentials or uri are
+ // available, then we simply drop out of voice spatially.
+ if(LLVivoxVoiceClient::getInstance()->parcelVoiceInfoReceived(mRequestingState))
+ {
LLVivoxVoiceClient::getInstance()->setSpatialChannel(uri, credentials);
}
}
@@ -551,18 +558,27 @@ void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID
void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries)
{
- if ( gAgent.getRegion() && mVoiceEnabled )
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if ( region && mVoiceEnabled )
{
std::string url =
- gAgent.getRegion()->getCapability(
- "ProvisionVoiceAccountRequest");
-
- if ( url == "" ) return;
-
+ region->getCapability("ProvisionVoiceAccountRequest");
+
+ if ( url.empty() )
+ {
+ // we've not received the capability yet, so return.
+ // the password will remain empty, so we'll remain in
+ // stateIdle
+ return;
+ }
+
LLHTTPClient::post(
- url,
- LLSD(),
- new LLVivoxVoiceAccountProvisionResponder(retries));
+ url,
+ LLSD(),
+ new LLVivoxVoiceAccountProvisionResponder(retries));
+
+ setState(stateConnectorStart);
}
}
@@ -673,7 +689,8 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState)
CASE(stateVoiceFontsWait);
CASE(stateVoiceFontsReceived);
CASE(stateCreatingSessionGroup);
- CASE(stateNoChannel);
+ CASE(stateNoChannel);
+ CASE(stateRetrievingParcelVoiceInfo);
CASE(stateJoiningSession);
CASE(stateSessionJoined);
CASE(stateRunning);
@@ -741,42 +758,6 @@ void LLVivoxVoiceClient::stateMachine()
}
}
- // Check for parcel boundary crossing
- {
- LLViewerRegion *region = gAgent.getRegion();
- LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
-
- if(region && parcel)
- {
- S32 parcelLocalID = parcel->getLocalID();
- std::string regionName = region->getName();
- std::string capURI = region->getCapability("ParcelVoiceInfoRequest");
-
-// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL;
-
- // The region name starts out empty and gets filled in later.
- // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes.
- // If either is empty, wait for the next time around.
- if(!regionName.empty())
- {
- if(!capURI.empty())
- {
- if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName))
- {
- // We have changed parcels. Initiate a parcel channel lookup.
- mCurrentParcelLocalID = parcelLocalID;
- mCurrentRegionName = regionName;
-
- parcelChanged();
- }
- }
- else
- {
- LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL;
- }
- }
- }
- }
switch(getState())
{
@@ -1026,22 +1007,9 @@ void LLVivoxVoiceClient::stateMachine()
}
else if(!mAccountName.empty())
{
- LLViewerRegion *region = gAgent.getRegion();
-
- if(region)
+ if ( mAccountPassword.empty() )
{
- if ( region->getCapability("ProvisionVoiceAccountRequest") != "" )
- {
- if ( mAccountPassword.empty() )
- {
- requestVoiceAccountProvision();
- }
- setState(stateConnectorStart);
- }
- else
- {
- LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL;
- }
+ requestVoiceAccountProvision();
}
}
break;
@@ -1382,11 +1350,7 @@ void LLVivoxVoiceClient::stateMachine()
setState(stateCreatingSessionGroup);
sessionGroupCreateSendMessage();
#else
- // Not using session groups -- skip the stateCreatingSessionGroup state.
- setState(stateNoChannel);
-
- // Initial kick-off of channel lookup logic
- parcelChanged();
+ setState(stateNoChannel);
#endif
break;
@@ -1399,19 +1363,29 @@ void LLVivoxVoiceClient::stateMachine()
}
else if(!mMainSessionGroupHandle.empty())
{
- setState(stateNoChannel);
-
// Start looped recording (needed for "panic button" anti-griefing tool)
recordingLoopStart();
-
- // Initial kick-off of channel lookup logic
- parcelChanged();
+ setState(stateNoChannel);
}
break;
+
+ //MARK: stateRetrievingParcelVoiceInfo
+ case stateRetrievingParcelVoiceInfo:
+ // wait until parcel voice info is received.
+ if(mSessionTerminateRequested || !mVoiceEnabled)
+ {
+ // if a terminate request has been received,
+ // bail and go to the stateSessionTerminated
+ // state. If the cap request is still pending,
+ // the responder will check to see if we've moved
+ // to a new session and won't change any state.
+ setState(stateSessionTerminated);
+ }
+ break;
+
//MARK: stateNoChannel
case stateNoChannel:
-
LL_DEBUGS("Voice") << "State No Channel" << LL_ENDL;
mSpatialJoiningNum = 0;
// Do this here as well as inside sendPositionalUpdate().
@@ -1432,6 +1406,16 @@ void LLVivoxVoiceClient::stateMachine()
{
setState(stateCaptureBufferPaused);
}
+ else if(checkParcelChanged() || (mNextAudioSession == NULL))
+ {
+ // the parcel is changed, or we have no pending audio sessions,
+ // so try to request the parcel voice info
+ // if we have the cap, we move to the appropriate state
+ if(requestParcelVoiceInfo())
+ {
+ setState(stateRetrievingParcelVoiceInfo);
+ }
+ }
else if(sessionNeedsRelog(mNextAudioSession))
{
requestRelog();
@@ -1466,32 +1450,28 @@ void LLVivoxVoiceClient::stateMachine()
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING);
setState(stateJoiningSession);
}
- else if(!mSpatialSessionURI.empty())
- {
- // If we're not headed elsewhere and have a spatial URI, return to spatial.
- switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials);
- }
break;
-
+
//MARK: stateJoiningSession
case stateJoiningSession: // waiting for session handle
-
- // If this is true we have problem with connection to voice server (EXT-4313).
- // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM.
- if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM)
+
+ // If this is true we have problem with connection to voice server (EXT-4313).
+ // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM.
+ if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM)
{
- // Notify observers to let them know there is problem with voice
- notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
- llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl;
+ // Notify observers to let them know there is problem with voice
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
+ llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl;
}
-
- // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for
- // example for p2p many times while waiting for response, so it can't be used to detect errors
- if(mAudioSession && mAudioSession->mIsSpatial)
+
+ // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for
+ // example for p2p many times while waiting for response, so it can't be used to detect errors
+ if(mAudioSession && mAudioSession->mIsSpatial)
{
- mSpatialJoiningNum++;
+
+ mSpatialJoiningNum++;
}
-
+
// joinedAudioSession() will transition from here to stateSessionJoined.
if(!mVoiceEnabled)
{
@@ -1511,12 +1491,13 @@ void LLVivoxVoiceClient::stateMachine()
}
}
}
- break;
-
+ break;
+
//MARK: stateSessionJoined
case stateSessionJoined: // session handle received
- mSpatialJoiningNum = 0;
+
+ mSpatialJoiningNum = 0;
// It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4
// before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck.
// For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined.
@@ -1553,7 +1534,7 @@ void LLVivoxVoiceClient::stateMachine()
sessionMediaDisconnectSendMessage(mAudioSession);
setState(stateSessionTerminated);
}
- }
+ }
break;
//MARK: stateRunning
@@ -1565,6 +1546,7 @@ void LLVivoxVoiceClient::stateMachine()
}
else
{
+
if(!inSpatialChannel())
{
// When in a non-spatial channel, never send positional updates.
@@ -1572,8 +1554,22 @@ void LLVivoxVoiceClient::stateMachine()
}
else
{
+ if(checkParcelChanged())
+ {
+ // if the parcel has changed, attempted to request the
+ // cap for the parcel voice info. If we can't request it
+ // then we don't have the cap URL so we do nothing and will
+ // recheck next time around
+ if(requestParcelVoiceInfo())
+ {
+ // we did get the cap, and we made the request,
+ // so go wait for the response.
+ setState(stateRetrievingParcelVoiceInfo);
+ }
+ }
// Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position)
enforceTether();
+
}
// Do notifications for expiring Voice Fonts.
@@ -3840,7 +3836,7 @@ void LLVivoxVoiceClient::participantUpdatedEvent(
// also initialize voice moderate_mode depend on Agent's participant. See EXT-6937.
// *TODO: remove once a way to request the current voice channel moderation mode is implemented.
- if (gAgentID == participant->mAvatarID)
+ if (gAgent.getID() == participant->mAvatarID)
{
speaker_manager->initVoiceModerateMode();
}
@@ -4073,7 +4069,7 @@ void LLVivoxVoiceClient::messageEvent(
}
LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL;
- gIMMgr->addMessage(session->mIMSessionID,
+ LLIMMgr::getInstance()->addMessage(session->mIMSessionID,
session->mCallerID,
session->mName.c_str(),
message.c_str(),
@@ -4447,24 +4443,91 @@ LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::findParticipantByID(co
}
-void LLVivoxVoiceClient::parcelChanged()
+
+// Check for parcel boundary crossing
+bool LLVivoxVoiceClient::checkParcelChanged(bool update)
{
- if(getState() >= stateNoChannel)
+ LLViewerRegion *region = gAgent.getRegion();
+ LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+
+ if(region && parcel)
{
- // If the user is logged in, start a channel lookup.
- LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+ S32 parcelLocalID = parcel->getLocalID();
+ std::string regionName = region->getName();
+
+ // LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL;
+
+ // The region name starts out empty and gets filled in later.
+ // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes.
+ // If either is empty, wait for the next time around.
+ if(!regionName.empty())
+ {
+ if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName))
+ {
+ // We have changed parcels. Initiate a parcel channel lookup.
+ if (update)
+ {
+ mCurrentParcelLocalID = parcelLocalID;
+ mCurrentRegionName = regionName;
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool LLVivoxVoiceClient::parcelVoiceInfoReceived(state requesting_state)
+{
+ // pop back to the state we were in when the parcel changed and we managed to
+ // do the request.
+ if(getState() == stateRetrievingParcelVoiceInfo)
+ {
+ setState(requesting_state);
+ return true;
+ }
+ else
+ {
+ // we've dropped out of stateRetrievingParcelVoiceInfo
+ // before we received the cap result, due to a terminate
+ // or transition to a non-voice channel. Don't switch channels.
+ return false;
+ }
+}
+
- std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
+bool LLVivoxVoiceClient::requestParcelVoiceInfo()
+{
+ LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+
+ // grab the cap for parcel voice info from the region.
+ LLViewerRegion * region = gAgent.getRegion();
+ if (region == NULL)
+ {
+ return false;
+ }
+ // grab the cap.
+ std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
+ if (!url.empty())
+ {
+ // if we've already retrieved the cap from the region, go ahead and make the request,
+ // and return true so we can go into the state that waits for the response.
+ checkParcelChanged(true);
LLSD data;
+ LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+
LLHTTPClient::post(
- url,
- data,
- new LLVivoxVoiceClientCapResponder);
+ url,
+ data,
+ new LLVivoxVoiceClientCapResponder(getState()));
+ return true;
}
- else
+ else
{
- // The transition to stateNoChannel needs to kick this off again.
- LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL;
+
+ // we don't have the cap yet, so return false so the caller can try again later.
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest cap not yet available, deferring" << LL_ENDL;
+ return false;
}
}
@@ -4488,6 +4551,7 @@ void LLVivoxVoiceClient::switchChannel(
case stateJoinSessionFailed:
case stateJoinSessionFailedWaiting:
case stateNoChannel:
+ case stateRetrievingParcelVoiceInfo:
// Always switch to the new URI from these states.
needsSwitch = true;
break;
@@ -4560,13 +4624,10 @@ void LLVivoxVoiceClient::switchChannel(
mNextAudioSession->mIsP2P = is_p2p;
}
- if(getState() <= stateNoChannel)
- {
- // We're already set up to join a channel, just needed to fill in the session URI
- }
- else
+ if(getState() >= stateRetrievingParcelVoiceInfo)
{
- // State machine will come around and rejoin if uri/handle is not empty.
+ // If we're already in a channel, or if we're joining one, terminate
+ // so we can rejoin with the new session data.
sessionTerminate();
}
}
@@ -6267,13 +6328,13 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string
{
session->mTextInvitePending = false;
- // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel.
+ // We don't need to call LLIMMgr::getInstance()->addP2PSession() here. The first incoming message will create the panel.
}
if(session->mVoiceInvitePending)
{
session->mVoiceInvitePending = false;
- gIMMgr->inviteToSession(
+ LLIMMgr::getInstance()->inviteToSession(
session->mIMSessionID,
session->mName,
session->mCallerID,
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 471545de56..1142a1a49c 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -380,7 +380,8 @@ protected:
stateVoiceFontsWait, // Awaiting the list of voice fonts
stateVoiceFontsReceived, // List of voice fonts received
stateCreatingSessionGroup, // Creating the main session group
- stateNoChannel, //
+ stateNoChannel, // Need to join a channel
+ stateRetrievingParcelVoiceInfo, // waiting for parcel voice info request to return with spatial credentials
stateJoiningSession, // waiting for session handle
stateSessionJoined, // session handle received
stateRunning, // in session, steady state
@@ -620,6 +621,8 @@ protected:
void sessionMediaDisconnectSendMessage(sessionState *session);
void sessionTextDisconnectSendMessage(sessionState *session);
+
+
// Pokes the state machine to leave the audio session next time around.
void sessionTerminate();
@@ -629,6 +632,12 @@ protected:
// Does the actual work to get out of the audio session
void leaveAudioSession();
+ // notifies the voice client that we've received parcel voice info
+ bool parcelVoiceInfoReceived(state requesting_state);
+
+ friend class LLVivoxVoiceClientCapResponder;
+
+
void lookupName(const LLUUID &id);
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
void avatarNameResolved(const LLUUID &id, const std::string &name);
@@ -733,9 +742,11 @@ private:
bool mCaptureDeviceDirty;
bool mRenderDeviceDirty;
+
+ bool checkParcelChanged(bool update = false);
// This should be called when the code detects we have changed parcels.
// It initiates the call to the server that gets the parcel channel.
- void parcelChanged();
+ bool requestParcelVoiceInfo();
void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = "");
void joinSession(sessionState *session);
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 6f354b78b1..a4b0910c92 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -324,10 +324,18 @@ void LLVOPartGroup::getGeometry(S32 idx,
LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
-
+
+ //HACK -- the verticesp->mV[3] = 0.f here are to set the texture index to 0 (particles don't use texture batching, maybe they should)
+ // this works because there is actually a 4th float stored after the vertex position which is used as a texture index
+ // also, somebody please VECTORIZE THIS
+
+ verticesp->mV[3] = 0.f;
*verticesp++ = part_pos_agent + up - right;
+ verticesp->mV[3] = 0.f;
*verticesp++ = part_pos_agent - up - right;
+ verticesp->mV[3] = 0.f;
*verticesp++ = part_pos_agent + up + right;
+ verticesp->mV[3] = 0.f;
*verticesp++ = part_pos_agent - up + right;
*colorsp++ = part.mColor;
@@ -360,7 +368,7 @@ U32 LLVOPartGroup::getPartitionType() const
}
LLParticlePartition::LLParticlePartition()
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK, TRUE, GL_STREAM_DRAW_ARB)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
{
mRenderPass = LLRenderPass::PASS_ALPHA;
mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES;
@@ -418,6 +426,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co
mFaceList.push_back(facep);
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
+ llassert(facep->getIndicesCount() < 65536);
}
obj->mDepth /= count;
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 6396bc042d..66ba6249d3 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -370,7 +370,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
mAtmHeight = ATM_HEIGHT;
mEarthCenter = LLVector3(mCameraPosAgent.mV[0], mCameraPosAgent.mV[1], -EARTH_RADIUS);
- mSunDefaultPosition = LLVector3(LLWLParamManager::instance()->mCurParams.getVector("lightnorm", error));
+ mSunDefaultPosition = LLVector3(LLWLParamManager::getInstance()->mCurParams.getVector("lightnorm", error));
if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition"))
{
initSunDirection(mSunDefaultPosition, LLVector3(0, 0, 0));
@@ -646,24 +646,24 @@ void LLVOSky::initAtmospherics(void)
bool error;
// uniform parameters for convenience
- dome_radius = LLWLParamManager::instance()->getDomeRadius();
- dome_offset_ratio = LLWLParamManager::instance()->getDomeOffset();
- sunlight_color = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("sunlight_color", error));
- ambient = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("ambient", error));
- //lightnorm = LLWLParamManager::instance()->mCurParams.getVector("lightnorm", error);
- gamma = LLWLParamManager::instance()->mCurParams.getVector("gamma", error)[0];
- blue_density = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("blue_density", error));
- blue_horizon = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("blue_horizon", error));
- haze_density = LLWLParamManager::instance()->mCurParams.getVector("haze_density", error)[0];
- haze_horizon = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("haze_horizon", error));
- density_multiplier = LLWLParamManager::instance()->mCurParams.getVector("density_multiplier", error)[0];
- max_y = LLWLParamManager::instance()->mCurParams.getVector("max_y", error)[0];
- glow = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("glow", error));
- cloud_shadow = LLWLParamManager::instance()->mCurParams.getVector("cloud_shadow", error)[0];
- cloud_color = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("cloud_color", error));
- cloud_scale = LLWLParamManager::instance()->mCurParams.getVector("cloud_scale", error)[0];
- cloud_pos_density1 = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("cloud_pos_density1", error));
- cloud_pos_density2 = LLColor3(LLWLParamManager::instance()->mCurParams.getVector("cloud_pos_density2", error));
+ dome_radius = LLWLParamManager::getInstance()->getDomeRadius();
+ dome_offset_ratio = LLWLParamManager::getInstance()->getDomeOffset();
+ sunlight_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("sunlight_color", error));
+ ambient = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("ambient", error));
+ //lightnorm = LLWLParamManager::getInstance()->mCurParams.getVector("lightnorm", error);
+ gamma = LLWLParamManager::getInstance()->mCurParams.getVector("gamma", error)[0];
+ blue_density = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_density", error));
+ blue_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_horizon", error));
+ haze_density = LLWLParamManager::getInstance()->mCurParams.getVector("haze_density", error)[0];
+ haze_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("haze_horizon", error));
+ density_multiplier = LLWLParamManager::getInstance()->mCurParams.getVector("density_multiplier", error)[0];
+ max_y = LLWLParamManager::getInstance()->mCurParams.getVector("max_y", error)[0];
+ glow = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("glow", error));
+ cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_shadow", error)[0];
+ cloud_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_color", error));
+ cloud_scale = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_scale", error)[0];
+ cloud_pos_density1 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density1", error));
+ cloud_pos_density2 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density2", error));
// light norm is different. We need the sun's direction, not the light direction
// which could be from the moon. And we need to clamp it
@@ -1033,7 +1033,7 @@ void LLVOSky::calcAtmospherics(void)
// Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio
// between sunlight and point lights in windlight to normalize point lights.
F32 sun_dynamic_range = llmax(gSavedSettings.getF32("RenderSunDynamicRange"), 0.0001f);
- LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp);
+ LLWLParamManager::getInstance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp);
mSunDiffuse = vary_SunlightColor;
mSunAmbient = vary_AmbientColor;
@@ -1483,6 +1483,8 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons
facep->setVertexBuffer(buff);
}
+ llassert(facep->getVertexBuffer()->getNumIndices() == 6);
+
index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp);
if (-1 == index_offset)
@@ -2127,7 +2129,7 @@ void LLVOSky::updateFog(const F32 distance)
F32 depth = water_height - camera_height;
// get the water param manager variables
- float water_fog_density = LLWaterParamManager::instance()->getFogDensity();
+ float water_fog_density = LLWaterParamManager::getInstance()->getFogDensity();
LLColor4 water_fog_color = LLDrawPoolWater::sWaterFogColor.mV;
// adjust the color based on depth. We're doing linear approximations
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index dbcd4f50ca..510525259f 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -375,6 +375,8 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
S32 num_vertices, num_indices;
U32 index;
+ llassert(mLastStride > 0);
+
render_stride = mLastStride;
patch_size = mPatchp->getSurface()->getGridsPerPatchEdge();
S32 vert_size = patch_size / render_stride;
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 8946d4e0b6..3c7fe708e6 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -980,11 +980,6 @@ void LLVOTree::appendMesh(LLStrider<LLVector3>& vertices,
for (S32 i = 0; i < index_count; i++)
{
U16 index = index_offset + i;
- if (idx[index] >= vert_start + vert_count ||
- idx[index] < vert_start)
- {
- llerrs << "WTF?" << llendl;
- }
*indices++ = idx[index]-vert_start+cur_idx;
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e9a8c9b80a..e6da8eb89d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -73,6 +73,7 @@
#include "llagent.h"
#include "llviewermediafocus.h"
#include "lldatapacker.h"
+#include "llviewershadermgr.h"
#include "llvoavatar.h"
#include "llvocache.h"
@@ -1095,8 +1096,6 @@ void LLVOVolume::updateSculptTexture()
}
-
-
void LLVOVolume::notifyMeshLoaded()
{
mSculptChanged = TRUE;
@@ -1222,7 +1221,7 @@ BOOL LLVOVolume::calcLOD()
}
//hold onto unmodified distance for debugging
- F32 debug_distance = distance;
+ //F32 debug_distance = distance;
distance *= sDistanceFactor;
@@ -1245,7 +1244,9 @@ BOOL LLVOVolume::calcLOD()
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO))
{
- setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail));
+ //setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail));
+
+ setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex()));
}
if (cur_detail != mLOD)
@@ -1274,6 +1275,15 @@ BOOL LLVOVolume::updateLOD()
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
mLODChanged = TRUE;
}
+ else
+ {
+ F32 new_radius = getBinRadius();
+ F32 old_radius = mDrawable->getBinRadius();
+ if (new_radius < old_radius * 0.9f || new_radius > old_radius*1.1f)
+ {
+ gPipeline.markPartitionMove(mDrawable);
+ }
+ }
lod_changed = lod_changed || LLViewerObject::updateLOD();
@@ -3086,16 +3096,28 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes)
{
+ F32 radius = getScale().length();
+
if (isMesh())
{
LLSD& header = gMeshRepo.getMeshHeader(getVolume()->getParams().getSculptID());
- F32 radius = getScale().length();
-
return LLMeshRepository::getStreamingCost(header, radius, bytes, visible_bytes, mLOD);
}
-
- return 0.f;
+ else
+ {
+ LLVolume* volume = getVolume();
+ S32 counts[4];
+ LLVolume::getLoDTriangleCounts(volume->getParams(), counts);
+
+ LLSD header;
+ header["lowest_lod"]["size"] = counts[0] * 10;
+ header["low_lod"]["size"] = counts[1] * 10;
+ header["medium_lod"]["size"] = counts[2] * 10;
+ header["high_lod"]["size"] = counts[3] * 10;
+
+ return LLMeshRepository::getStreamingCost(header, radius);
+ }
}
U32 LLVOVolume::getTriangleCount()
@@ -3187,6 +3209,10 @@ F32 LLVOVolume::getBinRadius()
F32 scale = 1.f;
+ S32 size_factor = llmax(gSavedSettings.getS32("OctreeStaticObjectSizeFactor"), 1);
+ S32 attachment_size_factor = llmax(gSavedSettings.getS32("OctreeAttachmentSizeFactor"), 1);
+ LLVector3 distance_factor = gSavedSettings.getVector3("OctreeDistanceFactor");
+ LLVector3 alpha_distance_factor = gSavedSettings.getVector3("OctreeAlphaDistanceFactor");
const LLVector4a* ext = mDrawable->getSpatialExtents();
BOOL shrink_wrap = mDrawable->isAnimating();
@@ -3216,6 +3242,8 @@ F32 LLVOVolume::getBinRadius()
radius = llmin(bounds.mV[1], bounds.mV[2]);
radius = llmin(radius, bounds.mV[0]);
radius *= 0.5f;
+ radius *= 1.f+mDrawable->mDistanceWRTCamera*alpha_distance_factor[1];
+ radius += mDrawable->mDistanceWRTCamera*alpha_distance_factor[0];
}
else if (shrink_wrap)
{
@@ -3226,24 +3254,19 @@ F32 LLVOVolume::getBinRadius()
}
else if (mDrawable->isStatic())
{
- /*if (mDrawable->getRadius() < 2.0f)
- {
- radius = 16.f;
- }
- else
- {
- radius = llmax(mDrawable->getRadius(), 32.f);
- }*/
-
- radius = (((S32) mDrawable->getRadius())/2+1)*8;
+ radius = llmax((S32) mDrawable->getRadius(), 1)*size_factor;
+ radius *= 1.f + mDrawable->mDistanceWRTCamera * distance_factor[1];
+ radius += mDrawable->mDistanceWRTCamera * distance_factor[0];
}
else if (mDrawable->getVObj()->isAttachment())
{
- radius = (((S32) (mDrawable->getRadius()*4)+1))*2;
+ radius = llmax((S32) mDrawable->getRadius(),1)*attachment_size_factor;
}
else
{
- radius = 8.f;
+ radius = mDrawable->getRadius();
+ radius *= 1.f + mDrawable->mDistanceWRTCamera * distance_factor[1];
+ radius += mDrawable->mDistanceWRTCamera * distance_factor[0];
}
return llclamp(radius*scale, 0.5f, 256.f);
@@ -3342,7 +3365,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
{
if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf())
{
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_RIGGED, TRUE);
+ updateRiggedVolume();
+ genBBoxes(FALSE);
volume = mRiggedVolume;
transform = false;
}
@@ -3521,7 +3545,7 @@ void LLVOVolume::updateRiggedVolume()
LLVolume* volume = getVolume();
- const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(volume->getParams().getSculptID());
+ const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(volume->getParams().getSculptID(), this);
if (!skin)
{
@@ -3712,6 +3736,21 @@ LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep)
mSlopRatio = 0.25f;
}
+bool can_batch_texture(LLFace* facep)
+{
+ if (facep->getTextureEntry()->getBumpmap())
+ { //bump maps aren't worked into texture batching yet
+ return false;
+ }
+
+ if (facep->isState(LLFace::TEXTURE_ANIM) && facep->getVirtualSize() > MIN_TEX_ANIM_SIZE)
+ { //texture animation breaks batches
+ return false;
+ }
+
+ return true;
+}
+
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
@@ -3762,12 +3801,36 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
LLViewerTexture* tex = facep->getTexture();
+ U8 index = facep->getTextureIndex();
+
+ bool batchable = false;
+
+ if (index < 255 && idx >= 0)
+ {
+ if (index < draw_vec[idx]->mTextureList.size())
+ {
+ if (draw_vec[idx]->mTextureList[index].isNull())
+ {
+ batchable = true;
+ draw_vec[idx]->mTextureList[index] = tex;
+ }
+ else if (draw_vec[idx]->mTextureList[index] == tex)
+ { //this face's texture index can be used with this batch
+ batchable = true;
+ }
+ }
+ else
+ { //texture list can be expanded to fit this texture index
+ batchable = true;
+ }
+ }
+
U8 glow = (U8) (facep->getTextureEntry()->getGlow() * 255);
if (idx >= 0 &&
draw_vec[idx]->mVertexBuffer == facep->getVertexBuffer() &&
draw_vec[idx]->mEnd == facep->getGeomIndex()-1 &&
- (LLPipeline::sTextureBindTest || draw_vec[idx]->mTexture == tex) &&
+ (LLPipeline::sTextureBindTest || draw_vec[idx]->mTexture == tex || batchable) &&
#if LL_DARWIN
draw_vec[idx]->mEnd - draw_vec[idx]->mStart + facep->getGeomCount() <= (U32) gGLManager.mGLMaxVertexRange &&
draw_vec[idx]->mCount + facep->getIndicesCount() <= (U32) gGLManager.mGLMaxIndexRange &&
@@ -3781,6 +3844,12 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_vec[idx]->mCount += facep->getIndicesCount();
draw_vec[idx]->mEnd += facep->getGeomCount();
draw_vec[idx]->mVSize = llmax(draw_vec[idx]->mVSize, facep->getVirtualSize());
+
+ if (index >= draw_vec[idx]->mTextureList.size())
+ {
+ draw_vec[idx]->mTextureList.resize(index+1);
+ draw_vec[idx]->mTextureList[index] = tex;
+ }
draw_vec[idx]->validate();
update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[0]);
update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[1]);
@@ -3811,6 +3880,11 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_info->mDrawMode = LLRender::TRIANGLE_STRIP;
}
+ if (index < 255)
+ { //initialize texture list for texture batching
+ draw_info->mTextureList.resize(index+1);
+ draw_info->mTextureList[index] = tex;
+ }
draw_info->validate();
}
}
@@ -3910,7 +3984,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LLVOVolume* vobj = drawablep->getVOVolume();
- if (vobj->getVolume() && vobj->getVolume()->isTetrahedron())
+ if (vobj->getVolume() && vobj->getVolume()->isTetrahedron() || (vobj->isMesh() && !gMeshRepo.meshRezEnabled()))
{
continue;
}
@@ -3923,7 +3997,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
bool rigged = vobj->isAttachment() &&
vobj->isMesh() &&
- gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID());
+ gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID(), vobj);
bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic();
@@ -3965,7 +4039,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if ( pAvatarVO )
{
LLUUID currentId = vobj->getVolume()->getParams().getSculptID();
- const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId );
+ const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId, vobj );
if ( pSkinData )
{
@@ -4233,15 +4307,24 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
U32 bump_mask = LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR;
U32 fullbright_mask = LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR;
- if (LLPipeline::sRenderDeferred)
+ bool batch_textures = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1;
+
+ if (batch_textures)
{
bump_mask |= LLVertexBuffer::MAP_BINORMAL;
+ genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, FALSE, TRUE);
+ genDrawInfo(group, fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, fullbright_faces, FALSE, TRUE);
+ genDrawInfo(group, bump_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, bump_faces, FALSE, TRUE);
+ genDrawInfo(group, alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, alpha_faces, TRUE, TRUE);
+ }
+ else
+ {
+ genDrawInfo(group, simple_mask, simple_faces);
+ genDrawInfo(group, fullbright_mask, fullbright_faces);
+ genDrawInfo(group, bump_mask, bump_faces, FALSE, TRUE);
+ genDrawInfo(group, alpha_mask, alpha_faces, TRUE);
}
- genDrawInfo(group, simple_mask, simple_faces);
- genDrawInfo(group, bump_mask, bump_faces);
- genDrawInfo(group, fullbright_mask, fullbright_faces);
- genDrawInfo(group, alpha_mask, alpha_faces, TRUE);
if (!LLPipeline::sDelayVBUpdate)
{
@@ -4297,11 +4380,6 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
face->getGeometryVolume(*volume, face->getTEOffset(),
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex());
}
-
- if (!face)
- {
- llerrs << "WTF?" << llendl;
- }
}
drawablep->clearState(LLDrawable::REBUILD_ALL);
@@ -4356,13 +4434,37 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
group->clearState(LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);
}
- if (group && group->isState(LLSpatialGroup::NEW_DRAWINFO))
+ llassert(!group || !group->isState(LLSpatialGroup::NEW_DRAWINFO));
+}
+
+struct CompareBatchBreakerModified
+{
+ bool operator()(const LLFace* const& lhs, const LLFace* const& rhs)
{
- llerrs << "WTF?" << llendl;
+ const LLTextureEntry* lte = lhs->getTextureEntry();
+ const LLTextureEntry* rte = rhs->getTextureEntry();
+
+ if (lte->getBumpmap() != rte->getBumpmap())
+ {
+ return lte->getBumpmap() < rte->getBumpmap();
+ }
+ else if (lte->getFullbright() != rte->getFullbright())
+ {
+ return lte->getFullbright() < rte->getFullbright();
+ }
+ else if (lte->getGlow() != rte->getGlow())
+ {
+ return lte->getGlow() < rte->getGlow();
+ }
+ else
+ {
+ return lhs->getTexture() < rhs->getTexture();
+ }
+
}
-}
+};
-void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
+void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort, BOOL batch_textures)
{
//calculate maximum number of vertices to store in a single buffer
U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
@@ -4371,7 +4473,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (!distance_sort)
{
//sort faces by things that break batches
- std::sort(faces.begin(), faces.end(), LLFace::CompareBatchBreaker());
+ std::sort(faces.begin(), faces.end(), CompareBatchBreakerModified());
}
else
{
@@ -4391,6 +4493,21 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
buffer_index = -1;
}
+ S32 texture_index_channels = gGLManager.mNumTextureImageUnits-1; //always reserve one for shiny for now just for simplicity
+
+ if (gGLManager.mGLVersion < 3.1f)
+ {
+ texture_index_channels = 1;
+ }
+
+ if (LLPipeline::sRenderDeferred && distance_sort)
+ {
+ texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels;
+ }
+
+ texture_index_channels = llmin(texture_index_channels, (S32) gSavedSettings.getU32("RenderMaxTextureIndex"));
+
+
while (face_iter != faces.end())
{
//pull off next face
@@ -4421,24 +4538,101 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
std::vector<LLFace*>::iterator i = face_iter;
++i;
- while (i != faces.end() &&
- (LLPipeline::sTextureBindTest || (distance_sort || (*i)->getTexture() == tex)))
+ std::vector<LLViewerTexture*> texture_list;
+
+ if (batch_textures)
{
- facep = *i;
-
- if (geom_count + facep->getGeomCount() > max_vertices)
- { //cut batches on geom count too big
- break;
+ U8 cur_tex = 0;
+ facep->setTextureIndex(cur_tex);
+ texture_list.push_back(tex);
+
+ //if (can_batch_texture(facep))
+ {
+ while (i != faces.end())
+ {
+ facep = *i;
+ if (facep->getTexture() != tex)
+ {
+ if (distance_sort)
+ { //textures might be out of order, see if texture exists in current batch
+ bool found = false;
+ for (U32 tex_idx = 0; tex_idx < texture_list.size(); ++tex_idx)
+ {
+ if (facep->getTexture() == texture_list[tex_idx])
+ {
+ cur_tex = tex_idx;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ cur_tex = texture_list.size();
+ }
+ }
+ else
+ {
+ cur_tex++;
+ }
+
+ if (!can_batch_texture(facep))
+ { //face is bump mapped or has an animated texture matrix -- can't
+ //batch more than 1 texture at a time
+ break;
+ }
+
+ if (cur_tex >= texture_index_channels)
+ { //cut batches when index channels are depleted
+ break;
+ }
+
+ tex = facep->getTexture();
+
+ texture_list.push_back(tex);
+ }
+
+ if (geom_count + facep->getGeomCount() > max_vertices)
+ { //cut batches on geom count too big
+ break;
+ }
+
+ ++i;
+ index_count += facep->getIndicesCount();
+ geom_count += facep->getGeomCount();
+
+ facep->setTextureIndex(cur_tex);
+ }
}
- ++i;
- index_count += facep->getIndicesCount();
- geom_count += facep->getGeomCount();
+ tex = texture_list[0];
+ }
+ else
+ {
+ while (i != faces.end() &&
+ (LLPipeline::sTextureBindTest || (distance_sort || (*i)->getTexture() == tex)))
+ {
+ facep = *i;
+
+
+ //face has no texture index
+ facep->mDrawInfo = NULL;
+ facep->setTextureIndex(255);
+
+ if (geom_count + facep->getGeomCount() > max_vertices)
+ { //cut batches on geom count too big
+ break;
+ }
+
+ ++i;
+ index_count += facep->getIndicesCount();
+ geom_count += facep->getGeomCount();
+ }
}
//create/delete/resize vertex buffer if needed
LLVertexBuffer* buffer = NULL;
- LLSpatialGroup::buffer_texture_map_t::iterator found_iter = group->mBufferMap[mask].find(tex);
+ LLSpatialGroup::buffer_texture_map_t::iterator found_iter = group->mBufferMap[mask].find(*face_iter);
if (found_iter != group->mBufferMap[mask].end())
{
@@ -4469,7 +4663,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
}
- buffer_map[mask][tex].push_back(buffer);
+ buffer_map[mask][*face_iter].push_back(buffer);
//add face geometry
@@ -4483,6 +4677,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
facep->setGeomIndex(index_offset);
facep->setVertexBuffer(buffer);
+ if (batch_textures && facep->getTextureIndex() == 255)
+ {
+ llerrs << "Invalid texture index." << llendl;
+ }
+
{
//for debugging, set last time face was updated vs moved
facep->updateRebuildFlags();
@@ -4495,12 +4694,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
U32 te_idx = facep->getTEOffset();
- if (facep->getGeometryVolume(*volume, te_idx,
- vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset))
- {
- buffer->markDirty(facep->getGeomIndex(), facep->getGeomCount(),
- facep->getIndicesStart(), facep->getIndicesCount());
- }
+ facep->getGeometryVolume(*volume, te_idx,
+ vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset);
}
}
@@ -4681,7 +4876,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
{
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
-
+ llassert(facep->getIndicesCount() < 65536);
//remember face (for sorting)
mFaceList.push_back(facep);
}
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 51664cb31d..7b1c725483 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -568,7 +568,7 @@ void LLVOWLSky::buildFanBuffer(LLStrider<LLVector3> & vertices,
LLStrider<LLVector2> & texCoords,
LLStrider<U16> & indices)
{
- const F32 RADIUS = LLWLParamManager::instance()->getDomeRadius();
+ const F32 RADIUS = LLWLParamManager::getInstance()->getDomeRadius();
U32 i, num_slices;
F32 phi0, theta, x0, y0, z0;
@@ -629,7 +629,7 @@ void LLVOWLSky::buildStripsBuffer(U32 begin_stack, U32 end_stack,
LLStrider<LLVector2> & texCoords,
LLStrider<U16> & indices)
{
- const F32 RADIUS = LLWLParamManager::instance()->getDomeRadius();
+ const F32 RADIUS = LLWLParamManager::getInstance()->getDomeRadius();
U32 i, j, num_slices, num_stacks;
F32 phi0, theta, x0, y0, z0;
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 67bb965f99..1a98d4c6c2 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -54,12 +54,9 @@
#include "llwlparammanager.h"
#include "llwaterparamset.h"
-#include "llfloaterwater.h"
#include "curl/curl.h"
-LLWaterParamManager * LLWaterParamManager::sInstance = NULL;
-
LLWaterParamManager::LLWaterParamManager() :
mFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f, 0.0f, "waterFogColor", "WaterFogColor"),
mFogDensity(4, "waterFogDensity", 2),
@@ -73,8 +70,6 @@ LLWaterParamManager::LLWaterParamManager() :
mWave1Dir(.5f, .5f, "wave1Dir"),
mWave2Dir(.5f, .5f, "wave2Dir"),
mDensitySliderValue(1.0f),
- mPrevFogDensity(16.0f), // 2^4
- mPrevFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f),
mWaterFogKS(1.0f)
{
}
@@ -83,131 +78,73 @@ LLWaterParamManager::~LLWaterParamManager()
{
}
-void LLWaterParamManager::loadAllPresets(const std::string& file_name)
+void LLWaterParamManager::loadAllPresets()
{
- std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL;
-
- bool found = true;
- LLDirIterator app_settings_iter(path_name, "*.xml");
- while(found)
- {
- std::string name;
- found = app_settings_iter.next(name);
- if(found)
- {
-
- name=name.erase(name.length()-4);
+ // First, load system (coming out of the box) water presets.
+ loadPresetsFromDir(getSysDir());
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_unescape(name.c_str(), name.size());
- std::string unescaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
- loadPreset(unescaped_name,FALSE);
- }
- }
+ // Then load user presets. Note that user day presets will modify any system ones already loaded.
+ loadPresetsFromDir(getUserDir());
+}
- // And repeat for user presets, note the user presets will modify any system presets already loaded
+void LLWaterParamManager::loadPresetsFromDir(const std::string& dir)
+{
+ LL_INFOS2("AppInit", "Shaders") << "Loading water presets from " << dir << LL_ENDL;
- std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL;
-
- found = true;
- LLDirIterator user_settings_iter(path_name2, "*.xml");
- while(found)
+ LLDirIterator dir_iter(dir, "*.xml");
+ while (1)
{
- std::string name;
- found = user_settings_iter.next(name);
- if(found)
+ std::string file;
+ if (!dir_iter.next(file))
{
- name=name.erase(name.length()-4);
-
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_unescape(name.c_str(), name.size());
- std::string unescaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
+ break; // no more files
+ }
- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
- loadPreset(unescaped_name,FALSE);
+ std::string path = dir + file;
+ if (!loadPreset(path))
+ {
+ llwarns << "Error loading water preset from " << path << llendl;
}
}
-
}
-void LLWaterParamManager::loadPreset(const std::string & name,bool propagate)
+bool LLWaterParamManager::loadPreset(const std::string& path)
{
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_filename(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
- escaped_filename += ".xml";
+ llifstream xml_file;
+ std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading water settings from " << pathName << LL_ENDL;
-
- llifstream presetsXML;
- presetsXML.open(pathName.c_str());
-
- // That failed, try loading from the users area instead.
- if(!presetsXML)
+ xml_file.open(path.c_str());
+ if (!xml_file)
{
- pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename);
- LL_DEBUGS2("AppInit", "Shaders") << "Loading User water setting from " << pathName << LL_ENDL;
- presetsXML.clear();
- presetsXML.open(pathName.c_str());
+ return false;
}
- if (presetsXML)
- {
- LLSD paramsData(LLSD::emptyMap());
+ LL_DEBUGS2("AppInit", "Shaders") << "Loading water " << name << LL_ENDL;
- LLPointer<LLSDParser> parser = new LLSDXMLParser();
+ LLSD params_data;
+ LLPointer<LLSDParser> parser = new LLSDXMLParser();
+ parser->parse(xml_file, params_data, LLSDSerialize::SIZE_UNLIMITED);
+ xml_file.close();
- parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED);
-
- std::map<std::string, LLWaterParamSet>::iterator mIt = mParamList.find(name);
- if(mIt == mParamList.end())
- {
- addParamSet(name, paramsData);
- }
- else
- {
- setParamSet(name, paramsData);
- }
- presetsXML.close();
- }
- else
+ if (hasParamSet(name))
{
- llwarns << "Can't find " << name << llendl;
- return;
+ setParamSet(name, params_data);
}
-
- if(propagate)
+ else
{
- getParamSet(name, mCurParams);
- propagateParameters();
+ addParamSet(name, params_data);
}
-}
+
+ return true;
+}
void LLWaterParamManager::savePreset(const std::string & name)
{
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_filename(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
- escaped_filename += ".xml";
+ llassert(!name.empty());
// make an empty llsd
LLSD paramsData(LLSD::emptyMap());
- std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename));
+ std::string pathName(getUserDir() + LLURI::escape(name) + ".xml");
// fill it with LLSD windlight params
paramsData = mParamList[name].getAll();
@@ -221,7 +158,6 @@ void LLWaterParamManager::savePreset(const std::string & name)
propagateParameters();
}
-
void LLWaterParamManager::propagateParameters(void)
{
// bind the variables only if we're using shaders
@@ -251,7 +187,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
{
if (shader->mShaderGroup == LLGLSLShader::SG_WATER)
{
- shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::instance()->getRotatedLightDir().mV);
+ shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::getInstance()->getRotatedLightDir().mV);
shader->uniform3fv("camPosLocal", 1, LLViewerCamera::getInstance()->getOrigin().mV);
shader->uniform4fv("waterFogColor", 1, LLDrawPoolWater::sWaterFogColor.mV);
shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
@@ -261,36 +197,33 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
}
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params");
-
-void LLWaterParamManager::update(LLViewerCamera * cam)
+void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate)
{
- LLFastTimer ftm(FTM_UPDATE_WLPARAM);
-
- // update the shaders and the menu
- propagateParameters();
-
- // If water fog color has been changed, save it.
- if (mPrevFogColor != mFogColor)
+ if (params.size() == 0)
{
- gSavedSettings.setColor4("WaterFogColor", mFogColor);
- mPrevFogColor = mFogColor;
+ llwarns << "Undefined water params" << llendl;
+ return;
}
- // If water fog density has been changed, save it.
- if (mPrevFogDensity != mFogDensity)
+ if (interpolate)
{
- gSavedSettings.setF32("WaterFogDensity", mFogDensity);
- mPrevFogDensity = mFogDensity;
+ LLWLParamManager::getInstance()->mAnimator.startInterpolation(params);
}
-
- // sync menus if they exist
- LLFloaterWater* waterfloater = LLFloaterReg::findTypedInstance<LLFloaterWater>("env_water");
- if(waterfloater)
+ else
{
- waterfloater->syncMenu();
+ mCurParams.setAll(params);
}
+}
+static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params");
+
+void LLWaterParamManager::update(LLViewerCamera * cam)
+{
+ LLFastTimer ftm(FTM_UPDATE_WATERPARAM);
+
+ // update the shaders and the menu
+ propagateParameters();
+
// only do this if we're dealing with shaders
if(gPipeline.canUseVertexShaders())
{
@@ -339,26 +272,14 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
}
}
-// static
-void LLWaterParamManager::initClass(void)
-{
- instance();
-}
-
-// static
-void LLWaterParamManager::cleanupClass(void)
-{
- delete sInstance;
- sInstance = NULL;
-}
-
bool LLWaterParamManager::addParamSet(const std::string& name, LLWaterParamSet& param)
{
// add a new one if not one there already
- std::map<std::string, LLWaterParamSet>::iterator mIt = mParamList.find(name);
+ preset_map_t::iterator mIt = mParamList.find(name);
if(mIt == mParamList.end())
{
mParamList[name] = param;
+ mPresetListChangeSignal();
return true;
}
@@ -367,23 +288,15 @@ bool LLWaterParamManager::addParamSet(const std::string& name, LLWaterParamSet&
BOOL LLWaterParamManager::addParamSet(const std::string& name, LLSD const & param)
{
- // add a new one if not one there already
- std::map<std::string, LLWaterParamSet>::const_iterator finder = mParamList.find(name);
- if(finder == mParamList.end())
- {
- mParamList[name].setAll(param);
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+ LLWaterParamSet param_set;
+ param_set.setAll(param);
+ return addParamSet(name, param_set);
}
bool LLWaterParamManager::getParamSet(const std::string& name, LLWaterParamSet& param)
{
// find it and set it
- std::map<std::string, LLWaterParamSet>::iterator mIt = mParamList.find(name);
+ preset_map_t::iterator mIt = mParamList.find(name);
if(mIt != mParamList.end())
{
param = mParamList[name];
@@ -394,6 +307,12 @@ bool LLWaterParamManager::getParamSet(const std::string& name, LLWaterParamSet&
return false;
}
+bool LLWaterParamManager::hasParamSet(const std::string& name)
+{
+ LLWaterParamSet dummy;
+ return getParamSet(name, dummy);
+}
+
bool LLWaterParamManager::setParamSet(const std::string& name, LLWaterParamSet& param)
{
mParamList[name] = param;
@@ -417,29 +336,74 @@ bool LLWaterParamManager::setParamSet(const std::string& name, const LLSD & para
bool LLWaterParamManager::removeParamSet(const std::string& name, bool delete_from_disk)
{
// remove from param list
- std::map<std::string, LLWaterParamSet>::iterator mIt = mParamList.find(name);
- if(mIt != mParamList.end())
+ preset_map_t::iterator it = mParamList.find(name);
+ if (it == mParamList.end())
{
- mParamList.erase(mIt);
+ LL_WARNS("WindLight") << "No water preset named " << name << LL_ENDL;
+ return false;
}
- if(delete_from_disk)
- {
+ mParamList.erase(it);
- std::string path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
-
- // use full curl escaped name
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
- gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml");
+ // remove from file system if requested
+ if (delete_from_disk)
+ {
+ if (gDirUtilp->deleteFilesInDir(getUserDir(), LLURI::escape(name) + ".xml") < 1)
+ {
+ LL_WARNS("WindLight") << "Error removing water preset " << name << " from disk" << LL_ENDL;
+ }
}
+ // signal interested parties
+ mPresetListChangeSignal();
return true;
}
+bool LLWaterParamManager::isSystemPreset(const std::string& preset_name) const
+{
+ // *TODO: file system access is excessive here.
+ return gDirUtilp->fileExists(getSysDir() + LLURI::escape(preset_name) + ".xml");
+}
+
+void LLWaterParamManager::getPresetNames(preset_name_list_t& presets) const
+{
+ presets.clear();
+
+ for (preset_map_t::const_iterator it = mParamList.begin(); it != mParamList.end(); ++it)
+ {
+ presets.push_back(it->first);
+ }
+}
+
+void LLWaterParamManager::getPresetNames(preset_name_list_t& user_presets, preset_name_list_t& system_presets) const
+{
+ user_presets.clear();
+ system_presets.clear();
+
+ for (preset_map_t::const_iterator it = mParamList.begin(); it != mParamList.end(); ++it)
+ {
+ if (isSystemPreset(it->first))
+ {
+ system_presets.push_back(it->first);
+ }
+ else
+ {
+ user_presets.push_back(it->first);
+ }
+ }
+}
+
+void LLWaterParamManager::getUserPresetNames(preset_name_list_t& user_presets) const
+{
+ preset_name_list_t dummy;
+ getPresetNames(user_presets, dummy);
+}
+
+boost::signals2::connection LLWaterParamManager::setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb)
+{
+ return mPresetListChangeSignal.connect(cb);
+}
+
F32 LLWaterParamManager::getFogDensity(void)
{
bool err;
@@ -458,34 +422,22 @@ F32 LLWaterParamManager::getFogDensity(void)
return fogDensity;
}
-// static
-LLWaterParamManager * LLWaterParamManager::instance()
+// virtual static
+void LLWaterParamManager::initSingleton()
{
- if(NULL == sInstance)
- {
- sInstance = new LLWaterParamManager();
-
- sInstance->loadAllPresets(LLStringUtil::null);
-
- sInstance->getParamSet("Default", sInstance->mCurParams);
- sInstance->initOverrides();
- }
+ LL_DEBUGS("Windlight") << "Initializing water" << LL_ENDL;
+ loadAllPresets();
+ LLEnvManagerNew::instance().usePrefs();
+}
- return sInstance;
+// static
+std::string LLWaterParamManager::getSysDir()
+{
+ return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "");
}
-void LLWaterParamManager::initOverrides()
+// static
+std::string LLWaterParamManager::getUserDir()
{
- // Override fog color from the current preset with the saved setting.
- LLColor4 fog_color_override = gSavedSettings.getColor4("WaterFogColor");
- mFogColor = fog_color_override;
- mPrevFogColor = fog_color_override;
- mCurParams.set("waterFogColor", fog_color_override);
-
- // Do the same with fog density.
- F32 fog_density = gSavedSettings.getF32("WaterFogDensity");
- mPrevFogDensity = fog_density;
- mFogDensity = fog_density;
- mCurParams.set("waterFogDensity", fog_density);
- setDensitySliderValue(mFogDensity.mExp);
+ return gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS , "windlight/water", "");
}
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index f465034c39..dc7d41be2a 100644
--- a/indra/newview/llwaterparammanager.h
+++ b/indra/newview/llwaterparammanager.h
@@ -27,7 +27,7 @@
#ifndef LL_WATER_PARAMMANAGER_H
#define LL_WATER_PARAMMANAGER_H
-#include <vector>
+#include <list>
#include <map>
#include "llwaterparamset.h"
#include "llviewercamera.h"
@@ -212,19 +212,13 @@ struct WaterExpFloatControl
/// WindLight parameter manager class - what controls all the wind light shaders
-class LLWaterParamManager
+class LLWaterParamManager : public LLSingleton<LLWaterParamManager>
{
+ LOG_CLASS(LLWaterParamManager);
public:
-
- LLWaterParamManager();
- ~LLWaterParamManager();
-
- /// load a preset file
- void loadAllPresets(const std::string & fileName);
-
- /// load an individual preset into the sky
-
- void loadPreset(const std::string & name,bool propagate=true);
+ typedef std::list<std::string> preset_name_list_t;
+ typedef std::map<std::string, LLWaterParamSet> preset_map_t;
+ typedef boost::signals2::signal<void()> preset_list_signal_t;
/// save the parameter presets to file
void savePreset(const std::string & name);
@@ -232,18 +226,15 @@ public:
/// send the parameters to the shaders
void propagateParameters(void);
+ // display specified water
+ void applyParams(const LLSD& params, bool interpolate);
+
/// update information for the shader
void update(LLViewerCamera * cam);
/// Update shader uniforms that have changed.
void updateShaderUniforms(LLGLSLShader * shader);
- /// Perform global initialization for this class.
- static void initClass(void);
-
- // Cleanup of global data that's only inited once per class.
- static void cleanupClass();
-
/// add a param to the list
bool addParamSet(const std::string& name, LLWaterParamSet& param);
@@ -253,6 +244,9 @@ public:
/// get a param from the list
bool getParamSet(const std::string& name, LLWaterParamSet& param);
+ /// check whether the preset is in the list
+ bool hasParamSet(const std::string& name);
+
/// set the param in the list with a new param
bool setParamSet(const std::string& name, LLWaterParamSet& param);
@@ -263,6 +257,24 @@ public:
/// returns true if successful
bool removeParamSet(const std::string& name, bool delete_from_disk);
+ /// @return true if the preset comes out of the box
+ bool isSystemPreset(const std::string& preset_name) const;
+
+ /// @return all named water presets.
+ const preset_map_t& getPresets() const { return mParamList; }
+
+ /// @return user and system preset names as a single list
+ void getPresetNames(preset_name_list_t& presets) const;
+
+ /// @return user and system preset names separately
+ void getPresetNames(preset_name_list_t& user_presets, preset_name_list_t& system_presets) const;
+
+ /// @return list of user presets names
+ void getUserPresetNames(preset_name_list_t& user_presets) const;
+
+ /// Emitted when a preset gets added or deleted.
+ boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb);
+
/// set the normap map we want for water
bool setNormalMapID(const LLUUID& img);
@@ -281,12 +293,6 @@ public:
F32 getFogDensity(void);
LLColor4 getFogColor(void);
- // singleton pattern implementation
- static LLWaterParamManager * instance();
-
-private:
- void initOverrides();
-
public:
LLWaterParamSet mCurParams;
@@ -308,20 +314,28 @@ public:
WaterFloatControl mScaleBelow;
WaterFloatControl mBlurMultiplier;
- // list of all the parameters, listed by name
- std::map<std::string, LLWaterParamSet> mParamList;
-
F32 mDensitySliderValue;
private:
+ friend class LLSingleton<LLWaterParamManager>;
+ /*virtual*/ void initSingleton();
+ LLWaterParamManager();
+ ~LLWaterParamManager();
+
+ void loadAllPresets();
+ void loadPresetsFromDir(const std::string& dir);
+ bool loadPreset(const std::string& path);
+
+ static std::string getSysDir();
+ static std::string getUserDir();
+
LLVector4 mWaterPlane;
F32 mWaterFogKS;
- LLColor4 mPrevFogColor;
- F32 mPrevFogDensity;
+ // list of all the parameters, listed by name
+ preset_map_t mParamList;
- // our parameter manager singleton instance
- static LLWaterParamManager * sInstance;
+ preset_list_signal_t mPresetListChangeSignal;
};
inline void LLWaterParamManager::setDensitySliderValue(F32 val)
diff --git a/indra/newview/llwaterparamset.cpp b/indra/newview/llwaterparamset.cpp
index 9457d631be..39d366b023 100644
--- a/indra/newview/llwaterparamset.cpp
+++ b/indra/newview/llwaterparamset.cpp
@@ -29,7 +29,6 @@
#include "llwaterparamset.h"
#include "llsd.h"
-#include "llfloaterwater.h"
#include "llwaterparammanager.h"
#include "lluictrlfactory.h"
#include "llsliderctrl.h"
@@ -224,3 +223,46 @@ F32 LLWaterParamSet::getFloat(const std::string& paramName, bool& error)
return 0;
}
+// Added for interpolation effect in DEV-33645
+// Based on LLWLParamSet::mix, but written by Jacob without an intimate knowledge of how WindLight works.
+// The function definition existed in the header but was never implemented. If you think there is something
+// wrong with this, you're probably right. Ask Jacob, Q, or a member of the original WindLight team.
+void LLWaterParamSet::mix(LLWaterParamSet& src, LLWaterParamSet& dest, F32 weight)
+{
+ // Setup
+ LLSD srcVal, destVal; // LLSD holders for get/set calls, reusable
+
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
+ // If param exists in both src and dest, set the holder variables, otherwise skip
+ if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first))
+ {
+ srcVal = src.mParamValues[iter->first];
+ destVal = dest.mParamValues[iter->first];
+ }
+ else
+ {
+ continue;
+ }
+
+ if(iter->second.isReal()) // If it's a real, interpolate directly
+ {
+ iter->second = srcVal.asReal() + ((destVal.asReal() - srcVal.asReal()) * weight);
+ }
+ else if(iter->second.isArray() && iter->second[0].isReal() // If it's an array of reals, loop through the reals and interpolate on those
+ && iter->second.size() == srcVal.size() && iter->second.size() == destVal.size())
+ {
+ // Actually do interpolation: old value + (difference in values * factor)
+ for(int i=0; i < iter->second.size(); ++i)
+ {
+ // iter->second[i] = (1.f-weight)*(F32)srcVal[i].asReal() + weight*(F32)destVal[i].asReal(); // old way of doing it -- equivalent but one more operation
+ iter->second[i] = srcVal[i].asReal() + ((destVal[i].asReal() - srcVal[i].asReal()) * weight);
+ }
+ }
+ else // Else, skip
+ {
+ continue;
+ }
+ }
+}
diff --git a/indra/newview/llwaterparamset.h b/indra/newview/llwaterparamset.h
index 9957d5371b..b28585af59 100644
--- a/indra/newview/llwaterparamset.h
+++ b/indra/newview/llwaterparamset.h
@@ -34,7 +34,6 @@
#include "v4color.h"
#include "llviewershadermgr.h"
-class LLFloaterWater;
class LLWaterParamSet;
/// A class representing a set of parameter values for the Water shaders.
diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp
index a94a2e41aa..e568638cf6 100644
--- a/indra/newview/llwlanimator.cpp
+++ b/indra/newview/llwlanimator.cpp
@@ -30,20 +30,31 @@
#include "llsky.h"
#include "pipeline.h"
#include "llwlparammanager.h"
+#include "llwaterparammanager.h"
-LLWLAnimator::LLWLAnimator() : mStartTime(0), mDayRate(1), mDayTime(0),
- mIsRunning(FALSE), mUseLindenTime(false)
+extern LLControlGroup gSavedSettings;
+
+F64 LLWLAnimator::INTERP_TOTAL_SECONDS = 3.f;
+
+LLWLAnimator::LLWLAnimator() : mStartTime(0.f), mDayRate(1.f), mDayTime(0.f),
+ mIsRunning(FALSE), mIsInterpolating(FALSE), mTimeType(TIME_LINDEN),
+ mInterpStartTime(), mInterpEndTime()
{
- mDayTime = 0;
+ mInterpBeginWL = new LLWLParamSet();
+ mInterpBeginWater = new LLWaterParamSet();
+ mInterpEndWater = new LLWaterParamSet();
}
void LLWLAnimator::update(LLWLParamSet& curParams)
{
+ //llassert(mUseLindenTime != mUseLocalTime);
+
F64 curTime;
curTime = getDayTime();
// don't do anything if empty
- if(mTimeTrack.size() == 0) {
+ if(mTimeTrack.size() == 0)
+ {
return;
}
@@ -53,13 +64,15 @@ void LLWLAnimator::update(LLWLParamSet& curParams)
mSecondIt++;
// grab the two tween iterators
- while(mSecondIt != mTimeTrack.end() && curTime > mSecondIt->first) {
+ while(mSecondIt != mTimeTrack.end() && curTime > mSecondIt->first)
+ {
mFirstIt++;
mSecondIt++;
}
// scroll it around when you get to the end
- if(mSecondIt == mTimeTrack.end() || mFirstIt->first > curTime) {
+ if(mSecondIt == mTimeTrack.end() || mFirstIt->first > curTime)
+ {
mSecondIt = mTimeTrack.begin();
mFirstIt = mTimeTrack.end();
mFirstIt--;
@@ -67,70 +80,111 @@ void LLWLAnimator::update(LLWLParamSet& curParams)
F32 weight = 0;
- if(mFirstIt->first < mSecondIt->first) {
+ if(mFirstIt->first < mSecondIt->first)
+ {
// get the delta time and the proper weight
weight = F32 (curTime - mFirstIt->first) /
(mSecondIt->first - mFirstIt->first);
// handle the ends
- } else if(mFirstIt->first > mSecondIt->first) {
+ }
+ else if(mFirstIt->first > mSecondIt->first)
+ {
// right edge of time line
- if(curTime >= mFirstIt->first) {
+ if(curTime >= mFirstIt->first)
+ {
weight = F32 (curTime - mFirstIt->first) /
((1 + mSecondIt->first) - mFirstIt->first);
-
// left edge of time line
- } else {
+ }
+ else
+ {
weight = F32 ((1 + curTime) - mFirstIt->first) /
((1 + mSecondIt->first) - mFirstIt->first);
}
-
// handle same as whatever the last one is
- } else {
+ }
+ else
+ {
weight = 1;
}
+ if(mIsInterpolating)
+ {
+ // *TODO_JACOB: this is kind of laggy. Not sure why. The part that lags is the curParams.mix call, and none of the other mixes. It works, though.
+ clock_t current = clock();
+ if(current >= mInterpEndTime)
+ {
+ mIsInterpolating = false;
+ return;
+ }
+
+ // determine moving target for final interpolation value
+ // *TODO: this will not work with lazy loading of sky presets.
+ LLWLParamSet buf = LLWLParamSet();
+ buf.setAll(LLWLParamManager::getInstance()->mParamList[mFirstIt->second].getAll()); // just give it some values, otherwise it has no params to begin with (see comment in constructor)
+ buf.mix(LLWLParamManager::getInstance()->mParamList[mFirstIt->second], LLWLParamManager::getInstance()->mParamList[mSecondIt->second], weight); // mix to determine moving target for interpolation finish (as below)
+
+ // mix from previous value to moving target
+ weight = (current - mInterpStartTime) / (INTERP_TOTAL_SECONDS * CLOCKS_PER_SEC);
+ curParams.mix(*mInterpBeginWL, buf, weight);
+
+ // mix water
+ LLWaterParamManager::getInstance()->mCurParams.mix(*mInterpBeginWater, *mInterpEndWater, weight);
+ }
+ else
+ {
// do the interpolation and set the parameters
- curParams.mix(LLWLParamManager::instance()->mParamList[mFirstIt->second],
- LLWLParamManager::instance()->mParamList[mSecondIt->second], weight);
+ // *TODO: this will not work with lazy loading of sky presets.
+ curParams.mix(LLWLParamManager::getInstance()->mParamList[mFirstIt->second], LLWLParamManager::getInstance()->mParamList[mSecondIt->second], weight);
+ }
}
F64 LLWLAnimator::getDayTime()
{
- if(!mIsRunning) {
+ if(!mIsRunning)
+ {
return mDayTime;
}
-
- if(mUseLindenTime) {
-
+ else if(mTimeType == TIME_LINDEN)
+ {
F32 phase = gSky.getSunPhase() / F_PI;
// we're not solving the non-linear equation that determines sun phase
// we're just linearly interpolating between the major points
if (phase <= 5.0 / 4.0) {
mDayTime = (1.0 / 3.0) * phase + (1.0 / 3.0);
- } else {
+ }
+ else
+ {
mDayTime = phase - (1.0 / 2.0);
}
- if(mDayTime > 1) {
+ if(mDayTime > 1)
+ {
mDayTime--;
}
return mDayTime;
}
+ else if(mTimeType == TIME_LOCAL)
+ {
+ return getLocalTime();
+ }
// get the time;
mDayTime = (LLTimer::getElapsedSeconds() - mStartTime) / mDayRate;
// clamp it
- if(mDayTime < 0) {
+ if(mDayTime < 0)
+ {
mDayTime = 0;
}
- while(mDayTime > 1) {
+ while(mDayTime > 1)
+ {
mDayTime--;
}
@@ -144,15 +198,18 @@ void LLWLAnimator::setDayTime(F64 dayTime)
mDayTime = dayTime;
// clamp it
- if(mDayTime < 0) {
+ if(mDayTime < 0)
+ {
mDayTime = 0;
- } else if(mDayTime > 1) {
+ }
+ else if(mDayTime > 1)
+ {
mDayTime = 1;
}
}
-void LLWLAnimator::setTrack(std::map<F32, std::string>& curTrack,
+void LLWLAnimator::setTrack(std::map<F32, LLWLParamKey>& curTrack,
F32 dayRate, F64 dayTime, bool run)
{
mTimeTrack = curTrack;
@@ -161,3 +218,96 @@ void LLWLAnimator::setTrack(std::map<F32, std::string>& curTrack,
mIsRunning = run;
}
+
+void LLWLAnimator::startInterpolation(const LLSD& targetWater)
+{
+ mInterpBeginWL->setAll(LLWLParamManager::getInstance()->mCurParams.getAll());
+ mInterpBeginWater->setAll(LLWaterParamManager::getInstance()->mCurParams.getAll());
+
+ mInterpStartTime = clock();
+ mInterpEndTime = mInterpStartTime + clock_t(INTERP_TOTAL_SECONDS) * CLOCKS_PER_SEC;
+
+ // Don't set any ending WL -- this is continuously calculated as the animator updates since it's a moving target
+ mInterpEndWater->setAll(targetWater);
+
+ mIsInterpolating = true;
+}
+
+std::string LLWLAnimator::timeToString(F32 curTime)
+{
+ S32 hours;
+ S32 min;
+ bool isPM = false;
+
+ // get hours and minutes
+ hours = (S32) (24.0 * curTime);
+ curTime -= ((F32) hours / 24.0f);
+ min = llround(24.0f * 60.0f * curTime);
+
+ // handle case where it's 60
+ if(min == 60)
+ {
+ hours++;
+ min = 0;
+ }
+
+ // set for PM
+ if(hours >= 12 && hours < 24)
+ {
+ isPM = true;
+ }
+
+ // convert to non-military notation
+ if(hours >= 24)
+ {
+ hours = 12;
+ }
+ else if(hours > 12)
+ {
+ hours -= 12;
+ }
+ else if(hours == 0)
+ {
+ hours = 12;
+ }
+
+ // make the string
+ std::stringstream newTime;
+ newTime << hours << ":";
+
+ // double 0
+ if(min < 10)
+ {
+ newTime << 0;
+ }
+
+ // finish it
+ newTime << min << " ";
+ if(isPM)
+ {
+ newTime << "PM";
+ }
+ else
+ {
+ newTime << "AM";
+ }
+
+ return newTime.str();
+}
+
+F64 LLWLAnimator::getLocalTime()
+{
+ char buffer[9];
+ time_t rawtime;
+ struct tm* timeinfo;
+
+ time(&rawtime);
+ timeinfo = localtime(&rawtime);
+ strftime(buffer, 9, "%H:%M:%S", timeinfo);
+ std::string timeStr(buffer);
+
+ F64 tod = ((F64)atoi(timeStr.substr(0,2).c_str())) / 24.f +
+ ((F64)atoi(timeStr.substr(3,2).c_str())) / 1440.f +
+ ((F64)atoi(timeStr.substr(6,2).c_str())) / 86400.f;
+ return tod;
+}
diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h
index 5677290213..5223b45343 100644
--- a/indra/newview/llwlanimator.h
+++ b/indra/newview/llwlanimator.h
@@ -28,28 +28,39 @@
#define LL_WL_ANIMATOR_H
#include "llwlparamset.h"
+#include "llwaterparamset.h"
#include <string>
#include <map>
+struct LLWLParamKey;
+
class LLWLAnimator {
public:
+ typedef enum e_time
+ {
+ TIME_LINDEN,
+ TIME_LOCAL,
+ TIME_CUSTOM
+ } ETime;
+
F64 mStartTime;
F32 mDayRate;
F64 mDayTime;
// track to play
- std::map<F32, std::string> mTimeTrack;
- std::map<F32, std::string>::iterator mFirstIt, mSecondIt;
-
- // params to use
- //std::map<std::string, LLWLParamSet> mParamList;
-
- bool mIsRunning;
- bool mUseLindenTime;
+ std::map<F32, LLWLParamKey> mTimeTrack;
+ std::map<F32, LLWLParamKey>::iterator mFirstIt, mSecondIt;
// simple constructor
LLWLAnimator();
+ ~LLWLAnimator()
+ {
+ delete mInterpBeginWL;
+ delete mInterpBeginWater;
+ delete mInterpEndWater;
+ }
+
// update the parameters
void update(LLWLParamSet& curParams);
@@ -63,9 +74,66 @@ public:
void setDayTime(F64 dayTime);
// set an animation track
- void setTrack(std::map<F32, std::string>& track,
+ void setTrack(std::map<F32, LLWLParamKey>& track,
F32 dayRate, F64 dayTime = 0, bool run = true);
+ void deactivate()
+ {
+ mIsRunning = false;
+ }
+
+ void activate(ETime time)
+ {
+ mIsRunning = true;
+ mTimeType = time;
+ }
+
+ void startInterpolation(const LLSD& targetWater);
+
+ bool getIsRunning()
+ {
+ return mIsRunning;
+ }
+
+ bool getUseCustomTime()
+ {
+ return mTimeType == TIME_CUSTOM;
+ }
+
+ bool getUseLocalTime()
+ {
+ return mTimeType == TIME_LOCAL;
+ }
+
+ bool getUseLindenTime()
+ {
+ return mTimeType == TIME_LINDEN;
+ }
+
+ void setTimeType(ETime time)
+ {
+ mTimeType = time;
+ }
+
+ ETime getTimeType()
+ {
+ return mTimeType;
+ }
+
+ /// convert the present time to a digital clock time
+ static std::string timeToString(F32 curTime);
+
+ /// get local time between 0 and 1
+ static F64 getLocalTime();
+
+private:
+ ETime mTimeType;
+ bool mIsRunning, mIsInterpolating;
+ LLWLParamSet *mInterpBeginWL;
+ LLWaterParamSet *mInterpBeginWater, *mInterpEndWater;
+ clock_t mInterpStartTime, mInterpEndTime;
+
+ static F64 INTERP_TOTAL_SECONDS;
};
#endif // LL_WL_ANIMATOR_H
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 85b3d62a49..4c0cb7c0f4 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -27,12 +27,11 @@
#include "llviewerprecompiledheaders.h"
#include "llwldaycycle.h"
-
-#include "llnotificationsutil.h"
#include "llsdserialize.h"
-#include "llxmlnode.h"
-
#include "llwlparammanager.h"
+#include "llnotifications.h"
+
+#include "llviewerwindow.h"
#include <map>
@@ -45,85 +44,160 @@ LLWLDayCycle::~LLWLDayCycle()
{
}
-void LLWLDayCycle::loadDayCycle(const std::string & fileName)
+void LLWLDayCycle::loadDayCycle(const LLSD& day_data, LLWLParamKey::EScope scope)
{
- // clear the first few things
+ lldebugs << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << llendl;
mTimeMap.clear();
- // now load the file
- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
- "windlight/days", fileName));
- llinfos << "Loading DayCycle settings from " << pathName << llendl;
-
- llifstream day_cycle_xml(pathName);
- if (day_cycle_xml.is_open())
+ // add each key frame
+ for(S32 i = 0; i < day_data.size(); ++i)
{
- // load and parse it
- LLSD day_data(LLSD::emptyArray());
- LLPointer<LLSDParser> parser = new LLSDXMLParser();
- parser->parse(day_cycle_xml, day_data, LLSDSerialize::SIZE_UNLIMITED);
-
- // add each key
- for(S32 i = 0; i < day_data.size(); ++i)
+ // make sure it's a two array
+ if(day_data[i].size() != 2)
+ {
+ continue;
+ }
+
+ // check each param key exists in param manager
+ bool success;
+ LLWLParamSet pset;
+ LLWLParamKey frame = LLWLParamKey(day_data[i][1].asString(), scope);
+ success =
+ LLWLParamManager::getInstance()->getParamSet(frame, pset);
+ if(!success)
{
- // make sure it's a two array
- if(day_data[i].size() != 2)
+ // *HACK: If loading region day cycle, try local sky presets as well.
+ // Local presets may be referenced by a region day cycle after
+ // it has been edited but the changes have not been uploaded.
+ if (scope == LLEnvKey::SCOPE_REGION)
{
- continue;
+ frame.scope = LLEnvKey::SCOPE_LOCAL;
+ success = LLWLParamManager::getInstance()->getParamSet(frame, pset);
}
-
- // check each param name exists in param manager
- bool success;
- LLWLParamSet pset;
- success = LLWLParamManager::instance()->getParamSet(day_data[i][1].asString(), pset);
- if(!success)
+
+ if (!success)
{
// alert the user
LLSD args;
args["SKY"] = day_data[i][1].asString();
- LLNotificationsUtil::add("WLMissingSky", args);
+ LLNotifications::instance().add("WLMissingSky", args, LLSD());
continue;
}
-
- // then add the key
- addKey((F32)day_data[i][0].asReal(), day_data[i][1].asString());
}
+
+ // then add the keyframe
+ addKeyframe((F32)day_data[i][0].asReal(), frame);
+ }
+}
+
+void LLWLDayCycle::loadDayCycleFromFile(const std::string & fileName)
+{
+ loadDayCycle(loadCycleDataFromFile(fileName), LLWLParamKey::SCOPE_LOCAL);
+}
+/*static*/ LLSD LLWLDayCycle::loadCycleDataFromFile(const std::string & fileName)
+{
+ // *FIX: Cannot load user day cycles.
+ std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
+ "windlight/days", fileName));
+
+ return loadDayCycleFromPath(pathName);
+}
+
+// static
+LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path)
+{
+ LL_INFOS("Windlight") << "Loading DayCycle settings from " << file_path << LL_ENDL;
+
+ llifstream day_cycle_xml(file_path);
+ if (day_cycle_xml.is_open())
+ {
+ // load and parse it
+ LLSD day_data(LLSD::emptyArray());
+ LLPointer<LLSDParser> parser = new LLSDXMLParser();
+ parser->parse(day_cycle_xml, day_data, LLSDSerialize::SIZE_UNLIMITED);
day_cycle_xml.close();
+ return day_data;
+ }
+ else
+ {
+ return LLSD();
}
}
void LLWLDayCycle::saveDayCycle(const std::string & fileName)
{
- LLSD day_data(LLSD::emptyArray());
-
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", fileName));
//llinfos << "Saving WindLight settings to " << pathName << llendl;
- for(std::map<F32, std::string>::const_iterator mIt = mTimeMap.begin();
- mIt != mTimeMap.end();
- ++mIt)
+ save(pathName);
+}
+
+void LLWLDayCycle::save(const std::string& file_path)
+{
+ LLSD day_data = asLLSD();
+
+ llofstream day_cycle_xml(file_path);
+ LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
+ formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY);
+ day_cycle_xml.close();
+}
+
+LLSD LLWLDayCycle::asLLSD()
+{
+ LLSD day_data(LLSD::emptyArray());
+ for(std::map<F32, LLWLParamKey>::const_iterator mIt = mTimeMap.begin(); mIt != mTimeMap.end(); ++mIt)
{
LLSD key(LLSD::emptyArray());
key.append(mIt->first);
- key.append(mIt->second);
+ key.append(mIt->second.name);
day_data.append(key);
}
- llofstream day_cycle_xml(pathName);
- LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
- formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY);
- day_cycle_xml.close();
+ lldebugs << "Dumping day cycle (" << mTimeMap.size() << ") to LLSD: " << day_data << llendl;
+ return day_data;
}
+bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const
+{
+ bool result = true;
+ LLWLParamManager& wl_mgr = LLWLParamManager::instance();
+
+ refs.clear();
+ for (std::map<F32, LLWLParamKey>::const_iterator iter = mTimeMap.begin(); iter != mTimeMap.end(); ++iter)
+ {
+ const LLWLParamKey& key = iter->second;
+ if (!wl_mgr.getParamSet(key, refs[key]))
+ {
+ llwarns << "Cannot find sky [" << key.name << "] referenced by a day cycle" << llendl;
+ result = false;
+ }
+ }
+
+ return result;
+}
-void LLWLDayCycle::clearKeys()
+bool LLWLDayCycle::getSkyMap(LLSD& sky_map) const
{
+ std::map<LLWLParamKey, LLWLParamSet> refs;
+
+ if (!getSkyRefs(refs))
+ {
+ return false;
+ }
+
+ sky_map = LLWLParamManager::createSkyMap(refs);
+ return true;
+}
+
+void LLWLDayCycle::clearKeyframes()
+{
+ lldebugs << "Clearing key frames" << llendl;
mTimeMap.clear();
}
-bool LLWLDayCycle::addKey(F32 newTime, const std::string & paramName)
+bool LLWLDayCycle::addKeyframe(F32 newTime, LLWLParamKey frame)
{
// no adding negative time
if(newTime < 0)
@@ -134,48 +208,58 @@ bool LLWLDayCycle::addKey(F32 newTime, const std::string & paramName)
// if time not being used, add it and return true
if(mTimeMap.find(newTime) == mTimeMap.end())
{
- mTimeMap.insert(std::pair<F32, std::string>(newTime, paramName));
+ mTimeMap.insert(std::pair<F32, LLWLParamKey>(newTime, frame));
+ lldebugs << "Adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl;
return true;
}
// otherwise, don't add, and return error
+ llwarns << "Error adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl;
return false;
}
-bool LLWLDayCycle::changeKeyTime(F32 oldTime, F32 newTime)
+bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime)
{
+ lldebugs << "Changing key frame time (" << oldTime << " => " << newTime << ")" << llendl;
+
// just remove and add back
- std::string name = mTimeMap[oldTime];
+ LLWLParamKey frame = mTimeMap[oldTime];
- bool stat = removeKey(oldTime);
+ bool stat = removeKeyframe(oldTime);
if(stat == false)
{
+ lldebugs << "Failed to change key frame time (" << oldTime << " => " << newTime << ")" << llendl;
return stat;
}
- return addKey(newTime, name);
+ return addKeyframe(newTime, frame);
}
-bool LLWLDayCycle::changeKeyParam(F32 time, const std::string & name)
+bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key)
{
+ lldebugs << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << llendl;
+
// just remove and add back
// make sure param exists
LLWLParamSet tmp;
- bool stat = LLWLParamManager::instance()->getParamSet(name, tmp);
+ bool stat = LLWLParamManager::getInstance()->getParamSet(key, tmp);
if(stat == false)
{
+ lldebugs << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << llendl;
return stat;
}
- mTimeMap[time] = name;
+ mTimeMap[time] = key;
return true;
}
-bool LLWLDayCycle::removeKey(F32 time)
+bool LLWLDayCycle::removeKeyframe(F32 time)
{
+ lldebugs << "Removing key frame (" << time << ")" << llendl;
+
// look for the time. If there, erase it
- std::map<F32, std::string>::iterator mIt = mTimeMap.find(time);
+ std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time);
if(mIt != mTimeMap.end())
{
mTimeMap.erase(mIt);
@@ -185,15 +269,15 @@ bool LLWLDayCycle::removeKey(F32 time)
return false;
}
-bool LLWLDayCycle::getKey(const std::string & name, F32& key)
+bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time) const
{
- // scroll through till we find the
- std::map<F32, std::string>::iterator mIt = mTimeMap.begin();
+ // scroll through till we find the correct value in the map
+ std::map<F32, LLWLParamKey>::const_iterator mIt = mTimeMap.begin();
for(; mIt != mTimeMap.end(); ++mIt)
{
- if(name == mIt->second)
+ if(frame == mIt->second)
{
- key = mIt->first;
+ key_time = mIt->first;
return true;
}
}
@@ -204,26 +288,52 @@ bool LLWLDayCycle::getKey(const std::string & name, F32& key)
bool LLWLDayCycle::getKeyedParam(F32 time, LLWLParamSet& param)
{
// just scroll on through till you find it
- std::map<F32, std::string>::iterator mIt = mTimeMap.find(time);
- if(mIt != mTimeMap.end())
+ std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time);
+ if(mIt != mTimeMap.end())
{
- return LLWLParamManager::instance()->getParamSet(mIt->second, param);
+ return LLWLParamManager::getInstance()->getParamSet(mIt->second, param);
}
// return error if not found
+ lldebugs << "Key " << time << " not found" << llendl;
return false;
}
bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name)
{
// just scroll on through till you find it
- std::map<F32, std::string>::iterator mIt = mTimeMap.find(time);
+ std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time);
if(mIt != mTimeMap.end())
{
- name = mTimeMap[time];
+ name = mTimeMap[time].name;
return true;
}
// return error if not found
+ lldebugs << "Key " << time << " not found" << llendl;
return false;
}
+
+bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const
+{
+ F32 dummy;
+ return getKeytime(keyframe, dummy);
+}
+
+void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe)
+{
+ lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl;
+ F32 keytime;
+ bool might_exist;
+ do
+ {
+ // look for it
+ might_exist = getKeytime(keyframe, keytime);
+ if(!might_exist)
+ {
+ return;
+ }
+ might_exist = removeKeyframe(keytime);
+
+ } while(might_exist); // might be another one
+}
diff --git a/indra/newview/llwldaycycle.h b/indra/newview/llwldaycycle.h
index 5cbf72191d..c8585564ed 100644
--- a/indra/newview/llwldaycycle.h
+++ b/indra/newview/llwldaycycle.h
@@ -34,13 +34,16 @@ class LLWLDayCycle;
#include <string>
#include "llwlparamset.h"
#include "llwlanimator.h"
+struct LLWLParamKey;
+#include "llenvmanager.h" // for LLEnvKey::EScope
class LLWLDayCycle
{
+ LOG_CLASS(LLWLDayCycle);
public:
// lists what param sets are used when during the day
- std::map<F32, std::string> mTimeMap;
+ std::map<F32, LLWLParamKey> mTimeMap;
// how long is my day
F32 mDayRate;
@@ -54,35 +57,56 @@ public:
~LLWLDayCycle();
/// load a day cycle
- void loadDayCycle(const std::string & fileName);
+ void loadDayCycle(const LLSD& llsd, LLEnvKey::EScope scope);
/// load a day cycle
+ void loadDayCycleFromFile(const std::string & fileName);
+
+ /// save a day cycle
void saveDayCycle(const std::string & fileName);
- /// clear keys
- void clearKeys();
+ /// save a day cycle
+ void save(const std::string& file_path);
+
+ /// load the LLSD data from a file (returns the undefined LLSD if not found)
+ static LLSD loadCycleDataFromFile(const std::string & fileName);
+
+ /// load the LLSD data from a file specified by full path
+ static LLSD loadDayCycleFromPath(const std::string& file_path);
+
+ /// get the LLSD data for this day cycle
+ LLSD asLLSD();
+
+ // get skies referenced by this day cycle
+ bool getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const;
+
+ // get referenced skies as LLSD
+ bool getSkyMap(LLSD& sky_map) const;
+
+ /// clear keyframes
+ void clearKeyframes();
/// Getters and Setters
/// add a new key frame to the day cycle
/// returns true if successful
/// no negative time
- bool addKey(F32 newTime, const std::string & paramName);
+ bool addKeyframe(F32 newTime, LLWLParamKey key);
- /// adjust a key's placement in the day cycle
+ /// adjust a keyframe's placement in the day cycle
/// returns true if successful
- bool changeKeyTime(F32 oldTime, F32 newTime);
+ bool changeKeyframeTime(F32 oldTime, F32 newTime);
- /// adjust a key's parameter used
+ /// adjust a keyframe's parameter used
/// returns true if successful
- bool changeKeyParam(F32 time, const std::string & paramName);
+ bool changeKeyframeParam(F32 time, LLWLParamKey key);
- /// remove a key from the day cycle
+ /// remove a key frame from the day cycle
/// returns true if successful
- bool removeKey(F32 time);
+ bool removeKeyframe(F32 time);
/// get the first key time for a parameter
/// returns false if not there
- bool getKey(const std::string & name, F32& key);
+ bool getKeytime(LLWLParamKey keyFrame, F32& keyTime) const;
/// get the param set at a given time
/// returns true if found one
@@ -92,6 +116,12 @@ public:
/// returns true if it found one
bool getKeyedParamName(F32 time, std::string & name);
+ /// @return true if there are references to the given sky
+ bool hasReferencesTo(const LLWLParamKey& keyframe) const;
+
+ /// removes all references to the sky (paramkey)
+ /// does nothing if the sky doesn't exist in the day
+ void removeReferencesTo(const LLWLParamKey& keyframe);
};
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
new file mode 100644
index 0000000000..b5f53232cc
--- /dev/null
+++ b/indra/newview/llwlhandlers.cpp
@@ -0,0 +1,203 @@
+/**
+ * @file llwlhandlers.cpp
+ * @brief Various classes which handle Windlight-related messaging
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llwlhandlers.h"
+
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "llenvmanager.h"
+#include "llnotificationsutil.h"
+
+/****
+ * LLEnvironmentRequest
+ ****/
+// static
+bool LLEnvironmentRequest::initiate()
+{
+ LLViewerRegion* cur_region = gAgent.getRegion();
+
+ if (!cur_region)
+ {
+ LL_WARNS("WindlightCaps") << "Viewer region not set yet, skipping env. settings request" << LL_ENDL;
+ return false;
+ }
+
+ if (!cur_region->capabilitiesReceived())
+ {
+ LL_INFOS("WindlightCaps") << "Deferring windlight settings request until we've got region caps" << LL_ENDL;
+ cur_region->setCapabilitiesReceivedCallback(boost::bind(&LLEnvironmentRequest::onRegionCapsReceived, _1));
+ return false;
+ }
+
+ return doRequest();
+}
+
+// static
+void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id)
+{
+ if (region_id != gAgent.getRegion()->getRegionID())
+ {
+ LL_INFOS("WindlightCaps") << "Got caps for a non-current region" << LL_ENDL;
+ return;
+ }
+
+ LL_DEBUGS("WindlightCaps") << "Received region capabilities" << LL_ENDL;
+ doRequest();
+}
+
+// static
+bool LLEnvironmentRequest::doRequest()
+{
+ std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
+ if (url.empty())
+ {
+ LL_INFOS("WindlightCaps") << "Skipping windlight setting request - we don't have this capability" << LL_ENDL;
+ // region is apparently not capable of this; don't respond at all
+ return false;
+ }
+
+ LL_INFOS("WindlightCaps") << "Requesting region windlight settings via " << url << LL_ENDL;
+ LLHTTPClient::get(url, new LLEnvironmentRequestResponder());
+ return true;
+}
+
+/****
+ * LLEnvironmentRequestResponder
+ ****/
+int LLEnvironmentRequestResponder::sCount = 0; // init to 0
+
+LLEnvironmentRequestResponder::LLEnvironmentRequestResponder()
+{
+ mID = ++sCount;
+}
+/*virtual*/ void LLEnvironmentRequestResponder::result(const LLSD& unvalidated_content)
+{
+ LL_INFOS("WindlightCaps") << "Received region windlight settings" << LL_ENDL;
+
+ if (mID != sCount)
+ {
+ LL_INFOS("WindlightCaps") << "Got superseded by another responder; ignoring..." << LL_ENDL;
+ return;
+ }
+
+ if (unvalidated_content[0]["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
+ {
+ LL_WARNS("WindlightCaps") << "Not in the region from where this data was received (wanting "
+ << gAgent.getRegion()->getRegionID() << " but got " << unvalidated_content[0]["regionID"].asUUID()
+ << ") - ignoring..." << LL_ENDL;
+ return;
+ }
+
+ LLEnvManagerNew::getInstance()->onRegionSettingsResponse(unvalidated_content);
+}
+/*virtual*/ void LLEnvironmentRequestResponder::error(U32 status, const std::string& reason)
+{
+ LL_INFOS("WindlightCaps") << "Got an error, not using region windlight..." << LL_ENDL;
+ LLEnvManagerNew::getInstance()->onRegionSettingsResponse(LLSD());
+}
+
+/****
+ * LLEnvironmentApply
+ ****/
+
+clock_t LLEnvironmentApply::UPDATE_WAIT_SECONDS = clock_t(3.f);
+clock_t LLEnvironmentApply::sLastUpdate = clock_t(0.f);
+
+// static
+bool LLEnvironmentApply::initiateRequest(const LLSD& content)
+{
+ clock_t current = clock();
+
+ // Make sure we don't update too frequently.
+ if (current < sLastUpdate + (UPDATE_WAIT_SECONDS * CLOCKS_PER_SEC))
+ {
+ LLSD args(LLSD::emptyMap());
+ args["WAIT"] = (F64)UPDATE_WAIT_SECONDS;
+ LLNotificationsUtil::add("EnvUpdateRate", args);
+ return false;
+ }
+
+ sLastUpdate = current;
+
+ // Send update request.
+ std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
+ if (url.empty())
+ {
+ LL_WARNS("WindlightCaps") << "Applying windlight settings not supported" << LL_ENDL;
+ return false;
+ }
+
+ LL_INFOS("WindlightCaps") << "Sending windlight settings to " << url << LL_ENDL;
+ LL_DEBUGS("WindlightCaps") << "content: " << content << LL_ENDL;
+ LLHTTPClient::post(url, content, new LLEnvironmentApplyResponder());
+ return true;
+}
+
+/****
+ * LLEnvironmentApplyResponder
+ ****/
+/*virtual*/ void LLEnvironmentApplyResponder::result(const LLSD& content)
+{
+ if (content["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
+ {
+ LL_WARNS("WindlightCaps") << "No longer in the region where data was sent (currently "
+ << gAgent.getRegion()->getRegionID() << ", reply is from " << content["regionID"].asUUID()
+ << "); ignoring..." << LL_ENDL;
+ return;
+ }
+ else if (content["success"].asBoolean())
+ {
+ LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << content["regionID"].asUUID() << LL_ENDL;
+ LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true);
+ }
+ else
+ {
+ LL_WARNS("WindlightCaps") << "Region couldn't apply windlight settings! Reason from sim: " << content["fail_reason"].asString() << LL_ENDL;
+ LLSD args(LLSD::emptyMap());
+ args["FAIL_REASON"] = content["fail_reason"].asString();
+ LLNotificationsUtil::add("WLRegionApplyFail", args);
+ LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false);
+ }
+}
+/*virtual*/ void LLEnvironmentApplyResponder::error(U32 status, const std::string& reason)
+{
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+
+ LL_WARNS("WindlightCaps") << "Couldn't apply windlight settings to region! Reason: " << msg << LL_ENDL;
+
+ LLSD args(LLSD::emptyMap());
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("WLRegionApplyFail", args);
+}
diff --git a/indra/newview/llwlhandlers.h b/indra/newview/llwlhandlers.h
new file mode 100644
index 0000000000..213bc7c7ce
--- /dev/null
+++ b/indra/newview/llwlhandlers.h
@@ -0,0 +1,106 @@
+/**
+ * @file llwlhandlers.h
+ * @brief Headers for classes in llwlhandlers.cpp
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLWLHANDLERS_H
+#define LL_LLWLHANDLERS_H
+
+#include "llviewerprecompiledheaders.h"
+#include "llhttpclient.h"
+
+class LLEnvironmentRequest
+{
+ LOG_CLASS(LLEnvironmentRequest);
+public:
+ /// @return true if request was successfully sent
+ static bool initiate();
+
+private:
+ static void onRegionCapsReceived(const LLUUID& region_id);
+ static bool doRequest();
+};
+
+class LLEnvironmentRequestResponder: public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLEnvironmentRequestResponder);
+public:
+ virtual void result(const LLSD& content);
+ virtual void error(U32 status, const std::string& reason);
+
+private:
+ friend class LLEnvironmentRequest;
+
+ LLEnvironmentRequestResponder();
+ static int sCount;
+ int mID;
+};
+
+class LLEnvironmentApply
+{
+ LOG_CLASS(LLEnvironmentApply);
+public:
+ /// @return true if request was successfully sent
+ static bool initiateRequest(const LLSD& content);
+
+private:
+ static clock_t sLastUpdate;
+ static clock_t UPDATE_WAIT_SECONDS;
+};
+
+class LLEnvironmentApplyResponder: public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLEnvironmentApplyResponder);
+public:
+ /*
+ * Expecting reply from sim in form of:
+ * {
+ * regionID : uuid,
+ * messageID: uuid,
+ * success : true
+ * }
+ * or
+ * {
+ * regionID : uuid,
+ * success : false,
+ * fail_reason : string
+ * }
+ */
+ virtual void result(const LLSD& content);
+
+ virtual void error(U32 status, const std::string& reason); // non-200 errors only
+
+private:
+ friend class LLEnvironmentApply;
+
+ LLEnvironmentApplyResponder() {}
+};
+
+#endif // LL_LLWLHANDLERS_H
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 848efcbb49..55608a059f 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -37,23 +37,29 @@
#include "llspinctrl.h"
#include "llcheckboxctrl.h"
#include "lluictrlfactory.h"
+#include "llviewercamera.h"
#include "llcombobox.h"
#include "lllineeditor.h"
#include "llsdserialize.h"
#include "v4math.h"
+#include "llviewerdisplay.h"
#include "llviewercontrol.h"
+#include "llviewerwindow.h"
+#include "lldrawpoolwater.h"
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "lldaycyclemanager.h"
+#include "llenvmanager.h"
#include "llwlparamset.h"
#include "llpostprocess.h"
-#include "llfloaterwindlight.h"
-#include "llfloaterdaycycle.h"
-#include "llfloaterenvsettings.h"
-#include "curl/curl.h"
+#include "llviewershadermgr.h"
+#include "llglslshader.h"
-LLWLParamManager * LLWLParamManager::sInstance = NULL;
-static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params");
+#include "curl/curl.h"
+#include "llstreamtools.h"
LLWLParamManager::LLWLParamManager() :
@@ -96,161 +102,237 @@ LLWLParamManager::~LLWLParamManager()
{
}
-void LLWLParamManager::loadPresets(const std::string& file_name)
+void LLWLParamManager::clearParamSetsOfScope(LLWLParamKey::EScope scope)
{
- std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL;
-
- bool found = true;
- LLDirIterator app_settings_iter(path_name, "*.xml");
- while(found)
+ if (LLWLParamKey::SCOPE_LOCAL == scope)
{
- std::string name;
- found = app_settings_iter.next(name);
- if(found)
- {
-
- name=name.erase(name.length()-4);
-
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_unescape(name.c_str(), name.size());
- std::string unescaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
+ LL_WARNS("Windlight") << "Tried to clear windlight sky presets from local system! This shouldn't be called..." << LL_ENDL;
+ return;
+ }
- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
- loadPreset(unescaped_name,FALSE);
+ std::set<LLWLParamKey> to_remove;
+ for(std::map<LLWLParamKey, LLWLParamSet>::iterator iter = mParamList.begin(); iter != mParamList.end(); ++iter)
+ {
+ if(iter->first.scope == scope)
+ {
+ to_remove.insert(iter->first);
}
}
- // And repeat for user presets, note the user presets will modify any system presets already loaded
+ for(std::set<LLWLParamKey>::iterator iter = to_remove.begin(); iter != to_remove.end(); ++iter)
+ {
+ mParamList.erase(*iter);
+ }
+}
- std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL;
-
- found = true;
- LLDirIterator user_settings_iter(path_name2, "*.xml");
- while(found)
+// returns all skies referenced by the day cycle, with their final names
+// side effect: applies changes to all internal structures!
+std::map<LLWLParamKey, LLWLParamSet> LLWLParamManager::finalizeFromDayCycle(LLWLParamKey::EScope scope)
+{
+ lldebugs << "mDay before finalizing:" << llendl;
{
- std::string name;
- found = user_settings_iter.next(name);
- if(found)
+ for (std::map<F32, LLWLParamKey>::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter)
{
- name=name.erase(name.length()-4);
+ LLWLParamKey& key = iter->second;
+ lldebugs << iter->first << "->" << key.name << llendl;
+ }
+ }
+
+ std::map<LLWLParamKey, LLWLParamSet> final_references;
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_unescape(name.c_str(), name.size());
- std::string unescaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
+ // Move all referenced to desired scope, renaming if necessary
+ // First, save skies referenced
+ std::map<LLWLParamKey, LLWLParamSet> current_references; // all skies referenced by the day cycle, with their current names
+ // guard against skies with same name and different scopes
+ std::set<std::string> inserted_names;
+ std::map<std::string, unsigned int> conflicted_names; // integer later used as a count, for uniquely renaming conflicts
- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
- loadPreset(unescaped_name,FALSE);
+ LLWLDayCycle& cycle = mDay;
+ for(std::map<F32, LLWLParamKey>::iterator iter = cycle.mTimeMap.begin();
+ iter != cycle.mTimeMap.end();
+ ++iter)
+ {
+ LLWLParamKey& key = iter->second;
+ std::string desired_name = key.name;
+ replace_newlines_with_whitespace(desired_name); // already shouldn't have newlines, but just in case
+ if(inserted_names.find(desired_name) == inserted_names.end())
+ {
+ inserted_names.insert(desired_name);
}
+ else
+ {
+ // make exist in map
+ conflicted_names[desired_name] = 0;
+ }
+ current_references[key] = mParamList[key];
}
-}
+ // forget all old skies in target scope, and rebuild, renaming as needed
+ clearParamSetsOfScope(scope);
+ for(std::map<LLWLParamKey, LLWLParamSet>::iterator iter = current_references.begin(); iter != current_references.end(); ++iter)
+ {
+ const LLWLParamKey& old_key = iter->first;
-void LLWLParamManager::savePresets(const std::string & fileName)
-{
- //Nobody currently calls me, but if they did, then its reasonable to write the data out to the user's folder
- //and not over the RO system wide version.
+ std::string desired_name(old_key.name);
+ replace_newlines_with_whitespace(desired_name);
- LLSD paramsData(LLSD::emptyMap());
-
- std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", fileName));
+ LLWLParamKey new_key(desired_name, scope); // name will be replaced later if necessary
- for(std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.begin();
- mIt != mParamList.end();
- ++mIt)
- {
- paramsData[mIt->first] = mIt->second.getAll();
- }
+ // if this sky is one with a non-unique name, rename via appending a number
+ // an existing preset of the target scope gets to keep its name
+ if (scope != old_key.scope && conflicted_names.find(desired_name) != conflicted_names.end())
+ {
+ std::string& new_name = new_key.name;
- llofstream presetsXML(pathName);
+ do
+ {
+ // if this executes more than once, this is an absurdly pathological case
+ // (e.g. "x" repeated twice, but "x 1" already exists, so need to use "x 2")
+ std::stringstream temp;
+ temp << desired_name << " " << (++conflicted_names[desired_name]);
+ new_name = temp.str();
+ } while (inserted_names.find(new_name) != inserted_names.end());
- LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
+ // yay, found one that works
+ inserted_names.insert(new_name); // track names we consume here; shouldn't be necessary due to ++int? but just in case
- formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);
+ // *TODO factor out below into a rename()?
- presetsXML.close();
-}
+ LL_INFOS("Windlight") << "Renamed " << old_key.name << " (scope" << old_key.scope << ") to "
+ << new_key.name << " (scope " << new_key.scope << ")" << LL_ENDL;
-void LLWLParamManager::loadPreset(const std::string & name,bool propagate)
-{
-
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_filename(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
+ // update name in sky
+ iter->second.mName = new_name;
- escaped_filename += ".xml";
+ // update keys in day cycle
+ for(std::map<F32, LLWLParamKey>::iterator frame = cycle.mTimeMap.begin(); frame != cycle.mTimeMap.end(); ++frame)
+ {
+ if (frame->second == old_key)
+ {
+ frame->second = new_key;
+ }
+ }
- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL;
+ // add to master sky map
+ mParamList[new_key] = iter->second;
+ }
- llifstream presetsXML;
- presetsXML.open(pathName.c_str());
+ final_references[new_key] = iter->second;
+ }
- // That failed, try loading from the users area instead.
- if(!presetsXML)
+ lldebugs << "mDay after finalizing:" << llendl;
{
- pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename);
- LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight sky setting from " << pathName << LL_ENDL;
- presetsXML.clear();
- presetsXML.open(pathName.c_str());
+ for (std::map<F32, LLWLParamKey>::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter)
+ {
+ LLWLParamKey& key = iter->second;
+ lldebugs << iter->first << "->" << key.name << llendl;
+ }
}
- if (presetsXML)
+ return final_references;
+}
+
+// static
+LLSD LLWLParamManager::createSkyMap(std::map<LLWLParamKey, LLWLParamSet> refs)
+{
+ LLSD skies = LLSD::emptyMap();
+ for(std::map<LLWLParamKey, LLWLParamSet>::iterator iter = refs.begin(); iter != refs.end(); ++iter)
{
- LLSD paramsData(LLSD::emptyMap());
+ skies.insert(iter->first.name, iter->second.getAll());
+ }
+ return skies;
+}
- LLPointer<LLSDParser> parser = new LLSDXMLParser();
+void LLWLParamManager::addAllSkies(const LLWLParamKey::EScope scope, const LLSD& sky_presets)
+{
+ for(LLSD::map_const_iterator iter = sky_presets.beginMap(); iter != sky_presets.endMap(); ++iter)
+ {
+ LLWLParamSet set;
+ set.setAll(iter->second);
+ mParamList[LLWLParamKey(iter->first, scope)] = set;
+ }
+}
- parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED);
+void LLWLParamManager::refreshRegionPresets()
+{
+ // Remove all region sky presets because they may belong to a previously visited region.
+ clearParamSetsOfScope(LLEnvKey::SCOPE_REGION);
+
+ // Add all sky presets belonging to the current region.
+ addAllSkies(LLEnvKey::SCOPE_REGION, LLEnvManagerNew::instance().getRegionSettings().getSkyMap());
+}
+
+void LLWLParamManager::loadAllPresets()
+{
+ // First, load system (coming out of the box) sky presets.
+ loadPresetsFromDir(getSysDir());
- std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.find(name);
- if(mIt == mParamList.end())
+ // Then load user presets. Note that user day presets will modify any system ones already loaded.
+ loadPresetsFromDir(getUserDir());
+}
+
+void LLWLParamManager::loadPresetsFromDir(const std::string& dir)
+{
+ LL_INFOS2("AppInit", "Shaders") << "Loading sky presets from " << dir << LL_ENDL;
+
+ LLDirIterator dir_iter(dir, "*.xml");
+ while (1)
+ {
+ std::string file;
+ if (!dir_iter.next(file))
{
- addParamSet(name, paramsData);
+ break; // no more files
}
- else
+
+ std::string path = dir + file;
+ if (!loadPreset(path))
{
- setParamSet(name, paramsData);
+ llwarns << "Error loading sky preset from " << path << llendl;
}
- presetsXML.close();
- }
- else
+ }
+}
+
+bool LLWLParamManager::loadPreset(const std::string& path)
+{
+ llifstream xml_file;
+ std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
+
+ xml_file.open(path.c_str());
+ if (!xml_file)
{
- llwarns << "Can't find " << name << llendl;
- return;
+ return false;
}
-
- if(propagate)
+ LL_DEBUGS2("AppInit", "Shaders") << "Loading sky " << name << LL_ENDL;
+
+ LLSD params_data;
+ LLPointer<LLSDParser> parser = new LLSDXMLParser();
+ parser->parse(xml_file, params_data, LLSDSerialize::SIZE_UNLIMITED);
+ xml_file.close();
+
+ LLWLParamKey key(name, LLEnvKey::SCOPE_LOCAL);
+ if (hasParamSet(key))
{
- getParamSet(name, mCurParams);
- propagateParameters();
+ setParamSet(key, params_data);
+ }
+ else
+ {
+ addParamSet(key, params_data);
}
-}
-void LLWLParamManager::savePreset(const std::string & name)
-{
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_filename(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
+ return true;
+}
- escaped_filename += ".xml";
+void LLWLParamManager::savePreset(LLWLParamKey key)
+{
+ llassert(key.scope == LLEnvKey::SCOPE_LOCAL && !key.name.empty());
// make an empty llsd
LLSD paramsData(LLSD::emptyMap());
- std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename));
+ std::string pathName(getUserDir() + escapeString(key.name) + ".xml");
// fill it with LLSD windlight params
- paramsData = mParamList[name].getAll();
+ paramsData = mParamList[key].getAll();
// write to file
llofstream presetsXML(pathName);
@@ -283,6 +365,8 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader)
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params");
+
void LLWLParamManager::propagateParameters(void)
{
LLFastTimer ftm(FTM_UPDATE_WLPARAM);
@@ -362,7 +446,7 @@ void LLWLParamManager::update(LLViewerCamera * cam)
mCurParams.updateCloudScrolling();
// update only if running
- if(mAnimator.mIsRunning)
+ if(mAnimator.getIsRunning())
{
mAnimator.update(mCurParams);
}
@@ -370,31 +454,16 @@ void LLWLParamManager::update(LLViewerCamera * cam)
// update the shaders and the menu
propagateParameters();
- // sync menus if they exist
- LLFloaterWindLight* wlfloater = LLFloaterReg::findTypedInstance<LLFloaterWindLight>("env_windlight");
- if (wlfloater)
- {
- wlfloater->syncMenu();
- }
- LLFloaterDayCycle* dlfloater = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
- if (dlfloater)
- {
- dlfloater->syncMenu();
- }
- LLFloaterEnvSettings* envfloater = LLFloaterReg::findTypedInstance<LLFloaterEnvSettings>("env_settings");
- if (envfloater)
- {
- envfloater->syncMenu();
- }
-
F32 camYaw = cam->getYaw();
+ stop_glerror();
+
// *TODO: potential optimization - this block may only need to be
// executed some of the time. For example for water shaders only.
{
F32 camYawDelta = mSunDeltaYaw * DEG_TO_RAD;
- LLVector3 lightNorm3(mLightDir);
+ LLVector3 lightNorm3(mLightDir);
lightNorm3 *= LLQuaternion(-(camYaw + camYawDelta), LLVector3(0.f, 1.f, 0.f));
mRotatedLightDir = LLVector4(lightNorm3, 0.f);
@@ -412,17 +481,18 @@ void LLWLParamManager::update(LLViewerCamera * cam)
}
}
-// static
-void LLWLParamManager::initClass(void)
+bool LLWLParamManager::applyDayCycleParams(const LLSD& params, LLEnvKey::EScope scope, F32 time)
{
- instance();
+ mDay.loadDayCycle(params, scope);
+ resetAnimator(time, true); // set to specified time and start animator
+ return true;
}
-// static
-void LLWLParamManager::cleanupClass()
+bool LLWLParamManager::applySkyParams(const LLSD& params)
{
- delete sInstance;
- sInstance = NULL;
+ mAnimator.deactivate();
+ mCurParams.setAll(params);
+ return true;
}
void LLWLParamManager::resetAnimator(F32 curTime, bool run)
@@ -432,133 +502,227 @@ void LLWLParamManager::resetAnimator(F32 curTime, bool run)
return;
}
-bool LLWLParamManager::addParamSet(const std::string& name, LLWLParamSet& param)
+
+bool LLWLParamManager::addParamSet(const LLWLParamKey& key, LLWLParamSet& param)
{
// add a new one if not one there already
- std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.find(name);
+ std::map<LLWLParamKey, LLWLParamSet>::iterator mIt = mParamList.find(key);
if(mIt == mParamList.end())
{
- mParamList[name] = param;
+ llassert(!key.name.empty());
+ // *TODO: validate params
+ mParamList[key] = param;
+ mPresetListChangeSignal();
return true;
}
return false;
}
-BOOL LLWLParamManager::addParamSet(const std::string& name, LLSD const & param)
+BOOL LLWLParamManager::addParamSet(const LLWLParamKey& key, LLSD const & param)
{
- // add a new one if not one there already
- std::map<std::string, LLWLParamSet>::const_iterator finder = mParamList.find(name);
- if(finder == mParamList.end())
- {
- mParamList[name].setAll(param);
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+ LLWLParamSet param_set;
+ param_set.setAll(param);
+ return addParamSet(key, param_set);
}
-bool LLWLParamManager::getParamSet(const std::string& name, LLWLParamSet& param)
+bool LLWLParamManager::getParamSet(const LLWLParamKey& key, LLWLParamSet& param)
{
// find it and set it
- std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.find(name);
+ std::map<LLWLParamKey, LLWLParamSet>::iterator mIt = mParamList.find(key);
if(mIt != mParamList.end())
{
- param = mParamList[name];
- param.mName = name;
+ param = mParamList[key];
+ param.mName = key.name;
return true;
}
return false;
}
-bool LLWLParamManager::setParamSet(const std::string& name, LLWLParamSet& param)
+bool LLWLParamManager::hasParamSet(const LLWLParamKey& key)
{
- mParamList[name] = param;
+ LLWLParamSet dummy;
+ return getParamSet(key, dummy);
+}
+
+bool LLWLParamManager::setParamSet(const LLWLParamKey& key, LLWLParamSet& param)
+{
+ llassert(!key.name.empty());
+ // *TODO: validate params
+ mParamList[key] = param;
return true;
}
-bool LLWLParamManager::setParamSet(const std::string& name, const LLSD & param)
+bool LLWLParamManager::setParamSet(const LLWLParamKey& key, const LLSD & param)
{
+ llassert(!key.name.empty());
+ // *TODO: validate params
+
// quick, non robust (we won't be working with files, but assets) check
+ // this might not actually be true anymore....
if(!param.isMap())
{
return false;
}
- mParamList[name].setAll(param);
-
- return true;
+ LLWLParamSet param_set;
+ param_set.setAll(param);
+ return setParamSet(key, param_set);
}
-bool LLWLParamManager::removeParamSet(const std::string& name, bool delete_from_disk)
+void LLWLParamManager::removeParamSet(const LLWLParamKey& key, bool delete_from_disk)
{
+ // *NOTE: Removing a sky preset invalidates day cycles that refer to it.
+
+ if (key.scope == LLEnvKey::SCOPE_REGION)
+ {
+ llwarns << "Removing region skies not supported" << llendl;
+ llassert(key.scope == LLEnvKey::SCOPE_LOCAL);
+ return;
+ }
+
// remove from param list
- std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.find(name);
- if(mIt != mParamList.end())
+ std::map<LLWLParamKey, LLWLParamSet>::iterator it = mParamList.find(key);
+ if (it == mParamList.end())
{
- mParamList.erase(mIt);
+ LL_WARNS("WindLight") << "No sky preset named " << key.name << LL_ENDL;
+ return;
}
- F32 key;
+ mParamList.erase(it);
+ mDay.removeReferencesTo(key);
- // remove all references
- bool stat = true;
- do
+ // remove from file system if requested
+ if (delete_from_disk)
{
- // get it
- stat = mDay.getKey(name, key);
- if(stat == false)
+ std::string path_name(getUserDir());
+ std::string escaped_name = escapeString(key.name);
+
+ if(gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml") < 1)
{
- break;
+ LL_WARNS("WindLight") << "Error removing sky preset " << key.name << " from disk" << LL_ENDL;
}
+ }
- // and remove
- stat = mDay.removeKey(key);
+ // signal interested parties
+ mPresetListChangeSignal();
+}
- } while(stat == true);
-
- if(delete_from_disk)
+bool LLWLParamManager::isSystemPreset(const std::string& preset_name) const
+{
+ // *TODO: file system access is excessive here.
+ return gDirUtilp->fileExists(getSysDir() + escapeString(preset_name) + ".xml");
+}
+
+void LLWLParamManager::getPresetNames(preset_name_list_t& region, preset_name_list_t& user, preset_name_list_t& sys) const
+{
+ region.clear();
+ user.clear();
+ sys.clear();
+
+ for (std::map<LLWLParamKey, LLWLParamSet>::const_iterator it = mParamList.begin(); it != mParamList.end(); it++)
{
- std::string path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
-
- // use full curl escaped name
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
- gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml");
- }
+ const LLWLParamKey& key = it->first;
+ const std::string& name = key.name;
- return true;
+ if (key.scope == LLEnvKey::SCOPE_REGION)
+ {
+ region.push_back(name);
+ }
+ else
+ {
+ if (isSystemPreset(name))
+ {
+ sys.push_back(name);
+ }
+ else
+ {
+ user.push_back(name);
+ }
+ }
+ }
}
+void LLWLParamManager::getUserPresetNames(preset_name_list_t& user) const
+{
+ preset_name_list_t region, sys; // unused
+ getPresetNames(region, user, sys);
+}
-// static
-LLWLParamManager * LLWLParamManager::instance()
+void LLWLParamManager::getPresetKeys(preset_key_list_t& keys) const
{
- if(NULL == sInstance)
+ keys.clear();
+
+ for (std::map<LLWLParamKey, LLWLParamSet>::const_iterator it = mParamList.begin(); it != mParamList.end(); it++)
{
- sInstance = new LLWLParamManager();
+ keys.push_back(it->first);
+ }
+}
+
+boost::signals2::connection LLWLParamManager::setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb)
+{
+ return mPresetListChangeSignal.connect(cb);
+}
- sInstance->loadPresets(LLStringUtil::null);
+// virtual static
+void LLWLParamManager::initSingleton()
+{
+ LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL;
+
+ loadAllPresets();
- // load the day
- sInstance->mDay.loadDayCycle(std::string("Default.xml"));
+ // load the day
+ std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName();
+ if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay))
+ {
+ // Fall back to default.
+ llwarns << "No day cycle named " << preferred_day << ", falling back to defaults" << llendl;
+ mDay.loadDayCycleFromFile("Default.xml");
- // *HACK - sets cloud scrolling to what we want... fix this better in the future
- sInstance->getParamSet("Default", sInstance->mCurParams);
+ // *TODO: Fix user preferences accordingly.
+ }
- // set it to noon
- sInstance->resetAnimator(0.5, true);
+ // *HACK - sets cloud scrolling to what we want... fix this better in the future
+ std::string sky = LLEnvManagerNew::instance().getSkyPresetName();
+ if (!getParamSet(LLWLParamKey(sky, LLWLParamKey::SCOPE_LOCAL), mCurParams))
+ {
+ llwarns << "No sky preset named " << sky << ", falling back to defaults" << llendl;
+ getParamSet(LLWLParamKey("Default", LLWLParamKey::SCOPE_LOCAL), mCurParams);
- // but use linden time sets it to what the estate is
- sInstance->mAnimator.mUseLindenTime = true;
+ // *TODO: Fix user preferences accordingly.
}
- return sInstance;
+ // set it to noon
+ resetAnimator(0.5, LLEnvManagerNew::instance().getUseDayCycle());
+
+ // but use linden time sets it to what the estate is
+ mAnimator.setTimeType(LLWLAnimator::TIME_LINDEN);
+
+ LLEnvManagerNew::instance().usePrefs();
+}
+
+// static
+std::string LLWLParamManager::getSysDir()
+{
+ return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "");
+}
+
+// static
+std::string LLWLParamManager::getUserDir()
+{
+ return gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS , "windlight/skies", "");
+}
+
+// static
+std::string LLWLParamManager::escapeString(const std::string& str)
+{
+ // Don't use LLURI::escape() because it doesn't encode '-' characters
+ // which may break handling of some system presets like "A-12AM".
+ char* curl_str = curl_escape(str.c_str(), str.size());
+ std::string escaped_str(curl_str);
+ curl_free(curl_str);
+
+ return escaped_str;
}
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index 8c6329e769..bc984b9126 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -27,12 +27,14 @@
#ifndef LL_WLPARAMMANAGER_H
#define LL_WLPARAMMANAGER_H
-#include <vector>
+#include <list>
#include <map>
+#include "llenvmanager.h"
#include "llwlparamset.h"
#include "llwlanimator.h"
#include "llwldaycycle.h"
#include "llviewercamera.h"
+#include "lltrans.h"
class LLGLSLShader;
@@ -72,7 +74,7 @@ struct WLColorControl {
r = val.mV[0];
g = val.mV[1];
b = val.mV[2];
- i = val.mV[3];
+ i = val.mV[3];
return *this;
}
@@ -115,25 +117,112 @@ struct WLFloatControl {
}
};
-/// WindLight parameter manager class - what controls all the wind light shaders
-class LLWLParamManager
+struct LLWLParamKey : LLEnvKey
{
public:
+ // scope and source of a param set (WL sky preset)
+ std::string name;
+ EScope scope;
- LLWLParamManager();
- ~LLWLParamManager();
+ // for conversion from LLSD
+ static const int NAME_IDX = 0;
+ static const int SCOPE_IDX = 1;
+
+ inline LLWLParamKey(const std::string& n, EScope s)
+ : name(n), scope(s)
+ {
+ }
+
+ inline LLWLParamKey(LLSD llsd)
+ : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger()))
+ {
+ }
+
+ inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort
+ : name(""), scope(SCOPE_LOCAL)
+ {
+ }
+
+ inline LLWLParamKey(std::string& stringVal)
+ {
+ size_t len = stringVal.length();
+ if (len > 0)
+ {
+ name = stringVal.substr(0, len - 1);
+ scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str());
+ }
+ }
+
+ inline std::string toStringVal() const
+ {
+ std::stringstream str;
+ str << name << scope;
+ return str.str();
+ }
+
+ inline LLSD toLLSD() const
+ {
+ LLSD llsd = LLSD::emptyArray();
+ llsd.append(LLSD(name));
+ llsd.append(LLSD(scope));
+ return llsd;
+ }
+
+ inline void fromLLSD(const LLSD& llsd)
+ {
+ name = llsd[NAME_IDX].asString();
+ scope = EScope(llsd[SCOPE_IDX].asInteger());
+ }
+
+ inline bool operator <(const LLWLParamKey other) const
+ {
+ if (name < other.name)
+ {
+ return true;
+ }
+ else if (name > other.name)
+ {
+ return false;
+ }
+ else
+ {
+ return scope < other.scope;
+ }
+ }
+
+ inline bool operator ==(const LLWLParamKey other) const
+ {
+ return (name == other.name) && (scope == other.scope);
+ }
- /// load a preset file
- void loadPresets(const std::string & fileName);
+ inline std::string toString() const
+ {
+ switch (scope)
+ {
+ case SCOPE_LOCAL:
+ return name + std::string(" (") + LLTrans::getString("Local") + std::string(")");
+ break;
+ case SCOPE_REGION:
+ return name + std::string(" (") + LLTrans::getString("Region") + std::string(")");
+ break;
+ default:
+ return name + " (?)";
+ }
+ }
+};
- /// save the preset file
- void savePresets(const std::string & fileName);
+/// WindLight parameter manager class - what controls all the wind light shaders
+class LLWLParamManager : public LLSingleton<LLWLParamManager>
+{
+ LOG_CLASS(LLWLParamManager);
- /// load an individual preset into the sky
- void loadPreset(const std::string & name,bool propogate=true);
+public:
+ typedef std::list<std::string> preset_name_list_t;
+ typedef std::list<LLWLParamKey> preset_key_list_t;
+ typedef boost::signals2::signal<void()> preset_list_signal_t;
/// save the parameter presets to file
- void savePreset(const std::string & name);
+ void savePreset(const LLWLParamKey key);
/// Set shader uniforms dirty, so they'll update automatically.
void propagateParameters(void);
@@ -147,6 +236,12 @@ public:
/// update information camera dependent parameters
void update(LLViewerCamera * cam);
+ /// apply specified day cycle, setting time to noon by default
+ bool applyDayCycleParams(const LLSD& params, LLEnvKey::EScope scope, F32 time = 0.5);
+
+ /// apply specified fixed sky params
+ bool applySkyParams(const LLSD& params);
+
// get where the light is pointing
inline LLVector4 getLightDir(void) const;
@@ -161,36 +256,62 @@ public:
/// get the radius of the dome
inline F32 getDomeRadius(void) const;
-
- /// Perform global initialization for this class.
- static void initClass(void);
-
- // Cleanup of global data that's only inited once per class.
- static void cleanupClass();
- /// add a param to the list
- bool addParamSet(const std::string& name, LLWLParamSet& param);
+ /// add a param set (preset) to the list
+ bool addParamSet(const LLWLParamKey& key, LLWLParamSet& param);
- /// add a param to the list
- BOOL addParamSet(const std::string& name, LLSD const & param);
+ /// add a param set (preset) to the list
+ BOOL addParamSet(const LLWLParamKey& key, LLSD const & param);
- /// get a param from the list
- bool getParamSet(const std::string& name, LLWLParamSet& param);
+ /// get a param set (preset) from the list
+ bool getParamSet(const LLWLParamKey& key, LLWLParamSet& param);
+
+ /// check whether the preset is in the list
+ bool hasParamSet(const LLWLParamKey& key);
/// set the param in the list with a new param
- bool setParamSet(const std::string& name, LLWLParamSet& param);
+ bool setParamSet(const LLWLParamKey& key, LLWLParamSet& param);
/// set the param in the list with a new param
- bool setParamSet(const std::string& name, LLSD const & param);
+ bool setParamSet(const LLWLParamKey& key, LLSD const & param);
/// gets rid of a parameter and any references to it
- /// returns true if successful
- bool removeParamSet(const std::string& name, bool delete_from_disk);
+ /// ignores "delete_from_disk" if the scope is not local
+ void removeParamSet(const LLWLParamKey& key, bool delete_from_disk);
- // singleton pattern implementation
- static LLWLParamManager * instance();
+ /// clear parameter mapping of a given scope
+ void clearParamSetsOfScope(LLEnvKey::EScope scope);
-public:
+ /// @return true if the preset comes out of the box
+ bool isSystemPreset(const std::string& preset_name) const;
+
+ /// @return user and system preset names as a single list
+ void getPresetNames(preset_name_list_t& region, preset_name_list_t& user, preset_name_list_t& sys) const;
+
+ /// @return user preset names
+ void getUserPresetNames(preset_name_list_t& user) const;
+
+ /// @return keys of all known presets
+ void getPresetKeys(preset_key_list_t& keys) const;
+
+ /// Emitted when a preset gets added or deleted.
+ boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb);
+
+ /// add all skies in LLSD using the given scope
+ void addAllSkies(LLEnvKey::EScope scope, const LLSD& preset_map);
+
+ /// refresh region-scope presets
+ void refreshRegionPresets();
+
+ // returns all skies referenced by the current day cycle (in mDay), with their final names
+ // side effect: applies changes to all internal structures! (trashes all unreferenced skies in scope, keys in day cycle rescoped to scope, etc.)
+ std::map<LLWLParamKey, LLWLParamSet> finalizeFromDayCycle(LLWLParamKey::EScope scope);
+
+ // returns all skies in map (intended to be called with output from a finalize)
+ static LLSD createSkyMap(std::map<LLWLParamKey, LLWLParamSet> map);
+
+ /// escape string in a way different from LLURI::escape()
+ static std::string escapeString(const std::string& str);
// helper variables
LLWLAnimator mAnimator;
@@ -243,14 +364,27 @@ public:
F32 mDomeOffset;
F32 mDomeRadius;
- // list of all the parameters, listed by name
- std::map<std::string, LLWLParamSet> mParamList;
-
-
+
private:
- // our parameter manager singleton instance
- static LLWLParamManager * sInstance;
+ friend class LLWLAnimator;
+
+ void loadAllPresets();
+ void loadPresetsFromDir(const std::string& dir);
+ bool loadPreset(const std::string& path);
+
+ static std::string getSysDir();
+ static std::string getUserDir();
+
+ friend class LLSingleton<LLWLParamManager>;
+ /*virtual*/ void initSingleton();
+ LLWLParamManager();
+ ~LLWLParamManager();
+
+ // list of all the parameters, listed by name
+ std::map<LLWLParamKey, LLWLParamSet> mParamList;
+
+ preset_list_signal_t mPresetListChangeSignal;
};
inline F32 LLWLParamManager::getDomeOffset(void) const
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index cf06766d73..02d914a812 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -29,8 +29,8 @@
#include "llwlparamset.h"
#include "llwlanimator.h"
-#include "llfloaterwindlight.h"
#include "llwlparammanager.h"
+#include "llglslshader.h"
#include "lluictrlfactory.h"
#include "llsliderctrl.h"
@@ -94,7 +94,7 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
shader->uniform4fv(param, 1, val.mV);
}
- else
+ else // param is the uniform name
{
LLVector4 val;
@@ -119,7 +119,6 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
val.mV[0] = i->second.asBoolean();
}
-
shader->uniform4fv(param, 1, val.mV);
}
}
@@ -260,7 +259,6 @@ void LLWLParamSet::setEastAngle(float val)
void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
{
// set up the iterators
- LLSD::map_iterator cIt = mParamValues.beginMap();
// keep cloud positions and coverage the same
/// TODO masking will do this later
@@ -273,55 +271,39 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
LLSD srcVal;
LLSD destVal;
- // do the interpolation for all the ones saved as vectors
- // skip the weird ones
- for(; cIt != mParamValues.endMap(); cIt++) {
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
- // check params to make sure they're actually there
- if(src.mParamValues.has(cIt->first))
+ // If param exists in both src and dest, set the holder variables, otherwise skip
+ if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first))
{
- srcVal = src.mParamValues[cIt->first];
+ srcVal = src.mParamValues[iter->first];
+ destVal = dest.mParamValues[iter->first];
}
else
{
continue;
}
- if(dest.mParamValues.has(cIt->first))
+ if(iter->second.isReal()) // If it's a real, interpolate directly
{
- destVal = dest.mParamValues[cIt->first];
+ iter->second = srcVal.asReal() + ((destVal.asReal() - srcVal.asReal()) * weight);
}
- else
- {
- continue;
- }
-
- // skip if not a vector
- if(!cIt->second.isArray())
- {
- continue;
- }
-
- // only Real vectors allowed
- if(!cIt->second[0].isReal())
+ else if(iter->second.isArray() && iter->second[0].isReal() // If it's an array of reals, loop through the reals and interpolate on those
+ && iter->second.size() == srcVal.size() && iter->second.size() == destVal.size())
{
- continue;
+ // Actually do interpolation: old value + (difference in values * factor)
+ for(int i=0; i < iter->second.size(); ++i)
+ {
+ // iter->second[i] = (1.f-weight)*(F32)srcVal[i].asReal() + weight*(F32)destVal[i].asReal(); // old way of doing it -- equivalent but one more operation
+ iter->second[i] = srcVal[i].asReal() + ((destVal[i].asReal() - srcVal[i].asReal()) * weight);
+ }
}
-
- // make sure all the same size
- if( cIt->second.size() != srcVal.size() ||
- cIt->second.size() != destVal.size())
+ else // Else, skip
{
continue;
- }
-
- // more error checking might be necessary;
-
- for(int i=0; i < cIt->second.size(); ++i)
- {
- cIt->second[i] = (1.0f - weight) * (F32) srcVal[i].asReal() +
- weight * (F32) destVal[i].asReal();
- }
+ }
}
// now mix the extra parameters
diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h
index 487e2bf922..3c44ed3bb8 100644
--- a/indra/newview/llwlparamset.h
+++ b/indra/newview/llwlparamset.h
@@ -32,10 +32,9 @@
#include "v4math.h"
#include "v4color.h"
-#include "llviewershadermgr.h"
-class LLFloaterWindLight;
class LLWLParamSet;
+class LLGLSLShader;
/// A class representing a set of parameter values for the WindLight shaders.
class LLWLParamSet {
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index ec24b02934..4a6ec7fdbb 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -61,6 +61,7 @@
#include <map>
#include <cstring>
+
//
// Globals
//
@@ -91,8 +92,7 @@ LLWorld::LLWorld() :
mLastPacketsIn(0),
mLastPacketsOut(0),
mLastPacketsLost(0),
- mSpaceTimeUSec(0),
- mClassicCloudsEnabled(TRUE)
+ mSpaceTimeUSec(0)
{
for (S32 i = 0; i < 8; i++)
{
@@ -183,10 +183,6 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
llerrs << "Unable to create new region!" << llendl;
}
- regionp->mCloudLayer.create(regionp);
- regionp->mCloudLayer.setWidth((F32)mWidth);
- regionp->mCloudLayer.setWindPointer(&regionp->mWind);
-
mRegionList.push_back(regionp);
mActiveRegionList.push_back(regionp);
mCulledRegionList.push_back(regionp);
@@ -661,92 +657,6 @@ void LLWorld::updateParticles()
LLViewerPartSim::getInstance()->updateSimulation();
}
-void LLWorld::updateClouds(const F32 dt)
-{
- static LLFastTimer::DeclareTimer ftm("World Clouds");
- LLFastTimer t(ftm);
-
- if ( gSavedSettings.getBOOL("FreezeTime") )
- {
- // don't move clouds in snapshot mode
- return;
- }
-
- if (
- mClassicCloudsEnabled !=
- gSavedSettings.getBOOL("SkyUseClassicClouds") )
- {
- // The classic cloud toggle has been flipped
- // gotta update all of the cloud layers
- mClassicCloudsEnabled =
- gSavedSettings.getBOOL("SkyUseClassicClouds");
-
- if ( !mClassicCloudsEnabled && mActiveRegionList.size() )
- {
- // We've transitioned to having classic clouds disabled
- // reset all cloud layers.
- for (
- region_list_t::iterator iter = mActiveRegionList.begin();
- iter != mActiveRegionList.end();
- ++iter)
- {
- LLViewerRegion* regionp = *iter;
- regionp->mCloudLayer.reset();
- }
-
- return;
- }
- }
- else if ( !mClassicCloudsEnabled ) return;
-
- if (mActiveRegionList.size())
- {
- for (region_list_t::iterator iter = mActiveRegionList.begin();
- iter != mActiveRegionList.end(); ++iter)
- {
- LLViewerRegion* regionp = *iter;
- regionp->mCloudLayer.updatePuffs(dt);
- }
-
- // Reshuffle who owns which puffs
- for (region_list_t::iterator iter = mActiveRegionList.begin();
- iter != mActiveRegionList.end(); ++iter)
- {
- LLViewerRegion* regionp = *iter;
- regionp->mCloudLayer.updatePuffOwnership();
- }
-
- // Add new puffs
- for (region_list_t::iterator iter = mActiveRegionList.begin();
- iter != mActiveRegionList.end(); ++iter)
- {
- LLViewerRegion* regionp = *iter;
- regionp->mCloudLayer.updatePuffCount();
- }
- }
-}
-
-LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff)
-{
- if (mActiveRegionList.size())
- {
- // Update all the cloud puff positions, and timer based stuff
- // such as death decay
- for (region_list_t::iterator iter = mActiveRegionList.begin();
- iter != mActiveRegionList.end(); ++iter)
- {
- LLViewerRegion* regionp = *iter;
- LLCloudGroup *groupp = regionp->mCloudLayer.findCloudGroup(puff);
- if (groupp)
- {
- return groupp;
- }
- }
- }
- return NULL;
-}
-
-
void LLWorld::renderPropertyLines()
{
S32 region_count = 0;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 845a87b8cf..e74bf2a620 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -392,6 +392,7 @@ void LLPipeline::init()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
+ gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
@@ -580,11 +581,6 @@ void LLPipeline::allocatePhysicsBuffer()
if (mPhysicsDisplay.getWidth() != resX || mPhysicsDisplay.getHeight() != resY)
{
mPhysicsDisplay.allocate(resX, resY, GL_RGBA, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
- if (mSampleBuffer.getWidth() == mPhysicsDisplay.getWidth() &&
- mSampleBuffer.getHeight() == mPhysicsDisplay.getHeight())
- {
- mPhysicsDisplay.setSampleBuffer(&mSampleBuffer);
- }
}
}
@@ -594,8 +590,9 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
mScreenWidth = resX;
mScreenHeight = resY;
- //never use more than 4 samples for render targets
- U32 samples = llmin(gSavedSettings.getU32("RenderFSAASamples"), (U32) 4);
+ //cap samples at 4 for render targets to avoid out of memory errors
+ U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+
if (gGLManager.mIsATI)
{ //disable multisampling of render targets where ATI is involved
samples = 0;
@@ -621,11 +618,11 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
bool gi = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED);
//allocate deferred rendering color buffers
- mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
- mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
+ mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
addDeferredAttachments(mDeferredScreen);
- mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
#if LL_DARWIN
// As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
@@ -636,7 +633,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
if (shadow_detail > 0 || ssao)
{ //only need mDeferredLight[0] for shadows OR ssao
- mDeferredLight[0].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ mDeferredLight[0].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
}
else
{
@@ -645,7 +642,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
if (ssao)
{ //only need mDeferredLight[1] for ssao
- mDeferredLight[1].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ mDeferredLight[1].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false);
}
else
{
@@ -654,7 +651,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
if (gi)
{ //only need mDeferredLight[2] and mGIMapPost for gi
- mDeferredLight[2].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ mDeferredLight[2].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false);
for (U32 i = 0; i < 2; i++)
{
#if LL_DARWIN
@@ -744,35 +741,9 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
}
- if (LLRenderTarget::sUseFBO && samples > 1)
- {
- mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples);
- if (LLPipeline::sRenderDeferred)
- {
- addDeferredAttachments(mSampleBuffer);
- mDeferredScreen.setSampleBuffer(&mSampleBuffer);
- mEdgeMap.setSampleBuffer(&mSampleBuffer);
- }
-
- mScreen.setSampleBuffer(&mSampleBuffer);
-
- stop_glerror();
- }
- else
- {
- mSampleBuffer.release();
- }
-
if (LLPipeline::sRenderDeferred)
{ //share depth buffer between deferred targets
mDeferredScreen.shareDepthBuffer(mScreen);
- for (U32 i = 0; i < 3; i++)
- { //share stencil buffer with screen space lightmap to stencil out sky
- if (mDeferredLight[i].getTexture(0))
- {
- mDeferredScreen.shareDepthBuffer(mDeferredLight[i]);
- }
- }
}
gGL.getTexUnit(0)->disable();
@@ -802,16 +773,7 @@ void LLPipeline::updateRenderDeferred()
//static
void LLPipeline::refreshRenderDeferred()
{
- if(gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES))
- {
- //turn the deferred rendering and glow off when draw physics shapes.
- sRenderDeferred = FALSE ;
- sRenderGlow = FALSE ;
- }
- else
- {
- updateRenderDeferred() ;
- }
+ updateRenderDeferred();
}
void LLPipeline::releaseGLBuffers()
@@ -841,7 +803,6 @@ void LLPipeline::releaseGLBuffers()
mScreen.release();
mPhysicsDisplay.release();
mUIScreen.release();
- mSampleBuffer.release();
mDeferredScreen.release();
mDeferredDepth.release();
for (U32 i = 0; i < 3; i++)
@@ -2550,6 +2511,32 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu)
}
}
+void LLPipeline::markPartitionMove(LLDrawable* drawable)
+{
+ if (!drawable->isState(LLDrawable::PARTITION_MOVE) &&
+ !drawable->getPositionGroup().equals3(LLVector4a::getZero()))
+ {
+ drawable->setState(LLDrawable::PARTITION_MOVE);
+ mPartitionQ.push_back(drawable);
+ }
+}
+
+void LLPipeline::processPartitionQ()
+{
+ for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
+ {
+ LLDrawable* drawable = *iter;
+ if (!drawable->isDead())
+ {
+ drawable->updateBinRadius();
+ drawable->movePartition();
+ }
+ drawable->clearState(LLDrawable::PARTITION_MOVE);
+ }
+
+ mPartitionQ.clear();
+}
+
void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE);
@@ -3610,7 +3597,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if (gDebugGL)
{
check_stack_depth(stack_depth);
- std::string msg = llformat("%s pass %d", gPoolNames[cur_type].c_str(), i);
+ std::string msg = llformat("pass %d", i);
LLGLState::checkStates(msg);
LLGLState::checkTextureChannels(msg);
LLGLState::checkClientArrays(msg);
@@ -4085,6 +4072,37 @@ void LLPipeline::renderDebug()
bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD);
+ if (!hud_only && !mDebugBlips.empty())
+ { //render debug blips
+ glPointSize(8.f);
+ LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
+
+ gGL.begin(LLRender::POINTS);
+ for (std::list<DebugBlip>::iterator iter = mDebugBlips.begin(); iter != mDebugBlips.end(); )
+ {
+ DebugBlip& blip = *iter;
+
+ blip.mAge += gFrameIntervalSeconds;
+ if (blip.mAge > 2.f)
+ {
+ mDebugBlips.erase(iter++);
+ }
+ else
+ {
+ iter++;
+ }
+
+ blip.mPosition.mV[2] += gFrameIntervalSeconds*2.f;
+
+ gGL.color4fv(blip.mColor.mV);
+ gGL.vertex3fv(blip.mPosition.mV);
+ }
+ gGL.end();
+ gGL.flush();
+ glPointSize(1.f);
+ }
+
+
// Debug stuff.
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -5919,7 +5937,6 @@ LLSpatialPartition* LLPipeline::getSpatialPartition(LLViewerObject* vobj)
return NULL;
}
-
void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
{
if (!drawable || drawable->isDead())
@@ -6065,7 +6082,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
if (!(gPipeline.canUseVertexShaders() &&
- sRenderGlow))
+ sRenderGlow) ||
+ (!sRenderDeferred && hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)))
{
return;
}
@@ -6111,67 +6129,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
-
- /*if (for_snapshot)
- {
- gGL.getTexUnit(0)->bind(&mGlow[1]);
- {
- //LLGLEnable stencil(GL_STENCIL_TEST);
- //glStencilFunc(GL_NOTEQUAL, 255, 0xFFFFFFFF);
- //glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
- //LLGLDisable blend(GL_BLEND);
-
- // If the snapshot is constructed from tiles, calculate which
- // tile we're in.
-
- //from LLViewerCamera::setPerpsective
- if (zoom_factor > 1.f)
- {
- int pos_y = subfield / llceil(zoom_factor);
- int pos_x = subfield - (pos_y*llceil(zoom_factor));
- F32 size = 1.f/zoom_factor;
-
- tc1.set(pos_x*size, pos_y*size);
- tc2 = tc1 + LLVector2(size,size);
- }
- else
- {
- tc2.set(1,1);
- }
-
- LLGLEnable blend(GL_BLEND);
- gGL.setSceneBlendType(LLRender::BT_ADD);
-
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.color4f(1,1,1,1);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
-
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,1);
-
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(1,-1);
-
- gGL.texCoord2f(tc2.mV[0], tc2.mV[1]);
- gGL.vertex2f(1,1);
-
- gGL.end();
-
- gGL.flush();
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- }
-
- gGL.flush();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- return;
- }*/
-
+
{
{
LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
@@ -6195,11 +6153,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->disable();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_RECT_TEXTURE);
- gGL.getTexUnit(0)->bind(&mScreen);
-
+ mScreen.bindTexture(0, 0);
+
gGL.color4f(1,1,1,1);
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
gGL.begin(LLRender::TRIANGLE_STRIP);
@@ -6214,7 +6169,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.end();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->unbind(mScreen.getUsage());
mGlow[2].flush();
}
@@ -6242,7 +6197,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
for (S32 i = 0; i < kernel; i++)
{
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
{
LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
mGlow[i%2].bindTarget();
@@ -6303,9 +6257,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLVertexBuffer::unbind();
- if (LLPipeline::sRenderDeferred && !LLViewerCamera::getInstance()->cameraUnderWater())
+ if (LLPipeline::sRenderDeferred)
{
- bool dof_enabled = true;
+ bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater();
LLGLSLShader* shader = &gDeferredPostProgram;
if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
@@ -6313,7 +6267,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
shader = &gDeferredGIFinalProgram;
dof_enabled = false;
}
- else if (LLToolMgr::getInstance()->inBuildMode() || !gSavedSettings.getBOOL("RenderDepthOfField"))
+ else if (!dof_enabled || LLToolMgr::getInstance()->inBuildMode() || !gSavedSettings.getBOOL("RenderDepthOfField"))
{ //squish focal length when in build mode (or if DoF is disabled) so DoF doesn't make editing objects difficult
shader = &gDeferredPostNoDoFProgram;
dof_enabled = false;
@@ -6435,11 +6389,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
shader->uniform1f("magnification", magnification);
}
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_RECT_TEXTURE);
+ S32 channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
mScreen.bindTexture(0, channel);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
}
//channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, LLTexUnit::TT_RECT_TEXTURE);
//if (channel > -1)
@@ -6532,6 +6485,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES))
{
+ gGL.setColorMask(true, false);
+
LLVector2 tc1(0,0);
LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
(F32) gViewerWindow->getWorldViewHeightRaw()*2);
@@ -6578,25 +6533,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
noise_map = mNoiseMap;
}
- LLGLState::checkTextureChannels();
-
shader.bind();
S32 channel = 0;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(0,channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(1, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(2, channel);
@@ -6719,22 +6672,16 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
shader.uniformMatrix4fv("gi_norm_mat", 1, FALSE, mGINormalMatrix.m);
}
}
-
- /*channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_POSITION, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredScreen.bindTexture(3, channel);
- }*/
+ stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&mDeferredDepth, TRUE);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
stop_glerror();
- glTexParameteri(LLTexUnit::getInternalType(mDeferredDepth.getUsage()), GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
- glTexParameteri(LLTexUnit::getInternalType(mDeferredDepth.getUsage()), GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
+ //glTexParameteri(LLTexUnit::getInternalType(mDeferredDepth.getUsage()), GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
+ //glTexParameteri(LLTexUnit::getInternalType(mDeferredDepth.getUsage()), GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
stop_glerror();
@@ -6763,7 +6710,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[light_index].getUsage());
if (channel > -1)
{
mDeferredLight[light_index].bindTexture(0, channel);
@@ -6983,9 +6930,9 @@ void LLPipeline::renderDeferredLighting()
}
//ati doesn't seem to love actually using the stencil buffer on FBO's
- LLGLEnable stencil(GL_STENCIL_TEST);
- glStencilFunc(GL_EQUAL, 1, 0xFFFFFFFF);
- glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
+ LLGLDisable stencil(GL_STENCIL_TEST);
+ //glStencilFunc(GL_EQUAL, 1, 0xFFFFFFFF);
+ //glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
gGL.setColorMask(true, true);
@@ -7787,33 +7734,41 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
LLViewerTexture* img = volume->getLightTexture();
+ if (img == NULL)
+ {
+ img = LLViewerFetchedTexture::sWhiteImagep;
+ }
+
S32 channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
- if (channel > -1 && img)
+ if (channel > -1)
{
- gGL.getTexUnit(channel)->bind(img);
+ if (img)
+ {
+ gGL.getTexUnit(channel)->bind(img);
- F32 lod_range = logf(img->getWidth())/logf(2.f);
+ F32 lod_range = logf(img->getWidth())/logf(2.f);
- shader.uniform1f("proj_focus", focus);
- shader.uniform1f("proj_lod", lod_range);
- shader.uniform1f("proj_ambient_lod", llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
+ shader.uniform1f("proj_focus", focus);
+ shader.uniform1f("proj_lod", lod_range);
+ shader.uniform1f("proj_ambient_lod", llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
+ }
}
+
}
void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
{
stop_glerror();
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_POSITION, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[0].getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_EDGE, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_EDGE, mEdgeMap.getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, mDeferredLight[1].getUsage());
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, mDeferredLight[2].getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIP);
@@ -7860,8 +7815,6 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->activate();
shader.unbind();
-
- LLGLState::checkTextureChannels();
}
inline float sgn(float a)
@@ -9409,6 +9362,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadow[i+4].flush();
}
}
+ else
+ { //no spotlight shadows
+ mShadowSpotLight[0] = mShadowSpotLight[1] = NULL;
+ }
+
if (!gSavedSettings.getBOOL("CameraOffset"))
{
@@ -9831,4 +9789,9 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...)
}
}
+void LLPipeline::addDebugBlip(const LLVector3& position, const LLColor4& color)
+{
+ DebugBlip blip(position, color);
+ mDebugBlips.push_back(blip);
+}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index e9a250cd6d..e9da25e544 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -157,7 +157,8 @@ public:
void markGLRebuild(LLGLUpdate* glu);
void markRebuild(LLSpatialGroup* group, BOOL priority = FALSE);
void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE);
-
+ void markPartitionMove(LLDrawable* drawablep);
+
//get the object between start and end that's closest to start.
LLViewerObject* lineSegmentIntersectInWorld(const LLVector3& start, const LLVector3& end,
BOOL pick_transparent,
@@ -211,6 +212,7 @@ public:
void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0, LLPlane* plane = NULL); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane
void createObjects(F32 max_dtime);
void createObject(LLViewerObject* vobj);
+ void processPartitionQ();
void updateGeom(F32 max_dtime);
void updateGL();
void rebuildPriorityGroups();
@@ -358,6 +360,8 @@ public:
static void updateRenderDeferred();
static void refreshRenderDeferred();
+ void addDebugBlip(const LLVector3& position, const LLColor4& color);
+
private:
void unloadShaders();
void addToQuickLookup( LLDrawPool* new_poolp );
@@ -524,7 +528,6 @@ public:
LLRenderTarget mEdgeMap;
LLRenderTarget mDeferredDepth;
LLRenderTarget mDeferredLight[3];
- LLMultisampleBuffer mSampleBuffer;
LLRenderTarget mGIMap;
LLRenderTarget mGIMapPost[2];
LLRenderTarget mLuminanceMap;
@@ -637,6 +640,9 @@ protected:
LLDrawable::drawable_list_t mBuildQ2; // non-priority
LLSpatialGroup::sg_vector_t mGroupQ1; //priority
LLSpatialGroup::sg_vector_t mGroupQ2; // non-priority
+
+ LLDrawable::drawable_list_t mPartitionQ; //drawables that need to update their spatial partition radius
+
bool mGroupQ2Locked;
bool mGroupQ1Locked;
@@ -726,6 +732,20 @@ public:
protected:
std::vector<LLFace*> mSelectedFaces;
+ class DebugBlip
+ {
+ public:
+ LLColor4 mColor;
+ LLVector3 mPosition;
+ F32 mAge;
+
+ DebugBlip(const LLVector3& position, const LLColor4& color)
+ : mColor(color), mPosition(position), mAge(0.f)
+ { }
+ };
+
+ std::list<DebugBlip> mDebugBlips;
+
LLPointer<LLViewerFetchedTexture> mFaceSelectImagep;
U32 mLightMask;
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 973df6998a..76965ad14b 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -133,6 +133,15 @@
name="AvatarListItemIconVoiceLeftColor"
reference="AvatarListItemIconOfflineColor" />
<color
+ name="BadgeImageColor"
+ value="0.44 0.69 0.56 1.0" />
+ <color
+ name="BadgeBorderColor"
+ value="0.9 0.9 0.9 1.0" />
+ <color
+ name="BadgeLabelColor"
+ reference="White" />
+ <color
name="ButtonBorderColor"
reference="Unused?" />
<color
@@ -500,22 +509,22 @@
reference="DkGray2" />
<color
name="MultiSliderDisabledThumbColor"
- reference="Unused?" />
+ reference="Black" />
<color
name="MultiSliderThumbCenterColor"
- reference="Unused?" />
+ reference="White" />
<color
name="MultiSliderThumbCenterSelectedColor"
- reference="Unused?" />
+ reference="Green" />
<color
name="MultiSliderThumbOutlineColor"
reference="Unused?" />
<color
name="MultiSliderTrackColor"
- reference="Unused?" />
+ reference="LtGray" />
<color
name="MultiSliderTriangleColor"
- reference="Unused?" />
+ reference="Yellow" />
<!--
<color
name="NameTagBackground"
@@ -760,7 +769,7 @@
<color
name="MenuBarProjectBgColor"
reference="MdBlue" />
-
+
<color
name="MeshImportTableNormalColor"
value="1 1 1 1"/>
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gift.png b/indra/newview/skins/default/textures/icons/Inv_Gift.png
new file mode 100644
index 0000000000..5afe85d72d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Gift.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png b/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png
new file mode 100644
index 0000000000..be58114aa1
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Off.png b/indra/newview/skins/default/textures/icons/OutboxPush_Off.png
new file mode 100644
index 0000000000..e6b9480ab1
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On.png b/indra/newview/skins/default/textures/icons/OutboxPush_On.png
new file mode 100644
index 0000000000..ffda2e92d4
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png
new file mode 100644
index 0000000000..6b5911014f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png b/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png
new file mode 100644
index 0000000000..0e60b417b0
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_Over.png
new file mode 100644
index 0000000000..9c26b92e73
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Press.png b/indra/newview/skins/default/textures/icons/OutboxPush_Press.png
new file mode 100644
index 0000000000..3b5d462975
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png
new file mode 100644
index 0000000000..f85be047b0
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png
new file mode 100644
index 0000000000..cd4e482216
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png
new file mode 100644
index 0000000000..d212a871ce
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png
new file mode 100644
index 0000000000..e5b6023e36
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png
new file mode 100644
index 0000000000..e1911a092f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png
new file mode 100644
index 0000000000..9e59f7843a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png
new file mode 100644
index 0000000000..51e8bff646
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png
new file mode 100644
index 0000000000..300e2e69e1
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png
new file mode 100644
index 0000000000..32fb236381
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png
new file mode 100644
index 0000000000..827f343b1e
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.png
new file mode 100644
index 0000000000..956e02b14d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.png b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.png
new file mode 100644
index 0000000000..434caeda8b
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.png
new file mode 100644
index 0000000000..064687ed0f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.png b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.png
new file mode 100644
index 0000000000..5465650d0c
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Disabled.png b/indra/newview/skins/default/textures/icons/Sync_Disabled.png
new file mode 100644
index 0000000000..ca2e8def97
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Enabled.png b/indra/newview/skins/default/textures/icons/Sync_Enabled.png
new file mode 100644
index 0000000000..bc236c8b98
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Enabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_1.png b/indra/newview/skins/default/textures/icons/Sync_Progress_1.png
new file mode 100644
index 0000000000..624e556376
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_2.png b/indra/newview/skins/default/textures/icons/Sync_Progress_2.png
new file mode 100644
index 0000000000..5769803b3f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_3.png b/indra/newview/skins/default/textures/icons/Sync_Progress_3.png
new file mode 100644
index 0000000000..92d4bfb020
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_4.png b/indra/newview/skins/default/textures/icons/Sync_Progress_4.png
new file mode 100644
index 0000000000..6d43eb3a9f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_5.png b/indra/newview/skins/default/textures/icons/Sync_Progress_5.png
new file mode 100644
index 0000000000..766d063c99
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_6.png b/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
new file mode 100644
index 0000000000..dfe7f68b72
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index cc7cce99c9..799cd907dc 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -1,4 +1,4 @@
-<!--
+<!--
This file contains metadata about how to load, display, and scale textures for rendering in the UI.
Images do *NOT* have to appear in this file in order to use them as textures in the UI...simply refer
to them by filename (relative to textures directory).
@@ -72,8 +72,11 @@ with the same filename but different name
<texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
<texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
+ <texture name="Badge_Background" file_name="widgets/Badge_Background.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+ <texture name="Badge_Border" file_name="widgets/Badge_Border.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+
<texture name="Blank" file_name="Blank.png" preload="false" />
-
+
<texture name="BreadCrumbBtn_Left_Disabled" file_name="widgets/BreadCrumbBtn_Left_Disabled.png" preload="false"/>
<texture name="BreadCrumbBtn_Left_Off" file_name="widgets/BreadCrumbBtn_Left_Off.png" preload="false"/>
<texture name="BreadCrumbBtn_Left_Over" file_name="widgets/BreadCrumbBtn_Left_Over.png" preload="false"/>
@@ -88,7 +91,6 @@ with the same filename but different name
<texture name="BreadCrumbBtn_Right_Off" file_name="widgets/BreadCrumbBtn_Right_Off.png" preload="false"/>
<texture name="BreadCrumbBtn_Right_Over" file_name="widgets/BreadCrumbBtn_Right_Over.png" preload="false"/>
<texture name="BreadCrumbBtn_Right_Press" file_name="widgets/BreadCrumbBtn_Right_Press.png" preload="false"/>
-
<texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="0" scale.top="1" scale.right="0" scale.bottom="0" />
<texture name="BuyArrow_Press" file_name="navbar/BuyArrow_Press.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
@@ -266,6 +268,8 @@ with the same filename but different name
<texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" />
+ <texture name="MarketplaceBtn_Off" file_name="widgets/MarketplaceBtn_Off.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" />
+ <texture name="MarketplaceBtn_Selected" file_name="widgets/MarketplaceBtn_Selected.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" />
<texture name="Microphone_On" file_name="icons/Microphone_On.png" preload="false" />
@@ -349,6 +353,23 @@ with the same filename but different name
<texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" />
<texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" />
+ <texture name="OutboxPush_Disabled" file_name="icons/OutboxPush_Disabled.png" preload="true" />
+ <texture name="OutboxPush_Off" file_name="icons/OutboxPush_Off.png" preload="true" />
+ <texture name="OutboxPush_On" file_name="icons/OutboxPush_On.png" preload="true" />
+ <texture name="OutboxPush_On_Over" file_name="icons/OutboxPush_On_Over.png" preload="true" />
+ <texture name="OutboxPush_Over" file_name="icons/OutboxPush_Over.png" preload="true" />
+ <texture name="OutboxPush_Press" file_name="icons/OutboxPush_Press.png" preload="true" />
+ <texture name="OutboxPush_Progress_1" file_name="icons/OutboxPush_Progress_1.png" preload="true" />
+ <texture name="OutboxPush_Progress_2" file_name="icons/OutboxPush_Progress_2.png" preload="true" />
+ <texture name="OutboxPush_Progress_3" file_name="icons/OutboxPush_Progress_3.png" preload="true" />
+ <texture name="OutboxPush_Progress_4" file_name="icons/OutboxPush_Progress_4.png" preload="true" />
+ <texture name="OutboxPush_Progress_5" file_name="icons/OutboxPush_Progress_5.png" preload="true" />
+ <texture name="OutboxPush_Progress_6" file_name="icons/OutboxPush_Progress_6.png" preload="true" />
+ <texture name="OutboxPush_Selected" file_name="icons/OutboxPush_Selected.png" preload="true" />
+ <texture name="OutboxPush_Selected_Disabled" file_name="icons/OutboxPush_Selected_Disabled.png" preload="true" />
+ <texture name="OutboxPush_Selected_Over" file_name="icons/OutboxPush_Selected_Over.png" preload="true" />
+ <texture name="OutboxPush_Selected_Press" file_name="icons/OutboxPush_Selected_Press.png" preload="true" />
+
<texture name="PanOrbit_Off" file_name="bottomtray/PanOrbit_Off.png" preload="false" />
<texture name="Parcel_Exp_Color" file_name="icons/Parcel_Exp_Color.png" preload="false" />
@@ -369,6 +390,10 @@ with the same filename but different name
<texture name="Parcel_ScriptsNo_Dark" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" />
<texture name="Parcel_Voice_Dark" file_name="icons/Parcel_Voice_Dark.png" preload="false" />
<texture name="Parcel_VoiceNo_Dark" file_name="icons/Parcel_VoiceNo_Dark.png" preload="false" />
+ <texture name="Parcel_SeeAVsOff_Dark" file_name="icons/Parcel_SeeAVsOff_Dark.png" preload="false" />
+ <texture name="Parcel_SeeAVsOn_Dark" file_name="icons/Parcel_SeeAVsOn_Dark.png" preload="false" />
+ <texture name="Parcel_SeeAVsOff_Light" file_name="icons/Parcel_SeeAVsOff_Light.png" preload="false" />
+ <texture name="Parcel_SeeAVsOn_Light" file_name="icons/Parcel_SeeAVsOn_Light.png" preload="false" />
<texture name="Parcel_BuildNo_Light" file_name="icons/Parcel_BuildNo_Light.png" preload="false" />
<texture name="Parcel_FlyNo_Light" file_name="icons/Parcel_FlyNo_Light.png" preload="false" />
@@ -496,6 +521,15 @@ with the same filename but different name
<texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" />
<texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" />
+ <texture name="Sync_Disabled" file_name="icons/Sync_Disabled.png" preload="true" />
+ <texture name="Sync_Enabled" file_name="icons/Sync_Enabled.png" preload="true" />
+ <texture name="Sync_Progress_1" file_name="icons/Sync_Progress_1.png" preload="true" />
+ <texture name="Sync_Progress_2" file_name="icons/Sync_Progress_2.png" preload="true" />
+ <texture name="Sync_Progress_3" file_name="icons/Sync_Progress_3.png" preload="true" />
+ <texture name="Sync_Progress_4" file_name="icons/Sync_Progress_4.png" preload="true" />
+ <texture name="Sync_Progress_5" file_name="icons/Sync_Progress_5.png" preload="true" />
+ <texture name="Sync_Progress_6" file_name="icons/Sync_Progress_6.png" preload="true" />
+
<texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
<texture name="TabIcon_Appearance_Selected" file_name="taskpanel/TabIcon_Appearance_Selected.png" preload="false" />
<texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" />
@@ -649,6 +683,7 @@ with the same filename but different name
<texture name="inv_folder_mesh.tga"/>
<texture name="inv_item_mesh.tga"/>
+
<texture name="lag_status_critical.tga" />
<texture name="lag_status_good.tga" />
<texture name="lag_status_warning.tga" />
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Background.png b/indra/newview/skins/default/textures/widgets/Badge_Background.png
new file mode 100644
index 0000000000..5089c30312
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Badge_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Border.png b/indra/newview/skins/default/textures/widgets/Badge_Border.png
new file mode 100644
index 0000000000..4b086a63fb
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Badge_Border.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png
new file mode 100644
index 0000000000..e603c44384
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png
new file mode 100644
index 0000000000..fbc164123f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 9b1df65d1b..0ccaab73ba 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -56,24 +56,30 @@ Tak til følgende beboere: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Ha
<panel label="Licenser" name="licenses_panel">
<text_editor name="credits_editor">
3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
- APR Copyright (C) 2000-2004 The Apache Software Foundation
- cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
- DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
- expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
- FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
- GL Copyright (C) 1999-2004 Brian Paul.
- Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
- jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
- jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
- ogg/vorbis Copyright (C) 2001, Xiphophorus
- OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
- SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
- SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
- zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
- google-perftools Copyright (c) 2005, Google Inc.
+APR Copyright (C) 2000-2004 The Apache Software Foundation
+Collada DOM Copyright 2005 Sony Computer Entertainment Inc.
+cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
+expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
+GL Copyright (C) 1999-2004 Brian Paul.
+GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia.
+google-perftools Copyright (c) 2005, Google Inc.
+Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+ogg/vorbis Copyright (C) 2001, Xiphophorus
+OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+PCRE Copyright (c) 1997-2008 University of Cambridge
+SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
+google-perftools Copyright (c) 2005, Google Inc.
-Alle rettigheder forbeholdes. Se licenses.txt for detaljer.
+Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
+
+All rights reserved. See licenses.txt for details.
Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
</text_editor>
diff --git a/indra/newview/skins/default/xui/da/floater_beacons.xml b/indra/newview/skins/default/xui/da/floater_beacons.xml
index 8049b072ce..5100a6df1f 100644
--- a/indra/newview/skins/default/xui/da/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/da/floater_beacons.xml
@@ -17,5 +17,6 @@
<check_box label="Kun berøring" name="touch_only"/>
<check_box label="Lydkilder" name="sounds"/>
<check_box label="Partikel kilder" name="particles"/>
+ <check_box label="Medie kilder" name="moapbeacon"/>
</panel>
</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_buy_contents.xml b/indra/newview/skins/default/xui/da/floater_buy_contents.xml
index c2b2ccc244..085fa2f9cc 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_contents.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_buy_contents" title="KØB INDHOLD">
<text name="contains_text">
- [NAME] indeholder:
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; contains:
</text>
<text name="buy_text">
Køb for L$[AMOUNT] fra [NAME]?
diff --git a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml
deleted file mode 100644
index ffae3d788f..0000000000
--- a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="DAG CYKLUS OPSÆTNING">
- <tab_container name="Day Cycle Tabs">
- <panel label="Dag cyklus" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <multi_slider label="" name="WLTimeSlider"/>
- <multi_slider label="" name="WLDayCycleKeys"/>
- <text name="WL12am">
- 00:00
- </text>
- <text name="WL3am">
- 03:00
- </text>
- <text name="WL6am">
- 06:00
- </text>
- <text name="WL9amHash">
- 09:00
- </text>
- <text name="WL12pmHash">
- 12:00
- </text>
- <text name="WL3pm">
- 15:00
- </text>
- <text name="WL6pm">
- 18:00
- </text>
- <text name="WL9pm">
- 21:00
- </text>
- <text name="WL12am2">
- 00:00
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey"/>
- <button label="Slet key" label_selected="Slet key" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Key-frame indstillinger:
- </text>
- <text name="WLCurKeyTimeText">
- Key tid:
- </text>
- <spinner label="Timer" name="WLCurKeyHour"/>
- <spinner label="Min." name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Key fast indstilling:
- </text>
- <combo_box label="Faste" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Snap:
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Cycluslængde:
- </text>
- <spinner label="Timer" name="WLLengthOfDayHour"/>
- <spinner label="Min." name="WLLengthOfDayMin"/>
- <spinner label="Sek." name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Vis :
- </text>
- <button label="Afspil" label_selected="Afspil" name="WLAnimSky"/>
- <button label="Stop!" label_selected="Stop" name="WLStopAnimSky"/>
- <button label="Benyt estate tid" label_selected="Gå til estate tid" name="WLUseLindenTime"/>
- <button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle"/>
- <button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_env_settings.xml b/indra/newview/skins/default/xui/da/floater_env_settings.xml
deleted file mode 100644
index a6fbc05734..0000000000
--- a/indra/newview/skins/default/xui/da/floater_env_settings.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="REDIGERING AF OMGIVELSER">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Tid på
-dagen
- </text>
- <text name="EnvTimeText2">
- 00:00
- </text>
- <slider label="" name="EnvTimeSlider"/>
- <text name="EnvCloudText">
- Skydække
- </text>
- <slider label="" name="EnvCloudSlider"/>
- <text name="EnvWaterColorText">
- Farve på
-vand
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Klik for at åbne farvevælger"/>
- <text name="EnvWaterFogText">
- Tåge på
-vand
- </text>
- <slider label="" name="EnvWaterFogSlider"/>
- <button label="Benyt tid fra estate" name="EnvUseEstateTimeButton"/>
- <button label="Avanceret himmel" name="EnvAdvancedSkyButton"/>
- <button label="Avanceret vand" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_import_collada.xml b/indra/newview/skins/default/xui/da/floater_import_collada.xml
new file mode 100644
index 0000000000..ebc7c86388
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_import_collada.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Import Collada" title="Import Scene">
+ <text name="mesh count">
+ Meshes: [COUNT]
+ </text>
+ <text name="texture count">
+ Textures: [COUNT]
+ </text>
+ <text name="status">
+ Status: [STATUS]
+ </text>
+ <button label="Cancel" name="cancel"/>
+ <button label="OK" name="ok"/>
+ <string name="status_idle">
+ Idle
+ </string>
+ <string name="status_uploading">
+ Uploading [NAME]
+ </string>
+ <string name="status_creating">
+ Creating object [NAME]
+ </string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml
index af2910fe58..655701bb96 100644
--- a/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml
@@ -1,24 +1,25 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Inventory Finder" title="INVENTORY_RECENT_ITEMS">
- <check_box label="Animation" name="check_animation" />
- <check_box label="Visitkort" name="check_calling_card" />
- <check_box label="Tøj" name="check_clothing" />
- <check_box label="Bevægelser" name="check_gesture" />
- <check_box label="Landemærke" name="check_landmark" />
- <check_box label="Note" name="check_notecard" />
- <check_box label="Objekter" name="check_object" />
- <check_box label="Scripts" name="check_script" />
- <check_box label="Lyde" name="check_sound" />
- <check_box label="Teksturer" name="check_texture" />
- <check_box label="Foto&apos;s" name="check_snapshot" />
- <button label="Alle" label_selected="Alle" name="All" />
- <button label="Ingen" label_selected="Ingen" name="None" />
- <check_box label="Vis altid mapper" name="check_show_empty" />
- <check_box label="Siden sidste logoff" name="check_since_logoff" />
+ <check_box label="Animation" name="check_animation"/>
+ <check_box label="Visitkort" name="check_calling_card"/>
+ <check_box label="Tøj" name="check_clothing"/>
+ <check_box label="Bevægelser" name="check_gesture"/>
+ <check_box label="Landemærke" name="check_landmark"/>
+ <check_box label="Meshes" name="check_mesh"/>
+ <check_box label="Note" name="check_notecard"/>
+ <check_box label="Objekter" name="check_object"/>
+ <check_box label="Scripts" name="check_script"/>
+ <check_box label="Lyde" name="check_sound"/>
+ <check_box label="Teksturer" name="check_texture"/>
+ <check_box label="Foto&apos;s" name="check_snapshot"/>
+ <button label="Alle" label_selected="Alle" name="All"/>
+ <button label="Ingen" label_selected="Ingen" name="None"/>
+ <check_box label="Vis altid mapper" name="check_show_empty"/>
+ <check_box label="Siden sidste logoff" name="check_since_logoff"/>
<text name="- OR -">
- ELLER -
</text>
- <spinner label="Timer siden" name="spin_hours_ago" />
- <spinner label="Dage siden" name="spin_days_ago" />
- <button label="Luk" label_selected="Luk" name="Close" />
+ <spinner label="Timer siden" name="spin_hours_ago"/>
+ <spinner label="Dage siden" name="spin_days_ago"/>
+ <button label="Luk" label_selected="Luk" name="Close"/>
</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_model_preview.xml b/indra/newview/skins/default/xui/da/floater_model_preview.xml
new file mode 100644
index 0000000000..a98c70ff52
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_model_preview.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Model Preview" title="Upload Model">
+ <string name="status_idle">
+ Idle
+ </string>
+ <string name="status_reading_file">
+ Loading...
+ </string>
+ <string name="status_generating_meshes">
+ Generating Meshes...
+ </string>
+ <string name="status_vertex_number_overflow">
+ Error: Vertex number is more than 65534, aborted!
+ </string>
+ <string name="high">
+ High
+ </string>
+ <string name="medium">
+ Medium
+ </string>
+ <string name="low">
+ Low
+ </string>
+ <string name="lowest">
+ Lowest
+ </string>
+ <string name="mesh_status_good">
+ Ship it!
+ </string>
+ <string name="mesh_status_na">
+ N/A
+ </string>
+ <string name="mesh_status_none">
+ None
+ </string>
+ <string name="mesh_status_submesh_mismatch">
+ Levels of detail have a different number of textureable faces.
+ </string>
+ <string name="mesh_status_mesh_mismatch">
+ Levels of detail have a different number of mesh instances.
+ </string>
+ <string name="mesh_status_too_many_vertices">
+ Level of detail has too many vertices.
+ </string>
+ <string name="mesh_status_missing_lod">
+ Missing required level of detail.
+ </string>
+ <string name="layer_all">
+ All
+ </string>
+ <string name="decomposing">
+ Analyzing...
+ </string>
+ <string name="simplifying">
+ Simplifying...
+ </string>
+ <text name="name_label">
+ Name:
+ </text>
+ <text name="lod_label">
+ Preview:
+ </text>
+ <combo_box name="preview_lod_combo" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ Level of Detail: High
+ </combo_item>
+ <combo_item name="medium">
+ Level of Detail: Medium
+ </combo_item>
+ <combo_item name="low">
+ Level of Detail: Low
+ </combo_item>
+ <combo_item name="lowest">
+ Level of Detail: Lowest
+ </combo_item>
+ </combo_box>
+ <panel>
+ <text name="streaming cost">
+ Resource Cost: [COST]
+ </text>
+ <text name="physics cost">
+ Physics Cost: [COST]
+ </text>
+ <text name="upload fee">
+ Upload Fee: N/A
+ </text>
+ </panel>
+ <text name="status">
+ [STATUS]
+ </text>
+ <button label="Defaults" name="reset_btn" tool_tip="Reset to defaults"/>
+ <button label="Upload" name="ok_btn" tool_tip="Upload to simulator"/>
+ <button label="Cancel" name="cancel_btn"/>
+ <tab_container name="import_tab">
+ <panel label="Level of Detail" name="lod_panel">
+ <text name="lod_table_header">
+ Select Level of Detail:
+ </text>
+ <text name="high_label" value="High"/>
+ <text name="high_triangles" value="0"/>
+ <text name="high_vertices" value="0"/>
+ <text name="medium_label" value="Medium"/>
+ <text name="medium_triangles" value="0"/>
+ <text name="medium_vertices" value="0"/>
+ <text name="low_label" value="Low"/>
+ <text name="low_triangles" value="0"/>
+ <text name="low_vertices" value="0"/>
+ <text name="lowest_label" value="Lowest"/>
+ <text name="lowest_triangles" value="0"/>
+ <text name="lowest_vertices" value="0"/>
+ <text name="lod_table_footer">
+ Level of Detail: [DETAIL]
+ </text>
+ <radio_group name="lod_file_or_limit" value="lod_from_file">
+ <radio_item label="Load from file" name="lod_from_file"/>
+ <radio_item label="Auto generate" name="lod_auto_generate"/>
+ <radio_item label="None" name="lod_none"/>
+ </radio_group>
+ <button label="Browse..." name="lod_browse"/>
+ <combo_box name="lod_mode">
+ <combo_item name="triangle_limit">
+ Triangle Limit
+ </combo_item>
+ <combo_item name="error_threshold">
+ Error Threshold
+ </combo_item>
+ </combo_box>
+ <text name="build_operator_text">
+ Build Operator:
+ </text>
+ <text name="queue_mode_text">
+ Queue Mode:
+ </text>
+ <combo_box name="build_operator">
+ <combo_item name="edge_collapse">
+ Edge Collapse
+ </combo_item>
+ <combo_item name="half_edge_collapse">
+ Half Edge Collapse
+ </combo_item>
+ </combo_box>
+ <combo_box name="queue_mode">
+ <combo_item name="greedy">
+ Greedy
+ </combo_item>
+ <combo_item name="lazy">
+ Lazy
+ </combo_item>
+ <combo_item name="independent">
+ Independent
+ </combo_item>
+ </combo_box>
+ <text name="border_mode_text">
+ Border Mode:
+ </text>
+ <text name="share_tolderance_text">
+ Share Tolerance:
+ </text>
+ <combo_box name="border_mode">
+ <combo_item name="border_unlock">
+ Unlock
+ </combo_item>
+ <combo_item name="border_lock">
+ Lock
+ </combo_item>
+ </combo_box>
+ <text name="crease_label">
+ Crease Angle:
+ </text>
+ <spinner name="crease_angle" value="75"/>
+ </panel>
+ <panel label="Physics" name="physics_panel">
+ <panel name="physics geometry">
+ <radio_group name="physics_load_radio" value="physics_load_from_file">
+ <radio_item label="File:" name="physics_load_from_file"/>
+ <radio_item label="Use Level of Detail:" name="physics_use_lod"/>
+ </radio_group>
+ <combo_box name="physics_lod_combo" tool_tip="LOD to use for physics shape">
+ <combo_item name="physics_lowest">
+ Lowest
+ </combo_item>
+ <combo_item name="physics_low">
+ Low
+ </combo_item>
+ <combo_item name="physics_medium">
+ Medium
+ </combo_item>
+ <combo_item name="physics_high">
+ High
+ </combo_item>
+ </combo_box>
+ <button label="Browse..." name="physics_browse"/>
+ </panel>
+ <panel name="physics analysis">
+ <slider label="Smooth:" name="Smooth"/>
+ <check_box label="Close Holes (slow)" name="Close Holes (Slow)"/>
+ <button label="Analyze" name="Decompose"/>
+ <button label="Cancel" name="decompose_cancel"/>
+ </panel>
+ <panel name="physics simplification">
+ <slider label="Passes:" name="Combine Quality"/>
+ <slider label="Detail Scale:" name="Detail Scale"/>
+ <slider label="Retain:" name="Retain%"/>
+ <button label="Simplify" name="Simplify"/>
+ <button label="Cancel" name="simplify_cancel"/>
+ </panel>
+ <panel name="physics info">
+ <slider label="Preview Spread:" name="physics_explode"/>
+ <text name="physics_triangles">
+ Triangles: [TRIANGLES]
+ </text>
+ <text name="physics_points">
+ Vertices: [POINTS]
+ </text>
+ <text name="physics_hulls">
+ Hulls: [HULLS]
+ </text>
+ </panel>
+ </panel>
+ <panel label="Modifiers" name="modifiers_panel">
+ <spinner name="import_scale" value="1.0"/>
+ <text name="import_dimensions">
+ [X] x [Y] x [Z] m
+ </text>
+ <check_box label="Textures" name="upload_textures"/>
+ <check_box label="Skin weight" name="upload_skin"/>
+ <check_box label="Joint positions" name="upload_joints"/>
+ <spinner name="pelvis_offset" value="0.0"/>
+ </panel>
+ </tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_model_wizard.xml b/indra/newview/skins/default/xui/da/floater_model_wizard.xml
new file mode 100644
index 0000000000..8ad443581a
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_model_wizard.xml
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Model Wizard" title="UPLOAD MODEL WIZARD">
+ <button label="5. Upload" name="upload_btn"/>
+ <button label="4. Review" name="review_btn"/>
+ <button label="3. Physics" name="physics2_btn"/>
+ <button label="3. Physics" name="physics_btn"/>
+ <button label="2. Optimize" name="optimize_btn"/>
+ <button label="1. Choose File" name="choose_file_btn"/>
+ <panel name="choose_file_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Upload Model
+ </text>
+ </panel>
+ <text name="description">
+ This wizard will help you import mesh models to Second Life. First specify a file containing the model you wish to import. Second Life supports COLLADA (.dae) files.
+ </text>
+ <panel name="content">
+ <text name="Cache location">
+ Filename:
+ </text>
+ <button label="Browse..." label_selected="Browse..." name="browse"/>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ </panel>
+ <panel name="optimize_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Optimize
+ </text>
+ </panel>
+ <text name="description">
+ This wizard has optimized your model to improve performance. You may adjust the results of the optimization process bellow or click Next to continue.
+ </text>
+ <panel name="content">
+ <text name="high_detail_text">
+ Generate Level of Detail: High
+ </text>
+ <text name="medium_detail_text">
+ Generate Level of Detail: Medium
+ </text>
+ <text name="low_detail_text">
+ Generate Level of Detail: Low
+ </text>
+ <text name="lowest_detail_text">
+ Generate Level of Detail: Lowest
+ </text>
+ </panel>
+ <panel name="content2">
+ <text name="lod_label">
+ Model Preview:
+ </text>
+ <combo_box name="preview_lod_combo2" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ High
+ </combo_item>
+ <combo_item name="medium">
+ Medium
+ </combo_item>
+ <combo_item name="low">
+ Low
+ </combo_item>
+ <combo_item name="lowest">
+ Lowest
+ </combo_item>
+ </combo_box>
+ <text name="streaming cost">
+ Resource Cost: [COST]
+ </text>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ </panel>
+ <panel name="physics_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Physics
+ </text>
+ </panel>
+ <text name="description">
+ The wizard will create a physical shape, which determines how the object interacts with other objects and avatars. Set the slider to the detail level most appropriate for how your object will be used:
+ </text>
+ <panel name="content">
+ <text name="streaming cost">
+ Resource Cost: [COST]
+ </text>
+ </panel>
+ </panel>
+ <panel name="physics2_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Physics
+ </text>
+ </panel>
+ <text name="description">
+ Preview the physics shape below then click Next to continue. To modify the physics shape, click the Back button.
+ </text>
+ <panel name="content">
+ <text name="lod_label">
+ Model Preview:
+ </text>
+ <combo_box name="preview_lod_combo3" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ High
+ </combo_item>
+ <combo_item name="medium">
+ Medium
+ </combo_item>
+ <combo_item name="low">
+ Low
+ </combo_item>
+ <combo_item name="lowest">
+ Lowest
+ </combo_item>
+ </combo_box>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ <text name="streaming cost">
+ Resource Cost: [COST]
+ </text>
+ </panel>
+ </panel>
+ <panel name="review_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Review
+ </text>
+ </panel>
+ <text name="description">
+ Review the details below then click. Upload to upload your model. Your L$ balance will be charged when you click Upload.
+ </text>
+ <panel name="content">
+ <text name="lod_label">
+ Model Preview:
+ </text>
+ <combo_box name="preview_lod_combo" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ High
+ </combo_item>
+ <combo_item name="medium">
+ Medium
+ </combo_item>
+ <combo_item name="low">
+ Low
+ </combo_item>
+ <combo_item name="lowest">
+ Lowest
+ </combo_item>
+ </combo_box>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ <text name="streaming cost">
+ Resource Cost: [COST]
+ </text>
+ <text name="physics cost">
+ Physics Cost: [COST]
+ </text>
+ </panel>
+ <panel name="upload_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Upload Complete!
+ </text>
+ </panel>
+ <text name="description">
+ Congratulations! Your model has been sucessfully uploaded. You will find the model in the Objects folder in your inventory.
+ </text>
+ </panel>
+ <button label="&lt;&lt; Back" name="back"/>
+ <button label="Next &gt;&gt;" name="next"/>
+ <button label="Upload" name="upload" tool_tip="Upload to simulator"/>
+ <button label="Cancel" name="cancel"/>
+ <button label="Close" name="close"/>
+ <spinner name="import_scale" value="1.0"/>
+ <string name="status_idle">
+ Idle
+ </string>
+ <string name="status_reading_file">
+ Loading...
+ </string>
+ <string name="status_generating_meshes">
+ Generating Meshes...
+ </string>
+ <string name="status_vertex_number_overflow">
+ Error: Vertex number is more than 65534, aborted!
+ </string>
+ <string name="high">
+ High
+ </string>
+ <string name="medium">
+ Medium
+ </string>
+ <string name="low">
+ Low
+ </string>
+ <string name="lowest">
+ Lowest
+ </string>
+ <string name="mesh_status_good">
+ Ship it!
+ </string>
+ <string name="mesh_status_na">
+ N/A
+ </string>
+ <string name="mesh_status_none">
+ None
+ </string>
+ <string name="mesh_status_submesh_mismatch">
+ Levels of detail have a different number of textureable faces.
+ </string>
+ <string name="mesh_status_mesh_mismatch">
+ Levels of detail have a different number of mesh instances.
+ </string>
+ <string name="mesh_status_too_many_vertices">
+ Level of detail has too many vertices.
+ </string>
+ <string name="mesh_status_missing_lod">
+ Missing required level of detail.
+ </string>
+ <string name="layer_all">
+ All
+ </string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_price_for_listing.xml b/indra/newview/skins/default/xui/da/floater_price_for_listing.xml
new file mode 100644
index 0000000000..b091fa09b5
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_price_for_listing.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="price_for_listing" title="PUBLISH CLASSIFIED AD">
+ <text name="explanation_text">
+ Din annonce vil løbe en uge fra udgivelsesdatoen.
+
+Placeringen af din annonce i listerne er afhængig af hvor meget du har valgt at betale.
+
+De annoncer der betales mest for vises øverst i lister og højere i søgeresultater.
+ </text>
+ <text name="price_text">
+ Pris for annonce:
+ </text>
+ <text name="price_symbol">
+ L$
+ </text>
+ <button label="OK" name="set_price_btn"/>
+ <button label="Annullér" name="cancel_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_settings_debug.xml b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
index 016e5af378..f7eda56e48 100644
--- a/indra/newview/skins/default/xui/da/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="DEBUG INDSTILLINGER">
<radio_group name="boolean_combo">
- <radio_item label="SANDT" name="TRUE" value="sand"/>
- <radio_item label="FALSK" name="FALSE" value=""/>
+ <radio_item label="SANDT" name="TRUE" />
+ <radio_item label="FALSK" name="FALSE" />
</radio_group>
<color_swatch label="Farve" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/da/floater_sound_devices.xml b/indra/newview/skins/default/xui/da/floater_sound_devices.xml
new file mode 100644
index 0000000000..cb4cbba570
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_sound_devices.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_sound_devices" title="Lyd enheder">
+ <text name="voice_label">
+ Stemme chat
+ </text>
+ <check_box label="Aktiveret" name="enable_voice"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml
index 8264e366c0..815bde456e 100644
--- a/indra/newview/skins/default/xui/da/floater_tools.xml
+++ b/indra/newview/skins/default/xui/da/floater_tools.xml
@@ -122,6 +122,18 @@
<text name="prim_count">
Prims: [COUNT]
</text>
+ <text name="linked_set_count">
+ Lænkede sæt: [COUNT]
+ </text>
+ <text name="linked_set_cost" tool_tip="Pris for nuværende valgte lænkede sæt som [prims] / [physics complexity]">
+ Pris: [COST] / [PHYSICS]
+ </text>
+ <text name="object_count">
+ Objekter: [COUNT]
+ </text>
+ <text name="object_cost" tool_tip="Pris for nuværende valgte objekter som [prims] / [physics complexity]">
+ Pris: [COST] / [PHYSICS]
+ </text>
<tab_container name="Object Info Tabs">
<panel label="Generelt" name="General">
<panel.string name="text deed continued">
@@ -266,15 +278,6 @@
<combo_box.item label="Ring" name="Ring"/>
<combo_box.item label="Sculpted" name="Sculpted"/>
</combo_box>
- <combo_box name="material">
- <combo_box.item label="Sten" name="Stone"/>
- <combo_box.item label="Metal" name="Metal"/>
- <combo_box.item label="Glas" name="Glass"/>
- <combo_box.item label="Træ" name="Wood"/>
- <combo_box.item label="Kød" name="Flesh"/>
- <combo_box.item label="Plastik" name="Plastic"/>
- <combo_box.item label="Gummi" name="Rubber"/>
- </combo_box>
<text name="text cut">
Snit Z-akse (start/slut)
</text>
@@ -347,9 +350,19 @@
<combo_box.item label="Kuglering" name="Torus"/>
<combo_box.item label="Plan" name="Plane"/>
<combo_box.item label="Cylinder" name="Cylinder"/>
+ <combo_box.item label="Mesh" name="Mesh"/>
</combo_box>
</panel>
<panel label="Features" name="Features">
+ <panel.string name="None">
+ Ingen
+ </panel.string>
+ <panel.string name="Prim">
+ Prim
+ </panel.string>
+ <panel.string name="Convex Hull">
+ Konveks skrog
+ </panel.string>
<text name="select_single">
Vælg kun én prim for at ændre egenskaber.
</text>
@@ -374,6 +387,23 @@
<spinner label="Fokus" name="Light Focus"/>
<spinner label="Udfasning" name="Light Falloff"/>
<spinner label="Omgivelser" name="Light Ambiance"/>
+ <text name="label physicsshapetype">
+ Fysisk form type:
+ </text>
+ <combo_box name="Physics Shape Type Combo Ctrl" tool_tip="Vælg fysisk form type"/>
+ <combo_box name="material">
+ <combo_box.item label="Sten" name="Stone"/>
+ <combo_box.item label="Metal" name="Metal"/>
+ <combo_box.item label="Glas" name="Glass"/>
+ <combo_box.item label="Træ" name="Wood"/>
+ <combo_box.item label="Kød" name="Flesh"/>
+ <combo_box.item label="Plastik" name="Plastic"/>
+ <combo_box.item label="Gummi" name="Rubber"/>
+ </combo_box>
+ <spinner label="Tyngde" name="Physics Gravity"/>
+ <spinner label="Friktion" name="Physics Friction"/>
+ <spinner label="Tæthed" name="Physics Density"/>
+ <spinner label="Restitution" name="Physics Restitution"/>
</panel>
<panel label="Tekstur" name="Texture">
<panel.string name="string repeats per meter">
diff --git a/indra/newview/skins/default/xui/da/floater_water.xml b/indra/newview/skins/default/xui/da/floater_water.xml
deleted file mode 100644
index aedd1b442c..0000000000
--- a/indra/newview/skins/default/xui/da/floater_water.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="AVANCERET OPSÆTNING AF VAND">
- <text name="KeyFramePresetsText">
- Vand opsætninger:
- </text>
- <button label="Ny" label_selected="Ny" name="WaterNewPreset"/>
- <button label="Gem" label_selected="Gem" name="WaterSavePreset"/>
- <button label="Slet" label_selected="Slet" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="INDSTILLINGER" name="Settings">
- <text name="BHText">
- Vandtåge farve
- </text>
- <button label="?" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Klik for at åbne farvevælger"/>
- <text name="WaterFogDensText">
- Tåge tæthedskarakteristik
- </text>
- <button label="?" name="WaterFogDensityHelp"/>
- <slider label="" name="WaterFogDensity"/>
- <text name="WaterUnderWaterFogModText">
- Tilretning undervandståge
- </text>
- <button label="?" name="WaterUnderWaterFogModHelp"/>
- <slider label="" name="WaterUnderWaterFogMod"/>
- <text name="BDensText">
- Lille bølge reflektionsskala
- </text>
- <button label="?" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <slider label="" name="WaterNormalScaleX"/>
- <slider label="" name="WaterNormalScaleY"/>
- <slider label="" name="WaterNormalScaleZ"/>
- <text name="HDText">
- Spredningsskala
- </text>
- <button label="?" name="WaterFresnelScaleHelp"/>
- <slider label="" name="WaterFresnelScale"/>
- <text name="FresnelOffsetText">
- Spredning offset
- </text>
- <button label="?" name="WaterFresnelOffsetHelp"/>
- <slider label="" name="WaterFresnelOffset"/>
- <text name="DensMultText">
- Lysbrydning fra oven
- </text>
- <button label="?" name="WaterScaleAboveHelp"/>
- <slider label="" name="WaterScaleAbove"/>
- <text name="WaterScaleBelowText">
- Lysbrydning fra neden
- </text>
- <button label="?" name="WaterScaleBelowHelp"/>
- <slider label="" name="WaterScaleBelow"/>
- <text name="MaxAltText">
- Udviskning
- </text>
- <button label="?" name="WaterBlurMultiplierHelp"/>
- <slider label="" name="WaterBlurMult"/>
- </panel>
- <panel label="BILLEDE" name="Waves">
- <text name="BHText">
- Retning for store bølger
- </text>
- <button label="?" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <slider label="" name="WaterWave1DirX"/>
- <slider label="" name="WaterWave1DirY"/>
- <text name="BHText2">
- Retning for små bølger
- </text>
- <button label="?" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <slider label="" name="WaterWave2DirX"/>
- <slider label="" name="WaterWave2DirY"/>
- <text name="BHText3">
- Tekstur map
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- <texture_picker label="" name="WaterNormalMap"/>
- </panel>
- </tab_container>
- <string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_windlight_options.xml b/indra/newview/skins/default/xui/da/floater_windlight_options.xml
deleted file mode 100644
index 56f94b24e9..0000000000
--- a/indra/newview/skins/default/xui/da/floater_windlight_options.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="WindLight floater" title="AVANCERET OPSÆTNING FOR HIMMEL">
- <text name="KeyFramePresetsText">
- Faste indstillinger:
- </text>
- <button label="Ny" label_selected="Ny" name="WLNewPreset" />
- <button label="Gem" label_selected="Gem" name="WLSavePreset" />
- <button label="Slet" label_selected="Slet" name="WLDeletePreset" />
- <button label="Dags cyklus" label_selected="Dags cyklus" name="WLDayCycleMenuButton" />
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSFÆRE" name="Atmosphere">
- <text name="BHText">
- Blå - horisont
- </text>
- <button label="?" name="WLBlueHorizonHelp" />
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <slider label="" name="WLBlueHorizonR" />
- <slider label="" name="WLBlueHorizonG" />
- <slider label="" name="WLBlueHorizonB" />
- <slider label="" name="WLBlueHorizonI" />
- <text name="BDensText">
- Dis - horisont
- </text>
- <button label="?" name="WLHazeHorizonHelp" />
- <slider label="" name="WLHazeHorizon" />
- <text name="BDensText2">
- Blå - tæthed
- </text>
- <button label="?" name="WLBlueDensityHelp" />
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <slider label="" name="WLBlueDensityR" />
- <slider label="" name="WLBlueDensityG" />
- <slider label="" name="WLBlueDensityB" />
- <slider label="" name="WLBlueDensityI" />
- <text name="HDText">
- Dis - intensitet
- </text>
- <button label="?" name="WLHazeDensityHelp" />
- <slider label="" name="WLHazeDensity" />
- <text name="DensMultText">
- Densitet faktor
- </text>
- <button label="?" name="WLDensityMultHelp" />
- <slider label="" name="WLDensityMult" />
- <text name="WLDistanceMultText">
- Distance faktor
- </text>
- <button label="?" name="WLDistanceMultHelp" />
- <slider label="" name="WLDistanceMult" />
- <text name="MaxAltText">
- Maximum højde
- </text>
- <button label="?" name="WLMaxAltitudeHelp" />
- <slider label="" name="WLMaxAltitude" />
- </panel>
- <panel label="LYS" name="Lighting">
- <text name="SLCText">
- Sol/Måne farve
- </text>
- <button label="?" name="WLSunlightColorHelp" />
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <slider label="" name="WLSunlightR" />
- <slider label="" name="WLSunlightG" />
- <slider label="" name="WLSunlightB" />
- <slider label="" name="WLSunlightI" />
- <text name="TODText">
- Sol/Måne position
- </text>
- <button label="?" name="WLTimeOfDayHelp" />
- <slider label="" name="WLSunAngle" />
- <text name="WLAmbientText">
- Omgivende
- </text>
- <button label="?" name="WLAmbientHelp" />
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <slider label="" name="WLAmbientR" />
- <slider label="" name="WLAmbientG" />
- <slider label="" name="WLAmbientB" />
- <slider label="" name="WLAmbientI" />
- <text name="WLEastAngleText">
- Øst vinkel
- </text>
- <button label="?" name="WLEastAngleHelp" />
- <slider label="" name="WLEastAngle" />
- <text name="SunGlowText">
- Sol glød
- </text>
- <button label="?" name="WLSunGlowHelp" />
- <slider label="Fokus " name="WLGlowB" />
- <slider label="Størr. " name="WLGlowR" />
- <text name="SceneGammaText">
- Lysintensitet (gamma)
- </text>
- <button label="?" name="WLSceneGammaHelp" />
- <slider label="" name="WLGamma" />
- <text name="WLStarText">
- Stjerne intensitet
- </text>
- <button label="?" name="WLStarBrightnessHelp" />
- <slider label="" name="WLStarAlpha" />
- </panel>
- <panel label="SKYER" name="Clouds">
- <text name="WLCloudColorText">
- Farve på skyer
- </text>
- <button label="?" name="WLCloudColorHelp" />
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <slider label="" name="WLCloudColorR" />
- <slider label="" name="WLCloudColorG" />
- <slider label="" name="WLCloudColorB" />
- <slider label="" name="WLCloudColorI" />
- <text name="WLCloudColorText2">
- Skyer XY/Tæthed
- </text>
- <button label="?" name="WLCloudDensityHelp" />
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- T
- </text>
- <slider label="" name="WLCloudX" />
- <slider label="" name="WLCloudY" />
- <slider label="" name="WLCloudDensity" />
- <text name="WLCloudCoverageText">
- Skydække
- </text>
- <button label="?" name="WLCloudCoverageHelp" />
- <slider label="" name="WLCloudCoverage" />
- <text name="WLCloudScaleText">
- Skystørrelse
- </text>
- <button label="?" name="WLCloudScaleHelp" />
- <slider label="" name="WLCloudScale" />
- <text name="WLCloudDetailText">
- Sky detaljer(XY/tæthed)
- </text>
- <button label="?" name="WLCloudDetailHelp" />
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- T
- </text>
- <slider label="" name="WLCloudDetailX" />
- <slider label="" name="WLCloudDetailY" />
- <slider label="" name="WLCloudDetailDensity" />
- <text name="WLCloudScrollXText">
- Sky drift X
- </text>
- <button label="?" name="WLCloudScrollXHelp" />
- <check_box label="Lås" name="WLCloudLockX" />
- <slider label="" name="WLCloudScrollX" />
- <text name="WLCloudScrollYText">
- Sky drift Y
- </text>
- <button label="?" name="WLCloudScrollYHelp" />
- <check_box label="Lås" name="WLCloudLockY" />
- <slider label="" name="WLCloudScrollY" />
- <check_box label="Benyt simple skyer" name="DrawClassicClouds" />
- <button label="?" name="WLClassicCloudsHelp" />
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/da/menu_avatar_self.xml b/indra/newview/skins/default/xui/da/menu_avatar_self.xml
index 0080f7a59e..4e6b42a744 100644
--- a/indra/newview/skins/default/xui/da/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/da/menu_avatar_self.xml
@@ -14,6 +14,7 @@
<menu_item_call label="Undertrøje" name="Self Undershirt"/>
<menu_item_call label="Underbukser" name="Self Underpants"/>
<menu_item_call label="Tatovering" name="Self Tattoo"/>
+ <menu_item_call label="Fysik" name="Self Physics"/>
<menu_item_call label="Alpha" name="Self Alpha"/>
<menu_item_call label="Alt tøj" name="All Clothes"/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/da/menu_bottomtray.xml b/indra/newview/skins/default/xui/da/menu_bottomtray.xml
index 9ac296904a..a0d74db36d 100644
--- a/indra/newview/skins/default/xui/da/menu_bottomtray.xml
+++ b/indra/newview/skins/default/xui/da/menu_bottomtray.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<menu name="hide_camera_move_controls_menu">
- <menu_item_check label="Stemme aktiveret" name="EnableVoiceChat"/>
+ <menu_item_check label="Tal knap" name="EnableVoiceChat"/>
<menu_item_check label="Faste bevægelser" name="ShowGestureButton"/>
<menu_item_check label="Bevægelse knap" name="ShowMoveButton"/>
<menu_item_check label="Vis knap" name="ShowCameraButton"/>
diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml
index 35551318d1..f9bdf36f1f 100644
--- a/indra/newview/skins/default/xui/da/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/da/menu_inventory.xml
@@ -25,6 +25,7 @@
<menu_item_call label="Nye underbukser" name="New Underpants"/>
<menu_item_call label="Nyt alpha lag" name="New Alpha Mask"/>
<menu_item_call label="Ny tatovering" name="New Tattoo"/>
+ <menu_item_call label="Ny fysik" name="New Physics"/>
</menu>
<menu label="Nye kropsdele" name="New Body Parts">
<menu_item_call label="Ny figur" name="New Shape"/>
diff --git a/indra/newview/skins/default/xui/da/menu_inventory_add.xml b/indra/newview/skins/default/xui/da/menu_inventory_add.xml
index 07f70d7190..eca03d3ee9 100644
--- a/indra/newview/skins/default/xui/da/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/da/menu_inventory_add.xml
@@ -4,6 +4,8 @@
<menu_item_call label="Billede (L$[COST])..." name="Upload Image"/>
<menu_item_call label="Lyd (L$[COST])..." name="Upload Sound"/>
<menu_item_call label="Animation (L$[COST])..." name="Upload Animation"/>
+ <menu_item_call label="Model..." name="Upload Model"/>
+ <menu_item_call label="Model Wizard..." name="Upload Model Wizard"/>
<menu_item_call label="Hent mange (L$[COST] pr. fil)..." name="Bulk Upload"/>
<menu_item_call label="Sæt standardværdier for upload rettigheder" name="perm prefs"/>
</menu>
@@ -23,6 +25,7 @@
<menu_item_call label="Nye underbukser" name="New Underpants"/>
<menu_item_call label="Nyt alpha lag" name="New Alpha"/>
<menu_item_call label="Ny tatovering" name="New Tattoo"/>
+ <menu_item_call label="Ny fysik" name="New Physics"/>
</menu>
<menu label="Nye kropsdele" name="New Body Parts">
<menu_item_call label="Ny kropsbygning" name="New Shape"/>
diff --git a/indra/newview/skins/default/xui/da/menu_media_ctrl.xml b/indra/newview/skins/default/xui/da/menu_media_ctrl.xml
new file mode 100644
index 0000000000..788b1c4b59
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/menu_media_ctrl.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<context_menu name="media ctrl context menu">
+ <menu_item_call label="Klip" name="Cut"/>
+ <menu_item_call label="Kopier" name="Copy"/>
+ <menu_item_call label="Sæt ind" name="Paste"/>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/da/menu_model_import_gear_default.xml b/indra/newview/skins/default/xui/da/menu_model_import_gear_default.xml
new file mode 100644
index 0000000000..d9626692d5
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/menu_model_import_gear_default.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<toggleable_menu name="model_menu_gear_default">
+ <menu_item_check label="Show edges" name="show_edges"/>
+ <menu_item_check label="Show physics" name="show_physics"/>
+ <menu_item_check label="Show textures" name="show_textures"/>
+ <menu_item_check label="Show skin weight" name="show_skin_weight"/>
+ <menu_item_check label="Show joint positions" name="show_joint_positions"/>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/da/menu_outfit_gear.xml b/indra/newview/skins/default/xui/da/menu_outfit_gear.xml
index 8b4c776496..0b0fff3b93 100644
--- a/indra/newview/skins/default/xui/da/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/da/menu_outfit_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="Gear Outfit">
+<toggleable_menu name="Gear Outfit">
<menu_item_call label="Tag på - Erstat nuværende sæt" name="wear"/>
<menu_item_call label="Tag på - Tilføj til nuværende sæt" name="wear_add"/>
<menu_item_call label="Tag af - Fjern fra nuværende sæt" name="take_off"/>
@@ -14,6 +14,7 @@
<menu_item_call label="Ny undertrøje" name="New Undershirt"/>
<menu_item_call label="Nye underbukser" name="New Underpants"/>
<menu_item_call label="Ny alpha" name="New Alpha"/>
+ <menu_item_call label="Ny fysik" name="New Physics"/>
<menu_item_call label="Ny tatovering" name="New Tattoo"/>
</menu>
<menu label="Nye kropsdele" name="New Body Parts">
@@ -24,4 +25,4 @@
</menu>
<menu_item_call label="Omdøb sæt" name="rename"/>
<menu_item_call label="Slet sæt" name="delete_outfit"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml
index f59a0622be..d352312d15 100644
--- a/indra/newview/skins/default/xui/da/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/da/menu_viewer.xml
@@ -118,6 +118,8 @@
<menu_item_call label="Billede (L$[COST])..." name="Upload Image"/>
<menu_item_call label="Lyd (L$[COST])..." name="Upload Sound"/>
<menu_item_call label="Animation (L$[COST])..." name="Upload Animation"/>
+ <menu_item_call label="Model..." name="Upload Model"/>
+ <menu_item_call label="Model Wizard..." name="Upload Model Wizard"/>
<menu_item_call label="Mange (L$[COST] pr. fil)..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Fortyd" name="Undo"/>
@@ -157,7 +159,7 @@
<menu_item_check label="Alpha" name="Alpha"/>
<menu_item_check label="Træer" name="Tree"/>
<menu_item_check label="Avatarer" name="Character"/>
- <menu_item_check label="Overflade" name="SurfacePath"/>
+ <menu_item_check label="Surface Patch" name="Surface Patch"/>
<menu_item_check label="Himmel" name="Sky"/>
<menu_item_check label="Vand" name="Water"/>
<menu_item_check label="Jord" name="Ground"/>
@@ -215,6 +217,7 @@
<menu_item_check label="Konsol med tekstur kategorier" name="Texture Category"/>
<menu_item_check label="Hurtig-timere" name="Fast Timers"/>
<menu_item_check label="Hukommelse" name="Memory"/>
+ <menu_item_check label="Scene Statistics" name="Scene Statistics"/>
<menu_item_call label="Vis Regionsinfo i debug-konsol" name="Region Info to Debug Console"/>
<menu_item_check label="Kamera" name="Camera"/>
<menu_item_check label="Vind" name="Wind"/>
@@ -222,6 +225,7 @@
</menu>
<menu label="Vis info" name="Display Info">
<menu_item_check label="Vis tid" name="Show Time"/>
+ <menu_item_check label="Show Upload Cost" name="Show Upload Cost"/>
<menu_item_check label="Vis gengivelses information" name="Show Render Info"/>
<menu_item_check label="Vis tekstur information" name="Show Texture Info"/>
<menu_item_check label="Vis farve under cursor" name="Show Color Under Cursor"/>
@@ -244,7 +248,12 @@
<menu_item_check label="Frame test" name="Frame Test"/>
</menu>
<menu label="Render Metadata" name="Render Metadata">
+ <menu_item_check label="Normals" name="Normals"/>
+ <menu_item_check label="Physics Shapes" name="Physics Shapes"/>
<menu_item_check label="Opdatér type" name="Update Type"/>
+ <menu_item_check label="LOD Info" name="LOD Info"/>
+ <menu_item_check label="Build Queue" name="Build Queue"/>
+ <menu_item_check label="Sculpt" name="Sculpt"/>
</menu>
<menu label="Gengivelse" name="Rendering">
<menu_item_check label="Akser" name="Axes"/>
@@ -310,6 +319,7 @@
<menu_item_call label="Debug avatar teksturer" name="Debug Avatar Textures"/>
</menu>
<menu_item_check label="HTTP teksturer" name="HTTP Textures"/>
+ <menu_item_check label="HTTP Inventory" name="HTTP Inventory"/>
<menu_item_check label="Benyt consol vindue ved næste opstart" name="Console Window"/>
<menu_item_call label="Anmod om administrator status" name="Request Admin Options"/>
<menu_item_call label="Forlad administrationsstatus" name="Leave Admin Options"/>
@@ -334,4 +344,9 @@
</menu>
<menu_item_call label="&quot;God Tools&quot;" name="God Tools"/>
</menu>
+ <menu label="Admin" name="Deprecated">
+ <menu label="Take Off Clothing" name="Take Off Clothing">
+ <menu_item_call label="Fysik" name="Physics"/>
+ </menu>
+ </menu>
</menu_bar>
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 0d2aaf45ce..4c0fbd280b 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -1071,6 +1071,12 @@ Det kan påvirke din indtastning af password.
<notification name="RezItemNoPermissions">
Utilstrækkelige tilladelser til at danne genstanden.
</notification>
+ <notification name="IMAcrossParentEstates">
+ Ikke muligt at sende IM over forældre estates.
+ </notification>
+ <notification name="TransferInventoryAcrossParentEstates">
+ Ikke muligt at overføre din beholdning over forældre parceller.
+ </notification>
<notification name="UnableToLoadNotecard">
Ikke muligt at indlæse note.
Prøv venligst igen.
@@ -1641,6 +1647,10 @@ De vil blive blokeret nogle få sekunder af sikkerhedsmæssige årsager.
Din stemme er blevet slukket af moderatoren.
<usetemplate name="okbutton" yestext="OK"/>
</notification>
+ <notification name="UploadCostConfirmation">
+ Dette upload vil koste L$[PRICE], ønsker du at sende?
+ <usetemplate name="okcancelbuttons" notext="Annullér" yestext="Send"/>
+ </notification>
<notification name="ConfirmClearTeleportHistory">
Er du sikker på at du vil slette teleport historikken?
<usetemplate name="okcancelbuttons" notext="Annullér" yestext="OK"/>
@@ -1652,6 +1662,9 @@ Knappen vil blive vist når der er nok plads til den.
<notification name="ShareNotification">
Vælg beboere at dele med.
</notification>
+ <notification name="MeshUploadError">
+ [LABEL] kunne ikke sendes: [MESSAGE] [IDENTIFIER] [INVALIDITY_IDENTIFIER]
+ </notification>
<notification name="ShareItemsConfirmation">
Er du sikker på at du vil dele følgende genstande:
@@ -1668,6 +1681,19 @@ Me følgende beboere:
<notification name="DeedToGroupFail">
Dedikering til gruppe fejlede.
</notification>
+ <notification name="ReleaseLandThrottled">
+ Parcellen [PARCEL_NAME] kan ikke efterlades på nuværende tidspunkt.
+ </notification>
+ <notification name="ReleasedLandWithReclaim">
+ [AREA] m² parcellen &apos;[PARCEL_NAME]&apos; er blevet frigivet.
+
+Du har [RECLAIM_PERIOD] timer til at få den tilbage for L$0 før den udbydes til salg til andre beboere.
+ </notification>
+ <notification name="ReleasedLandNoReclaim">
+ [AREA] m² parcel &apos;[PARCEL_NAME]&apos; er blevet frigivet.
+
+Parcellen kan nu købes af enhver beboer.
+ </notification>
<notification name="AvatarRezNotification">
( [EXISTENCE] sekunder i live )
Avatar &apos;[NAME]&apos; var ikke sky mere, efter [TIME] sekunder.
@@ -1746,6 +1772,13 @@ Sluk for alles lyd?
<notification label="Stå op" name="HintSit">
For at rejse dig op og forlad siddeposition, tryk på &quot;Stå op&quot; knappen.
</notification>
+ <notification label="Tal" name="HintSpeak">
+ Klik på tal knappen for at tænde og slukke for din mikrofon.
+
+Klik på den lille pil-op for at se stemme kontrolpanelet.
+
+Skjules tale knappen, vil stemmechat ikke være mulig.
+ </notification>
<notification label="Undersøg verden" name="HintDestinationGuide">
Destinationsguiden indeholder tusinder af nye steder der kan opleves. Vælg venligst et sted og vælg Teleport for at komme derhen.
</notification>
@@ -1755,12 +1788,16 @@ Sluk for alles lyd?
<notification label="Flyt" name="HintMove">
For at gå eller løbe, åben Flyt panelet for neden og brug pilene til at navigere. Du kan også bruge pile-tasterne på dit tastatur.
</notification>
+ <notification label="" name="HintMoveClick">
+ 1. Klik for at gå
+Klik et hvorsomhelst på jorden for at gå til dette sted.
+
+2. Klik og træk for at rotere visning
+Klik hvorsomhelst i verden for at rotere din visning
+ </notification>
<notification label="Visningsnavn" name="HintDisplayName">
Angiv dit konfigurérbare visningsnavn her. Dette er i tillæg til dit unikke brugernavn, som ikke kan ændres. Du kan ændre hvordan du ser andre beboeres navne i dine indstillinger.
</notification>
- <notification label="Flyt" name="HintMoveArrows">
- For at gå, brug piletasterne på tastaturet. Du kan løbe ved at trykke to gange på Pil-Op
- </notification>
<notification label="Se" name="HintView">
For at ændre dit kamera-view, benyt kredsløbs og panoreringskontrollerne. Nulstil view ved at trykke Esc eller ved at gå.
</notification>
@@ -1798,6 +1835,10 @@ Sluk for alles lyd?
Oprettelse og redigering af grupper er kun muligt i avanceret tilstand. Ønsker du at logge ud for at skifte tilstand? Valg af tilstand findes på login skærmbilledet.
<usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
</notification>
+ <notification label="" name="NoPlaceInfo">
+ Det er kun muligt at vise profil for stedet i avanceret opsætning. Ønsker du at logge ud for at skifte tilstand? Valg af tilstand findes på login skærmbilledet.
+ <usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
+ </notification>
<notification label="" name="NoPicks">
Oprettelse og redigering af favoritter er kun mulig i avanceret tilstand. Ønsker du at logge ud for at skifte tilstand? Valg af tilstand findes på login skærmbilledet.
<usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
@@ -1818,6 +1859,18 @@ Sluk for alles lyd?
Det er kun muligt at betale andre beboere i avanceret tilstand. Ønsker du at logge ud for at skifte tilstand?
<usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
</notification>
+ <notification label="" name="NoInventory">
+ Det er kun muligt at vise beholdning i avanceret tilstand. Ønsker du at logge ud og logge på i avanceret tilstand.
+ <usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
+ </notification>
+ <notification label="" name="NoAppearance">
+ Udseende opsætning er kun tilgængelig i avanceret tilstand. Ønsker du at logge ud og logge på i avanceret tilstand.
+ <usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
+ </notification>
+ <notification label="" name="NoSearch">
+ Søgning er kun mulig i avanceret tilstand. Ønsker du at logge ud og logge på i avanceret tilstand.
+ <usetemplate name="okcancelbuttons" notext="Afslut ikke" yestext="Afslut"/>
+ </notification>
<global name="UnsupportedGLRequirements">
Det ser ikke ud til at din hardware opfylder minimumskravene til [APP_NAME]. [APP_NAME] kræver et OpenGL grafikkort som understøter &apos;multitexture&apos;. Check eventuelt om du har de nyeste drivere for grafikkortet, og de nyeste service-packs og patches til dit operativsystem.
diff --git a/indra/newview/skins/default/xui/da/panel_edit_physics.xml b/indra/newview/skins/default/xui/da/panel_edit_physics.xml
new file mode 100644
index 0000000000..16c9b16fa3
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_edit_physics.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="edit_physics_panel">
+ <panel label="" name="accordion_panel">
+ <accordion name="physics_accordion">
+ <accordion_tab name="physics_breasts_updown_tab" title="Bryst fasthed"/>
+ <accordion_tab name="physics_breasts_inout_tab" title="Kavalergang"/>
+ <accordion_tab name="physics_breasts_leftright_tab" title="Bryst sving"/>
+ <accordion_tab name="physics_belly_tab" title="Mave fasthed"/>
+ <accordion_tab name="physics_butt_tab" title="Bagdel fasthed"/>
+ <accordion_tab name="physics_butt_leftright_tab" title="Bagdel sving"/>
+ <accordion_tab name="physics_advanced_tab" title="Avancerede parametre"/>
+ </accordion>
+ </panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_edit_pick.xml b/indra/newview/skins/default/xui/da/panel_edit_pick.xml
index fd287b1a0a..3036f30240 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Gem valgte" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Annullér" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml
index 4b9360f0d1..906870e6d9 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml
@@ -45,6 +45,9 @@
<string name="edit_tattoo_title">
Redigerer tatovering
</string>
+ <string name="edit_physics_title">
+ Redigering af fysik
+ </string>
<string name="shape_desc_text">
Kropsbygning:
</string>
@@ -90,6 +93,9 @@
<string name="tattoo_desc_text">
Tatovering:
</string>
+ <string name="physics_desc_text">
+ Fysik:
+ </string>
<labeled_back_button label="Gem" name="back_btn" tool_tip="Tilbage til redigering"/>
<text name="edit_wearable_title" value="Redigerer kropsbygning"/>
<panel label="Trøje" name="wearable_type_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml
index 925492b2d7..66a128cd13 100644
--- a/indra/newview/skins/default/xui/da/panel_people.xml
+++ b/indra/newview/skins/default/xui/da/panel_people.xml
@@ -66,16 +66,16 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Verd
<layout_panel name="view_profile_btn_lp">
<button label="Profil" name="view_profile_btn" tool_tip="Vis billeder, grupper og anden beboer information"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="Åben session med privat besked (IM)"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Kald" name="call_btn" tool_tip="Opkald til denne beboer"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Del" name="share_btn" tool_tip="Del en genstand fra beholdning"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teleportér" name="teleport_btn" tool_tip="Tilbyd teleport"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
index ed499619f6..19c82509cd 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
@@ -30,7 +30,9 @@
<spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_lifetime"/>
<spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_fadingtime"/>
<check_box name="translate_chat_checkbox"/>
- <text name="translate_chb_label" >Benyt maskin-oversættelse ved chat (håndteret af Google)</text>
+ <text name="translate_chb_label">
+ Benyt maskinel oversættelse ved chat (håndteret af Google)
+ </text>
<text name="translate_language_text" width="110">
Oversæt chat til :
</text>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_colors.xml b/indra/newview/skins/default/xui/da/panel_preferences_colors.xml
index b2b00db769..cc3dc480bc 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_colors.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Farver" name="colors_panel">
<text name="effects_color_textbox">
- Mine effekter (selektions-stråle):
+ Mine effekter (selektions pejlelys):
</text>
- <color_swatch name="effect_color_swatch" tool_tip="Klik for at åbne farve-vælger"/>
+ <color_swatch name="effect_color_swatch" tool_tip="Klik for at åbne farvevælger"/>
<text name="font_colors">
- Chat bogstavsfarver:
+ Vælg font farver:
</text>
<text name="text_box1">
Mig
@@ -22,6 +22,9 @@
<text name="text_box5">
Fejl
</text>
+ <text name="text_box10">
+ Direkte
+ </text>
<text name="text_box7">
Ejer
</text>
@@ -29,12 +32,12 @@
URL&apos;er
</text>
<text name="bubble_chat">
- Baggrundsfarve til navne-skilt (berører også Bubble Chat):
+ Navneskilt baggrundsfarve (påvirker også chat talebobler):
</text>
- <color_swatch name="background" tool_tip="Vælg farve til navne-skilt"/>
- <slider label="Uigennemsigtighed:" name="bubble_chat_opacity" tool_tip="Vælg gennemsigtighed for navneskilt"/>
+ <color_swatch name="background" tool_tip="Vælg navneskilt farve"/>
+ <slider label="Gennemsigtighed:" name="bubble_chat_opacity" tool_tip="Vælg navneskilt gennemsigtighed"/>
<text name="floater_opacity">
- Vindue uigennemsigtighed:
+ Floater gennemsigtighed:
</text>
<slider label="Aktiv:" name="active"/>
<slider label="Inaktiv:" name="inactive"/>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
index 15da1f9ec5..72200a07ad 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
@@ -28,8 +28,20 @@
</text>
<check_box initial_value="sand" label="Gennemsigtig vand" name="TransparentWater"/>
<check_box initial_value="true" label="Glatte flader og skin" name="BumpShiny"/>
+ <check_box initial_value="sand" label="Lokale lys" name="LocalLights"/>
<check_box initial_value="true" label="Basale flader" name="BasicShaders" tool_tip="Ved at slå dette valg fra, kan det forhindres at visse grafikkort drivere crasher."/>
<check_box initial_value="true" label="Atmosfæriske flader" name="WindLightUseAtmosShaders"/>
+ <check_box initial_value="sand" label="Lys og skygger" name="UseLightShaders"/>
+ <check_box initial_value="sand" label="&quot;Ambient Occlusion&quot;" name="UseSSAO"/>
+ <check_box initial_value="sand" label="Skarphedsdybde" name="UseDoF"/>
+ <text name="shadows_label">
+ Skygger:
+ </text>
+ <combo_box name="ShadowDetail">
+ <combo_box.item label="Ingen" name="0"/>
+ <combo_box.item label="Sol/Måne" name="1"/>
+ <combo_box.item label="Sol/Måne + Projektorer" name="2"/>
+ </combo_box>
<text name="reflection_label">
Reflektioner i vand:
</text>
@@ -40,6 +52,10 @@
<combo_box.item label="Alle avatarer og objekter" name="3"/>
<combo_box.item label="Alt" name="4"/>
</combo_box>
+ <slider label="Avatar fysik:" name="AvatarPhysicsDetail"/>
+ <text name="AvatarPhysicsDetailText">
+ Lav
+ </text>
<slider label="Maks. visnings-afstand:" name="DrawDistance"/>
<text name="DrawDistanceMeterText2">
m
@@ -78,7 +94,7 @@
Lav
</text>
<text name="AvatarRenderingText">
- Avatar gengivelse
+ Avatar rendering:
</text>
<check_box initial_value="true" label="Mini-figurer på lang afstand" name="AvatarImpostors"/>
<check_box initial_value="true" label="Hardware Skinning" name="AvatarVertexProgram"/>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
index 0626976cb5..26d2ae4abd 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
@@ -6,7 +6,7 @@
<slider label="Generel" name="System Volume"/>
<check_box initial_value="true" name="mute_when_minimized"/>
<text name="mute_chb_label">
- Sluk lyd når minimeret
+ Sluk for lyd når minimeret
</text>
<slider label="Knapper" name="UI Volume"/>
<slider label="Omgivelser" name="Wind Volume"/>
diff --git a/indra/newview/skins/default/xui/da/panel_region_general.xml b/indra/newview/skins/default/xui/da/panel_region_general.xml
index 5b5dd411ac..667c88c5b1 100644
--- a/indra/newview/skins/default/xui/da/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/da/panel_region_general.xml
@@ -25,6 +25,7 @@
<check_box label="Tillad at sælge land" name="allow_land_resell_check"/>
<check_box label="Tillad at samle/dele land" name="allow_parcel_changes_check"/>
<check_box label="Blokér visning af land i Søgning" name="block_parcel_search_check" tool_tip="Lad beboere se denne region og dens parceller i søgeresultater"/>
+ <check_box label="Til &quot;mesh&quot; objekter" name="mesh_rez_enabled_check" tool_tip="Lad personer rezze mesh objekter i denne region"/>
<spinner label="Max besøgende" name="agent_limit_spin"/>
<spinner label="Objekt bonus" name="object_bonus_spin"/>
<text label="Indhold" name="access_text">
diff --git a/indra/newview/skins/default/xui/da/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/da/panel_scrolling_param_base.xml
new file mode 100644
index 0000000000..fa659040ea
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_scrolling_param_base.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="LLScrollingPanelParamBase">
+ <slider label="[DESC]" name="param slider"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_sound_devices.xml b/indra/newview/skins/default/xui/da/panel_sound_devices.xml
new file mode 100644
index 0000000000..27b7666a1f
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_sound_devices.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<panel label="Opsætning for udstyr" name="device_settings_panel">
+ <panel.string name="default_text">
+ Standard
+ </panel.string>
+ <text name="Input">
+ Input
+ </text>
+ <text name="My volume label">
+ Min lydstyrke:
+ </text>
+ <slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Ændre lydstyrke med denne skyder"/>
+ <text name="wait_text">
+ Vent venligst
+ </text>
+ <text name="Output">
+ Output
+ </text>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index afc826d6d7..b5d8ac44bc 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -115,6 +115,140 @@
<string name="Quit">
Afslut
</string>
+ <string name="LoginFailedViewerNotPermitted">
+ Den klient du benytter kan ikke længere få adgang til Second Life. Besøg venligst denne side for at hente en ny klient:
+http://secondlife.com/download
+
+For mere information, se denne FAQ:
+http://secondlife.com/viewer-access-faq
+ </string>
+ <string name="LoginIntermediateOptionalUpdateAvailable">
+ Valgfri klient opdatering tilgængelig: [VERSION]
+ </string>
+ <string name="LoginFailedRequiredUpdate">
+ Påkrævet opdatering a klient: [VERSION]
+ </string>
+ <string name="LoginFailedAlreadyLoggedIn">
+ Din avatar er allerede logget på.
+ </string>
+ <string name="LoginFailedAuthenticationFailed">
+ Beklager! vi kunne ikke logge dig på.
+Undersøg venligst at du har indtastet det rette
+Please check to make sure you entered the right
+ * Brugernavn (like bobsmith12 or steller.sunshine)
+ * Password
+Check også at Caps Lock ikke er aktiveret.
+ </string>
+ <string name="LoginFailedPasswordChanged">
+ Som en sikkerhedsforanstaltning er dit password blevet ændret.
+Går venligst til din konto-side på http://secondlife.com/password
+og besvar sikkerhedsspørgsmål for at nulstille dit password.
+Vi undskylder besværet.
+ </string>
+ <string name="LoginFailedPasswordReset">
+ vi har lavet nogle ændringer i vores system og det er nødvendigt at nulstille dit password.
+Går venligst til din konto-side på http://secondlife.com/password
+og besvar sikkerhedsspørgsmål for at nulstille dit password.
+Vi undskylder besværet.
+ </string>
+ <string name="LoginFailedEmployeesOnly">
+ Second Life er midlertidig lukket ned for vedligeholdelse.
+Kun medarbejdere kan logge på for øjeblikket.
+Check www.secondlife.com/status for opdateringer.
+ </string>
+ <string name="LoginFailedPremiumOnly">
+ Second Life har midlertidig begrænset muligheden for log-in for at sikre, at brugere på systemet ikke får dårlige svartider.
+
+ Brugere med gratis-konti vil ikke kunne logge på Second Life på dette tidspunkt.
+ </string>
+ <string name="LoginFailedComputerProhibited">
+ Second Life kan ikke tilgås fra dennecomputer.
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedAcountSuspended">
+ Din konto vil ikke være tilgængelig før
+[TIME] Pacific Time.
+ </string>
+ <string name="LoginFailedAccountDisabled">
+ Vi kan desværre ikke behandle forespøgsel lige nu.
+Kontakt venligst Second Life supper for assitance via http://secondlife.com/support.
+Hvis du ikke kan ændre dit password ring venligst +1 (866) 476-9763.
+ </string>
+ <string name="LoginFailedTransformError">
+ Data inkonsistens registret ved login.
+Kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedAccountMaintenance">
+ Der foretages vedligehold på din konto lige nu.
+Din konto vil ikke være tilgængelig før
+[TIME] Pacific Time.
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedPendingLogoutFault">
+ Forespøgsel på logout blev besvaret med en fejl fra simulatoren.
+ </string>
+ <string name="LoginFailedPendingLogout">
+ Systemet er i gang med at logge dig ud netop nu.
+Din konto vil ikke være tilgængelig før
+[TIME] Pacific Time.
+ </string>
+ <string name="LoginFailedUnableToCreateSession">
+ Ikke muligt at oprette gyldig session.
+ </string>
+ <string name="LoginFailedUnableToConnectToSimulator">
+ Ikke muligt at koble til en simulator.
+ </string>
+ <string name="LoginFailedRestrictedHours">
+ Din konto kan kun tilgå Second Life
+mellem [START] [END] Pacific Time.
+Kom venligst tilbage i dette tidsrum.
+
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedIncorrectParameters">
+ Ugyldig parametre.
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedFirstNameNotAlphanumeric">
+ Fornavn parameter skal være alfanumerisk
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LoginFailedLastNameNotAlphanumeric">
+ Efternavn parameter skal være alfanumerisk
+Hvis du mener dette er en fejl, kontakt venligst support@secondlife.com.
+ </string>
+ <string name="LogoutFailedRegionGoingOffline">
+ Regionen er lukket ned.
+Prøv at logge på om lidt igen.
+ </string>
+ <string name="LogoutFailedAgentNotInRegion">
+ Avatar ikke i en region.
+Prøv venligst om lidt igen.
+ </string>
+ <string name="LogoutFailedPendingLogin">
+ The region was logging in another session.
+Please try logging in again in a minute.
+ </string>
+ <string name="LogoutFailedLoggingOut">
+ Region har lukket sidste session ned.
+Prøv venligst om lidt igen.
+ </string>
+ <string name="LogoutFailedStillLoggingOut">
+ Regionen er stadig ved at lukke forrige session ud.
+Prøv venligst om lidt igen.
+ </string>
+ <string name="LogoutSucceeded">
+ Region har lukket sidste session ned.
+Prøv venligst om lidt igen.
+ </string>
+ <string name="LogoutFailedLogoutBegun">
+ Region er i gang med at logge ud.
+Prøv venligst om lidt igen.
+ </string>
+ <string name="LoginFailedLoggingOutSession">
+ Region er i gang med at lukket sidste session ned.
+Prøv venligst om lidt igen.
+ </string>
<string name="AgentLostConnection">
Denne region kan have problemer. Tjek venligst din forbindelse til internettet.
</string>
@@ -423,6 +557,9 @@
<string name="symbolic folder link">
link til mappe
</string>
+ <string name="mesh">
+ mesh
+ </string>
<string name="AvatarAway">
Væk
</string>
@@ -852,6 +989,9 @@
<string name="tattoo">
Tatovering
</string>
+ <string name="physics">
+ Fysik
+ </string>
<string name="invalid">
ugyldig
</string>
@@ -891,6 +1031,9 @@
<string name="tattoo_not_worn">
Tatovering ikke benyttet
</string>
+ <string name="physics_not_worn">
+ Ikke noget fysisk båret
+ </string>
<string name="invalid_not_worn">
ugyldig
</string>
@@ -939,6 +1082,9 @@
<string name="create_new_tattoo">
Opret ny tatovering
</string>
+ <string name="create_new_physics">
+ Opret ny fysik
+ </string>
<string name="create_new_invalid">
ugyldig
</string>
@@ -1063,9 +1209,6 @@
<string name="InvFolder My Inventory">
Min beholdning
</string>
- <string name="InvFolder My Favorites">
- Mine favoritter
- </string>
<string name="InvFolder Library">
Bibliotek
</string>
@@ -1124,10 +1267,10 @@
Bevægelser
</string>
<string name="InvFolder Favorite">
- Favoritter
+ Mine favoritter
</string>
<string name="InvFolder favorite">
- Favoritter
+ Mine favoritter
</string>
<string name="InvFolder Current Outfit">
Nuværende sæt
@@ -1141,6 +1284,9 @@
<string name="InvFolder Accessories">
Tilbehør
</string>
+ <string name="InvFolder Meshes">
+ Meshes
+ </string>
<string name="InvFolder Friends">
Venner
</string>
@@ -2175,6 +2321,114 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE].
<string name="Bulbous Nose">
Kartoffelnæse
</string>
+ <string name="Breast Physics Mass">
+ Bryst fylde
+ </string>
+ <string name="Breast Physics Smoothing">
+ Brystudjævning
+ </string>
+ <string name="Breast Physics Gravity">
+ Bryst tyngde
+ </string>
+ <string name="Breast Physics Drag">
+ Bryst inerti
+ </string>
+ <string name="Breast Physics InOut Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Breast Physics InOut Spring">
+ Fjeder
+ </string>
+ <string name="Breast Physics InOut Gain">
+ Øg
+ </string>
+ <string name="Breast Physics InOut Damping">
+ Dæmpning
+ </string>
+ <string name="Breast Physics UpDown Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Breast Physics UpDown Spring">
+ Fjeder
+ </string>
+ <string name="Breast Physics UpDown Gain">
+ Øg
+ </string>
+ <string name="Breast Physics UpDown Damping">
+ Dæmpning
+ </string>
+ <string name="Breast Physics LeftRight Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Breast Physics LeftRight Spring">
+ Fjeder
+ </string>
+ <string name="Breast Physics LeftRight Gain">
+ Øg
+ </string>
+ <string name="Breast Physics LeftRight Damping">
+ Dæmpning
+ </string>
+ <string name="Belly Physics Mass">
+ Mave omfang
+ </string>
+ <string name="Belly Physics Smoothing">
+ maveudjævning
+ </string>
+ <string name="Belly Physics Gravity">
+ Mave tyngde
+ </string>
+ <string name="Belly Physics Drag">
+ Mave inerti
+ </string>
+ <string name="Belly Physics UpDown Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Belly Physics UpDown Spring">
+ Fjeder
+ </string>
+ <string name="Belly Physics UpDown Gain">
+ Øg
+ </string>
+ <string name="Belly Physics UpDown Damping">
+ Dæmpning
+ </string>
+ <string name="Butt Physics Mass">
+ Bagdel omfang
+ </string>
+ <string name="Butt Physics Smoothing">
+ Bagdelsudjævning
+ </string>
+ <string name="Butt Physics Gravity">
+ Bagdel tyngde
+ </string>
+ <string name="Butt Physics Drag">
+ Bagdel modstand
+ </string>
+ <string name="Butt Physics UpDown Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Butt Physics UpDown Spring">
+ Fjeder
+ </string>
+ <string name="Butt Physics UpDown Gain">
+ Øg
+ </string>
+ <string name="Butt Physics UpDown Damping">
+ Dæmpning
+ </string>
+ <string name="Butt Physics LeftRight Max Effect">
+ Maks. effekt
+ </string>
+ <string name="Butt Physics LeftRight Spring">
+ Fjeder
+ </string>
+ <string name="Butt Physics LeftRight Gain">
+ Øg
+ </string>
+ <string name="Butt Physics LeftRight Damping">
+ Dæmpning
+ </string>
<string name="Bushy Eyebrows">
Buskede øjenbryn
</string>
@@ -2184,6 +2438,9 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE].
<string name="Butt Size">
Størrelse bagdel
</string>
+ <string name="Butt Gravity">
+ Bagdel tyngde
+ </string>
<string name="bustle skirt">
Tournure
</string>
@@ -3537,6 +3794,9 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE].
<string name="session_initialization_timed_out_error">
Initialisering af session er &quot;timed out&quot;
</string>
+ <string name="Home position set.">
+ Hjemmeposition sat.
+ </string>
<string name="voice_morphing_url">
http://secondlife.com/landing/voicemorphing
</string>
@@ -3659,6 +3919,9 @@ Krænkelsesanmeldelse
<string name="New Tattoo">
Ny tatovering
</string>
+ <string name="New Physics">
+ Ny fysik
+ </string>
<string name="Invalid Wearable">
Kan ikke tages på
</string>
diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml
index d15ab105c2..578dcd50e5 100644
--- a/indra/newview/skins/default/xui/de/floater_about.xml
+++ b/indra/newview/skins/default/xui/de/floater_about.xml
@@ -55,27 +55,33 @@ Wir bedanken uns bei folgenden Einwohnern, die uns geholfen haben, dies zur bish
</panel>
<panel label="Lizenzen" name="licenses_panel">
<text_editor name="credits_editor">
- 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
-APR Copyright (C) 2000-2004 The Apache Software Foundation
-cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+ 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion.
+APR Copyright (C) 2000-2004 The Apache Software Foundation.
+Collada DOM Copyright 2005 Sony Computer Entertainment Inc.
+cURL Copyright (C) 1996-2002, Daniel Stenberg (daniel@haxx.se).
+DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
GL Copyright (C) 1999-2004 Brian Paul.
+GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University sowie David Luebke, Brenden Schubert, University of Virginia.
+google-perftools Copyright (c) 2005, Google Inc.
Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
-jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW).
jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
-ogg/vorbis Copyright (C) 2001, Xiphophorus
+ogg/vorbis Copyright (C) 2001, Xiphophorus.
OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
-SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+PCRE Copyright (c) 1997-2008 University of Cambridge.
+SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga.
+SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com).
xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
zlib Copyright (C) 1995-2002 Jean-loup Gailly und Mark Adler.
google-perftools Copyright (c) 2005, Google Inc.
-Alle Rechte vorbehalten. Details siehe licenses.txt.
+Second Life Viewer verwendet Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (und Lizenzgeber). Alle Rechte vorbehalten. Details siehe www.havok.com.
+
+Alle Rechte vorbehalten. Details siehe licenses.txt.
-Voice-Chat-Audiocoding: Polycom(R) Siren14(TM)
-(ITU-T Empf.G.722.1 Anhang C)
+Audiocodierung für Voice-Chat: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
</text_editor>
</panel>
</tab_container>
diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml
index f1e42232c8..f0fa4386d2 100644
--- a/indra/newview/skins/default/xui/de/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_about_land.xml
@@ -219,38 +219,38 @@ werden.
<text name="objects_available">
[COUNT] von [MAX] ([AVAILABLE] verfügbar)
</text>
- <text name="Primitives parcel supports:" width="200">
+ <text name="Primitives parcel supports:">
Von Parzelle unterstützte Prims:
</text>
- <text left="204" name="object_contrib_text" width="152">
+ <text name="object_contrib_text">
[COUNT]
</text>
<text name="Primitives on parcel:">
Prims auf Parzelle:
</text>
- <text left="204" name="total_objects_text" width="48">
+ <text name="total_objects_text">
[COUNT]
</text>
- <text left="14" name="Owned by parcel owner:" width="200">
+ <text name="Owned by parcel owner:" width="200">
Im Eigentum des Parzellenbesitzers:
</text>
- <text left="204" left_delta="200" name="owner_objects_text" width="48">
+ <text left_delta="204" name="owner_objects_text">
[COUNT]
</text>
- <button label="Anzeigen" label_selected="Anzeigen" name="ShowOwner" right="-135" width="60"/>
- <button label="Zurückgeben" label_selected="Zurückgeben..." name="ReturnOwner..." right="-10" tool_tip="Objekte an ihre Eigentümer zurückgeben." width="119"/>
- <text left="14" name="Set to group:">
+ <button label="Anzeigen" label_selected="Anzeigen" name="ShowOwner"/>
+ <button label="Zurückgeben" label_selected="Zurückgeben..." name="ReturnOwner..." tool_tip="Objekte an ihre Eigentümer zurückgeben."/>
+ <text name="Set to group:">
Der Gruppe zugeordnet:
</text>
- <text left="204" name="group_objects_text" width="48">
+ <text name="group_objects_text">
[COUNT]
</text>
- <button label="Anzeigen" label_selected="Anzeigen" name="ShowGroup" right="-135" width="60"/>
- <button label="Zurückgeben" label_selected="Zurückgeben..." name="ReturnGroup..." right="-10" tool_tip="Objekte an ihre Eigentümer zurückgeben." width="119"/>
- <text left="14" name="Owned by others:" width="128">
+ <button label="Anzeigen" label_selected="Anzeigen" name="ShowGroup"/>
+ <button label="Zurückgeben" label_selected="Zurückgeben..." name="ReturnGroup..." tool_tip="Objekte an ihre Eigentümer zurückgeben."/>
+ <text name="Owned by others:">
Im Eigentum anderer:
</text>
- <text left="204" name="other_objects_text" width="48">
+ <text name="other_objects_text">
[COUNT]
</text>
<button label="Anzeigen" label_selected="Anzeigen" name="ShowOther"/>
diff --git a/indra/newview/skins/default/xui/de/floater_buy_contents.xml b/indra/newview/skins/default/xui/de/floater_buy_contents.xml
index ccafa11cf4..bd6ace6bda 100644
--- a/indra/newview/skins/default/xui/de/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/de/floater_buy_contents.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater min_width="300" name="floater_buy_contents" title="INHALT KAUFEN">
<text name="contains_text">
- [NAME] enthält:
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; enthält:
</text>
<text name="buy_text">
[AMOUNT] L$ von [NAME] kaufen?
diff --git a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml
deleted file mode 100644
index 8599737106..0000000000
--- a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="TAGESZYKLUS-EDITOR">
- <tab_container name="Day Cycle Tabs">
- <panel label="Tageszyklus" name="Day Cycle">
- <button label=" ?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 24:00
- </text>
- <text name="WL3am">
- 03:00
- </text>
- <text name="WL6am">
- 06:00
- </text>
- <text name="WL9amHash">
- 09:00
- </text>
- <text name="WL12pmHash">
- 12:00
- </text>
- <text name="WL3pm">
- 15:00
- </text>
- <text name="WL6pm">
- 18:00
- </text>
- <text name="WL9pm">
- 21:00
- </text>
- <text name="WL12am2">
- 24:00
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Key hinzu" label_selected="Key hinzu" name="WLAddKey"/>
- <button label="Key löschen" label_selected="Key löschen" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Keyframe-Einstellungen:
- </text>
- <text name="WLCurKeyTimeText">
- Key-Zeit:
- </text>
- <spinner label="Std." name="WLCurKeyHour"/>
- <spinner label="Min." name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Key-Voreinstellung:
- </text>
- <combo_box label="Voreinstellung" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Einrasten:
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Zykluslänge:
- </text>
- <spinner label="Std." name="WLLengthOfDayHour"/>
- <spinner label="Min." name="WLLengthOfDayMin"/>
- <spinner label="Sek." name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Vorschau:
- </text>
- <button label="Start" label_selected="Start" name="WLAnimSky"/>
- <button label="Stopp" label_selected="Stopp" name="WLStopAnimSky"/>
- <button label="Grundbesitzzeit verw" label_selected="Zur Grundbesitzzeit" name="WLUseLindenTime"/>
- <button label="Testtag speichern" label_selected="Testtag speichern" name="WLSaveDayCycle"/>
- <button label="Testtag laden" label_selected="Testtag laden" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_env_settings.xml b/indra/newview/skins/default/xui/de/floater_env_settings.xml
deleted file mode 100644
index 0c78909108..0000000000
--- a/indra/newview/skins/default/xui/de/floater_env_settings.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="UMWELT-EDITOR">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Tageszeit
- </text>
- <text name="EnvTimeText2">
- 12:00
- </text>
- <text name="EnvCloudText">
- Wolkendecke
- </text>
- <text name="EnvWaterColorText">
- Wasserfarbe
- </text>
- <color_swatch name="EnvWaterColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
- <text name="EnvWaterFogText">
- Wasser-
-trübung
- </text>
- <button label="Grundbesitzzeit verw." name="EnvUseEstateTimeButton"/>
- <button label="Himmel (erweitert)" name="EnvAdvancedSkyButton"/>
- <button label="Wasser (erweitert)" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_import_collada.xml b/indra/newview/skins/default/xui/de/floater_import_collada.xml
new file mode 100644
index 0000000000..8b1313c7b5
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_import_collada.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Import Collada" title="Szene importieren">
+ <text name="mesh count">
+ Netze: [COUNT]
+ </text>
+ <text name="texture count">
+ Texturen: [COUNT]
+ </text>
+ <text name="status">
+ Status: [STATUS]
+ </text>
+ <button label="Abbrechen" name="cancel"/>
+ <button label="OK" name="ok"/>
+ <string name="status_idle">
+ Inaktiv
+ </string>
+ <string name="status_uploading">
+ [NAME] wird hochgeladen
+ </string>
+ <string name="status_creating">
+ Objektname [NAME] wird erstellt
+ </string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
index 9cc5b92daf..d63426d684 100644
--- a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
@@ -5,6 +5,7 @@
<check_box label="Kleidung" name="check_clothing"/>
<check_box label="Gesten" name="check_gesture"/>
<check_box label="Landmarken" name="check_landmark"/>
+ <check_box label="Netze" name="check_mesh"/>
<check_box label="Notizkarten" name="check_notecard"/>
<check_box label="Objekte" name="check_object"/>
<check_box label="Skripts" name="check_script"/>
diff --git a/indra/newview/skins/default/xui/de/floater_model_preview.xml b/indra/newview/skins/default/xui/de/floater_model_preview.xml
new file mode 100644
index 0000000000..83c51132ee
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_model_preview.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Model Preview" title="Modell hochladen">
+ <string name="status_idle">
+ Inaktiv
+ </string>
+ <string name="status_reading_file">
+ Laden...
+ </string>
+ <string name="status_generating_meshes">
+ Netze werden generiert...
+ </string>
+ <string name="status_vertex_number_overflow">
+ Fehler: Anzahl von Vertices überschreitet 65534. Operation abgebrochen.
+ </string>
+ <string name="high">
+ Hoch
+ </string>
+ <string name="medium">
+ Mittel
+ </string>
+ <string name="low">
+ Niedrig
+ </string>
+ <string name="lowest">
+ Niedrigste
+ </string>
+ <string name="mesh_status_good">
+ Ausliefern
+ </string>
+ <string name="mesh_status_na">
+ --
+ </string>
+ <string name="mesh_status_none">
+ Keine
+ </string>
+ <string name="mesh_status_submesh_mismatch">
+ Detailstufen haben unterschiedliche Anzahl texturfähiger Flächen.
+ </string>
+ <string name="mesh_status_mesh_mismatch">
+ Detailstufen haben unterschiedliche Anzahl von Netzinstanzen.
+ </string>
+ <string name="mesh_status_too_many_vertices">
+ Detailstufe hat zu viele Vertices.
+ </string>
+ <string name="mesh_status_missing_lod">
+ Erforderliche Detailstufe fehlt.
+ </string>
+ <string name="layer_all">
+ Alle
+ </string>
+ <string name="decomposing">
+ Analyse läuft...
+ </string>
+ <string name="simplifying">
+ Vereinfachung läuft...
+ </string>
+ <text name="name_label">
+ Name:
+ </text>
+ <text name="lod_label">
+ Vorschau:
+ </text>
+ <combo_box name="preview_lod_combo" tool_tip="Detailstufe zur Anzeige in Vorschaudarstellung">
+ <combo_item name="high">
+ Detailstufe: Hoch
+ </combo_item>
+ <combo_item name="medium">
+ Detailstufe: Mittel
+ </combo_item>
+ <combo_item name="low">
+ Detailstufe: Niedrig
+ </combo_item>
+ <combo_item name="lowest">
+ Detailstufe: Niedrigste
+ </combo_item>
+ </combo_box>
+ <panel>
+ <text name="streaming cost">
+ Ressourcenkosten: [COST]
+ </text>
+ <text name="physics cost">
+ Physikkosten: [COST]
+ </text>
+ <text name="upload fee">
+ Gebühr für Hochladen: --
+ </text>
+ </panel>
+ <text name="status">
+ [STATUS]
+ </text>
+ <button label="Standardwerte" name="reset_btn" tool_tip="Standardwerte wiederherstellen"/>
+ <button label="Hochladen" name="ok_btn" tool_tip="An Simulator hochladen"/>
+ <button label="Abbrechen" name="cancel_btn"/>
+ <tab_container name="import_tab">
+ <panel label="Detailstufe" name="lod_panel">
+ <text name="lod_table_header">
+ Detailstufe auswählen
+ </text>
+ <text name="high_label" value="Hoch"/>
+ <text name="high_triangles" value="0"/>
+ <text name="high_vertices" value="0"/>
+ <text name="medium_label" value="Mittel"/>
+ <text name="medium_triangles" value="0"/>
+ <text name="medium_vertices" value="0"/>
+ <text name="low_label" value="Niedrig"/>
+ <text name="low_triangles" value="0"/>
+ <text name="low_vertices" value="0"/>
+ <text name="lowest_label" value="Niedrigste"/>
+ <text name="lowest_triangles" value="0"/>
+ <text name="lowest_vertices" value="0"/>
+ <text name="lod_table_footer">
+ Detailstufe: [DETAIL]
+ </text>
+ <radio_group name="lod_file_or_limit" value="lod_from_file">
+ <radio_item label="Aus Datei laden" name="lod_from_file"/>
+ <radio_item label="Automatisch generieren" name="lod_auto_generate"/>
+ <radio_item label="Keine" name="lod_none"/>
+ </radio_group>
+ <button label="Durchsuchen..." name="lod_browse"/>
+ <combo_box name="lod_mode">
+ <combo_item name="triangle_limit">
+ Dreiecklimit
+ </combo_item>
+ <combo_item name="error_threshold">
+ Fehlerschwelle
+ </combo_item>
+ </combo_box>
+ <text name="build_operator_text">
+ Konstruktionsoperator:
+ </text>
+ <text name="queue_mode_text">
+ Warteschlangenmodus:
+ </text>
+ <combo_box name="build_operator">
+ <combo_item name="edge_collapse">
+ Kantenkollaps
+ </combo_item>
+ <combo_item name="half_edge_collapse">
+ Halbkantenkollaps
+ </combo_item>
+ </combo_box>
+ <combo_box name="queue_mode">
+ <combo_item name="greedy">
+ Strikt
+ </combo_item>
+ <combo_item name="lazy">
+ Locker
+ </combo_item>
+ <combo_item name="independent">
+ Unabhängig
+ </combo_item>
+ </combo_box>
+ <text name="border_mode_text">
+ Grenzenmodus:
+ </text>
+ <text name="share_tolderance_text">
+ Sharetoleranz:
+ </text>
+ <combo_box name="border_mode">
+ <combo_item name="border_unlock">
+ Freigeben
+ </combo_item>
+ <combo_item name="border_lock">
+ Sperren
+ </combo_item>
+ </combo_box>
+ <text name="crease_label">
+ Knitterwinkel:
+ </text>
+ <spinner name="crease_angle" value="75"/>
+ </panel>
+ <panel label="Physik" name="physics_panel">
+ <panel name="physics geometry">
+ <radio_group name="physics_load_radio" value="physics_load_from_file">
+ <radio_item label="Datei:" name="physics_load_from_file"/>
+ <radio_item label="Detailstufe verwenden:" name="physics_use_lod"/>
+ </radio_group>
+ <combo_box name="physics_lod_combo" tool_tip="Detailstufe für physische Form">
+ <combo_item name="physics_lowest">
+ Niedrigste
+ </combo_item>
+ <combo_item name="physics_low">
+ Niedrig
+ </combo_item>
+ <combo_item name="physics_medium">
+ Mittel
+ </combo_item>
+ <combo_item name="physics_high">
+ Hoch
+ </combo_item>
+ </combo_box>
+ <button label="Durchsuchen..." name="physics_browse"/>
+ </panel>
+ <panel name="physics analysis">
+ <slider label="Glätten:" name="Smooth"/>
+ <check_box label="Löcher schließen (langsam)" name="Close Holes (Slow)"/>
+ <button label="Analysieren" name="Decompose"/>
+ <button label="Abbrechen" name="decompose_cancel"/>
+ </panel>
+ <panel name="physics simplification">
+ <slider label="Durchläufe:" name="Combine Quality"/>
+ <slider label="Detailskala:" name="Detail Scale"/>
+ <slider label="Beibehalten:" name="Retain%"/>
+ <button label="Vereinfachen" name="Simplify"/>
+ <button label="Abbrechen" name="simplify_cancel"/>
+ </panel>
+ <panel name="physics info">
+ <slider label="Vorschaudehnung:" name="physics_explode"/>
+ <text name="physics_triangles">
+ Dreiecke: [TRIANGLES]
+ </text>
+ <text name="physics_points">
+ Vertices: [POINTS]
+ </text>
+ <text name="physics_hulls">
+ Hüllen: [HULLS]
+ </text>
+ </panel>
+ </panel>
+ <panel label="Modifizierer" name="modifiers_panel">
+ <spinner name="import_scale" value="1,0"/>
+ <text name="import_dimensions">
+ [X] x [Y] x [Z] m
+ </text>
+ <check_box label="Texturen" name="upload_textures"/>
+ <check_box label="Skingewicht" name="upload_skin"/>
+ <check_box label="Gelenkpositionen" name="upload_joints"/>
+ <spinner name="pelvis_offset" value="0,0"/>
+ </panel>
+ </tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_model_wizard.xml b/indra/newview/skins/default/xui/de/floater_model_wizard.xml
new file mode 100644
index 0000000000..2c7b45906e
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_model_wizard.xml
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Model Wizard" title="ASSISTENT ZUM HOCHLADEN VON MODELLEN">
+ <button label="5. Hochladen" name="upload_btn"/>
+ <button label="4. Überprüfen" name="review_btn"/>
+ <button label="3. Physik" name="physics2_btn"/>
+ <button label="3. Physik" name="physics_btn"/>
+ <button label="2. Optimieren" name="optimize_btn"/>
+ <button label="1. Datei auswählen" name="choose_file_btn"/>
+ <panel name="choose_file_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Modell hochladen
+ </text>
+ </panel>
+ <text name="description">
+ Mit diesem Assistenten können Sie Netzmodelle in Second Life hochladen. Geben Sie zuerst die Datei mit dem zu importierenden Modell an. Second Life unterstützt COLLADA-Dateien (.dae).
+ </text>
+ <panel name="content">
+ <text name="Cache location">
+ Dateiname:
+ </text>
+ <button label="Durchsuchen..." label_selected="Durchsuchen..." name="browse"/>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ </panel>
+ <panel name="optimize_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Optimieren
+ </text>
+ </panel>
+ <text name="description">
+ Dieser Assistent hat Ihr Modell optimiert, um die Leistung zu erhöhen. Sie können die Optimierungsergebnisse unten ändern oder zum Fortfahren auf „Weiter“ klicken.
+ </text>
+ <panel name="content">
+ <text name="high_detail_text">
+ Detailstufe generieren: Hoch
+ </text>
+ <text name="medium_detail_text">
+ Detailstufe generieren: Mittel
+ </text>
+ <text name="low_detail_text">
+ Detailstufe generieren: Niedrig
+ </text>
+ <text name="lowest_detail_text">
+ Detailstufe generieren: Niedrigste
+ </text>
+ </panel>
+ <panel name="content2">
+ <text name="lod_label">
+ Modellvorschau:
+ </text>
+ <combo_box name="preview_lod_combo2" tool_tip="Detailstufe zur Anzeige in Vorschaudarstellung">
+ <combo_item name="high">
+ Hoch
+ </combo_item>
+ <combo_item name="medium">
+ Mittel
+ </combo_item>
+ <combo_item name="low">
+ Niedrig
+ </combo_item>
+ <combo_item name="lowest">
+ Niedrigste
+ </combo_item>
+ </combo_box>
+ <text name="streaming cost">
+ Ressourcenkosten: [COST]
+ </text>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ </panel>
+ <panel name="physics_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Physik
+ </text>
+ </panel>
+ <text name="description">
+ Der Assistent erstellt eine physische Form, die die Interaktionen des Objekts mit anderen Objekten und Avataren bestimmt. Setzen Sie den Schieber auf die Detailstufe, die für Ihr Objekt am besten geeignet ist:
+ </text>
+ <panel name="content">
+ <text name="streaming cost">
+ Ressourcenkosten: [COST]
+ </text>
+ </panel>
+ </panel>
+ <panel name="physics2_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Physik
+ </text>
+ </panel>
+ <text name="description">
+ Überprüfen Sie die physische Form unten und klicken Sie dann auf „Weiter“. Um die physische Form zu ändern, klicken Sie auf „Zurück“.
+ </text>
+ <panel name="content">
+ <text name="lod_label">
+ Modellvorschau:
+ </text>
+ <combo_box name="preview_lod_combo3" tool_tip="Detailstufe zur Anzeige in Vorschaudarstellung">
+ <combo_item name="high">
+ Hoch
+ </combo_item>
+ <combo_item name="medium">
+ Mittel
+ </combo_item>
+ <combo_item name="low">
+ Niedrig
+ </combo_item>
+ <combo_item name="lowest">
+ Niedrigste
+ </combo_item>
+ </combo_box>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ <text name="streaming cost">
+ Ressourcenkosten: [COST]
+ </text>
+ </panel>
+ </panel>
+ <panel name="review_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Überprüfen
+ </text>
+ </panel>
+ <text name="description">
+ Überprüfen Sie die Details unten und klicken Sie dann auf „Hochladen“, um das Modell hochzuladen. Die Kosten werden von Ihrem L$-Kontostand abgezogen.
+ </text>
+ <panel name="content">
+ <text name="lod_label">
+ Modellvorschau:
+ </text>
+ <combo_box name="preview_lod_combo" tool_tip="Detailstufe zur Anzeige in Vorschaudarstellung">
+ <combo_item name="high">
+ Hoch
+ </combo_item>
+ <combo_item name="medium">
+ Mittel
+ </combo_item>
+ <combo_item name="low">
+ Niedrig
+ </combo_item>
+ <combo_item name="lowest">
+ Niedrigste
+ </combo_item>
+ </combo_box>
+ <text name="dimensions">
+ X: Y: Z:
+ </text>
+ <text name="dimension_dividers">
+ | |
+ </text>
+ </panel>
+ <text name="streaming cost">
+ Ressourcenkosten: [COST]
+ </text>
+ <text name="physics cost">
+ Physikkosten: [COST]
+ </text>
+ </panel>
+ <panel name="upload_panel">
+ <panel name="header_panel">
+ <text name="header_text">
+ Upload abgeschlossen
+ </text>
+ </panel>
+ <text name="description">
+ Herzlichen Glückwunsch! Ihr Modell wurde erfolgreich hochgeladen. Sie finden das Modell im Objektordner Ihres Inventars.
+ </text>
+ </panel>
+ <button label="&lt;&lt; Zurück" name="back"/>
+ <button label="Weiter &gt;&gt;" name="next"/>
+ <button label="Hochladen" name="upload" tool_tip="An Simulator hochladen"/>
+ <button label="Abbrechen" name="cancel"/>
+ <button label="Schließen" name="close"/>
+ <spinner name="import_scale" value="1,0"/>
+ <string name="status_idle">
+ Inaktiv
+ </string>
+ <string name="status_reading_file">
+ Laden...
+ </string>
+ <string name="status_generating_meshes">
+ Netze werden generiert...
+ </string>
+ <string name="status_vertex_number_overflow">
+ Fehler: Anzahl von Vertices überschreitet 65534. Operation abgebrochen.
+ </string>
+ <string name="high">
+ Hoch
+ </string>
+ <string name="medium">
+ Mittel
+ </string>
+ <string name="low">
+ Niedrig
+ </string>
+ <string name="lowest">
+ Niedrigste
+ </string>
+ <string name="mesh_status_good">
+ Ausliefern
+ </string>
+ <string name="mesh_status_na">
+ --
+ </string>
+ <string name="mesh_status_none">
+ Keine
+ </string>
+ <string name="mesh_status_submesh_mismatch">
+ Detailstufen haben unterschiedliche Anzahl texturfähiger Flächen.
+ </string>
+ <string name="mesh_status_mesh_mismatch">
+ Detailstufen haben unterschiedliche Anzahl von Netzinstanzen.
+ </string>
+ <string name="mesh_status_too_many_vertices">
+ Detailstufe hat zu viele Vertices.
+ </string>
+ <string name="mesh_status_missing_lod">
+ Erforderliche Detailstufe fehlt.
+ </string>
+ <string name="layer_all">
+ Alle
+ </string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_perm_prefs.xml b/indra/newview/skins/default/xui/de/floater_perm_prefs.xml
index fd65987aa9..9be22f3ccb 100644
--- a/indra/newview/skins/default/xui/de/floater_perm_prefs.xml
+++ b/indra/newview/skins/default/xui/de/floater_perm_prefs.xml
@@ -9,7 +9,7 @@
</text>
<check_box label="Bearbeiten" name="next_owner_modify"/>
<check_box label="Kopieren" name="next_owner_copy"/>
- <check_box label="Verkaufen/Weggeben" left_delta="80" name="next_owner_transfer"/>
+ <check_box label="Verkaufen/Weggeben" name="next_owner_transfer"/>
</panel>
<button label="OK" label_selected="OK" name="ok"/>
<button label="Abbrechen" label_selected="Abbrechen" name="cancel"/>
diff --git a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
index 6d3635fa8d..76dc623ca4 100644
--- a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
@@ -33,7 +33,7 @@
<text name="replace_text" tool_tip="Ersetzt den Auslösertext mit diesem Text. Wenn Sie zum Beispiel den Auslöser „hallo“ durch „wie geht&apos;s“ ersetzen, erscheint im Chat anstelle von „Ich wollte nur hallo sagen“ der Text „Ich wollte nur wie geht&apos;s sagen“ und die zugehörige Geste wird abgespielt.">
Ersetzen mit:
</text>
- <line_editor left_delta="94" name="replace_editor" tool_tip="Ersetzt den Auslösertext mit diesem Text. Wenn Sie zum Beispiel den Auslöser „hallo“ durch „wie geht&apos;s“ ersetzen, erscheint im Chat anstelle von „Ich wollte nur hallo sagen“ der Text „Ich wollte nur wie geht&apos;s sagen“ und die zugehörige Geste wird abgespielt." width="160"/>
+ <line_editor name="replace_editor" tool_tip="Ersetzt den Auslösertext mit diesem Text. Wenn Sie zum Beispiel den Auslöser „hallo“ durch „wie geht&apos;s“ ersetzen, erscheint im Chat anstelle von „Ich wollte nur hallo sagen“ der Text „Ich wollte nur wie geht&apos;s sagen“ und die zugehörige Geste wird abgespielt."/>
<text name="key_label">
Tastenkürzel:
</text>
diff --git a/indra/newview/skins/default/xui/de/floater_price_for_listing.xml b/indra/newview/skins/default/xui/de/floater_price_for_listing.xml
new file mode 100644
index 0000000000..bdd772a9c2
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_price_for_listing.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="price_for_listing" title="ANZEIGE VERÖFFENTLICHEN">
+ <text name="explanation_text">
+ Ihre Anzeige wird für eine Woche veröffentlicht.
+
+Die Position Ihrer Anzeige hängt davon ab, wie viel Sie dafür bezahlen möchten.
+
+Die Anzeigen, für die am meisten bezahlt wird, werden am Anfang der Liste angezeigt und erscheinen in Suchergebnissen weiter oben.
+ </text>
+ <text name="price_text">
+ Anzeigenpreis:
+ </text>
+ <text name="price_symbol">
+ L$
+ </text>
+ <button label="OK" name="set_price_btn"/>
+ <button label="Abbrechen" name="cancel_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml
index c014b8e040..ae68c71a80 100644
--- a/indra/newview/skins/default/xui/de/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml
@@ -4,7 +4,7 @@
unbekannt
</floater.string>
<radio_group label="Fototyp" name="snapshot_type_radio">
- <radio_item label="Email" name="postcard"/>
+ <radio_item label="E-Mail" name="postcard"/>
<radio_item label="Mein Inventar ([AMOUNT] L$)" name="texture"/>
<radio_item label="Auf meinem Computer speichern" name="local"/>
</radio_group>
diff --git a/indra/newview/skins/default/xui/de/floater_sound_devices.xml b/indra/newview/skins/default/xui/de/floater_sound_devices.xml
new file mode 100644
index 0000000000..7575ad9e2a
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_sound_devices.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_sound_devices" title="Audiogeräte">
+ <text name="voice_label">
+ Voice-Chat
+ </text>
+ <check_box label="Aktiviert" name="enable_voice"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml
index d95d674df2..338b609343 100644
--- a/indra/newview/skins/default/xui/de/floater_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_tools.xml
@@ -64,9 +64,9 @@
<radio_item label="Fläche auswählen" name="radio select face"/>
</radio_group>
<check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts"/>
- <button label="Link" name="link_btn"/>
- <button label="Verknüpfung auflösen" name="unlink_btn"/>
- <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für dieses Objekt">
+ <button label="Link" name="link_btn" width="30"/>
+ <button label="Verknüpfung auflösen" name="unlink_btn" width="126"/>
+ <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für dieses Objekt" left_pad="0">
þ: [COUNT]
</text>
<check_box label="" name="checkbox uniform"/>
@@ -125,6 +125,18 @@
<text name="prim_count">
Primitive: [COUNT]
</text>
+ <text name="linked_set_count">
+ Verknüpfte Sätze: [COUNT]
+ </text>
+ <text name="linked_set_cost" tool_tip="Kosten der gegenwärtig ausgewählten verknüpften Sätze als [Prims],[Komplexität der Physik]">
+ Kosten: [COST] / [PHYSICS]
+ </text>
+ <text name="object_count">
+ Objekte: [COUNT]
+ </text>
+ <text name="object_cost" tool_tip="Kosten der gegenwärtig ausgewählten Objekte als [Prims] / [Komplexität der Physik]">
+ Kosten: [COST] / [PHYSICS]
+ </text>
<tab_container name="Object Info Tabs">
<panel label="Allgemein" name="General">
<panel.string name="text deed continued">
@@ -269,15 +281,6 @@
<combo_box.item label="Ring" name="Ring"/>
<combo_box.item label="Geformt" name="Sculpted"/>
</combo_box>
- <combo_box name="material">
- <combo_box.item label="Stein" name="Stone"/>
- <combo_box.item label="Metall" name="Metal"/>
- <combo_box.item label="Glas" name="Glass"/>
- <combo_box.item label="Holz" name="Wood"/>
- <combo_box.item label="Fleisch" name="Flesh"/>
- <combo_box.item label="Kunststoff" name="Plastic"/>
- <combo_box.item label="Gummi" name="Rubber"/>
- </combo_box>
<text name="text cut">
Pfadschnitt (Anfang/Ende)
</text>
@@ -353,9 +356,19 @@
<combo_box.item label="Torus" name="Torus"/>
<combo_box.item label="Fläche" name="Plane"/>
<combo_box.item label="Zylinder" name="Cylinder"/>
+ <combo_box.item label="Netz" name="Mesh"/>
</combo_box>
</panel>
<panel label="Eigenschaften" name="Features">
+ <panel.string name="None">
+ Keine
+ </panel.string>
+ <panel.string name="Prim">
+ Prim
+ </panel.string>
+ <panel.string name="Convex Hull">
+ Konvexe Hülle
+ </panel.string>
<text name="select_single">
Wählen Sie nur einen einzelnen Baustein aus, um Eigenschaften zu bearbeiten.
</text>
@@ -380,6 +393,23 @@
<spinner label="Fokus" name="Light Focus"/>
<spinner label="Abnehmend" name="Light Falloff"/>
<spinner label="Ambiente" name="Light Ambiance"/>
+ <text name="label physicsshapetype">
+ Art der physischen Form:
+ </text>
+ <combo_box name="Physics Shape Type Combo Ctrl" tool_tip="Art der physischen Form auswählen"/>
+ <combo_box name="material">
+ <combo_box.item label="Stein" name="Stone"/>
+ <combo_box.item label="Metall" name="Metal"/>
+ <combo_box.item label="Glas" name="Glass"/>
+ <combo_box.item label="Holz" name="Wood"/>
+ <combo_box.item label="Fleisch" name="Flesh"/>
+ <combo_box.item label="Plastik" name="Plastic"/>
+ <combo_box.item label="Gummi" name="Rubber"/>
+ </combo_box>
+ <spinner label="Schwerkraft" name="Physics Gravity"/>
+ <spinner label="Reibung" name="Physics Friction"/>
+ <spinner label="Dichte" name="Physics Density"/>
+ <spinner label="Restitution" name="Physics Restitution"/>
</panel>
<panel label="Textur" name="Texture">
<panel.string name="string repeats per meter">
diff --git a/indra/newview/skins/default/xui/de/floater_water.xml b/indra/newview/skins/default/xui/de/floater_water.xml
deleted file mode 100644
index bb0dd9c75d..0000000000
--- a/indra/newview/skins/default/xui/de/floater_water.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="ERWEITERTER WASSER-EDITOR">
- <floater.string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </floater.string>
- <text name="KeyFramePresetsText" width="110">
- Voreinstellungen:
- </text>
- <combo_box left_delta="110" name="WaterPresetsCombo"/>
- <button label="Neu" label_selected="Neu" name="WaterNewPreset"/>
- <button label="Speichern" label_selected="Speichern" name="WaterSavePreset"/>
- <button label="Löschen" label_selected="Löschen" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="EINSTELLUNGEN" name="Settings">
- <text name="BHText">
- Wassertrübungsfarbe
- </text>
- <color_swatch name="WaterFogColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
- <text name="WaterFogDensText">
- Wassertrübungsdichte
- </text>
- <text name="WaterUnderWaterFogModText">
- Wassertrübungs-Modifikator
- </text>
- <slider bottom_delta="-34" name="WaterUnderWaterFogMod"/>
- <text name="BDensText">
- Reflexionswellengröße
- </text>
- <slider label="1" name="WaterNormalScaleX"/>
- <slider label="2" name="WaterNormalScaleY"/>
- <slider label="3" name="WaterNormalScaleZ"/>
- <text name="HDText">
- Fresnel-Skalierung
- </text>
- <text name="FresnelOffsetText">
- Fresnel-Versatz
- </text>
- <text name="DensMultText">
- Brechungsstärke oben
- </text>
- <text name="WaterScaleBelowText">
- Brechungsstärke unten
- </text>
- <text name="MaxAltText">
- Mischungsmultiplikator
- </text>
- </panel>
- <panel label="BILD" name="Waves">
- <text name="BHText">
- Richtung große Welle
- </text>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Richtung kleine Welle
- </text>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Normal-Map
- </text>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_windlight_options.xml b/indra/newview/skins/default/xui/de/floater_windlight_options.xml
deleted file mode 100644
index 5b59336f9d..0000000000
--- a/indra/newview/skins/default/xui/de/floater_windlight_options.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="ERWEITERTER HIMMEL-EDITOR">
- <text name="KeyFramePresetsText">
- Voreinstellungen:
- </text>
- <button label="Neu" label_selected="Neu" name="WLNewPreset"/>
- <button label="Speichern" label_selected="Speichern" name="WLSavePreset"/>
- <button label="Löschen" label_selected="Löschen" name="WLDeletePreset"/>
- <button label="Tageszyklus-Editor" label_selected="Tageszyklus-Editor" name="WLDayCycleMenuButton"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSPHÄRE" name="Atmosphere">
- <text name="BHText">
- Horizontfarbe
- </text>
- <button label=" ?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Horizonttrübung
- </text>
- <button label=" ?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Farbintensität
- </text>
- <button label=" ?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Trübungsintensität
- </text>
- <button label=" ?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Dichtemultiplikator
- </text>
- <button label=" ?" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Entfernungsmultiplikator
- </text>
- <button label=" ?" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Max. Höhe
- </text>
- <button label=" ?" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="LICHT" name="Lighting">
- <text name="SLCText">
- Sonne/Mond-Farbe
- </text>
- <button label=" ?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Sonne/Mond-Stand
- </text>
- <button label=" ?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Umgebung
- </text>
- <button label=" ?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Ostausrichtung
- </text>
- <button label=" ?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Sonnenleuchtkraft
- </text>
- <button label=" ?" name="WLSunGlowHelp"/>
- <slider label="Fokus " name="WLGlowB"/>
- <slider label="Größe " name="WLGlowR"/>
- <text name="SceneGammaText">
- Gamma in Szene
- </text>
- <button label=" ?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Sternenleuchtkraft
- </text>
- <button label=" ?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="WOLKEN" name="Clouds">
- <text name="WLCloudColorText">
- Wolkenfarbe
- </text>
- <button label=" ?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Wolken-XY/Dichte
- </text>
- <button label=" ?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Wolkendichte
- </text>
- <button label=" ?" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Wolkenskalierung
- </text>
- <button label=" ?" name="WLCloudScaleHelp"/>
- <text name="WLCloudDetailText">
- Wolkendetails (XY/Dichte)
- </text>
- <button label=" ?" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Wolkenbewegung X
- </text>
- <button label=" ?" name="WLCloudScrollXHelp"/>
- <check_box label="Fest" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Wolkenbewegung Y
- </text>
- <button label=" ?" name="WLCloudScrollYHelp"/>
- <check_box label="Fest" name="WLCloudLockY"/>
- <check_box label="Klassische Wolken" name="DrawClassicClouds"/>
- <button label=" ?" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/menu_inventory_add.xml b/indra/newview/skins/default/xui/de/menu_inventory_add.xml
index 165e9a9264..af70c08ba1 100644
--- a/indra/newview/skins/default/xui/de/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/de/menu_inventory_add.xml
@@ -4,6 +4,8 @@
<menu_item_call label="Bild ([COST] L$)..." name="Upload Image"/>
<menu_item_call label="Sound ([COST] L$)..." name="Upload Sound"/>
<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/>
+ <menu_item_call label="Modell..." name="Upload Model"/>
+ <menu_item_call label="Modellassistent..." name="Upload Model Wizard"/>
<menu_item_call label="Mehrfach-Upload ([COST] L$ pro Datei)..." name="Bulk Upload"/>
<menu_item_call label="Hochlade-Berechtigungen (Standard) festlegen" name="perm prefs"/>
</menu>
diff --git a/indra/newview/skins/default/xui/de/menu_model_import_gear_default.xml b/indra/newview/skins/default/xui/de/menu_model_import_gear_default.xml
new file mode 100644
index 0000000000..e1faeedcde
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/menu_model_import_gear_default.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<toggleable_menu name="model_menu_gear_default">
+ <menu_item_check label="Kanten anzeigen" name="show_edges"/>
+ <menu_item_check label="Physik anzeigen" name="show_physics"/>
+ <menu_item_check label="Texturen anzeigen" name="show_textures"/>
+ <menu_item_check label="Skingewicht anzeigen" name="show_skin_weight"/>
+ <menu_item_check label="Gelenkpositionen anzeigen" name="show_joint_positions"/>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index 9d5a69105d..05f9f94c8a 100644
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -120,6 +120,8 @@
<menu_item_call label="Bild ([COST] L$)..." name="Upload Image"/>
<menu_item_call label="Sound ([COST] L$)..." name="Upload Sound"/>
<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/>
+ <menu_item_call label="Modell..." name="Upload Model"/>
+ <menu_item_call label="Modellassistent..." name="Upload Model Wizard"/>
<menu_item_call label="Mehrfach-Upload ([COST] L$ pro Datei)..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Rückgängig" name="Undo"/>
@@ -159,7 +161,7 @@
<menu_item_check label="Alpha" name="Alpha"/>
<menu_item_check label="Baum" name="Tree"/>
<menu_item_check label="Avatare" name="Character"/>
- <menu_item_check label="SurfacePath" name="SurfacePath"/>
+ <menu_item_check label="Flächenpatch" name="Surface Patch"/>
<menu_item_check label="Himmel" name="Sky"/>
<menu_item_check label="Wasser" name="Water"/>
<menu_item_check label="Boden" name="Ground"/>
@@ -218,6 +220,7 @@
<menu_item_check label="Texture-Kategorie" name="Texture Category"/>
<menu_item_check label="Schnelle Timer" name="Fast Timers"/>
<menu_item_check label="Speicher" name="Memory"/>
+ <menu_item_check label="Szenestatistiken" name="Scene Statistics"/>
<menu_item_call label="Info zu Region in Fenster Fehler beseitigen" name="Region Info to Debug Console"/>
<menu_item_call label="Gruppeninfo in Fenster Fehler beseitigen" name="Group Info to Debug Console"/>
<menu_item_call label="Info zu Fähigkeiten in Fenster Fehler beseitigen" name="Capabilities Info to Debug Console"/>
@@ -228,6 +231,7 @@
</menu>
<menu label="Info anzeigen" name="Display Info">
<menu_item_check label="Zeit anzeigen" name="Show Time"/>
+ <menu_item_check label="Kosten für Hochladen anzeigen" name="Show Upload Cost"/>
<menu_item_check label="Render-Info anzeigen" name="Show Render Info"/>
<menu_item_check label="Texturinfos anzeigen" name="Show Texture Info"/>
<menu_item_check label="Matrizen anzeigen" name="Show Matrices"/>
@@ -253,8 +257,10 @@
</menu>
<menu label="Metadaten darstellen" name="Render Metadata">
<menu_item_check label="Bonding Boxes" name="Bounding Boxes"/>
+ <menu_item_check label="Normalen" name="Normals"/>
<menu_item_check label="Octree" name="Octree"/>
<menu_item_check label="Shadow Frusta" name="Shadow Frusta"/>
+ <menu_item_check label="Physische Formen" name="Physics Shapes"/>
<menu_item_check label="Okklusion" name="Occlusion"/>
<menu_item_check label="Bündel rendern" name="Render Batches"/>
<menu_item_check label="Typ aktualisieren" name="Update Type"/>
@@ -262,9 +268,12 @@
<menu_item_check label="Textur-Priorität" name="Texture Priority"/>
<menu_item_check label="Texturbereich" name="Texture Area"/>
<menu_item_check label="Oberflächenbereich" name="Face Area"/>
+ <menu_item_check label="Detailstufeninfos" name="LOD Info"/>
+ <menu_item_check label="Konstruktionswarteschlange" name="Build Queue"/>
<menu_item_check label="Lichter" name="Lights"/>
<menu_item_check label="Gelenkpunkte" name="Collision Skeleton"/>
<menu_item_check label="Raycast" name="Raycast"/>
+ <menu_item_check label="Formen" name="Sculpt"/>
</menu>
<menu label="Rendering" name="Rendering">
<menu_item_check label="Achsen" name="Axes"/>
@@ -272,7 +281,6 @@
<menu_item_call label="Texturinfo für ausgewähltes Objekt" name="Selected Texture Info Basis"/>
<menu_item_check label="Wireframe" name="Wireframe"/>
<menu_item_check label="Objekt-Objekt Okklusion" name="Object-Object Occlusion"/>
- <menu_item_check label="Framebuffer-Objekte" name="Framebuffer Objects"/>
<menu_item_check label="Licht und Schatten" name="Lighting and Shadows"/>
<menu_item_check label="Schatten von Sonne-/Mond-Projektoren" name="Shadows from Sun/Moon/Projectors"/>
<menu_item_check label="SSAO und Schattenglättung" name="SSAO and Shadow Smoothing"/>
@@ -371,6 +379,7 @@
<menu_item_call label="Lokale Texturen ausgeben" name="Dump Local Textures"/>
</menu>
<menu_item_check label="HTTP-Texturen" name="HTTP Textures"/>
+ <menu_item_check label="HTTP-Inventar" name="HTTP Inventory"/>
<menu_item_call label="Bilder komprimieren" name="Compress Images"/>
<menu_item_check label="Ausgabe Fehlerbeseitigung ausgeben" name="Output Debug Minidump"/>
<menu_item_check label="Bei nächster Ausführung Fenster öffnen" name="Console Window"/>
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index c172f7ea2d..75f26c6990 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -2172,6 +2172,12 @@ Dies kann die Eingabe Ihres Passworts beeinflussen.
<notification name="RezItemNoPermissions">
Keine Berechtigung zum Rezzen von Objekten.
</notification>
+ <notification name="IMAcrossParentEstates">
+ Senden von IMs über übergeordnete Grundbesitze hinweg nicht möglich.
+ </notification>
+ <notification name="TransferInventoryAcrossParentEstates">
+ Inventarübertragung über übergeordnete Grundbesitze hinweg nicht möglich.
+ </notification>
<notification name="UnableToLoadNotecard">
Notizkarten-Asset konnte nicht geladen werden.
</notification>
@@ -2749,6 +2755,10 @@ Diese werden für ein paar Sekunden sicherheitshalber gesperrt.
Sie wurden vom Moderator stummgeschaltet.
<usetemplate name="okbutton" yestext="OK"/>
</notification>
+ <notification name="UploadCostConfirmation">
+ Das Hochladen kostet [PRICE] L$. Möchten Sie fortfahren?
+ <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="Hochladen"/>
+ </notification>
<notification name="ConfirmClearTeleportHistory">
Möchten Sie Ihre Teleport-Liste löschen?
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
@@ -2760,6 +2770,9 @@ Die Schaltfläche wird angezeigt, wenn genügend Platz vorhanden ist.
<notification name="ShareNotification">
Wählen Sie Einwohner aus, für die Sie das Objekt freigeben möchten.
</notification>
+ <notification name="MeshUploadError">
+ [LABEL] konnte nicht hochgeladen werden: [MESSAGE] [IDENTIFIER] [INVALIDITY_IDENTIFIER]
+ </notification>
<notification name="ShareItemsConfirmation">
Möchten Sie wirklich die folgenden Objekte:
@@ -2776,6 +2789,19 @@ für folgende Einwohner freigeben:
<notification name="DeedToGroupFail">
Übertragung an Gruppe ist fehlgeschlagen.
</notification>
+ <notification name="ReleaseLandThrottled">
+ Die Parzelle [PARCEL_NAME] kann zurzeit nicht aufgegeben werden.
+ </notification>
+ <notification name="ReleasedLandWithReclaim">
+ Die [AREA] m² große Parzelle „[PARCEL_NAME]“ wurde freigegeben.
+
+Sie haben [RECLAIM_PERIOD] Stunden, um die Parzelle für 0 L$ zurückzufordern, bevor sie zum Verkauf an alle freigegeben wird.
+ </notification>
+ <notification name="ReleasedLandNoReclaim">
+ Die [AREA] m² große Parzelle „[PARCEL_NAME]“ wurde freigegeben.
+
+Sie steht jetzt zum Verkauf an alle zur Verfügung.
+ </notification>
<notification name="AvatarRezNotification">
(Seit [EXISTENCE] Sekunden inworld )
Avatar &apos;[NAME]&apos; wurde in [TIME] Sekunden gerezzt.
@@ -2914,6 +2940,10 @@ Durch Ausblenden der Schaltfläche „Sprechen“ wird die Sprechfunktion deakti
Die Erstellung und Bearbeitung von Gruppen ist nur im Modus „Erweitert“ möglich. Möchten Sie das Programm beenden und den Modus wechseln? Die Modusauswahl ist auf dem Anmeldebildschirm zu finden.
<usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
</notification>
+ <notification label="" name="NoPlaceInfo">
+ Die Anzeige des Ortsprofils ist nur im Modus „Erweitert“ möglich. Möchten Sie das Programm beenden und den Modus wechseln? Die Modusauswahl ist auf dem Anmeldebildschirm zu finden.
+ <usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
+ </notification>
<notification label="" name="NoPicks">
Die Erstellung und Bearbeitung von Auswahlen ist nur im Modus „Erweitert“ möglich. Möchten Sie das Programm beenden und den Modus wechseln? Die Modusauswahl ist auf dem Anmeldebildschirm zu finden.
<usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
@@ -2934,9 +2964,18 @@ Durch Ausblenden der Schaltfläche „Sprechen“ wird die Sprechfunktion deakti
Die Bezahlung anderer Einwohner ist nur im Modus „Erweitert“ möglich. Möchten Sie sich abmelden und den Modus wechseln?
<usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
</notification>
- <global name="UnsupportedCPU">
- - Ihre CPU-Geschwindigkeit entspricht nicht den Mindestanforderungen.
- </global>
+ <notification label="" name="NoInventory">
+ Die Inventaranzeige ist nur im Modus „Erweitert“ möglich. Möchten Sie sich abmelden und den Modus wechseln?
+ <usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
+ </notification>
+ <notification label="" name="NoAppearance">
+ Das Fenster zum Bearbeiten des Aussehens ist nur im Modus „Erweitert“ verfügbar. Möchten Sie sich abmelden und den Modus wechseln?
+ <usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
+ </notification>
+ <notification label="" name="NoSearch">
+ Die Suche ist nur im Modus „Erweitert“ möglich. Möchten Sie sich abmelden und den Modus wechseln?
+ <usetemplate name="okcancelbuttons" notext="Nicht beenden" yestext="Beenden"/>
+ </notification>
<global name="UnsupportedGLRequirements">
Ihr Computer entspricht nicht den Hardwareanforderungen von [APP_NAME]. [APP_NAME] setzt eine OpenGL-Grafikkarte mit Multitextur-Unterstützung voraus. Falls Ihre Grafikkarte diese Funktion unterstützt, installieren Sie die neuesten Treiber sowie die aktuellen Service Packs und Patches für Ihr Betriebssystem.
diff --git a/indra/newview/skins/default/xui/de/panel_edit_pick.xml b/indra/newview/skins/default/xui/de/panel_edit_pick.xml
index 3c56df763d..aafffc7ae3 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Auswahl speichern" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Abbrechen" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/de/panel_people.xml b/indra/newview/skins/default/xui/de/panel_people.xml
index 004792bbf5..63a832a165 100644
--- a/indra/newview/skins/default/xui/de/panel_people.xml
+++ b/indra/newview/skins/default/xui/de/panel_people.xml
@@ -66,16 +66,16 @@ Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/worldmap Karte].
<layout_panel name="view_profile_btn_lp">
<button label="Profil" name="view_profile_btn" tool_tip="Bilder, Gruppen und andere Einwohner-Informationen anzeigen"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="Instant Messenger öffnen"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Anrufen" name="call_btn" tool_tip="Diesen Einwohner anrufen"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Teilen" name="share_btn" tool_tip="Inventarobjekt teilen"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teleportieren" name="teleport_btn" tool_tip="Teleport anbieten"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_colors.xml b/indra/newview/skins/default/xui/de/panel_preferences_colors.xml
index 22681ffdf2..19c5efcb05 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_colors.xml
@@ -22,6 +22,9 @@
<text name="text_box5">
Fehler
</text>
+ <text name="text_box10">
+ Direkt
+ </text>
<text name="text_box7">
Eigentümer
</text>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
index 78cb03a50a..9175ea0bae 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
@@ -27,8 +27,20 @@
</text>
<check_box initial_value="true" label="Transparentes Wasser" name="TransparentWater"/>
<check_box initial_value="true" label="Bumpmapping und Glanz" name="BumpShiny"/>
+ <check_box initial_value="true" label="Lokale Lichtquellen" name="LocalLights"/>
<check_box initial_value="true" label="Einfache Shader" name="BasicShaders" tool_tip="Deaktivieren Sie diese Option, wenn der Grafikkartentreiber Abstürze verursacht"/>
<check_box initial_value="true" label="Atmosphären-Shader" name="WindLightUseAtmosShaders"/>
+ <check_box initial_value="true" label="Licht und Schatten" name="UseLightShaders"/>
+ <check_box initial_value="true" label="Ambient Occlusion" name="UseSSAO"/>
+ <check_box initial_value="true" label="Schärfentiefe" name="UseDoF"/>
+ <text name="shadows_label">
+ Schatten:
+ </text>
+ <combo_box name="ShadowDetail">
+ <combo_box.item label="Keine" name="0"/>
+ <combo_box.item label="Sonne/Mond" name="1"/>
+ <combo_box.item label="Sonne/Mond + Projektoren" name="2"/>
+ </combo_box>
<text name="reflection_label">
Wasserreflexionen:
</text>
@@ -48,7 +60,7 @@
m
</text>
<slider label="Max. Partikelzahl:" name="MaxParticleCount"/>
- <slider label="Max. Anzahl an voll dargestellten Avataren:" name="MaxNumberAvatarDrawn"/>
+ <slider label="Max. Anzahl an voll dargestellten Avataren:" label_width="230" name="MaxNumberAvatarDrawn" width="315"/>
<slider label="Post-Processing-Qualität:" name="RenderPostProcess"/>
<text name="MeshDetailText">
Darstellungsgrad:
diff --git a/indra/newview/skins/default/xui/de/panel_region_general.xml b/indra/newview/skins/default/xui/de/panel_region_general.xml
index be8507ebbd..f383be992b 100644
--- a/indra/newview/skins/default/xui/de/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/de/panel_region_general.xml
@@ -25,6 +25,7 @@
<check_box label="Landwiederverkauf zulassen" name="allow_land_resell_check"/>
<check_box label="Landumverteilung zulassen" name="allow_parcel_changes_check"/>
<check_box label="Landanzeige in Suche blockieren" name="block_parcel_search_check" tool_tip="Diese Region und ihre Parzellen in Suchergebnissen anzeigen"/>
+ <check_box label="Netzobjekte zulassen" name="mesh_rez_enabled_check" tool_tip="Anderen das Rezzen von Netzobjekten in dieser Region gestatten"/>
<spinner label="Avatar-Limit" name="agent_limit_spin"/>
<spinner label="Objektbonus" name="object_bonus_spin"/>
<text label="Inhaltseinstufung" name="access_text">
diff --git a/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml
index 990193574e..fa659040ea 100644
--- a/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml
+++ b/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="LLScrollingPanelParamBase">
- <slider label="[BESCHR]" name="param slider"/>
+ <slider label="[DESC]" name="param slider"/>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_sound_devices.xml b/indra/newview/skins/default/xui/de/panel_sound_devices.xml
new file mode 100644
index 0000000000..da20f7e214
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/panel_sound_devices.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<panel label="Geräteeinstellungen" name="device_settings_panel">
+ <panel.string name="default_text">
+ Standard
+ </panel.string>
+ <text name="Input">
+ Eingabe
+ </text>
+ <text name="My volume label">
+ Meine Lautstärke:
+ </text>
+ <slider_bar initial_value="1,0" name="mic_volume_slider" tool_tip="Lautstärke mit diesem Regler ändern"/>
+ <text name="wait_text">
+ Bitte warten
+ </text>
+ <text name="Output">
+ Ausgabe
+ </text>
+</panel>
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index f32eb21dd3..ed38267466 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -130,6 +130,139 @@
<string name="create_account_url">
http://join.secondlife.com/index.php?lang=de-DE
</string>
+ <string name="LoginFailedViewerNotPermitted">
+ Mit dem von Ihnen verwendeten Viewer ist der Zugriff auf Second Life nicht mehr möglich. Laden Sie von den folgenden Seite einen neuen Viewer herunter:
+http://secondlife.com/download
+
+Weitere Informationen finden Sie auf der folgenden FAQ-Seite:
+http://secondlife.com/viewer-access-faq
+ </string>
+ <string name="LoginIntermediateOptionalUpdateAvailable">
+ Optionales Viewer-Update verfügbar: [VERSION]
+ </string>
+ <string name="LoginFailedRequiredUpdate">
+ Erforderliches Viewer-Update: [VERSION]
+ </string>
+ <string name="LoginFailedAlreadyLoggedIn">
+ Dieser Agent ist bereits angemeldet.
+ </string>
+ <string name="LoginFailedAuthenticationFailed">
+ Wir bitten um Entschuldigung! Wir konnten Sie nicht anmelden.
+Stellen Sie sicher, dass Sie die richtigen Informationen eingegeben haben:
+ * Benutzername (wie robertschmidt12 oder warme.sonne)
+ * Kennwort
+Stellen Sie außerdem sicher, dass die Umschaltsperre deaktiviert ist.
+ </string>
+ <string name="LoginFailedPasswordChanged">
+ Ihr Kennwort wurde aus Sicherheitsgründen geändert.
+Gehen Sie zur Seite „Mein Account“ unter http://secondlife.com/password
+und beantworten Sie die Sicherheitsfrage, um Ihr Kennwort zurückzusetzen.
+Wir entschuldigen uns für eventuell enstandene Unannehmlichkeiten.
+ </string>
+ <string name="LoginFailedPasswordReset">
+ Aufgrund von Systemänderungen müssen Sie Ihr Kennwort zurücksetzen.
+Gehen Sie zur Seite „Mein Account“ unter http://secondlife.com/password
+und beantworten Sie die Sicherheitsfrage, um Ihr Kennwort zurückzusetzen.
+Wir entschuldigen uns für eventuell enstandene Unannehmlichkeiten.
+ </string>
+ <string name="LoginFailedEmployeesOnly">
+ Second Life ist vorübergehend wegen Wartung geschlossen.
+Nur Mitarbeiter können sich anmelden.
+Aktuelle Informationen finden Sie unter www.secondlife.com/status.
+ </string>
+ <string name="LoginFailedPremiumOnly">
+ Die Anmeldung bei Second Life ist vorübergehend eingeschränkt, um sicherzustellen, dass Einwohner, die sich bereits inworld aufhalten, das bestmögliche Erlebnis haben.
+
+Benutzer mit kostenlosen Konten können sich während dieses Zeitraums nicht bei Second Life anmelden, damit die Kapazität den Benutzern zur Verfügung steht, die ein gebührenpflichtiges Premium-Konto besitzen.
+ </string>
+ <string name="LoginFailedComputerProhibited">
+ Der Zugriff auf Second Life ist von diesem Computer aus nicht möglich.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an
+support@secondlife.com.
+ </string>
+ <string name="LoginFailedAcountSuspended">
+ Ihr Konto ist erst ab
+[TIME] Pacific Time wieder verfügbar.
+ </string>
+ <string name="LoginFailedAccountDisabled">
+ Ihre Anfrage kann derzeit nicht bearbeitet werden.
+Wenden Sie sich unter http://secondlife.com/support an den Second Life-Support.
+Wenn Sie Ihr Kennwort nicht ändern können, rufen Sie die US-Nummer (866) 476-9763 an.
+ </string>
+ <string name="LoginFailedTransformError">
+ Nicht übereinstimmende Daten bei der Anmeldung festgestellt.
+Wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LoginFailedAccountMaintenance">
+ An Ihrem Konto werden gerade kleinere Wartungsarbeiten durchgeführt.
+Ihr Konto ist erst ab
+[TIME] Pacific Time wieder verfügbar.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LoginFailedPendingLogoutFault">
+ Abmeldeanforderung führte zu einem Simulatorfehler.
+ </string>
+ <string name="LoginFailedPendingLogout">
+ Das System meldet Sie gerade ab.
+Ihr Konto ist erst ab
+[TIME] Pacific Time wieder verfügbar.
+ </string>
+ <string name="LoginFailedUnableToCreateSession">
+ Es kann keine gültige Sitzung erstellt werden.
+ </string>
+ <string name="LoginFailedUnableToConnectToSimulator">
+ Es kann keine Simulatorverbindung hergestellt werden.
+ </string>
+ <string name="LoginFailedRestrictedHours">
+ Mit Ihrem Konto ist der Zugriff auf Second Life
+nur zwischen [START] und [END] Pacific Time möglich.
+Schauen Sie während dieses Zeitraums vorbei.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LoginFailedIncorrectParameters">
+ Falsche Parameter.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LoginFailedFirstNameNotAlphanumeric">
+ Vorname muss alphanumerisch sein.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LoginFailedLastNameNotAlphanumeric">
+ Nachname muss alphanumerisch sein.
+Wenn Sie der Ansicht sind, dass Sie diese Meldung fälschlicherweise erhalten haben, wenden Sie sich an support@secondlife.com.
+ </string>
+ <string name="LogoutFailedRegionGoingOffline">
+ Die Region wird gerade offline geschaltet.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutFailedAgentNotInRegion">
+ Agent nicht in Region.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutFailedPendingLogin">
+ Die Region war gerade dabei, eine andere Sitzung anzumelden.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutFailedLoggingOut">
+ Die Region war gerade dabei, die vorherige Sitzung abzumelden.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutFailedStillLoggingOut">
+ Die Region ist noch immer dabei, die vorherige Sitzung abzumelden.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutSucceeded">
+ Die Region hat soeben die letzte Sitzung abgemeldet.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LogoutFailedLogoutBegun">
+ Die Region hat den Abmeldevorgang gestartet.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
+ <string name="LoginFailedLoggingOutSession">
+ Das System hat begonnen, Ihre letzte Sitzung abzumelden.
+Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+ </string>
<string name="AgentLostConnection">
In dieser Region kann es zu Problemen kommen. Bitte überprüfen Sie Ihre Internetverbindung.
</string>
@@ -441,6 +574,9 @@
<string name="symbolic folder link">
Link zu Ordner
</string>
+ <string name="mesh">
+ mesh
+ </string>
<string name="AvatarEditingAppearance">
(Aussehen wird bearbeitet)
</string>
@@ -1102,9 +1238,6 @@
<string name="InvFolder My Inventory">
Mein Inventar
</string>
- <string name="InvFolder My Favorites">
- Meine Favoriten
- </string>
<string name="InvFolder Library">
Bibliothek
</string>
@@ -1163,10 +1296,10 @@
Gesten
</string>
<string name="InvFolder Favorite">
- Favoriten
+ Meine Favoriten
</string>
<string name="InvFolder favorite">
- Favoriten
+ Meine Favoriten
</string>
<string name="InvFolder Current Outfit">
Aktuelles Outfit
@@ -1180,6 +1313,9 @@
<string name="InvFolder Accessories">
Zubehör
</string>
+ <string name="InvFolder Meshes">
+ Netze
+ </string>
<string name="InvFolder Friends">
Freunde
</string>
@@ -3762,6 +3898,9 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_
<string name="session_initialization_timed_out_error">
Die Initialisierung der Sitzung ist fehlgeschlagen
</string>
+ <string name="Home position set.">
+ Position für Zuhause festgelegt.
+ </string>
<string name="voice_morphing_url">
http://secondlife.com/landing/voicemorphing
</string>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 6e985e0476..07cb4c12f5 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -414,7 +414,7 @@
right="-10"
name="Cancel Land Sale"
left_pad="5"
- top_pad="-15"
+ top_pad="7"
width="180" />
<text
type="string"
@@ -488,6 +488,7 @@
width="186">
0
</text>
+
<button
enabled="false"
follows="left|top"
@@ -495,9 +496,20 @@
label="Buy Land"
layout="topleft"
left_delta="52"
+ top_pad="5"
name="Buy Land..."
- top_pad="7"
width="130" />
+ <button
+ enabled="false"
+ follows="left|top"
+ height="23"
+ label="Linden Sale"
+ layout="topleft"
+ left="10"
+ name="Linden Sale..."
+ tool_tip="Land must be owned, set content, and not already for auction."
+ top_pad="-23"
+ width="150" />
<button
enabled="true"
follows="left|top"
@@ -545,18 +557,7 @@
layout="topleft"
left_delta="0"
name="Reclaim Land..."
- top_delta="-50"
- width="180" />
- <button
- enabled="false"
- follows="left|top"
- height="23"
- label="Linden Sale"
- layout="topleft"
- left_delta="0"
- name="Linden Sale..."
- tool_tip="Land must be owned, set content, and not already for auction."
- top_pad="2"
+ top_delta="-25"
width="180" />
</panel>
<panel
@@ -1204,6 +1205,10 @@ Only large parcels can be listed in search.
name="push_restrict_region_text">
No Pushing (Region Override)
</panel.string>
+ <panel.string
+ name="see_avs_text">
+ See and chat with residents on this parcel
+ </panel.string>
<text
type="string"
length="1"
@@ -1313,7 +1318,7 @@ Only large parcels can be listed in search.
name="check group scripts"
top_delta="0"
width="70" />
- <text
+ <text
type="string"
text_color="white"
length="1"
@@ -1514,10 +1519,32 @@ Only large parcels can be listed in search.
type="string"
length="1"
follows="left|top"
+ text_color="white"
+ height="16"
+ layout="topleft"
+ left="230"
+ top="174"
+ name="allow_label5"
+ width="278">
+ Allow Residents on other parcels to:
+ </text>
+ <check_box
+ height="16"
+ label="See Avatars"
+ follows="top"
+ layout="topleft"
+ left="230"
+ name="SeeAvatarsCheck"
+ tool_tip="Allows residents on other parcels to see and chat with residents on this parcel, and you to see and chat with them."
+ width="120" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="16"
layout="topleft"
- left="220"
- top="180"
+ left="230"
+ top="230"
text_color="white"
name="landing_point"
word_wrap="true"
@@ -1531,7 +1558,7 @@ Only large parcels can be listed in search.
label_selected="Set"
layout="topleft"
name="Set"
- right="-68"
+ left="230"
tool_tip="Sets the landing point where visitors arrive. Sets to your avatar&apos;s location inside this parcel."
width="50" />
<button
@@ -1543,7 +1570,6 @@ Only large parcels can be listed in search.
left_pad="5"
name="Clear"
tool_tip="Clear the landing point"
- right="-10"
width="55" />
<text
type="string"
@@ -1552,7 +1578,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="220"
+ left="230"
top_pad="10"
name="Teleport Routing: "
width="200">
@@ -1845,6 +1871,34 @@ Only large parcels can be listed in search.
name="check sound local"
left_pad="0"
width="292" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="Avatar Sounds:"
+ top_pad="10"
+ width="100">
+ Avatar Sounds:
+ </text>
+ <check_box
+ height="16"
+ label="Everyone"
+ layout="topleft"
+ left_pad="0"
+ name="all av sound check"
+ top_delta="0"
+ width="130" />
+ <check_box
+ height="16"
+ label="Group"
+ layout="topleft"
+ left_pad="0"
+ name="group av sound check"
+ top_delta="0"
+ width="70" />
<text
type="string"
length="1"
@@ -2125,4 +2179,4 @@ Only large parcels can be listed in search.
</panel>
</panel>
</tab_container>
-</floater>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
deleted file mode 100644
index 65e2462ef8..0000000000
--- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,558 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="275"
- layout="topleft"
- name="Day Cycle Floater"
- help_topic="day_cycle_floater"
- save_rect="true"
- title="DAY CYCLE EDITOR"
- width="658">
- <tab_container
- follows="left|top"
- height="255"
- layout="topleft"
- left="0"
- name="Day Cycle Tabs"
- tab_position="top"
- top="20"
- width="656">
- <panel
- border="true"
- follows="left|top|right|bottom"
- height="255"
- label="Day Cycle"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="Day Cycle"
- top="0"
- width="654">
- <multi_slider
- can_edit_text="true"
- control_name="WLTimeSlider"
- decimal_digits="0"
- draw_track="false"
- follows="bottom"
- height="10"
- increment="0.0833333"
- initial_value="0"
- layout="topleft"
- left="20"
- max_sliders="20"
- max_val="24"
- name="WLTimeSlider"
- show_text="false"
- top="25"
- use_triangle="true"
- width="525" />
- <multi_slider
- can_edit_text="true"
- control_name="WLDayCycleKeys"
- decimal_digits="0"
- follows="bottom"
- height="10"
- increment="0.0833333"
- initial_value="0"
- layout="topleft"
- left_delta="0"
- max_sliders="20"
- max_val="24"
- name="WLDayCycleKeys"
- show_text="false"
- top_pad="15"
- width="525" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left="8"
- name="WL12am"
- top="74"
- width="55">
- 12am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL3am"
- top_delta="0"
- width="55">
- 3am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL6am"
- top_delta="0"
- width="55">
- 6am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL9amHash"
- top_delta="0"
- width="55">
- 9am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL12pmHash"
- top_delta="0"
- width="55">
- 12pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL3pm"
- top_delta="0"
- width="55">
- 3pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL6pm"
- top_delta="0"
- width="55">
- 6pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL9pm"
- top_delta="0"
- width="55">
- 9pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL12am2"
- top_delta="0"
- width="55">
- 12am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left="20"
- name="WL12amHash"
- top="54"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL3amHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL6amHash"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL9amHash2"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL12pmHash2"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL3pmHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL6pmHash"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL9pmHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL12amHash2"
- top_delta="-3"
- width="6">
- |
- </text>
- <button
- height="20"
- label="Add Key"
- label_selected="Add Key"
- layout="topleft"
- left="555"
- name="WLAddKey"
- top="30"
- width="96" />
- <button
- height="20"
- label="Delete Key"
- label_selected="Delete Key"
- layout="topleft"
- left_delta="0"
- name="WLDeleteKey"
- top_pad="5"
- width="96" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="20"
- name="WLCurKeyFrameText"
- top="104"
- width="235">
- Key Frame Settings:
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="30"
- name="WLCurKeyTimeText"
- top="124"
- width="105">
- Key Time:
- </text>
- <spinner
- control_name="WLCurKeyHour"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- label="Hour"
- label_width="35"
- layout="topleft"
- left_delta="20"
- max_val="100"
- name="WLCurKeyHour"
- top_pad="4"
- width="74" />
- <spinner
- control_name="WLCurKeyMin"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="5"
- initial_value="0"
- label="Min"
- label_width="45"
- layout="topleft"
- left_pad="5"
- max_val="55"
- name="WLCurKeyMin"
- top_delta="0"
- width="85" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="30"
- name="WLCurKeyTimeText2"
- top="169"
- width="185">
- Key Preset:
- </text>
- <combo_box
- height="18"
- label="Preset"
- layout="topleft"
- left_delta="0"
- name="WLKeyPresets"
- top_pad="7"
- width="205" />
- <view_border
- bevel_style="none"
- follows="top|left"
- height="115"
- layout="topleft"
- left="12"
- top="101"
- width="240" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="15"
- name="DayCycleText"
- top="114"
- width="120">
- Snap:
- </text>
- <combo_box
- enabled="false"
- height="18"
- label="5 min"
- layout="topleft"
- left_delta="0"
- name="WLSnapOptions"
- top_pad="7"
- width="70" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="0"
- name="DayCycleText2"
- top_pad="17"
- width="120">
- Length of Cycle:
- </text>
- <spinner
- control_name="WLLengthOfDayHour"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- label="Hour"
- label_width="33"
- layout="topleft"
- left_delta="-3"
- max_val="100"
- name="WLLengthOfDayHour"
- top_pad="4"
- width="74" />
- <spinner
- control_name="WLLengthOfDayMin"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- label="Min"
- label_width="25"
- layout="topleft"
- left_pad="2"
- max_val="59"
- name="WLLengthOfDayMin"
- top_delta="0"
- width="65" />
- <spinner
- control_name="WLLengthOfDaySec"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="24"
- label="Sec"
- label_width="25"
- layout="topleft"
- left_pad="2"
- max_val="59"
- name="WLLengthOfDaySec"
- top_delta="0"
- width="65"/>
- <text
- type="string"
- halign="right"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-23"
- name="DayCycleText3"
- top="114"
- width="85">
- Preview :
- </text>
- <button
- height="20"
- label="Play"
- label_selected="Play"
- layout="topleft"
- left="480"
- name="WLAnimSky"
- top_pad="5"
- width="83" />
- <button
- height="20"
- label="Stop!"
- label_selected="Stop"
- layout="topleft"
- left_pad="4"
- name="WLStopAnimSky"
- top_delta="0"
- width="83" />
- <button
- height="20"
- label="Use Estate Time"
- label_selected="Go to Estate Time"
- layout="topleft"
- left="480"
- name="WLUseLindenTime"
- top_pad="9"
- width="170" />
- <button
- height="20"
- label="Save Test Day"
- label_selected="Save Test Day"
- layout="topleft"
- left_delta="0"
- name="WLSaveDayCycle"
- top_pad="9"
- width="170" />
- <button
- height="20"
- label="Load Test Day"
- label_selected="Load Test Day"
- layout="topleft"
- left_delta="0"
- name="WLLoadDayCycle"
- top_pad="3"
- width="170" />
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml
new file mode 100644
index 0000000000..b5de4166f6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<floater
+ legacy_header_height="18"
+ height="130"
+ help_topic=""
+ layout="topleft"
+ name="Delete Env Preset"
+ save_rect="true"
+ title="DELETE ENV PRESET"
+ width="550">
+
+ <string name="title_water">Delete Water Preset</string>
+ <string name="title_sky">Delete Sky Preset</string>
+ <string name="title_day_cycle">Delete Day Cycle</string>
+
+ <string name="label_water">Preset:</string>
+ <string name="label_sky">Preset:</string>
+ <string name="label_day_cycle">Day cycle:</string>
+
+ <string name="msg_confirm_deletion">Are you sure you want to delete the selected preset?</string>
+ <string name="msg_sky_is_referenced">Cannot remove a preset that is referenced by some day cycle(s).</string>
+
+ <string name="combo_label">-Select a preset-</string>
+
+ <text
+ follows="top|left|right"
+ font="SansSerif"
+ height="10"
+ layout="topleft"
+ left="50"
+ name="label"
+ top="60"
+ width="60">
+ Preset:
+ </text>
+ <combo_box
+ follows="top|left"
+ layout="topleft"
+ left_pad="10"
+ name="preset_combo"
+ top_delta="-5"
+ width="200"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Delete"
+ layout="topleft"
+ left_pad="15"
+ name="delete"
+ width="70"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="5"
+ name="cancel"
+ width="70"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml
new file mode 100644
index 0000000000..d9a3ad0c4b
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="381"
+ layout="topleft"
+ name="Edit Day cycle"
+ help_topic="day_presets"
+ save_rect="true"
+ title="Edit Day Cycle"
+ width="705">
+
+ <string name="title_new">Create a New Day Cycle</string>
+ <string name="title_edit">Edit Day Cycle</string>
+ <string name="hint_new">Name your day cycle, adjust the controls to create it, and click "Save".</string>
+ <string name="hint_edit">To edit your day cycle, adjust the controls below and click "Save".</string>
+ <string name="combo_label">-Select a preset-</string>
+
+ <text
+ follows="top|left|right"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="hint"
+ top="25"
+ width="685" />
+ <text
+ follows="top|left|right"
+ font="SansSerif"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="label"
+ top_pad="25"
+ width="120">
+ Preset Name:
+ </text>
+ <combo_box
+ allow_text_entry="true"
+ follows="top|left"
+ layout="topleft"
+ left_pad="10"
+ max_chars="100"
+ name="day_cycle_combo"
+ top_delta="-5"
+ width="200" />
+ <line_editor
+ height="20"
+ left_delta="0"
+ name="day_cycle_name"
+ top_delta="0"
+ visible="true"
+ width="200" />
+ <text
+ follows="top|left|right"
+ height="95"
+ layout="topleft"
+ left_pad="10"
+ name="note"
+ top_delta="0"
+ width="345"
+ wrap="true">
+ Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
+ </text>
+ <!--======== Controls panel ========-->
+ <text
+ follows="left|top|right"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="hint_item1"
+ top="100"
+ width="300">
+ - Click on a tab to edit the specific sky settings and time.
+ </text>
+ <text
+ follows="left|top|right"
+ height="10"
+ layout="topleft"
+ name="hint_item2"
+ top_pad="10"
+ width="300">
+ - Click and drag the tabs to set the transition times.
+ </text>
+ <text
+ follows="left|top|right"
+ height="10"
+ layout="topleft"
+ name="hint_item3"
+ top_pad="10"
+ width="300">
+ - Use the scrubber to preview your day cycle.
+ </text>
+ <panel
+ follows="top|left"
+ height="100"
+ name="day_cycle_slider_panel"
+ layout="topleft"
+ left_delta="25"
+ top_pad="15"
+ width="660">
+ <multi_slider
+ can_edit_text="true"
+ control_name="WLTimeSlider"
+ decimal_digits="0"
+ draw_track="false"
+ follows="bottom"
+ height="10"
+ increment="0.0833333"
+ initial_value="0"
+ layout="topleft"
+ left="20"
+ max_sliders="20"
+ max_val="24"
+ name="WLTimeSlider"
+ show_text="false"
+ top_pad="0"
+ use_triangle="true"
+ width="525" />
+ <multi_slider
+ can_edit_text="true"
+ control_name="WLDayCycleKeys"
+ decimal_digits="0"
+ follows="bottom"
+ height="10"
+ increment="0.0833333"
+ initial_value="0"
+ layout="topleft"
+ left_delta="0"
+ max_sliders="20"
+ max_val="24"
+ name="WLDayCycleKeys"
+ show_text="false"
+ top_pad="15"
+ width="525" />
+ <button
+ height="20"
+ label="Add Key"
+ label_selected="Add Key"
+ layout="topleft"
+ left_pad="20"
+ name="WLAddKey"
+ top_delta="-18"
+ width="96" />
+ <button
+ height="20"
+ label="Delete Key"
+ label_selected="Delete Key"
+ layout="topleft"
+ name="WLDeleteKey"
+ top_pad="5"
+ width="96" />
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left="8"
+ name="WL12am"
+ top="74"
+ width="55">
+ 12am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL3am"
+ top_delta="0"
+ width="55">
+ 3am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL6am"
+ top_delta="0"
+ width="55">
+ 6am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL9amHash"
+ top_delta="0"
+ width="55">
+ 9am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL12pmHash"
+ top_delta="0"
+ width="55">
+ 12pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL3pm"
+ top_delta="0"
+ width="55">
+ 3pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL6pm"
+ top_delta="0"
+ width="55">
+ 6pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL9pm"
+ top_delta="0"
+ width="55">
+ 9pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="WL12am2"
+ top_delta="0"
+ width="55">
+ 12am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left="20"
+ name="WL12amHash"
+ top="54"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="11"
+ layout="topleft"
+ left_pad="59"
+ name="WL3amHash"
+ top_delta="3"
+ width="6">
+ I
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="59"
+ name="WL6amHash"
+ top_delta="-3"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="11"
+ layout="topleft"
+ left_pad="59"
+ name="WL9amHash2"
+ top_delta="3"
+ width="6">
+ I
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="59"
+ name="WL12pmHash2"
+ top_delta="-3"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="11"
+ layout="topleft"
+ left_pad="59"
+ name="WL3pmHash"
+ top_delta="3"
+ width="6">
+ I
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="59"
+ name="WL6pmHash"
+ top_delta="-3"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="11"
+ layout="topleft"
+ left_pad="59"
+ name="WL9pmHash"
+ top_delta="3"
+ width="6">
+ I
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="59"
+ name="WL12amHash2"
+ top_delta="-3"
+ width="6">
+ |
+ </text>
+ </panel>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="192"
+ name="WLCurKeyPresetText"
+ top_pad="10"
+ width="80">
+ Sky Setting:
+ </text>
+ <combo_box
+ height="18"
+ label="Preset"
+ layout="topleft"
+ left_pad="5"
+ name="WLSkyPresets"
+ width="205" />
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-40"
+ name="WLCurKeyTimeText"
+ top_pad="15"
+ width="35">
+ Time:
+ </text>
+ <time
+ follows="left|top"
+ height="16"
+ label_width="0"
+ layout="topleft"
+ left_pad="3"
+ name="time"
+ top_delta="-1"
+ value="6:00 AM"
+ width="75"/>
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="0"
+ layout="topleft"
+ left="10"
+ name="horiz_separator"
+ top_pad="20"
+ width="685"/>
+ <loading_indicator
+ height="23"
+ layout="topleft"
+ left="25"
+ name="progress_indicator"
+ top="350"
+ visible="false"
+ width="23" />
+ <check_box
+ follows="top|left"
+ height="10"
+ label="Make this my new day cycle"
+ layout="topleft"
+ left="310"
+ name="make_default_cb"
+ top_delta="13"
+ width="230"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Save"
+ layout="topleft"
+ left_pad="0"
+ name="save"
+ top_delta="-13"
+ width="70"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="15"
+ name="cancel"
+ top_delta="0"
+ width="70"/>
+ </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_edit_sky_preset.xml b/indra/newview/skins/default/xui/en/floater_edit_sky_preset.xml
new file mode 100644
index 0000000000..56233d91ee
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_edit_sky_preset.xml
@@ -0,0 +1,953 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="375"
+ layout="topleft"
+ name="Edit Sky Preset"
+ help_topic="sky_preset"
+ save_rect="true"
+ title="Edit Sky Preset"
+ width="840">
+
+ <string name="title_new">Create a New Sky Preset</string>
+ <string name="title_edit">Edit Sky Preset</string>
+ <string name="hint_new">Name your preset, adjust the controls to create it, and click "Save".</string>
+ <string name="hint_edit">To edit your sky preset, adjust the controls and click "Save".</string>
+ <string name="combo_label">-Select a preset-</string>
+
+ <text
+ follows="top|left|right"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="hint"
+ top="25"
+ width="700">
+ To edit your preset, adjust the controls then click "Save"
+ </text>
+ <text
+ follows="top|left|right"
+ font="SansSerif"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="label"
+ top_pad="25"
+ width="120">
+ Preset Name:
+ </text>
+ <combo_box
+ allow_text_entry="true"
+ follows="top|left"
+ layout="topleft"
+ left_pad="10"
+ max_chars="100"
+ name="sky_preset_combo"
+ top_delta="-5"
+ width="200"/>
+ <line_editor
+ height="20"
+ left_delta="0"
+ name="sky_preset_name"
+ top_delta="0"
+ width="200" />
+ <text
+ follows="top|left|right"
+ height="40"
+ layout="topleft"
+ left_pad="10"
+ name="note"
+ top_delta="0"
+ width="405"
+ wrap="true">
+ Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
+ </text>
+ <!--======== Controls panel ========-->
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="203"
+ layout="topleft"
+ left="25"
+ name="panel_water_preset"
+ top="122"
+ visible="true"
+ width="790"/>
+ <tab_container
+ follows="left|top"
+ height="225"
+ halign="center"
+ layout="topleft"
+ left="22"
+ name="WindLight Tabs"
+ tab_position="top"
+ top="101"
+ width="794">
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right|bottom"
+ height="196"
+ label="ATMOSPHERE"
+ layout="topleft"
+ left="1"
+ help_topic="sky_preset_atmosphere"
+ mouse_opaque="false"
+ name="Atmosphere"
+ top="60"
+ width="698">
+
+ <!--======== Tab Panel I. I conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left="40"
+ name="BHText"
+ top="25"
+ width="200">
+ Blue Horizon
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="0"
+ name="WLBlueHorizon"
+ top_pad="6"
+ width="60" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="0"
+ top_pad="20"
+ name="BDensText"
+ width="200">
+ Haze Horizon
+ </text>
+ <slider
+ control_name="WLHazeHorizon"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.25"
+ layout="topleft"
+ left_delta="0"
+ top_pad="6"
+ name="WLHazeHorizon"
+ width="200" />
+
+ <!--======== Tab Panel I. II conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="55"
+ name="BDensText2"
+ top="25"
+ width="200">
+ Blue Density
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="0"
+ name="WLBlueDensity"
+ top_pad="6"
+ width="60" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="0"
+ name="HDText"
+ top_pad="20"
+ width="200">
+ Haze Density
+ </text>
+ <slider
+ control_name="WLHazeDensity"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.7"
+ layout="topleft"
+ left_delta="0"
+ max_val="4"
+ name="WLHazeDensity"
+ top_pad="6"
+ width="200" />
+
+ <!--======== Tab Panel I. III conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="55"
+ name="DensMultText"
+ top="25"
+ width="200">
+ Density Multiplier
+ </text>
+ <slider
+ control_name="WLDensityMult"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.1"
+ layout="topleft"
+ left_delta="15"
+ max_val="0.9"
+ name="WLDensityMult"
+ top_pad="6"
+ width="200" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="WLDistanceMultText"
+ top_pad="20"
+ width="200">
+ Distance Multiplier
+ </text>
+ <slider
+ control_name="WLDistancMult"
+ decimal_digits="1"
+ follows="left|top"
+ height="10"
+ initial_value="1.0"
+ layout="topleft"
+ left_delta="15"
+ max_val="100"
+ name="WLDistanceMult"
+ top_pad="6"
+ width="200" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="MaxAltText"
+ top_pad="20"
+ width="200">
+ Max Altitude
+ </text>
+ <slider
+ control_name="WLMaxAltitude"
+ decimal_digits="0"
+ follows="left|top"
+ height="10"
+ increment="1"
+ initial_value="500"
+ layout="topleft"
+ left_delta="15"
+ max_val="4000"
+ name="WLMaxAltitude"
+ top_pad="6"
+ width="200" />
+ </panel>
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right|bottom"
+ height="196"
+ label="LIGHTING"
+ layout="topleft"
+ left_delta="0"
+ help_topic="sky_preset_lighting"
+ name="Lighting"
+ top_delta="4"
+ width="698">
+
+ <!--======== Tab Panel II. I conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="SLCText"
+ top="25"
+ width="150">
+ Sun/Moon Color
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="10"
+ name="WLSunlight"
+ top_pad="6"
+ width="60" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-10"
+ name="WLAmbientText"
+ top_pad="20"
+ width="150">
+ Ambient
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="10"
+ name="WLAmbient"
+ top_pad="6"
+ width="60" />
+
+ <!--======== Tab Panel II. II conlumn of controls ========-->
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="100"
+ name="SunGlowText"
+ top="25"
+ width="200">
+ Sun Glow
+ </text>
+ <slider
+ control_name="WLGlowB"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.1"
+ label="Focus "
+ layout="topleft"
+ left_delta="10"
+ max_val="0.5"
+ name="WLGlowB"
+ top_pad="6"
+ width="200" />
+ <slider
+ control_name="WLGlowR"
+ decimal_digits="2"
+ follows="top|left"
+ height="10"
+ increment="0.01"
+ initial_value="0.25"
+ label="Size "
+ layout="topleft"
+ left_delta="0"
+ max_val="1.99"
+ min_val="1"
+ name="WLGlowR"
+ top_pad="6"
+ width="200" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-10"
+ name="WLStarText"
+ top_pad="20"
+ width="200">
+ Star Brightness
+ </text>
+ <slider
+ control_name="WLStarAlpha"
+ decimal_digits="2"
+ follows="top|left"
+ height="10"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="10"
+ max_val="2"
+ name="WLStarAlpha"
+ top_pad="6"
+ width="200" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-10"
+ name="SceneGammaText"
+ top_pad="20"
+ width="200">
+ Scene Gamma
+ </text>
+ <slider
+ control_name="WLGamma"
+ decimal_digits="2"
+ follows="top|left"
+ height="10"
+ increment="0.01"
+ initial_value="2.0"
+ layout="topleft"
+ left_delta="10"
+ max_val="10"
+ name="WLGamma"
+ top_pad="6"
+ width="200" />
+
+ <!--======== Tab Panel II. III conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="60"
+ name="TODText"
+ top="25"
+ width="200">
+ Sun/Moon Position
+ </text>
+ <multi_slider
+ can_edit_text="true"
+ control_name="WLSunPos"
+ decimal_digits="0"
+ follows="bottom"
+ height="10"
+ increment="0.0833333"
+ initial_value="0"
+ layout="topleft"
+ left_delta="0"
+ max_sliders="1"
+ max_val="24"
+ name="WLSunPos"
+ show_text="false"
+ top_pad="0"
+ width="300" />
+
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_delta="2"
+ name="WL12amHash"
+ top_pad="6"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="66"
+ name="WL6amHash"
+ top_delta="0"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="67"
+ name="WL12pmHash2"
+ top_delta="0"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="67"
+ name="WL6pmHash"
+ top_delta="0"
+ width="6">
+ |
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ font="SansSerif"
+ height="14"
+ layout="topleft"
+ left_pad="67"
+ name="WL12amHash2"
+ top_delta="0"
+ width="6">
+ |
+ </text>
+
+
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_delta="-300"
+ name="WL12am"
+ top="74"
+ width="55">
+ 12am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="20"
+ name="WL6am"
+ top_delta="0"
+ width="55">
+ 6am
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="15"
+ name="WL12pmHash"
+ top_delta="0"
+ width="55">
+ 12pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="18"
+ name="WL6pm"
+ top_delta="0"
+ width="55">
+ 6pm
+ </text>
+ <text
+ type="string"
+ length="1"
+ border_visible="true"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="15"
+ name="WL12am2"
+ top_delta="0"
+ width="55">
+ 12am
+ </text>
+
+ <time
+ follows="left|top"
+ height="16"
+ label_width="0"
+ layout="topleft"
+ left_delta="-175"
+ name="WLDayTime"
+ top_pad="15"
+ value="6:00 AM"
+ width="75"/>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-106"
+ name="WLEastAngleText"
+ top_pad="24"
+ width="200">
+ East Angle
+ </text>
+ <slider
+ control_name="WLEastAngle"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.0"
+ layout="topleft"
+ left_delta="10"
+ name="WLEastAngle"
+ top_pad="6"
+ width="200" />
+
+ </panel>
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right|bottom"
+ height="196"
+ label="CLOUDS"
+ layout="topleft"
+ left_delta="0"
+ mouse_opaque="false"
+ help_topic="sky_preset_clouds"
+ name="Clouds"
+ top_delta="4"
+ width="698">
+
+ <!--======== Tab Panel III. I conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left="40"
+ name="WLCloudColorText"
+ top="25"
+ width="200">
+ Cloud Color
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="0"
+ name="WLCloudColor"
+ top_pad="6"
+ width="60" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="0"
+ name="WLCloudColorText2"
+ top_pad="20"
+ width="200">
+ Cloud XY/Density
+ </text>
+ <slider
+ control_name="WLCloudX"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ label="X"
+ layout="topleft"
+ left_delta="0"
+ top_pad="6"
+ name="WLCloudX"
+ width="200" />
+ <slider
+ control_name="WLCloudY"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ label="Y"
+ layout="topleft"
+ left_delta="0"
+ top_pad="6"
+ name="WLCloudY"
+ width="200" />
+ <slider
+ control_name="WLCloudDensity"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="1.0"
+ label="D"
+ layout="topleft"
+ left_delta="0"
+ name="WLCloudDensity"
+ top_pad="6"
+ width="200" />
+
+ <!--======== Tab Panel III. II conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="55"
+ name="WLCloudCoverageText"
+ top="15"
+ width="200">
+ Cloud Coverage
+ </text>
+ <slider
+ control_name="WLCloudCoverage"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ layout="topleft"
+ left_delta="15"
+ name="WLCloudCoverage"
+ top_pad="6"
+ width="200" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="WLCloudScaleText"
+ top_pad="20"
+ width="200">
+ Cloud Scale
+ </text>
+ <slider
+ control_name="WLCloudScale"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="1.0"
+ layout="topleft"
+ left_delta="15"
+ min_val="0.01"
+ name="WLCloudScale"
+ top_pad="6"
+ width="200" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-13"
+ name="WLCloudDetailText"
+ top_pad="20"
+ width="200">
+ Cloud Detail (XY/Density)
+ </text>
+ <slider
+ control_name="WLCloudDetailX"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ label="X"
+ layout="topleft"
+ left_delta="0"
+ top_pad="6"
+ name="WLCloudDetailX"
+ width="200" />
+ <slider
+ control_name="WLCloudDetailY"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ label="Y"
+ layout="topleft"
+ left_delta="0"
+ name="WLCloudDetailY"
+ top_pad="6"
+ width="200" />
+ <slider
+ control_name="WLCloudDetailDensity"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="1.0"
+ label="D"
+ layout="topleft"
+ left_delta="0"
+ name="WLCloudDetailDensity"
+ top_pad="6"
+ width="200" />
+
+ <!--======== Tab Panel III. III conlumn of controls ========-->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="55"
+ name="WLCloudScrollXText"
+ top="15"
+ width="150">
+ Cloud Scroll X
+ </text>
+ <check_box
+ control_name="WLCloudLockX"
+ follows="left|top"
+ height="16"
+ label="Lock"
+ layout="topleft"
+ left_delta="150"
+ name="WLCloudLockX"
+ top_delta="0"
+ width="200" />
+ <slider
+ control_name="WLCloudScrollX"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ layout="topleft"
+ left_delta="-135"
+ max_val="10"
+ min_val="-10"
+ name="WLCloudScrollX"
+ top_pad="6"
+ width="200" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="WLCloudScrollYText"
+ top_pad="20"
+ width="150">
+ Cloud Scroll Y
+ </text>
+ <check_box
+ control_name="WLCloudLockY"
+ follows="left|top"
+ height="16"
+ label="Lock"
+ layout="topleft"
+ left_delta="150"
+ name="WLCloudLockY"
+ width="200" />
+ <slider
+ control_name="WLCloudScrollY"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.5"
+ layout="topleft"
+ left_delta="-135"
+ max_val="10"
+ min_val="-10"
+ name="WLCloudScrollY"
+ top_pad="6"
+ width="200" />
+ </panel>
+ </tab_container>
+<!--======== End of Controls panel ========-->
+
+ <check_box
+ follows="top|left"
+ height="10"
+ label="Make this preset my new sky setting"
+ layout="topleft"
+ left="380"
+ name="make_default_cb"
+ top_pad="30"
+ width="280"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Save"
+ layout="topleft"
+ left_pad="0"
+ name="save"
+ width="70"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="15"
+ name="cancel"
+ width="70"/>
+ </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_edit_water_preset.xml b/indra/newview/skins/default/xui/en/floater_edit_water_preset.xml
new file mode 100644
index 0000000000..905983e7fa
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_edit_water_preset.xml
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="375"
+ layout="topleft"
+ name="Edit Water Preset"
+ help_topic="water_preset"
+ save_rect="true"
+ title="Edit Water Preset"
+ width="725">
+
+ <string name="title_new">Create a New Water Preset</string>
+ <string name="title_edit">Edit a Water Preset</string>
+ <string name="hint_new">Name your preset, adjust the controls to create it, and click "Save".</string>
+ <string name="hint_edit">To edit your water preset, adjust the controls and click "Save".</string>
+ <string name="combo_label">-Select a preset-</string>
+
+ <text
+ follows="top|left|right"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="hint"
+ top="25"
+ width="680">
+ To edit your preset, adjust the controls then click "Save"
+ </text>
+
+ <text
+ follows="top|left|right"
+ font="SansSerif"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="label"
+ top_pad="25"
+ width="120">
+ Preset Name:
+ </text>
+
+ <combo_box
+ allow_text_entry="true"
+ follows="top|left"
+ layout="topleft"
+ left_pad="10"
+ max_chars="100"
+ name="water_preset_combo"
+ top_delta="-5"
+ width="200"/>
+
+ <line_editor
+ height="20"
+ left_delta="0"
+ name="water_preset_name"
+ top_delta="0"
+ width="200" />
+
+ <text
+ follows="top|left|right"
+ height="40"
+ layout="topleft"
+ left_pad="10"
+ name="note"
+ top_delta="0"
+ width="340"
+ wrap="true">
+ Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
+ </text>
+
+ <!--======== Controls panel ========-->
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="top|left"
+ height="230"
+ layout="topleft"
+ left="10"
+ name="panel_water_preset"
+ top="100"
+ width="700">
+
+<!--======== I conlumn of controls ========-->
+ <text
+ follows="left|top|right"
+ height="10"
+ font="SansSerif"
+ layout="topleft"
+ left="10"
+ name="water_color_label"
+ top="5"
+ width="215">
+ Water Fog Color
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ follows="left|top"
+ height="37"
+ label_height="0"
+ layout="topleft"
+ left_delta="15"
+ name="WaterFogColor"
+ top_pad="8"
+ width="60" />
+
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ top_pad="10"
+ name="water_fog_density_label"
+ width="215">
+ Fog Density Exponent
+ </text>
+ <slider
+ decimal_digits="1"
+ follows="left|top"
+ height="10"
+ initial_value="0"
+ layout="topleft"
+ left_delta="15"
+ max_val="10"
+ name="WaterFogDensity"
+ top_pad="10"
+ width="200"/>
+
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ top_pad="15"
+ name="underwater_fog_modifier_label"
+ width="215">
+ Underwater Fog Modifier
+ </text>
+ <slider
+ decimal_digits="1"
+ follows="left|top"
+ height="10"
+ initial_value="0"
+ layout="topleft"
+ left_delta="15"
+ max_val="10"
+ name="WaterUnderWaterFogMod"
+ top_pad="10"
+ width="200"/>
+
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ name="BHText"
+ top_pad="15"
+ width="215">
+ Big Wave Direction
+ </text>
+ <slider
+ control_name="WaterWave1DirX"
+ decimal_digits="2"
+ follows="left|top"
+ increment="0.01"
+ initial_value="0.7"
+ label="X"
+ layout="topleft"
+ max_val="4"
+ min_val="-4"
+ name="WaterWave1DirX"
+ top_pad="10"
+ width="216"/>
+ <slider
+ control_name="WaterWave1DirY"
+ decimal_digits="2"
+ follows="left|top"
+ increment="0.01"
+ initial_value="0.7"
+ label="Y"
+ layout="topleft"
+ max_val="4"
+ min_val="-4"
+ name="WaterWave1DirY"
+ top_pad="5"
+ width="216"/>
+
+<!--======== II conlumn of controls ========-->
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ height="10"
+ layout="topleft"
+ left_pad="20"
+ name="BDensText"
+ top="5"
+ width="215">
+ Reflection Wavelet Scale
+ </text>
+ <slider
+ control_name="WaterNormalScaleX"
+ decimal_digits="1"
+ follows="left|top"
+ initial_value="0.7"
+ layout="topleft"
+ left_delta="15"
+ max_val="10"
+ name="WaterNormalScaleX"
+ top_pad="10"
+ width="200"/>
+ <slider
+ control_name="WaterNormalScaleY"
+ decimal_digits="1"
+ follows="left|top"
+ initial_value="0.7"
+ layout="topleft"
+ max_val="10"
+ name="WaterNormalScaleY"
+ top_pad="6"
+ width="200"/>
+ <slider
+ control_name="WaterNormalScaleZ"
+ decimal_digits="1"
+ follows="left|top"
+ initial_value="0.7"
+ layout="topleft"
+ max_val="10"
+ name="WaterNormalScaleZ"
+ top_pad="6"
+ width="200"/>
+
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ name="HDText"
+ top_pad="16"
+ width="215">
+ Fresnel Scale
+ </text>
+ <slider
+ control_name="WaterFresnelScale"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0.7"
+ layout="topleft"
+ left_delta="15"
+ name="WaterFresnelScale"
+ top_pad="10"
+ width="200"/>
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ name="FresnelOffsetText"
+ top_pad="15"
+ width="215">
+ Fresnel Offset
+ </text>
+ <slider
+ control_name="WaterFresnelOffset"
+ decimal_digits="2"
+ follows="left"
+ increment="0.01"
+ initial_value="0.7"
+ layout="topleft"
+ left_delta="15"
+ name="WaterFresnelOffset"
+ top_pad="10"
+ width="200"/>
+
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ layout="topleft"
+ left_delta="-15"
+ name="BHText2"
+ top_pad="15"
+ width="215">
+ Little Wave Direction
+ </text>
+ <slider
+ control_name="WaterWave2DirX"
+ decimal_digits="2"
+ follows="left|top"
+ increment="0.01"
+ initial_value="0.7"
+ label="X"
+ layout="topleft"
+ max_val="4"
+ min_val="-4"
+ name="WaterWave2DirX"
+ top_pad="10"
+ width="216" />
+ <slider
+ control_name="WaterWave2DirY"
+ decimal_digits="2"
+ follows="left|top"
+ increment="0.01"
+ initial_value="0.7"
+ label="Y"
+ layout="topleft"
+ max_val="4"
+ min_val="-4"
+ name="WaterWave2DirY"
+ top_pad="6"
+ width="216" />
+
+<!--======== III conlumn of contorls ========-->
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_pad="20"
+ name="DensMultText"
+ top="5"
+ width="215">
+ Refract Scale Above
+ </text>
+ <slider
+ control_name="WaterScaleAbove"
+ decimal_digits="2"
+ follows="left|top"
+ increment="0.01"
+ initial_value="0.1"
+ layout="topleft"
+ left_delta="15"
+ name="WaterScaleAbove"
+ top_pad="5"
+ width="200" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="WaterScaleBelowText"
+ top_pad="15"
+ width="215">
+ Refract Scale Below
+ </text>
+ <slider
+ control_name="WaterScaleBelow"
+ decimal_digits="2"
+ follows="left|top"
+ height="10"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="15"
+ name="WaterScaleBelow"
+ top_pad="5"
+ width="200"/>
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="MaxAltText"
+ top_pad="15"
+ width="215">
+ Blur Multiplier
+ </text>
+ <slider
+ control_name="WaterBlurMult"
+ follows="left|top"
+ height="10"
+ increment="0.001"
+ initial_value="0"
+ layout="topleft"
+ left_delta="15"
+ max_val="0.16"
+ name="WaterBlurMult"
+ top_pad="5"
+ width="200"/>
+
+ <text
+ follows="left|top|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left_delta="-15"
+ name="BHText3"
+ top_pad="15"
+ width="215">
+ Normal Map
+ </text>
+ <texture_picker
+ height="80"
+ layout="topleft"
+ left_delta="15"
+ name="WaterNormalMap"
+ top_pad="5"
+ width="100" />
+ </panel>
+<!--======== End of Controls panel ========-->
+
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="0"
+ layout="topleft"
+ left="10"
+ name="horiz_separator"
+ top_pad="5"
+ width="700"/>
+ <check_box
+ follows="top|left"
+ height="10"
+ label="Make this preset my new water setting"
+ layout="topleft"
+ left="275"
+ name="make_default_cb"
+ top_pad="20"
+ width="280"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Save"
+ layout="topleft"
+ left_pad="0"
+ name="save"
+ width="70"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="15"
+ name="cancel"
+ width="70"/>
+
+ </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_env_settings.xml b/indra/newview/skins/default/xui/en/floater_env_settings.xml
deleted file mode 100644
index 8df5e232d9..0000000000
--- a/indra/newview/skins/default/xui/en/floater_env_settings.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="150"
- layout="topleft"
- name="Environment Editor Floater"
- help_topic="environment_editor_floater"
- save_rect="true"
- title="ENVIRONMENT EDITOR"
- width="600">
- <floater.string
- name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="EnvTimeText"
- top="32"
- width="140">
- Time of Day
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left="15"
- name="EnvTimeText2"
- top="62"
- width="140">
- 12:00 PM
- </text>
- <icon
- height="25"
- image_name="icon_diurnal.tga"
- layout="topleft"
- left="85"
- name="EnvDayCycle"
- top="30"
- use_draw_context_alpha="false"
- width="200" />
- <slider
- control_name="EnvTimeSlider"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.0069444"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- max_val="0.99"
- name="EnvTimeSlider"
- show_text="false"
- top_pad="10"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="EnvCloudText"
- top="86"
- width="140">
- Cloud Cover
- </text>
- <slider
- control_name="EnvCloudSlider"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="75"
- name="EnvCloudSlider"
- top_delta="4"
- width="210" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="310"
- name="EnvWaterColorText"
- top="39"
- width="140">
- Water Color
- </text>
- <color_swatch
- can_apply_immediately="true"
- color="0.5 0.5 0.5 1"
- follows="left|top"
- height="50"
- layout="topleft"
- left="390"
- name="EnvWaterColor"
- tool_tip="Click to open color picker"
- top="30"
- width="40" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="310"
- name="EnvWaterFogText"
- top="86"
- width="140">
- Water Fog
- </text>
- <slider
- control_name="EnvWaterFogSlider"
- decimal_digits="2"
- follows="left"
- height="10"
- initial_value="0"
- layout="topleft"
- left_delta="75"
- max_val="10"
- name="EnvWaterFogSlider"
- top_delta="4"
- width="210" />
- <button
- follows="left|top"
- height="23"
- label="Use Estate Time"
- layout="topleft"
- left="10"
- name="EnvUseEstateTimeButton"
- top="120"
- width="137" />
- <button
- follows="left|top"
- height="23"
- label="Advanced Sky"
- layout="topleft"
- left_pad="3"
- name="EnvAdvancedSkyButton"
- top_delta="0"
- width="137" />
- <button
- follows="left|top"
- height="23"
- label="Advanced Water"
- layout="topleft"
- left_pad="3"
- name="EnvAdvancedWaterButton"
- top_delta="0"
- width="137" />
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_environment_settings.xml b/indra/newview/skins/default/xui/en/floater_environment_settings.xml
new file mode 100644
index 0000000000..1b1cafaca6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_environment_settings.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="328"
+ layout="topleft"
+ name="Environment Editor Floater"
+ help_topic="environment_editor_floater"
+ save_rect="true"
+ title="ENVIRONMENT SETTINGS"
+ width="540">
+
+ <text
+ follows="top|left|right"
+ height="15"
+ layout="topleft"
+ left="20"
+ name="note"
+ top="25"
+ width="510"
+ wrap="true">
+ Use the options below to customize the environment settings for your viewer.
+ </text>
+
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="237"
+ layout="topleft"
+ left="20"
+ name="border"
+ top_pad="8"
+ width="500"/>
+ <radio_group
+ follows="top|left"
+ height="45"
+ layout="topleft"
+ left_delta="10"
+ name="region_settings_radio_group"
+ top_delta="20"
+ width="200">
+ <radio_item
+ label="Use region settings"
+ layout="topleft"
+ name="use_region_settings"/>
+ <radio_item
+ label="Customize my environment"
+ layout="topleft"
+ name="use_my_settings"
+ top_pad="20"/>
+ </radio_group>
+
+ <panel
+ height="170"
+ layout="topleft"
+ left="50"
+ name="user_environment_settings"
+ top_pad="0"
+ width="470">
+
+ <text
+ follows="top|left|right"
+ font="SansSerifItalic"
+ height="15"
+ layout="topleft"
+ left_delta="0"
+ name="note"
+ top_pad="0"
+ width="470"
+ wrap="true">
+ Note: your custom settings will not be visible to other users.
+ </text>
+
+ <!-- Water Setting -->
+ <text
+ name="water_settings_title"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="50"
+ top="40"
+ width="200">
+ Water Setting
+ </text>
+ <combo_box
+ follows="top|left"
+ left_pad="2"
+ name="water_settings_preset_combo"
+ top_delta="-5"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+
+
+ <!-- Sky/Day Cycle Settings -->
+ <text
+ name="sky_dayc_settings_title"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="50"
+ top_pad="20"
+ width="100">
+ Sky / Day Cycle
+ </text>
+ <radio_group
+ layout="topleft"
+ left_delta="50"
+ name="sky_dayc_settings_radio_group"
+ top_pad="10"
+ height="50"
+ width="150">
+ <radio_item
+ layout="topleft"
+ label="Fixed sky"
+ name="my_sky_settings"/>
+ <radio_item
+ layout="topleft"
+ label="Day cycle"
+ name="my_dayc_settings"
+ top_pad="25"/>
+ </radio_group>
+ <combo_box
+ follows="top|left"
+ left_pad="2"
+ name="sky_settings_preset_combo"
+ top_delta="-7"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+ <combo_box
+ follows="top|left"
+ name="dayc_settings_preset_combo"
+ top_delta="36"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+ </panel>
+
+ <button
+ follows="left|top"
+ height="23"
+ label="OK"
+ layout="topleft"
+ right="-130"
+ name="ok_btn"
+ top_pad="10"
+ width="100" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="10"
+ name="cancel_btn"
+ width="100" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml
index 02e50ee584..de6d586f72 100644
--- a/indra/newview/skins/default/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml
@@ -2,6 +2,8 @@
<floater
legacy_header_height="18"
can_resize="true"
+ left="10000"
+ bottom="10000"
height="600"
layout="topleft"
min_height="150"
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index 43729d7c9f..5a1f920398 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -5,7 +5,7 @@
height="440"
layout="topleft"
min_height="140"
- min_width="467"
+ min_width="0"
name="floater_about"
help_topic="floater_about"
save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index dce55dae12..f58595b3c5 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -4,9 +4,11 @@
name="Model Preview" title="Upload Model" width="620">
<string name="status_idle">Idle</string>
+ <string name="status_parse_error">Dae parsing issue - see log for details.</string>
<string name="status_reading_file">Loading...</string>
<string name="status_generating_meshes">Generating Meshes...</string>
<string name="status_vertex_number_overflow">Error: Vertex number is more than 65534, aborted!</string>
+ <string name="bad_element">Error: element is invalid</string>
<string name="high">High</string>
<string name="medium">Medium</string>
<string name="low">Low</string>
@@ -83,6 +85,20 @@
</text>
</panel>
+ <check_box
+ height="16"
+ left_delta="0"
+ name="confirm_checkbox"
+ top_pad="15"
+ follows="bottom|left"
+ width="16" />
+
+ <text
+ height="30"
+ width="570"
+ word_wrap="true"
+ left_delta="25"
+ top_delta="0">I confirm that I have the appropriate rights to the material contained in this model. [secondlife:///app/floater/learn_more Learn more]</text>
<text left="10" bottom="540" width="290" height="15" follows="bottom|left|right" name="status">[STATUS]</text>
diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
index 47b2e5fd79..8603682e3a 100644
--- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
@@ -1019,9 +1019,11 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se
<spinner visible="false" left="10" height="20" follows="top|left" width="80" top_pad="-50" value="1.0" min_val="0.01" max_val="64.0" name="import_scale"/>
<string name="status_idle">Idle</string>
+ <string name="status_parse_error">Dae parsing issue - see log for details.</string>
<string name="status_reading_file">Loading...</string>
<string name="status_generating_meshes">Generating Meshes...</string>
- <string name="status_vertex_number_overflow">Error: Vertex number is more than 65534, aborted!</string>
+ <string name="status_vertex_number_overflow">Error: Vertex number is more than 65534, aborted!</string>
+ <string name="bad_element">Error: element is invalid</string>
<string name="high">High</string>
<string name="medium">Medium</string>
<string name="low">Low</string>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 9f6199fada..478ae5f53f 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -50,17 +50,17 @@
name="desc_label"
top_pad="25"
font.style="BOLD"
- width="100">
+ width="105">
Description:
</text>
<line_editor
follows="left|top"
height="20"
layout="topleft"
- left_delta="89"
+ left_delta="94"
name="desc"
top_delta="-4"
- width="175" />
+ width="170" />
<text
type="string"
length="1"
@@ -96,19 +96,19 @@
name="replace_text"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture!"
top_pad="10"
- width="210">
+ width="215">
Replace with:
</text>
<line_editor
follows="left|top"
height="20"
layout="topleft"
- left_delta="99"
+ left_delta="104"
max_length_bytes="31"
name="replace_editor"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture"
top_delta="-4"
- width="165" />
+ width="160" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml
index 32fb6f97e7..3b58cd08f6 100644
--- a/indra/newview/skins/default/xui/en/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_info.xml
@@ -16,5 +16,5 @@
name="region_panels"
right="-1"
tab_position="top"
- top="20" />
+ top="20"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index ec190ab656..89a0c4c287 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -330,13 +330,13 @@
increment="1"
initial_value="75"
label="Image quality"
- label_width="100"
+ label_width="124"
layout="topleft"
left_delta="0"
max_val="100"
name="image_quality_slider"
top_pad="5"
- width="205" />
+ width="228" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 40bf7bfed7..8b8f70b940 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -279,7 +279,7 @@
layout="topleft"
left_pad="2"
name="unlink_btn"
- width="50">
+ width="105">
<button.commit_callback
function="BuildTool.UnlinkObjects"/>
</button>
@@ -2098,11 +2098,7 @@ even though the user gets a free copy.
label="Cylinder"
name="Cylinder"
value="Cylinder" />
- <combo_box.item
- label="Mesh"
- name="Mesh"
- value="Mesh" />
- </combo_box>
+ </combo_box>
</panel>
<panel
border="false"
@@ -2461,8 +2457,9 @@ even though the user gets a free copy.
height="19"
increment="0.1"
initial_value="0"
- label="Density"
+ label="Density in 100 kg/m^3"
label_width="70"
+ label_wrap="true"
layout="topleft"
left_delta="0"
max_val="22587"
@@ -2483,7 +2480,7 @@ even though the user gets a free copy.
max_val="1"
min_val="0"
name="Physics Restitution"
- top_pad="4"
+ top_pad="8"
width="132" />
</panel>
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml
deleted file mode 100644
index 3a44ba3763..0000000000
--- a/indra/newview/skins/default/xui/en/floater_water.xml
+++ /dev/null
@@ -1,503 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="240"
- layout="topleft"
- name="Water Floater"
- help_topic="water_floater"
- save_rect="true"
- title="ADVANCED WATER EDITOR"
- width="700">
- <floater.string
- name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </floater.string>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left="10"
- name="KeyFramePresetsText"
- top="34"
- font="SansSerif"
- width="85">
- Water Presets:
- </text>
- <combo_box
- height="23"
- layout="topleft"
- left_delta="95"
- name="WaterPresetsCombo"
- top_delta="-4"
- width="150" />
- <button
- height="23"
- label="New"
- label_selected="New"
- layout="topleft"
- left_pad="3"
- name="WaterNewPreset"
- top_delta="0"
- width="70" />
- <button
- height="23"
- label="Save"
- label_selected="Save"
- layout="topleft"
- left_pad="3"
- name="WaterSavePreset"
- top_delta="0"
- width="70" />
- <button
- height="23"
- label="Delete"
- label_selected="Delete"
- layout="topleft"
- left_pad="3"
- name="WaterDeletePreset"
- top_delta="0"
- width="70" />
- <tab_container
- border="false"
- follows="left|top"
- height="180"
- halign="center"
- layout="topleft"
- left="0"
- name="Water Tabs"
- tab_position="top"
- top="60"
- width="700">
- <panel
- border="true"
- follows="all"
- height="180"
- label="SETTINGS"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- help_topic="water_settings_tab"
- name="Settings"
- top="0"
- width="698">
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="BHText"
- top="4"
- width="200">
- Water Fog Color
- </text>
- <color_swatch
- can_apply_immediately="true"
- color="0.5 0.5 0.5 1"
- follows="left|top"
- height="50"
- layout="topleft"
- left="40"
- name="WaterFogColor"
- tool_tip="Click to open color picker"
- top="30"
- width="40" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="WaterFogDensText"
- top="84"
- width="200">
- Fog Density Exponent
- </text>
- <slider
- control_name="WaterFogDensity"
- decimal_digits="1"
- follows="left"
- height="10"
- initial_value="16"
- layout="topleft"
- left="24"
- max_val="10"
- name="WaterFogDensity"
- top="124"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-14"
- name="WaterUnderWaterFogModText"
- top="124"
- width="200">
- Underwater Fog Modifier
- </text>
- <slider
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="16"
- layout="topleft"
- left="24"
- max_val="2"
- name="WaterUnderWaterFogMod"
- top="164"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="245"
- name="BDensText"
- top="4"
- width="200">
- Reflection Wavelet Scale
- </text>
- <slider
- control_name="WaterNormalScaleX"
- decimal_digits="1"
- follows="left"
- height="15"
- initial_value="0.7"
- label="1"
- layout="topleft"
- max_val="10"
- name="WaterNormalScaleX"
- top_pad="24"
- width="200" />
- <slider
- control_name="WaterNormalScaleY"
- decimal_digits="1"
- follows="left"
- height="15"
- initial_value="0.7"
- label="2"
- layout="topleft"
- max_val="10"
- name="WaterNormalScaleY"
- top_pad="4"
- width="200" />
- <slider
- control_name="WaterNormalScaleZ"
- decimal_digits="1"
- follows="left"
- height="15"
- initial_value="0.7"
- label="3"
- layout="topleft"
- max_val="10"
- name="WaterNormalScaleZ"
- top_pad="4"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- name="HDText"
- top="84"
- width="200">
- Fresnel Scale
- </text>
- <slider
- control_name="WaterFresnelScale"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- name="WaterFresnelScale"
- top="124"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- name="FresnelOffsetText"
- top="124"
- width="200">
- Fresnel Offset
- </text>
- <slider
- control_name="WaterFresnelOffset"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- name="WaterFresnelOffset"
- top="164"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="480"
- name="DensMultText"
- top="4"
- width="200">
- Refract Scale Above
- </text>
- <slider
- control_name="WaterScaleAbove"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.1"
- layout="topleft"
- left="494"
- name="WaterScaleAbove"
- top="44"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-14"
- name="WaterScaleBelowText"
- top="44"
- width="200">
- Refract Scale Below
- </text>
- <slider
- control_name="WaterScaleBelow"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- left="494"
- name="WaterScaleBelow"
- top="84"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-14"
- name="MaxAltText"
- top="84"
- width="200">
- Blur Multiplier
- </text>
- <slider
- control_name="WaterBlurMult"
- follows="left"
- height="10"
- increment="0.001"
- initial_value="0"
- layout="topleft"
- left="494"
- max_val="0.16"
- name="WaterBlurMult"
- top="124"
- width="200" />
- </panel>
- <panel
- border="true"
- follows="all"
- height="180"
- label="IMAGE"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- help_topic="water_waves_tab"
- name="Waves"
- top="0"
- width="698">
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="BHText"
- top="4"
- width="200">
- Big Wave Direction
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="10"
- name="WaterWave1DirXText"
- top_pad="5"
- width="10">
- X
- </text>
- <slider
- control_name="WaterWave1DirX"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left="24"
- max_val="4"
- min_val="-4"
- name="WaterWave1DirX"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WaterWave1DirYText"
- top_pad="-15"
- width="10">
- Y
- </text>
- <slider
- control_name="WaterWave1DirY"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- max_val="4"
- min_val="-4"
- name="WaterWave1DirY"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText2"
- top_pad="-10"
- width="355">
- Little Wave Direction
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="10"
- left_delta="0"
- name="WaterWave2DirXText"
- top_pad="5"
- width="10">
- X
- </text>
- <slider
- control_name="WaterWave2DirX"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left="24"
- max_val="4"
- min_val="-4"
- name="WaterWave2DirX"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WaterWave2DirYText"
- top_pad="-15"
- width="10">
- Y
- </text>
- <slider
- control_name="WaterWave2DirY"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- max_val="4"
- min_val="-4"
- name="WaterWave2DirY"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="240"
- name="BHText3"
- top="4"
- width="200">
- Normal Map
- </text>
- <texture_picker
- height="143"
- layout="topleft"
- left="250"
- name="WaterNormalMap"
- top="22"
- width="128" />
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index e04a72cbc0..69e6057556 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -18,6 +18,7 @@
follows="left|right|top|bottom"
layout="topleft"
left="5"
+ animate="false"
name="stack1"
orientation="vertical"
top="20"
@@ -156,14 +157,20 @@
name="external_controls"
top_delta="0"
user_resize="false"
+ auto_resize="true"
width="585">
<web_browser
- bottom="-22"
+ bottom="-2"
follows="all"
layout="topleft"
left="0"
name="webbrowser"
top="0"/>
+ </layout_panel>
+ <layout_panel name="status_bar"
+ height="23"
+ auto_resize="false"
+ user_resize="false">
<text
type="string"
length="200"
@@ -174,7 +181,7 @@
name="statusbartext"
parse_urls="false"
text_color="0.4 0.4 0.4 1"
- top_pad="5"
+ top_pad="3"
width="495"/>
<progress_bar
color_bar="0.3 1.0 0.3 1"
diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
deleted file mode 100644
index 7923dd87fa..0000000000
--- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml
+++ /dev/null
@@ -1,1288 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="256"
- layout="topleft"
- name="WindLight floater"
- help_topic="windlight_floater"
- save_rect="true"
- title="ADVANCED SKY EDITOR"
- width="700">
- <floater.string
- name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </floater.string>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="KeyFramePresetsText"
- top="34"
- width="135">
- Sky Presets:
- </text>
- <combo_box
- height="23"
- layout="topleft"
- left_delta="135"
- name="WLPresetsCombo"
- top_delta="-4"
- width="150" />
- <button
- height="23"
- label="New"
- label_selected="New"
- layout="topleft"
- left_pad="3"
- name="WLNewPreset"
- width="70" />
- <button
- height="23"
- label="Save"
- label_selected="Save"
- layout="topleft"
- left_pad="3"
- name="WLSavePreset"
- width="70" />
- <button
- height="23"
- label="Delete"
- label_selected="Delete"
- layout="topleft"
- left_pad="3"
- name="WLDeletePreset"
- width="70" />
- <button
- height="23"
- label="Day Cycle Editor"
- label_selected="Day Cycle Editor"
- layout="topleft"
- right="-10"
- name="WLDayCycleMenuButton"
- top_pad="-23"
- width="120" />
- <tab_container
- follows="left|top"
- height="196"
- halign="center"
- layout="topleft"
- left="0"
- name="WindLight Tabs"
- tab_position="top"
- top="60"
- width="700">
- <panel
- border="true"
- follows="left|top|right|bottom"
- height="196"
- label="ATMOSPHERE"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- help_topic="windlight_atmosphere_tab"
- name="Atmosphere"
- top="60"
- width="698">
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="BHText"
- top="4"
- width="355">
- Blue Horizon
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="10"
- name="BHText2"
- top_pad="5"
- width="10">
- R
- </text>
- <slider
- control_name="WLBlueHorizonR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLBlueHorizonR"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="10"
- top_pad="-15"
- name="BHText3"
- width="10">
- G
- </text>
- <slider
- control_name="WLBlueHorizonG"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLBlueHorizonG"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- name="BHText4"
- left="10"
- top_pad="-15"
- width="10">
- B
- </text>
- <slider
- control_name="WLBlueHorizonB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- name="WLBlueHorizonB"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- name="BHText5"
- left="10"
- top_pad="-15"
- width="10">
- I
- </text>
- <slider
- control_name="WLBlueHorizonI"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- name="WLBlueHorizonI"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- top_pad="-10"
- name="BDensText"
- width="355">
- Haze Horizon
- </text>
- <slider
- control_name="WLHazeHorizon"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.25"
- layout="topleft"
- left="23"
- top_delta="0"
- top_pad="27"
- name="WLHazeHorizon"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="245"
- name="BDensText2"
- top="4"
- width="355">
- Blue Density
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="245"
- name="BHText6"
- top_pad="5"
- width="10">
- R
- </text>
- <slider
- control_name="WLBlueDensityR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLBlueDensityR"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="245"
- name="BHText7"
- top_pad="-15"
- width="10">
- G
- </text>
- <slider
- control_name="WLBlueDensityG"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLBlueDensityG"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="245"
- name="BHText8"
- top_pad="-15"
- width="10">
- B
- </text>
- <slider
- control_name="WLBlueDensityB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLBlueDensityB"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left="245"
- name="BHText9"
- top_pad="-15"
- width="10">
- I
- </text>
- <slider
- control_name="WLBlueDensityI"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1"
- layout="topleft"
- left_delta="0"
- name="WLBlueDensityI"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="245"
- name="HDText"
- top_pad="-10"
- width="355">
- Haze Density
- </text>
- <slider
- control_name="WLHazeDensity"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left="258"
- max_val="4"
- name="WLHazeDensity"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="480"
- name="DensMultText"
- top="4"
- width="355">
- Density Multiplier
- </text>
- <slider
- control_name="WLDensityMult"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.1"
- layout="topleft"
- left_delta="13"
- max_val="0.9"
- name="WLDensityMult"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WLDistanceMultText"
- top_pad="-10"
- width="355">
- Distance Multiplier
- </text>
- <slider
- control_name="WLDistancMult"
- decimal_digits="1"
- follows="left"
- height="10"
- initial_value="1.0"
- layout="topleft"
- left_delta="13"
- max_val="100"
- name="WLDistanceMult"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="MaxAltText"
- top_pad="-15"
- width="355">
- Max Altitude
- </text>
- <slider
- control_name="WLMaxAltitude"
- decimal_digits="0"
- follows="left"
- height="10"
- increment="1"
- initial_value="500"
- layout="topleft"
- left_delta="13"
- max_val="4000"
- name="WLMaxAltitude"
- top_pad="27"
- width="200" />
- </panel>
- <panel
- border="true"
- follows="left|top|right|bottom"
- height="196"
- label="LIGHTING"
- layout="topleft"
- left_delta="0"
- help_topic="windlight_lighting_tab"
- name="Lighting"
- top_delta="4"
- width="698">
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="SLCText"
- top="4"
- width="355">
- Sun/Moon Color
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="0"
- name="BHText"
- top_pad="5"
- width="10">
- R
- </text>
- <slider
- control_name="WLSunlightR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLSunlightR"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText2"
- top_pad="-15"
- width="10">
- G
- </text>
- <slider
- control_name="WLSunlightG"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLSunlightG"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText3"
- top_pad="-15"
- width="10">
- B
- </text>
- <slider
- control_name="WLSunlightB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLSunlightB"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText4"
- top_pad="-15"
- width="10">
- I
- </text>
- <slider
- control_name="WLSunlightI"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- left_delta="0"
- name="WLSunlightI"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="TODText"
- top_pad="-10"
- width="355">
- Sun/Moon Position
- </text>
- <icon
- height="20"
- image_name="icon_diurnal.tga"
- layout="topleft"
- left_delta="14"
- top_pad="10"
- name="SkyDayCycle"
- use_draw_context_alpha="false"
- width="148" />
- <slider
- control_name="WLSunAngle"
- follows="left"
- height="10"
- increment="0.001"
- initial_value="0.7"
- layout="topleft"
- left_delta="-8"
- name="WLSunAngle"
- top_pad="20"
- width="207" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="245"
- name="WLAmbientText"
- top="4"
- width="355">
- Ambient
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="0"
- name="BHText5"
- top_pad="5"
- width="10">
- R
- </text>
- <slider
- control_name="WLAmbientR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLAmbientR"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText6"
- top_pad="-15"
- width="10">
- G
- </text>
- <slider
- control_name="WLAmbientG"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLAmbientG"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText7"
- top_pad="-15"
- width="10">
- B
- </text>
- <slider
- control_name="WLAmbientB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLAmbientB"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText8"
- top_pad="-15"
- width="10">
- I
- </text>
- <slider
- control_name="WLAmbientI"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1"
- layout="topleft"
- left_delta="0"
- name="WLAmbientI"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WLEastAngleText"
- top_pad="-10"
- width="355">
- East Angle
- </text>
- <slider
- control_name="WLEastAngle"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.0"
- layout="topleft"
- left_delta="13"
- name="WLEastAngle"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="480"
- name="SunGlowText"
- top="4"
- width="355">
- Sun Glow
- </text>
- <slider
- control_name="WLGlowB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.1"
- label="Focus "
- layout="topleft"
- left_delta="0"
- max_val="0.5"
- name="WLGlowB"
- top_pad="27"
- width="200" />
- <slider
- control_name="WLGlowR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.25"
- label="Size "
- layout="topleft"
- left_delta="0"
- max_val="1.99"
- min_val="1"
- name="WLGlowR"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="0"
- name="SceneGammaText"
- top_pad="-10"
- width="200">
- Scene Gamma
- </text>
- <slider
- control_name="WLGamma"
- decimal_digits="2"
- follows="bottom"
- height="10"
- increment="0.01"
- initial_value="2.0"
- layout="topleft"
- left_delta="0"
- max_val="10"
- name="WLGamma"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="0"
- name="WLStarText"
- top_pad="-10"
- width="355">
- Star Brightness
- </text>
- <slider
- control_name="WLStarAlpha"
- decimal_digits="2"
- follows="bottom"
- height="10"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- left_delta="0"
- max_val="2"
- name="WLStarAlpha"
- top_pad="27"
- width="200" />
- </panel>
- <panel
- border="true"
- follows="left|top|right|bottom"
- height="196"
- label="CLOUDS"
- layout="topleft"
- left_delta="0"
- mouse_opaque="false"
- help_topic="windlight_clouds_tab"
- name="Clouds"
- top_delta="4"
- width="698">
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="10"
- name="WLCloudColorText"
- top="4"
- width="355">
- Cloud Color
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="0"
- name="BHText"
- top_pad="5"
- width="10">
- R
- </text>
- <slider
- control_name="WLCloudColorR"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLCloudColorR"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText2"
- top_pad="-15"
- width="10">
- G
- </text>
- <slider
- control_name="WLCloudColorG"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLCloudColorG"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText3"
- top_pad="-15"
- width="10">
- B
- </text>
- <slider
- control_name="WLCloudColorB"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.7"
- layout="topleft"
- left_delta="0"
- name="WLCloudColorB"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText4"
- top_pad="-15"
- width="10">
- I
- </text>
- <slider
- control_name="WLCloudColorI"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- left_delta="0"
- name="WLCloudColorI"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WLCloudColorText2"
- top_pad="-10"
- width="355">
- Cloud XY/Density
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="0"
- name="BHText5"
- top_pad="5"
- width="10">
- X
- </text>
- <slider
- control_name="WLCloudX"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLCloudX"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText6"
- top_pad="-15"
- width="10">
- Y
- </text>
- <slider
- control_name="WLCloudY"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left_pad="3"
- top_pad="6"
- name="WLCloudY"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText7"
- top_pad="-15"
- width="10">
- D
- </text>
- <slider
- control_name="WLCloudDensity"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- left_delta="0"
- name="WLCloudDensity"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="245"
- name="WLCloudCoverageText"
- top="4"
- width="355">
- Cloud Coverage
- </text>
- <slider
- control_name="WLCloudCoverage"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left_delta="13"
- name="WLCloudCoverage"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WLCloudScaleText"
- top_pad="-10"
- width="355">
- Cloud Scale
- </text>
- <slider
- control_name="WLCloudScale"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- left_delta="13"
- min_val="0.01"
- name="WLCloudScale"
- top_pad="27"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="WLCloudDetailText"
- top_pad="-10"
- width="355">
- Cloud Detail (XY/Density)
- </text>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="0"
- name="BHText8"
- top_pad="8"
- width="10">
- X
- </text>
- <slider
- control_name="WLCloudDetailX"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left_pad="3"
- top_pad="8"
- name="WLCloudDetailX"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText9"
- top_pad="-15"
- width="10">
- Y
- </text>
- <slider
- control_name="WLCloudDetailY"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left_delta="0"
- name="WLCloudDetailY"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- halign="center"
- height="16"
- layout="topleft"
- left_delta="-13"
- name="BHText10"
- top_pad="-15"
- width="10">
- D
- </text>
- <slider
- control_name="WLCloudDetailDensity"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="1.0"
- layout="topleft"
- left_delta="0"
- name="WLCloudDetailDensity"
- left_pad="3"
- top_pad="6"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="480"
- name="WLCloudScrollXText"
- top="4"
- width="355">
- Cloud Scroll X
- </text>
- <check_box
- control_name="WLCloudLockX"
- follows="left"
- height="16"
- label="Lock"
- layout="topleft"
- left="625"
- name="WLCloudLockX"
- width="200" />
- <slider
- control_name="WLCloudScrollX"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left="494"
- max_val="10"
- min_val="-10"
- name="WLCloudScrollX"
- top="45"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-14"
- name="WLCloudScrollYText"
- top_delta="-1"
- width="355">
- Cloud Scroll Y
- </text>
- <check_box
- control_name="WLCloudLockY"
- follows="left"
- height="16"
- label="Lock"
- layout="topleft"
- left="625"
- name="WLCloudLockY"
- width="200" />
- <slider
- control_name="WLCloudScrollY"
- decimal_digits="2"
- follows="left"
- height="10"
- increment="0.01"
- initial_value="0.5"
- layout="topleft"
- left="494"
- max_val="10"
- min_val="-10"
- name="WLCloudScrollY"
- top="85"
- width="200" />
- <check_box
- control_name="DrawClassicClouds"
- follows="left"
- height="16"
- label="Draw Classic Clouds"
- layout="topleft"
- left="480"
- name="DrawClassicClouds"
- top="104"
- width="200" />
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 3ead67ca57..a7d1aa963c 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -135,6 +135,14 @@
name="login_panel_holder"
width="1024"/>
+ <debug_view follows="all"
+ left="0"
+ top="0"
+ mouse_opaque="false"
+ height="500"
+ name="DebugView"
+ width="1024"/>
+
<panel follows="all"
height="500"
left="0"
@@ -154,13 +162,6 @@
top="0"
width="1024"/>
</panel>
- <debug_view follows="all"
- left="0"
- top="0"
- mouse_opaque="false"
- height="500"
- name="DebugView"
- width="1024"/>
</layout_panel>
</layout_stack>
<panel mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index b36b82ebd8..e0ccb18c08 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -42,7 +42,7 @@
<menu_item_call.on_enable
function="File.EnableUpload" />
</menu_item_call>
- <menu_item_call
+ <menu_item_call
label="Model..."
layout="topleft"
name="Upload Model">
@@ -263,4 +263,4 @@
parameter="eyes" />
</menu_item_call>
</menu>
-</menu>
+</menu> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
index f9db64b524..65bd2793b6 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
@@ -42,6 +42,14 @@
function="CheckControl"
parameter="NearbyListShowIcons" />
</menu_item_check>
+ <menu_item_check name ="view_map" label="View Map">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="NearbyListShowMap" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="NearbyListShowMap" />
+ </menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
<menu_item_call.on_click function="SideTray.ShowPanel" userdata="panel_block_list_sidetray" />
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 81046e99a0..e00586811b 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -232,6 +232,16 @@
function="SideTray.PanelPeopleTab"
parameter="nearby_panel" />
</menu_item_call>
+ <menu_item_check
+ label="Nearby Voice"
+ name="Nearby Voice">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="voice_controls" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="voice_controls" />
+ </menu_item_check>
</menu>
<menu
create_jump_keys="true"
@@ -470,7 +480,7 @@
<menu_item_separator/>
- <menu
+ <menu
create_jump_keys="true"
label="Sun"
name="Environment Settings"
@@ -505,24 +515,105 @@
function="World.EnvSettings"
parameter="midnight" />
</menu_item_call>
- <menu_item_call
- label="Estate Time"
- name="Revert to Region Default">
- <menu_item_call.on_click
- function="World.EnvSettings"
- parameter="default" />
- </menu_item_call>
-
- <menu_item_separator/>
-
- <menu_item_call
- label="Environment Editor"
- name="Environment Editor">
- <menu_item_call.on_click
- function="World.EnvSettings"
- parameter="editor" />
- </menu_item_call>
</menu>
+
+
+ <menu
+ create_jump_keys="true"
+ label="Enviroment Editor"
+ name="Enviroment Editor"
+ tear_off="true">
+
+ <menu_item_call
+ label="Enviroment Settings..."
+ name="Enviroment Settings">
+ <menu_item_call.on_click
+ function="World.EnvSettings"
+ parameter="editor"/>
+ </menu_item_call>
+
+ <menu_item_separator/>
+
+ <menu
+ name="Water Presets"
+ label="Water Presets">
+ <menu_item_call
+ label="New preset..."
+ name="new_water_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="new_water"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Edit preset..."
+ name="edit_water_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="edit_water"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Delete preset..."
+ name="delete_water_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="delete_water"/>
+ </menu_item_call>
+ </menu>
+
+ <menu
+ name="Sky Presets"
+ label="Sky Presets">
+ <menu_item_call
+ label="New preset..."
+ name="new_sky_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="new_sky"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Edit preset..."
+ name="edit_sky_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="edit_sky"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Delete preset..."
+ name="delete_sky_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="delete_sky"/>
+ </menu_item_call>
+ </menu>
+
+ <menu
+ name="Day Presets"
+ label="Day Presets">
+ <menu_item_call
+ label="New preset..."
+ name="new_day_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="new_day_cycle"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Edit preset..."
+ name="edit_day_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="edit_day_cycle"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Delete preset..."
+ name="delete_day_preset">
+ <menu_item_call.on_click
+ function="World.EnvPreset"
+ parameter="delete_day_cycle"/>
+ </menu_item_call>
+ </menu>
+ </menu>
+
+
</menu>
<menu
create_jump_keys="true"
@@ -2840,6 +2931,18 @@
function="Floater.Toggle"
parameter="region_debug_console" />
</menu_item_check>
+ <menu_item_check
+ label="Region Debug Console"
+ name="Region Debug Console"
+ shortcut="control|shift|`"
+ use_mac_ctrl="true">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="region_debug_console" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="region_debug_console" />
+ </menu_item_check>
<menu_item_separator />
<menu_item_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ce96c488b4..661165069e 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3698,6 +3698,19 @@ Join me in [REGION]
<notification
icon="alertmodal.tga"
+ name="TooManyTeleportOffers"
+ type="alertmodal">
+You attempted to make [OFFERS] teleport offers
+which exceeds the limit of [LIMIT].
+ <tag>group</tag>
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="OfferTeleportFromGod"
type="alertmodal">
God summon Resident to your location?
@@ -4841,18 +4854,6 @@ Do you wish to overwrite the saved preset?
<notification
icon="alertmodal.tga"
- name="WLDeletePresetAlert"
- type="alertmodal">
-Do you wish to delete [SKY]?
- <tag>confirm</tag>
- <usetemplate
- name="okcancelbuttons"
- notext="No"
- yestext="Yes"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
name="WLNoEditDefault"
type="alertmodal">
You cannot edit or delete a default preset.
@@ -4869,81 +4870,53 @@ This day cycle file references a missing sky file: [SKY].
<notification
icon="alertmodal.tga"
- name="PPSaveEffectAlert"
+ name="WLRegionApplyFail"
type="alertmodal">
-PostProcess Effect exists. Do you still wish overwrite it?
- <usetemplate
- name="okcancelbuttons"
- notext="No"
- yestext="Yes"/>
- </notification>
-
- <notification
- icon="alert.tga"
- name="NewSkyPreset"
- type="alert">
-Give me a name for the new sky.
- <tag>confirm</tag>
- <form name="form">
- <input name="message" type="text">
-New Preset
- </input>
- <button
- default="true"
- index="0"
- name="OK"
- text="OK"/>
- <button
- index="1"
- name="Cancel"
- text="Cancel"/>
- </form>
+Sorry, the settings couldn't be applied to the region. Leaving the region and then returning may help rectify the problem. The reason given was: [FAIL_REASON]
</notification>
<notification
+ functor="GenericAcknowledge"
icon="alertmodal.tga"
- name="ExistsSkyPresetAlert"
+ name="EnvCannotDeleteLastDayCycleKey"
type="alertmodal">
-Preset already exists!
- <tag>fail</tag>
+Unable to delete the last key in this day cycle because you cannot have an empty day cycle. You should modify the last remaining key instead of attempting to delete it and then to create a new one.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
- icon="alert.tga"
- name="NewWaterPreset"
- type="alert">
-Give me a name for the new water preset.
- <tag>confirm</tag>
- <form name="form">
- <input name="message" type="text">
-New Preset
- </input>
- <button
- default="true"
- index="0"
- name="OK"
- text="OK"/>
- <button
- index="1"
- name="Cancel"
- text="Cancel"/>
- </form>
+ functor="GenericAcknowledge"
+ icon="alertmodal.tga"
+ name="DayCycleTooManyKeyframes"
+ type="alertmodal">
+You cannot add any more keyframes to this day cycle. The maximum number of keyframes for day cycles of [SCOPE] scope is [MAX].
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
+ functor="GenericAcknowledge"
icon="alertmodal.tga"
- name="ExistsWaterPresetAlert"
+ name="EnvUpdateRate"
type="alertmodal">
-Preset already exists!
- <tag>fail</tag>
+ You may only update region environmental settings every [WAIT] seconds. Wait at least that long and then try again.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
- name="WaterNoEditDefault"
+ name="PPSaveEffectAlert"
type="alertmodal">
-You cannot edit or delete a default preset.
- <tag>fail</tag>
+PostProcess Effect exists. Do you still wish overwrite it?
+ <usetemplate
+ name="okcancelbuttons"
+ notext="No"
+ yestext="Yes"/>
</notification>
<notification
@@ -5655,6 +5628,15 @@ This area has building disabled. You can&apos;t build or rez objects here.
<notification
icon="notify.tga"
+ name="SeeAvatars"
+ persist="true"
+ type="notify"
+ unique="true">
+This parcel hides avatars and text chat from another parcel. You can&apos;t see other residents outside the parcel, and those outside are not able to see you. Regular text chat on channel 0 is also blocked.
+ </notification>
+
+ <notification
+ icon="notify.tga"
name="ScriptsStopped"
persist="true"
type="notify">
@@ -6823,7 +6805,9 @@ Select residents to share with.
name="MeshUploadError"
icon="alert.tga"
type="alert">
- [LABEL] failed to upload: [MESSAGE] [IDENTIFIER] [INVALIDITY_IDENTIFIER]
+ [LABEL] failed to upload: [MESSAGE] [IDENTIFIER]
+
+See the log file for details.
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index f438e3d42d..9e70706603 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -52,10 +52,7 @@
multi_select="true"
name="list_attachments"
top="0"
- width="311">
- <flat_list_view.no_items_text
- value="No attachments worn" />
- </flat_list_view>
+ width="311"/>
</accordion_tab>
<accordion_tab
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
index 82dfb445da..2ec2e03e8c 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -220,7 +220,7 @@
height="23"
layout="topleft"
left_pad="4"
- name="layout_panel1"
+ name="layout_panel2"
user_resize="false"
auto_resize="true"
width="146">
diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
new file mode 100644
index 0000000000..d06190ec54
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<inbox_inventory_panel
+ name="inventory_inbox"
+ start_folder="Received Items"
+ follows="all" layout="topleft"
+ top="0" left="0" height="165" width="308"
+ top_pad="0"
+ bg_opaque_color="DkGray2"
+ bg_alpha_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ border="false"
+ bevel_style="none"
+ show_item_link_overlays="true"
+ >
+ <scroll reserve_scroll_corner="false" />
+</inbox_inventory_panel>
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
index 9bd60b935f..bfc503f05b 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
@@ -104,12 +104,12 @@
top_pad="15"
left="10"
name="show_text"
- width="40">
+ width="62">
Show:
</text>
<combo_box
height="23"
- left="50"
+ left="72"
width="140"
top_delta="-5"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml
new file mode 100644
index 0000000000..af32056428
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<inventory_panel
+ name="inventory_outbox"
+ start_folder="Outbox"
+ follows="all" layout="topleft"
+ top="0" left="0" height="165" width="308"
+ top_pad="0"
+ bg_opaque_color="DkGray2"
+ bg_alpha_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ border="false"
+ bevel_style="none"
+ show_item_link_overlays="true"
+ >
+ <scroll reserve_scroll_corner="false" />
+</inventory_panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index 9f98019c94..a0096adc01 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -14,9 +14,7 @@
background_visible="true"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
- no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]."
- no_matched_tabs_text.v_pad="10"
- no_visible_tabs_text.value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"
+
follows="all"
height="400"
layout="topleft"
@@ -24,6 +22,13 @@
name="outfits_accordion"
top="0"
width="309">
+ <no_matched_tabs_text
+ name="no_matched_outfits_msg"
+ value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]."
+ v_pad="10"/>
+ <no_visible_tabs_text
+ name="no_outfits_msg"
+ value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"/>
</accordion>
<panel
background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 1a00416b2a..cc4522f944 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -87,7 +87,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
width="319">
<panel
background_opaque="true"
- background_visible="true"
+ background_visible="true"
bg_alpha_color="DkGray"
bg_opaque_color="DkGray"
follows="all"
@@ -99,28 +99,55 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
name="nearby_panel"
top="0"
width="313">
- <net_map
- bg_color="NetMapBackgroundColor"
- follows="top|left|right"
- layout="topleft"
- left="3"
- mouse_opaque="false"
- name="Net Map"
- width="305"
- height="140"
- top="5"/>
- <avatar_list
- allow_select="true"
- follows="top|left|bottom|right"
- height="211"
- ignore_online_status="true"
+ <layout_stack
+ clip="false"
+ follows="all"
+ height="355"
+ layout="topleft"
+ mouse_opaque="false"
+ orientation="vertical"
+ width="313">
+ <layout_panel
+ height="142"
layout="topleft"
- left="3"
- multi_select="true"
- name="avatar_list"
- top="145"
- width="306" />
- <panel
+ min_dim="100"
+ mouse_opaque="false"
+ user_resize="true"
+ visibility_control="NearbyListShowMap"
+ width="313">
+ <net_map
+ bg_color="NetMapBackgroundColor"
+ follows="all"
+ height="140"
+ layout="topleft"
+ left="3"
+ mouse_opaque="false"
+ name="Net Map"
+ top="4"
+ width="305"/>
+ </layout_panel>
+ <layout_panel
+ height="213"
+ layout="topleft"
+ min_dim="100"
+ mouse_opaque="false"
+ user_resize="true"
+ width="313">
+ <avatar_list
+ allow_select="true"
+ follows="all"
+ height="211"
+ ignore_online_status="true"
+ layout="topleft"
+ left="3"
+ keep_one_selected="false"
+ multi_select="true"
+ name="avatar_list"
+ top="2"
+ width="306" />
+ </layout_panel>
+ </layout_stack>
+ <panel
background_visible="true"
follows="left|right|bottom"
height="27"
@@ -595,7 +622,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
height="23"
layout="bottomleft"
left_pad="3"
- name="chat_btn_lp"
+ name="im_btn_lp"
user_resize="false"
auto_resize="true"
width="41">
@@ -616,7 +643,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
height="23"
layout="bottomleft"
left_pad="3"
- name="chat_btn_lp"
+ name="call_btn_lp"
user_resize="false"
auto_resize="true"
width="52">
@@ -637,7 +664,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
height="23"
layout="bottomleft"
left_pad="3"
- name="chat_btn_lp"
+ name="share_btn_lp"
user_resize="false"
auto_resize="true"
width="66">
@@ -658,7 +685,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
height="23"
layout="bottomleft"
left_pad="3"
- name="chat_btn_lp"
+ name="teleport_btn_lp"
user_resize="false"
auto_resize="true"
width="77">
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 774a9e8bbf..e280115bda 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -153,6 +153,14 @@
name="icon_DamageNo"
translate="false"
value="Parcel_DamageNo_Dark" />
+ <string
+ name="icon_SeeAVs_Off"
+ translate="false"
+ value="Parcel_SeeAVsOff_Dark" />
+ <string
+ name="icon_SeeAVs_On"
+ translate="false"
+ value="Parcel_SeeAVsOn_Dark" />
<button
follows="top|left"
height="24"
@@ -354,7 +362,7 @@
title="Parcel">
<panel
follows="all"
- height="175"
+ height="200"
layout="topleft"
left="0"
name="parcel_characteristics_panel"
@@ -543,6 +551,31 @@
top_delta="0"
value="Off"
width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="Parcel_SeeAVsOff_Dark"
+ layout="topleft"
+ left="10"
+ name="see_avatars_icon"
+ top_pad="7"
+ width="22" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="8"
+ name="see_avatars_label"
+ value="See Avatars:"
+ width="90" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="0"
+ name="see_avatars_value"
+ value="Off"
+ width="60" />
<button
follows="bottom|right"
height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 91fe6f544c..1f92244eb9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -123,8 +123,8 @@
function="Pref.setControlFalse"
parameter="MuteAmbient" />
</slider>
- <button
- control_name="MuteAmbient"
+ <button
+ control_name="MuteAmbient"
disabled_control="MuteAudio"
follows="top|left"
height="16"
@@ -157,7 +157,7 @@
function="Pref.setControlFalse"
parameter="MuteSounds" />
</slider>
- <button
+ <button
control_name="MuteSounds"
disabled_control="MuteAudio"
follows="top|left"
@@ -169,7 +169,10 @@
left_pad="5"
name="mute_audio"
tab_stop="false"
- width="16" />
+ width="16">
+ <button.commit_callback
+ function="Pref.SetSounds"/>
+ </button>
<slider
control_name="AudioLevelMusic"
disabled_control="MuteAudio"
@@ -332,7 +335,17 @@
label="Play media attached to other avatars"
left="25"
width="230"/>
-
+ <check_box
+ name="gesture_audio_play_btn"
+ control_name="EnableGestureSounds"
+ disabled_control="MuteAudio"
+ value="true"
+ follows="left|bottom|right"
+ height="15"
+ tool_tip="Check this to hear sounds from gestures"
+ label="Play sounds from gestures"
+ top_pad="1"
+ left="25"/>
<text
type="string"
length="1"
@@ -372,7 +385,7 @@
height="18"
image_name="Move_Walk_Off"
layout="topleft"
- left_pad="170"
+ left_pad="170"
name="avatar_icon"
mouse_opaque="false"
visible="true"
@@ -483,8 +496,8 @@
filename="panel_sound_devices.xml"
visiblity_control="ShowDeviceSettings"
name="device_settings_panel"
- top="314"
- width="345"
+ top_pad="0"
+ width="480"
left="18"
class="panel_voice_device_settings"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml
index 2868d91cc7..4535c56339 100644
--- a/indra/newview/skins/default/xui/en/panel_progress.xml
+++ b/indra/newview/skins/default/xui/en/panel_progress.xml
@@ -132,4 +132,12 @@
name="cancel_btn"
top="700"
width="90" />
+ <web_browser
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="login_media_panel"
+ width="1024"
+ height="768"
+ top="0"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml
new file mode 100644
index 0000000000..aa38c49fae
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+
+<panel
+ border="true"
+ follows="top|left"
+ height="300"
+ label="Environment"
+ layout="topleft"
+ help_topic="panel_region_environment_tab"
+ name="panel_env_info"
+ width="530">
+ <text
+ name="water_settings_title"
+ follows="top|left"
+ height="30"
+ layout="topleft"
+ left="50"
+ top_pad="20"
+ width="430"
+ wrap="true">
+ Select the Water and Sky/Day Cycle Settings you would like all visitors to your region to see. More info
+ </text>
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="237"
+ layout="topleft"
+ left="50"
+ name="border"
+ top="60"
+ width="430"/>
+ <radio_group
+ follows="top|left"
+ height="45"
+ layout="topleft"
+ left_delta="10"
+ name="region_settings_radio_group"
+ top_delta="20"
+ width="200">
+ <radio_item
+ label="Use Second Life default"
+ layout="topleft"
+ name="use_sl_default_settings"/>
+ <radio_item
+ label="Use the following settings"
+ layout="topleft"
+ name="use_my_settings"
+ top_pad="20"/>
+ </radio_group>
+ <panel
+ follows="top|left"
+ height="150"
+ layout="topleft"
+ left="50"
+ name="user_environment_settings"
+ top_pad="20"
+ width="430">
+ <text
+ name="water_settings_title"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="50"
+ top_pad="0"
+ width="160">
+ Water Setting
+ </text>
+ <combo_box
+ follows="top|left"
+ left_pad="2"
+ name="water_settings_preset_combo"
+ top_delta="-7"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+ <text
+ name="sky_dayc_settings_title"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="50"
+ top_pad="30"
+ width="100">
+ Sky / Day Cycle
+ </text>
+ <radio_group
+ layout="topleft"
+ left_delta="50"
+ name="sky_dayc_settings_radio_group"
+ top_pad="10"
+ height="50"
+ width="110">
+ <radio_item
+ layout="topleft"
+ label="Fixed sky"
+ name="my_sky_settings"/>
+ <radio_item
+ layout="topleft"
+ label="Day cycle"
+ name="my_dayc_settings"
+ top_pad="25"/>
+ </radio_group>
+ <combo_box
+ follows="top|left"
+ left_pad="2"
+ name="sky_settings_preset_combo"
+ top_delta="-7"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+ <combo_box
+ follows="top|left"
+ name="dayc_settings_preset_combo"
+ top_delta="36"
+ width="200">
+ <combo_box.item
+ label="-Select a preset-"
+ name="item0"/>
+ </combo_box>
+ </panel>
+ <button
+ follows="left|top"
+ height="23"
+ label="Apply"
+ layout="topleft"
+ right="-160"
+ name="apply_btn"
+ top_pad="10"
+ width="100" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="10"
+ name="cancel_btn"
+ width="100" />
+ <loading_indicator
+ height="23"
+ left="50"
+ name="progress_indicator"
+ top_delta="0"
+ visible="false"
+ width="23" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml
index 1307d807e2..6b28639a77 100644
--- a/indra/newview/skins/default/xui/en/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- border="false"
+ border="true"
follows="top|left"
height="510"
help_topic="panel_region_estate_tab"
@@ -20,7 +20,7 @@
name="estate_help_text"
top="14"
word_wrap="true"
- width="300">
+ >
Changes to settings on this tab will affect all regions in the estate.
</text>
<text
@@ -30,9 +30,10 @@
font="SansSerif"
height="20"
layout="topleft"
- left_delta="0"
+ right="160"
name="estate_text"
top_pad="2"
+ halign="right"
width="140">
Estate:
</text>
@@ -43,9 +44,9 @@
font="SansSerif"
height="20"
layout="topleft"
- left_delta="0"
+ top_delta="0"
name="estate_name"
- top_delta="16"
+ left_pad="6"
width="150">
(unknown)
</text>
@@ -56,9 +57,10 @@
font="SansSerif"
height="20"
layout="topleft"
- left_delta="0"
+ right="160"
name="owner_text"
- top_pad="2"
+ top_pad="6"
+ halign="right"
width="150">
Estate owner:
</text>
@@ -69,75 +71,68 @@
font="SansSerif"
height="20"
layout="topleft"
- left_delta="0"
+ top_delta="0"
name="estate_owner"
- top_delta="16"
+ left_pad="6"
use_ellipses="true"
width="290">
(unknown)
</text>
+
<view_border
- bevel_style="in"
+ bevel_style="none"
follows="top|left"
- height="270"
+ height="95"
layout="topleft"
- left_delta="-4"
+ left="10"
top_pad="5"
- width="300" />
+ width="470" />
+
<check_box
height="20"
- label="Use Global Time"
+ label="Allow Public Access"
layout="topleft"
- left="12"
- name="use_global_time_check"
- top="132"
+ left="20"
+ name="externally_visible_check"
+ top_delta="5"
width="200" />
+
<check_box
height="20"
- label="Fixed Sun"
- layout="topleft"
- left="12"
- name="fixed_sun_check"
- top="152"
- width="100" />
- <icon
- height="20"
- image_name="icon_day_cycle.tga"
+ label="Allow Voice Chat"
layout="topleft"
- left="47"
- name="daycycle"
- top="177"
- width="165" />
- <slider
- follows="left|top"
- height="20"
- increment="0.001"
- label="Phase"
- layout="topleft"
- left="12"
- max_val="30"
- min_val="6"
- name="sun_hour_slider"
- show_text="false"
- top="202"
+ left="280"
+ name="voice_chat_check"
+ top_delta="0"
width="200" />
<check_box
height="20"
- label="Allow Public Access"
+ label="Allow Direct Teleport"
layout="topleft"
left_delta="0"
- name="externally_visible_check"
- top_pad="6"
- width="200" />
+ name="allow_direct_teleport"
+ top_pad="4"
+ width="80" />
+ <button
+ enabled="false"
+ follows="left|top"
+ height="23"
+ label="Apply"
+ layout="topleft"
+ name="apply_btn"
+ top_pad="15"
+ left_delta="0"
+ width="97" />
+
<text
type="string"
length="1"
follows="top|left"
height="16"
layout="topleft"
- left="32"
+ left="20"
name="Only Allow"
- top="250"
+ top_delta="-30"
width="278">
Restrict Access to accounts verified by:
</text>
@@ -161,50 +156,6 @@
tool_tip="Ban Residents who have not verified their age. See the [SUPPORT_SITE] for more information."
top_pad="2"
width="278" />
- <check_box
- height="20"
- label="Allow Voice Chat"
- layout="topleft"
- left="12"
- name="voice_chat_check"
- top="304"
- width="200" />
- <check_box
- height="20"
- label="Allow Direct Teleport"
- layout="topleft"
- left="12"
- name="allow_direct_teleport"
- top_pad="4"
- width="80" />
- <button
- enabled="false"
- follows="left|top"
- height="23"
- label="Apply"
- layout="topleft"
- name="apply_btn"
- top_pad="10"
- left="110"
- width="97" />
- <button
- follows="left|top"
- height="23"
- label="Send Message To Estate..."
- layout="topleft"
- left="45"
- name="message_estate_btn"
- top_pad="20"
- width="220" />
- <button
- follows="left|top"
- height="23"
- label="Kick Resident from Estate..."
- layout="topleft"
- left="45"
- name="kick_user_from_estate_btn"
- top_pad="5"
- width="220" />
<text
type="string"
@@ -214,16 +165,31 @@
height="20"
layout="topleft"
name="estate_manager_label"
- right="520"
+ top_pad="30"
+ left="10"
width="200">
Estate Managers:
</text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="280"
+ name="allow_resident_label"
+ top_delta="0"
+ width="200">
+ Allowed Residents:
+ </text>
+
+ <!-- Estate Managers box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
- right="520"
+ left="10"
top_pad="-5"
width="200" />
<name_list
@@ -235,43 +201,15 @@
name="estate_manager_name_list"
top_delta="0"
width="200" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_estate_manager_btn"
- right="520"
- top_pad="5"
- width="97" />
- <button
- follows="left|top"
- height="23"
- label="Add..."
- layout="topleft"
- left_delta="-103"
- name="add_estate_manager_btn"
- top_delta="0"
- width="97" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_delta="0"
- name="allow_resident_label"
- top_pad="10"
- width="200">
- Allowed Residents:
- </text>
+
+ <!-- Allowed Residents box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
- right="520"
- top_pad="-5"
+ left="280"
+ top_delta="0"
width="200" />
<name_list
follows="left|top"
@@ -282,42 +220,78 @@
name="allowed_avatar_name_list"
top_delta="0"
width="200" />
+
+ <!-- Estate Managers buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_estate_manager_btn"
+ top_pad="6"
+ width="97" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
- name="remove_allowed_avatar_btn"
- right="520"
- top_pad="5"
+ name="remove_estate_manager_btn"
+ left_pad="6"
width="97" />
+
+ <!-- Allowed Residents buttons -->
<button
follows="left|top"
height="23"
+ left="280"
label="Add..."
layout="topleft"
- left_delta="-103"
name="add_allowed_avatar_btn"
top_delta="0"
width="97" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_allowed_avatar_btn"
+ left_pad="6"
+ top_delta="0"
+ width="97" />
+
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
- left_delta="0"
+ left="10"
name="allow_group_label"
top_pad="10"
width="200">
Allowed Groups:
</text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="280"
+ name="ban_resident_label"
+ top_delta="0"
+ width="200">
+ Banned Residents:
+ </text>
+
+ <!-- Allowed Groups box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
- right="520"
+ left="10"
top_pad="-5"
width="200" />
<name_list
@@ -329,43 +303,15 @@
name="allowed_group_name_list"
top_delta="0"
width="200" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_allowed_group_btn"
- right="520"
- top_pad="5"
- width="97" />
- <button
- follows="left|top"
- height="23"
- label="Add..."
- layout="topleft"
- left_delta="-103"
- name="add_allowed_group_btn"
- top_delta="0"
- width="97" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_delta="0"
- name="ban_resident_label"
- top_pad="10"
- width="200">
- Banned Residents:
- </text>
+
+ <!-- Banned Residents box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
- right="520"
- top_pad="-5"
+ left="280"
+ top_delta="0"
width="200" />
<name_list
follows="left|top"
@@ -376,22 +322,64 @@
name="banned_avatar_name_list"
top_delta="0"
width="200" />
+
+ <!-- Allowed Groups buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_allowed_group_btn"
+ top_pad="6"
+ width="97" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
- name="remove_banned_avatar_btn"
- right="520"
- top_pad="5"
+ name="remove_allowed_group_btn"
+ left_pad="6"
+ top_delta="0"
width="97" />
+
+ <!-- Banned Residents buttons -->
<button
follows="left|top"
height="23"
label="Add..."
layout="topleft"
- left_delta="-103"
+ left="280"
name="add_banned_avatar_btn"
top_delta="0"
width="97" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_banned_avatar_btn"
+ top_delta="0"
+ left_pad="6"
+ width="97" />
+
+ <button
+ follows="left|top"
+ height="23"
+ label="Send Message To Estate..."
+ layout="topleft"
+ left="10"
+ name="message_estate_btn"
+ top_pad="20"
+ width="220" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Kick Resident from Estate..."
+ layout="topleft"
+ left="280"
+ name="kick_user_from_estate_btn"
+ top_delta="0"
+ width="220" />
+
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
index 5093c52129..bbb8b40594 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -2,7 +2,7 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="460"
help_topic="panel_region_terrain_tab"
label="Terrain"
layout="topleft"
@@ -50,10 +50,10 @@
label="Terrain Raise Limit"
label_width="120"
layout="topleft"
- left="15"
+ left="240"
max_val="100"
name="terrain_raise_spin"
- top="60"
+ top="40"
width="180" />
<spinner
follows="left|top"
@@ -62,95 +62,336 @@
label="Terrain Lower Limit"
label_width="120"
layout="topleft"
- left="15"
+ left="240"
max_val="0"
min_val="-100"
name="terrain_lower_spin"
- top="80"
+ top="60"
width="180" />
- <check_box
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="60"
+ layout="topleft"
+ left="8"
+ top="30"
+ width="460" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="20"
- label="Use Estate Sun"
layout="topleft"
- left="250"
- name="use_estate_sun_check"
- top="35"
+ left="10"
+ name="detail_texture_text"
+ top="110"
+ width="300">
+ Terrain Textures (requires 512x512, 24 bit .tga files)
+ </text>
+ <texture_picker
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_delta="0"
+ name="texture_detail_0"
+ top_delta="20"
width="100" />
- <check_box
- height="20"
- label="Fixed Sun"
+ <texture_picker
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_pad="10"
+ name="texture_detail_1"
+ top_delta="0"
+ width="100" />
+ <texture_picker
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_pad="10"
+ name="texture_detail_2"
+ top_delta="0"
+ width="100" />
+ <texture_picker
+ follows="left|top"
+ height="100"
layout="topleft"
- left="250"
- name="fixed_sun_check"
- top="55"
+ left_pad="10"
+ name="texture_detail_3"
+ top_delta="0"
width="100" />
- <icon
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="20"
- image_name="icon_day_cycle.tga"
layout="topleft"
- left="285"
- name="daycycle"
- top="80"
- width="165" />
- <slider
+ left="10"
+ name="height_text_lbl"
+ top_delta="90"
+ width="65">
+ 1 (Low)
+ </text>
+ <text
+ type="string"
+ length="1"
follows="left|top"
height="20"
- increment="0.001"
- label="Phase"
layout="topleft"
- left="250"
- max_val="30"
- min_val="6"
- name="sun_hour_slider"
- show_text="false"
- top="105"
- width="200" />
- <button
- enabled="false"
+ left_pad="45"
+ name="height_text_lbl2"
+ top_delta="0"
+ width="100">
+ 2
+ </text>
+ <text
+ type="string"
+ length="1"
follows="left|top"
height="20"
- label="Apply"
layout="topleft"
- left="350"
- name="apply_btn"
- top="135"
- width="90" />
- <view_border
- bevel_style="none"
- follows="top|left"
- height="130"
+ left_pad="10"
+ name="height_text_lbl3"
+ top_delta="0"
+ width="100">
+ 3
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
layout="topleft"
- left="8"
- top="30"
- width="460" />
+ left_pad="10"
+ name="height_text_lbl4"
+ top_delta="0"
+ width="100">
+ 4 (High)
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl5"
+ top_delta="30"
+ width="300">
+ Texture Elevation Ranges
+ </text>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl10"
+ top_delta="30"
+ width="200"
+ word_wrap="true">
+ These values represent the blend range for the textures above.
+ </text>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="height_text_lbl11"
+ top_delta="32"
+ width="200"
+ word_wrap="true">
+ Measured in meters, the LOW value is the MAXIMUM height of Texture #1, and the HIGH value is the MINIMUM height of Texture #4.
+ </text>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="270"
+ name="height_text_lbl6"
+ top="250"
+ width="100">
+ Northwest
+ </text>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="10"
+ name="height_text_lbl7"
+ top_delta="0"
+ width="100">
+ Northeast
+ </text>
+<!-- northwest low-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="Low"
+ label_width="37"
+ layout="topleft"
+ left="230"
+ max_val="500"
+ min_val="-500"
+ name="height_start_spin_1"
+ top_delta="15"
+ width="100" />
+<!-- northeast low-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="Low"
+ label_width="37"
+ layout="topleft"
+ left_pad="10"
+ max_val="500"
+ min_val="-500"
+ name="height_start_spin_3"
+ top_delta="0"
+ width="100" />
+<!-- northwest high-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="High"
+ label_width="37"
+ layout="topleft"
+ left="230"
+ max_val="500"
+ min_val="-500"
+ name="height_range_spin_1"
+ top_delta="20"
+ width="100" />
+<!-- northeast high-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="High"
+ label_width="37"
+ layout="topleft"
+ left_pad="10"
+ max_val="500"
+ min_val="-500"
+ name="height_range_spin_3"
+ top_delta="0"
+ width="100" />
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="270"
+ name="height_text_lbl8"
+ top_pad="10"
+ width="100">
+ Southwest
+ </text>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="10"
+ name="height_text_lbl9"
+ top_delta="0"
+ width="100">
+ Southeast
+ </text>
+<!-- southwest low-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="Low"
+ label_width="37"
+ layout="topleft"
+ left="230"
+ max_val="500"
+ min_val="-500"
+ name="height_start_spin_0"
+ top_delta="15"
+ width="100" />
+<!-- southeast low-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="Low"
+ label_width="37"
+ layout="topleft"
+ left_pad="10"
+ max_val="500"
+ min_val="-500"
+ name="height_start_spin_2"
+ top_delta="0"
+ width="100" />
+<!--southwest high-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="High"
+ label_width="37"
+ layout="topleft"
+ left="230"
+ max_val="500"
+ min_val="-500"
+ name="height_range_spin_0"
+ top_delta="20"
+ width="100" />
+<!-- southeast high-->
+ <spinner
+ follows="left|top"
+ height="20"
+ increment="0.5"
+ label="High"
+ label_width="37"
+ layout="topleft"
+ left_pad="10"
+ max_val="500"
+ min_val="-500"
+ name="height_range_spin_2"
+ top_delta="0"
+ width="100" />
+<!-- Terrain Download/Upload/Bake buttons -->
<button
follows="left|top"
height="20"
label="Download RAW terrain..."
layout="topleft"
- left_delta="2"
+ left="10"
name="download_raw_btn"
tool_tip="Available only to estate owners, not managers"
- top_pad="60"
- width="170" />
+ top="390"
+ width="160" />
<button
follows="left|top"
height="20"
label="Upload RAW terrain..."
layout="topleft"
- left="10"
+ left_pad="10"
+ top_delta="0"
name="upload_raw_btn"
tool_tip="Available only to estate owners, not managers"
- top="243"
- width="170" />
+ width="160" />
<button
follows="left|top"
height="20"
label="Bake Terrain"
layout="topleft"
- left="10"
+ left_pad="10"
name="bake_terrain_btn"
tool_tip="Set current terrain as mid-point for raise/lower limits"
- top="283"
+ width="100" />
+ <button
+ enabled="true"
+ follows="left|top"
+ height="20"
+ label="Apply"
+ layout="topleft"
+ left_delta="0"
+ name="apply_btn"
+ top="430"
width="100" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_texture.xml b/indra/newview/skins/default/xui/en/panel_region_texture.xml
deleted file mode 100644
index 5d910ea659..0000000000
--- a/indra/newview/skins/default/xui/en/panel_region_texture.xml
+++ /dev/null
@@ -1,327 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="true"
- follows="top|left"
- height="320"
- help_topic="panel_region_texture_tab"
- label="Ground Textures"
- layout="topleft"
- left="0"
- name="Textures"
- top="320"
- width="480">
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="20"
- layout="topleft"
- left="10"
- name="region_text_lbl"
- top="10"
- width="100">
- Region:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="20"
- layout="topleft"
- left_delta="50"
- name="region_text"
- top_delta="0"
- width="400">
- unknown
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="10"
- name="detail_texture_text"
- top="36"
- width="300">
- Terrain Textures (requires 512x512, 24 bit .tga files)
- </text>
- <texture_picker
- follows="left|top"
- height="100"
- layout="topleft"
- left_delta="0"
- name="texture_detail_0"
- top_delta="20"
- width="100" />
- <texture_picker
- follows="left|top"
- height="100"
- layout="topleft"
- left_pad="10"
- name="texture_detail_1"
- top_delta="0"
- width="100" />
- <texture_picker
- follows="left|top"
- height="100"
- layout="topleft"
- left_pad="10"
- name="texture_detail_2"
- top_delta="0"
- width="100" />
- <texture_picker
- follows="left|top"
- height="100"
- layout="topleft"
- left_pad="10"
- name="texture_detail_3"
- top_delta="0"
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="10"
- name="height_text_lbl"
- top="146"
- width="65">
- 1 (Low)
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="45"
- name="height_text_lbl2"
- top_delta="0"
- width="100">
- 2
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl3"
- top_delta="0"
- width="100">
- 3
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl4"
- top_delta="0"
- width="100">
- 4 (High)
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="10"
- name="height_text_lbl5"
- top="170"
- width="300">
- Texture Elevation Ranges
- </text>
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left="51"
- name="height_text_lbl6"
- top="185"
- width="100">
- Northwest
- </text>
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl7"
- top_delta="0"
- width="100">
- Northeast
- </text>
-<!-- northwest low-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="Low"
- label_width="37"
- layout="topleft"
- left="10"
- max_val="500"
- min_val="-500"
- name="height_start_spin_1"
- top_delta="15"
- width="100" />
-<!-- northeast low-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="Low"
- label_width="37"
- layout="topleft"
- left_pad="10"
- max_val="500"
- min_val="-500"
- name="height_start_spin_3"
- top_delta="0"
- width="100" />
-<!-- northwest high-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="High"
- label_width="37"
- layout="topleft"
- left="10"
- max_val="500"
- min_val="-500"
- name="height_range_spin_1"
- top_delta="20"
- width="100" />
-<!-- northeast high-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="High"
- label_width="37"
- layout="topleft"
- left_pad="10"
- max_val="500"
- min_val="-500"
- name="height_range_spin_3"
- top_delta="0"
- width="100" />
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left="51"
- name="height_text_lbl8"
- top_pad="10"
- width="100">
- Southwest
- </text>
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl9"
- top_delta="0"
- width="100">
- Southeast
- </text>
-<!-- southwest low-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="Low"
- label_width="37"
- layout="topleft"
- left="10"
- max_val="500"
- min_val="-500"
- name="height_start_spin_0"
- top_delta="15"
- width="100" />
-<!-- southeast low-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="Low"
- label_width="37"
- layout="topleft"
- left_pad="10"
- max_val="500"
- min_val="-500"
- name="height_start_spin_2"
- top_delta="0"
- width="100" />
-<!--southwest high-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="High"
- label_width="37"
- layout="topleft"
- left="10"
- max_val="500"
- min_val="-500"
- name="height_range_spin_0"
- top_delta="20"
- width="100" />
-<!-- southeast high-->
- <spinner
- follows="left|top"
- height="20"
- increment="0.5"
- label="High"
- label_width="37"
- layout="topleft"
- left_pad="10"
- max_val="500"
- min_val="-500"
- name="height_range_spin_2"
- top_delta="0"
- width="100" />
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left="10"
- name="height_text_lbl10"
- top_delta="30"
- width="400"
- word_wrap="true">
- These values represent the blend range for the textures above.
- </text>
- <text
- follows="left|top"
- height="20"
- layout="topleft"
- left_delta="0"
- name="height_text_lbl11"
- top_delta="32"
- width="400"
- word_wrap="true">
- Measured in meters, the LOW value is the MAXIMUM height of Texture #1, and the HIGH value is the MINIMUM height of Texture #4.
- </text>
- <button
- enabled="false"
- follows="left|bottom"
- height="20"
- label="Apply"
- layout="topleft"
- left="350"
- name="apply_btn"
- top="290"
- width="100" />
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml
index 6ef93406ec..0f330a7b98 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml
@@ -142,6 +142,7 @@
mouse_opaque="false"
background_visible="true"
>
+ <badge location="top_left" location_percent_vcenter="50" location_percent_hcenter="95" />
<panel
class="sidepanel_inventory"
name="sidepanel_inventory"
diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
index ccae7c5350..0a20a4a965 100644
--- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
@@ -7,33 +7,46 @@
layout="topleft"
name="device_settings_panel"
width="360">
- <panel.string
- name="default_text">
- Default
- </panel.string>
- <icon
- height="18"
- image_name="Microphone_On"
- left_delta="4"
- name="microphone_icon"
- mouse_opaque="false"
- top="7"
- layout="topleft"
- visible="true"
- width="18" />
- <text
+ <panel.string
+ name="default_text">
+ Default
+ </panel.string>
+ <icon
+ follows="left|top"
+ height="18"
+ image_name="Microphone_On"
+ left_delta="-5"
+ name="microphone_icon"
+ mouse_opaque="false"
+ top="7"
+ layout="topleft"
+ visible="true"
+ width="18" />
+ <icon
+ follows="left|top"
+ height="18"
+ image_name="Parcel_Voice_Dark"
+ layout="topleft"
+ left_pad="220"
+ name="speaker_icon"
+ mouse_opaque="false"
+ top_delta="0"
+ visible="true"
+ width="22" />
+ <text
type="string"
length="1"
- font.style="BOLD"
+ font.style="BOLD"
follows="left|top"
height="16"
layout="topleft"
- left_pad="3"
+ left_pad="-240"
+ top_delta="5"
name="Input"
- width="70">
- Input
- </text>
- <combo_box
+ width="60">
+ Input
+ </text>
+ <combo_box
height="23"
control_name="VoiceInputAudioDevice"
follows="left|top"
@@ -42,33 +55,57 @@
max_chars="128"
name="voice_input_device"
top_delta="-5"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="-70"
- name="My volume label"
- top_pad="4"
- width="200">
- My volume:
- </text>
- <slider_bar
- control_name="AudioLevelMic"
- follows="top|right|left"
- height="17"
- increment="0.025"
- initial_value="1.0"
- layout="topleft"
- left_delta="-6"
- max_val="2"
- name="mic_volume_slider"
- tool_tip="Change the volume using this slider"
- top_pad="-1"
- width="220" />
- <text
+ width="150" />
+ <text
+ font.style="BOLD"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left_pad="30"
+ name="Output"
+ top_delta="5"
+ width="60">
+ Output
+ </text>
+ <combo_box
+ control_name="VoiceOutputAudioDevice"
+ height="23"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ max_chars="128"
+ name="voice_output_device"
+ top_delta="-4"
+ width="150" />
+ <text
+ type="string"
+ halign="left"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_delta="-300"
+ name="My volume label"
+ top_pad="14"
+ width="200">
+ My volume:
+ </text>
+ <slider_bar
+ control_name="AudioLevelMic"
+ follows="top|right|left"
+ height="17"
+ increment="0.025"
+ initial_value="1.0"
+ layout="topleft"
+ left_delta="95"
+ max_val="2"
+ name="mic_volume_slider"
+ tool_tip="Change the volume using this slider"
+ top_pad="-18"
+ width="110" />
+ <text
type="string"
text_color="EmphasisColor"
length="1"
@@ -79,8 +116,8 @@
name="wait_text"
top_delta="-1"
width="110">
- Please wait
- </text>
+ Please wait
+ </text>
<locate
follows="right|top"
height="20"
@@ -121,35 +158,4 @@
name="bar4"
top_delta="0"
width="20" />
- <icon
- height="18"
- image_name="Parcel_Voice_Light"
- left="5"
- name="speaker_icon"
- mouse_opaque="false"
- top_pad="3"
- visible="true"
- width="22" />
- <text
- font.style="BOLD"
- type="string"
- length="1"
- follows="left|top"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Output"
- width="70">
- Output
- </text>
- <combo_box
- control_name="VoiceOutputAudioDevice"
- height="23"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- max_chars="128"
- name="voice_output_device"
- top_delta="-3"
- width="200" />
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
index 30d3064e14..79f29777ce 100644
--- a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
@@ -88,6 +88,16 @@
visible="false"
width="14"
/>
+ <icon
+ follows="right|top"
+ height="13"
+ image_name="Parcel_SeeAVsOff_Light"
+ left="2"
+ name="see_avatars_icon"
+ top="3"
+ visible="false"
+ width="14"
+ />
<text
follows="right|top"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 8997c1a6d7..79a0ec7c72 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -9,7 +9,7 @@
min_width="240"
name="objects panel"
width="333">
- <panel
+ <panel
follows="all"
layout="topleft"
left="0"
@@ -19,24 +19,226 @@
height="570"
visible="true"
width="330">
- <panel
- class="panel_main_inventory"
- filename="panel_main_inventory.xml"
- follows="all"
- layout="topleft"
- left="0"
- name="panel_main_inventory"
- top="0"
- label=""
- height="545"
- width="330" />
+ <layout_stack
+ follows="left|right|top|bottom"
+ layout="topleft"
+ left="0"
+ top="0"
+ orientation="vertical"
+ name="inventory_layout_stack"
+ height="535"
+ width="330">
+ <layout_panel
+ name="main_inventory_layout_panel"
+ min_dim="150"
+ width="330"
+ follows="bottom|left|right"
+ user_resize="false"
+ height="480">
+ <panel
+ class="panel_main_inventory"
+ filename="panel_main_inventory.xml"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="panel_main_inventory"
+ top="0"
+ label=""
+ height="480"
+ width="330" />
+ </layout_panel>
+ <layout_panel
+ width="330"
+ auto_resize="true"
+ user_resize="false"
+ follows="bottom|left|right"
+ name="inbox_layout_panel"
+ visible="false"
+ min_dim="35"
+ max_dim="200"
+ expanded_min_dim="90"
+ height="200">
+ <panel
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="marketplace_inbox"
+ class="panel_marketplace_inbox"
+ top="0"
+ label=""
+ height="200"
+ width="330">
+ <string name="InboxLabelWithArg">Received Items ([NUM])</string>
+ <string name="InboxLabelNoArg">Received Items</string>
+ <button
+ label="Received Items"
+ name="inbox_btn"
+ height="35"
+ width="308"
+ image_unselected="MarketplaceBtn_Off"
+ image_selected="MarketplaceBtn_Selected"
+ halign="left"
+ handle_right_mouse="false"
+ follows="top|left|right"
+ is_toggle="true"
+ tab_stop="false"
+ pad_left="35"
+ top="0"
+ left="10" />
+ <text
+ type="string"
+ length="1"
+ follows="right|top"
+ layout="topleft"
+ height="13"
+ top="10"
+ right="-20"
+ name="inbox_fresh_new_count"
+ font="SansSerifMedium"
+ halign="right"
+ text_color="EmphasisColor"
+ top_pad="0"
+ width="300">
+ [NUM] New
+ </text>
+ <panel
+ follows="all"
+ left="10"
+ bottom="200"
+ width="308"
+ top="35"
+ bg_opaque_color="InventoryBackgroundColor"
+ background_visible="true"
+ background_opaque="true"
+ tool_tip="Drag and drop items to your inventory to manage and use them"
+ >
+ <text
+ name="inbox_inventory_placeholder"
+ type="string"
+ follows="all"
+ layout="topleft"
+ top="0"
+ left="0"
+ width="308"
+ height="165"
+ wrap="true"
+ halign="center">
+ Purchases from the marketplace will be delivered here.
+ </text>
+ </panel>
+ </panel>
+ </layout_panel>
+ <layout_panel
+ width="330"
+ auto_resize="true"
+ user_resize="false"
+ follows="bottom|left|right"
+ name="outbox_layout_panel"
+ visible="false"
+ min_dim="35"
+ max_dim="200"
+ expanded_min_dim="90"
+ height="200">
+ <panel
+ follows="all"
+ layout="topleft"
+ left="10"
+ name="marketplace_outbox"
+ class="panel_marketplace_outbox"
+ top="0"
+ label=""
+ height="200"
+ width="310">
+ <button
+ label="Merchant Outbox"
+ is_toggle="true"
+ handle_right_mouse="false"
+ name="outbox_btn"
+ follows="top|left|right"
+ image_unselected="MarketplaceBtn_Off"
+ image_selected="MarketplaceBtn_Selected"
+ height="35"
+ tab_stop="false"
+ width="308"
+ halign="left"
+ pad_left="35"
+ top="0"
+ left="0" />
+ <button
+ image_unselected="OutboxPush_Off"
+ image_selected="OutboxPush_Selected"
+ image_hover_selected="OutboxPush_Selected_Over"
+ image_hover_unselected="OutboxPush_Over"
+ image_disabled_selected="OutboxPush_Selected_Disabled"
+ image_disabled="OutboxPush_Disabled"
+ image_pressed="OutboxPush_Press"
+ image_pressed_selected="OutboxPush_Selected_Press"
+ label=""
+ tool_tip="Push to my Marketplace Storefront"
+ is_toggle="false"
+ name="outbox_sync_btn"
+ follows="top|right"
+ tab_stop="false"
+ halign="center"
+ top="6"
+ left="-50"
+ height="23"
+ width="32"
+ enabled="false" />
+ <loading_indicator
+ follows="top|right"
+ name="outbox_sync_indicator"
+ top="6"
+ left="-50"
+ height="23"
+ width="32"
+ images_per_sec="1.15"
+ tab_stop="false"
+ visible="false">
+ <images>
+ <image name="OutboxPush_Progress_1"/>
+ <image name="OutboxPush_Progress_2"/>
+ <image name="OutboxPush_Progress_3"/>
+ <image name="OutboxPush_Progress_4"/>
+ <image name="OutboxPush_Progress_5"/>
+ <image name="OutboxPush_Progress_6"/>
+ </images>
+ </loading_indicator>
+ <panel
+ follows="all"
+ left="10"
+ bottom="200"
+ width="308"
+ top="35"
+ bg_opaque_color="InventoryBackgroundColor"
+ background_visible="true"
+ background_opaque="true"
+ tool_tip="Drag and drop items here to prepare them for sale on your storefront"
+ >
+ <text
+ name="outbox_inventory_placeholder"
+ type="string"
+ follows="all"
+ layout="topleft"
+ top="0"
+ left="0"
+ width="308"
+ height="165"
+ wrap="true"
+ halign="center">
+ Set up your merchant account to use this feature.
+ </text>
+ </panel>
+ </panel>
+ </layout_panel>
+ </layout_stack>
<panel
follows="bottom|left|right"
- height="25"
+ height="30"
layout="topleft"
name="button_panel"
left="9"
- top_pad="-2"
+ top_pad="7"
width="308">
<layout_stack
follows="bottom|left|right"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 339f14eacb..022c97f341 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1759,10 +1759,10 @@ integer llGetParcelMaxPrims(vector pos, integer sim_wide)
Returns the maximum number of prims allowed on the parcel at pos
</string>
<string name="LSLTipText_llGetParcelDetails" translate="false">
-list llGetParcelDetails(vector pos, list params)
-Returns the parcel details specified in params for the parcel at pos.
-Params is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA
- </string>
+ list llGetParcelDetails(vector pos, list params)
+ Returns the parcel details specified in params for the parcel at pos.
+ Params is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA, _ID, _SEE_AVATARS
+ </string>
<string name="LSLTipText_llSetLinkPrimitiveParams" translate="false">
llSetLinkPrimitiveParams(integer linknumber, list rules)
Sets primitive parameters for linknumber based on rules
@@ -2021,6 +2021,8 @@ Returns a string with the requested data about the region
<string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>
+ <string name="InventoryInboxNoItems">Items purchased through the marketplace will be delivered here.</string>
+ <string name="InventoryOutboxNoItems">Drag items here in preparation for listing on your marketplace storefront.</string>
<!-- use value="" because they have preceding spaces -->
<string name="no_transfer" value=" (no transfer)" />
<string name="no_modify" value=" (no modify)" />
@@ -2067,7 +2069,6 @@ Returns a string with the requested data about the region
<!-- inventory folder -->
<string name="InvFolder My Inventory">My Inventory</string>
- <string name="InvFolder My Favorites">My Favorites</string>
<string name="InvFolder Library">Library</string>
<string name="InvFolder Textures">Textures</string>
<string name="InvFolder Sounds">Sounds</string>
@@ -2087,10 +2088,10 @@ Returns a string with the requested data about the region
<string name="InvFolder Uncompressed Sounds">Uncompressed Sounds</string>
<string name="InvFolder Animations">Animations</string>
<string name="InvFolder Gestures">Gestures</string>
- <string name="InvFolder Favorite">Favorites</string>
+ <string name="InvFolder Favorite">My Favorites</string>
<!-- historically default name of the Favorites folder can start from either "f" or "F" letter.
We should localize both of them with the same value -->
- <string name="InvFolder favorite">Favorites</string>
+ <string name="InvFolder favorite">My Favorites</string>
<string name="InvFolder Current Outfit">Current Outfit</string>
<string name="InvFolder Initial Outfits">Initial Outfits</string>
<string name="InvFolder My Outfits">My Outfits</string>
@@ -2101,6 +2102,8 @@ Returns a string with the requested data about the region
<string name="InvFolder Friends">Friends</string>
<string name="InvFolder All">All</string>
+ <string name="no_attachments">No attachments worn</string>
+
<!-- inventory FVBridge -->
<!-- This is used in llpanelinventory.cpp when constructing a context menu for an item for Sale -->
<string name="Buy">Buy</string>
@@ -2248,6 +2251,9 @@ Returns a string with the requested data about the region
<string name="IMMainland">mainland</string>
<string name="IMTeen">teen</string>
+ <!-- floater about land -->
+ <string name="Anyone">anyone</string>
+
<!-- floater region info -->
<!-- The following will replace variable [ALL_ESTATES] in notifications EstateAllowed*, EstateBanned*, EstateManager* -->
<string name="RegionInfoError">error</string>
@@ -2350,6 +2356,10 @@ Returns a string with the requested data about the region
<string name="GroupOwned">Group Owned</string>
<string name="Public">Public</string>
+ <!-- Environment settings -->
+ <string name="LocalSettings">Local Settings</string>
+ <string name="RegionSettings">Region Settings</string>
+
<!-- panel classified -->
<string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string>
<string name="ClassifiedUpdateAfterPublish">(will update after publish)</string>
@@ -3131,6 +3141,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="LocationCtrlAdultIconTooltip">Adult Region</string>
<string name="LocationCtrlModerateIconTooltip">Moderate Region</string>
<string name="LocationCtrlGeneralIconTooltip">General Region</string>
+ <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string>
<!-- Strings used by the (currently Linux) auto-updater app -->
<string name="UpdaterWindowTitle">
diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml
new file mode 100644
index 0000000000..f77c4b7178
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/badge.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Additional attributes:
+ -->
+<badge border_image="Badge_Border"
+ border_color="BadgeBorderColor"
+ font="SansSerifSmall"
+ image="Badge_Background"
+ image_color="BadgeImageColor"
+ label_color="BadgeLabelColor"
+ location="top_left"
+ location_percent_hcenter="85"
+ location_percent_vcenter="85"
+ padding_horiz="7"
+ padding_vert="4"
+ requests_front="true"
+ >
+</badge>
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index 16241ed84e..302014eb24 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -25,5 +25,6 @@
pad_bottom="3"
height="23"
scale_image="true"
+ handle_right_mouse="true"
use_draw_context_alpha="true">
</button>
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
new file mode 100644
index 0000000000..2c987b158d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<inbox_folder_view_folder
+ folder_arrow_image="Folder_Arrow"
+ folder_indentation="8"
+ item_height="20"
+ item_top_pad="4"
+ selection_image="Rounded_Square"
+ >
+ <new_badge label="New" location="right" location_percent_hcenter="70" />
+</inbox_folder_view_folder>
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml
new file mode 100644
index 0000000000..830c27bdac
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<inbox_inventory_panel show_load_status="false" />
diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
index 93875d66e6..00f4c43915 100644
--- a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
@@ -3,4 +3,12 @@
bg_opaque_color="InventoryBackgroundColor"
background_visible="true"
background_opaque="true"
- />
+ show_load_status="true"
+ >
+ <scroll
+ name="Inventory Scroller"
+ follows="all"
+ reserve_scroll_corner="true"
+ tab_stop="true"
+ />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 37d60f1671..44436fb6f2 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -123,6 +123,14 @@
font="SansSerifSmall"
text_color="TextFgColor"
/>
+ <see_avatars_icon
+ name="see_avatars_icon"
+ width="22"
+ height="18"
+ top="21"
+ follows="right|top"
+ image_name="Parcel_SeeAVsOff_Light"
+ />
<combo_button
name="Location History"
label=""
diff --git a/indra/newview/skins/default/xui/en/widgets/panel.xml b/indra/newview/skins/default/xui/en/widgets/panel.xml
index 9bf99fa363..47a210d9b7 100644
--- a/indra/newview/skins/default/xui/en/widgets/panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/panel.xml
@@ -10,4 +10,5 @@
bg_alpha_image_overlay="White"
background_visible="false"
background_opaque="false"
- chrome="false"/> \ No newline at end of file
+ chrome="false"
+ accepts_badge="true"/> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/widgets/time.xml b/indra/newview/skins/default/xui/en/widgets/time.xml
new file mode 100644
index 0000000000..b5bdd564a6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/time.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<time text_enabled_color="LabelTextColor"
+ text_disabled_color="LabelDisabledColor"
+ font="SansSerifSmall"
+ label_width="40" >
+ <time.up_button name="SpinCtrl Up"
+ image_unselected="Stepper_Up_Off"
+ image_selected="Stepper_Up_Press"
+ tab_stop="false"
+ follows="left|bottom" />
+ <time.down_button name="SpinCtrl Down"
+ image_unselected="Stepper_Down_Off"
+ image_selected="Stepper_Down_Press"
+ tab_stop="false"
+ follows="left|bottom" />
+</time>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency.xml b/indra/newview/skins/default/xui/es/floater_buy_currency.xml
index 2f92cb55eb..43bbf0b70f 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_currency.xml
@@ -18,7 +18,7 @@
<text name="balance_amount">
[AMT] L$
</text>
- <text name="currency_action" width="50">
+ <text name="currency_action">
Quiero comprar
</text>
<text name="currency_label">
diff --git a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml
deleted file mode 100644
index 9c3ac1be0e..0000000000
--- a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="EDITOR DEL CICLO DE UN DÍA">
- <tab_container name="Day Cycle Tabs">
- <panel label="Ciclo de un día" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 12 am
- </text>
- <text name="WL3am">
- 3 am
- </text>
- <text name="WL6am">
- 6 am
- </text>
- <text name="WL9amHash">
- 9 am
- </text>
- <text name="WL12pmHash">
- 12 pm
- </text>
- <text name="WL3pm">
- 3 pm
- </text>
- <text name="WL6pm">
- 6 pm
- </text>
- <text name="WL9pm">
- 9 pm
- </text>
- <text name="WL12am2">
- 12 am
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/>
- <button label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Configuración del fotograma clave:
- </text>
- <text name="WLCurKeyTimeText">
- Hora clave:
- </text>
- <spinner label="Hora" name="WLCurKeyHour"/>
- <spinner label="Min." name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Modelo predefinido:
- </text>
- <combo_box label="Predefinido" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Intervalo:
- </text>
- <combo_box label="5 min." name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Duración del ciclo:
- </text>
- <spinner label="Hora" name="WLLengthOfDayHour"/>
- <spinner label="Min." name="WLLengthOfDayMin"/>
- <spinner label="Seg." name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Vista previa:
- </text>
- <button label="Probar" label_selected="Probar" name="WLAnimSky"/>
- <button label="Parar" label_selected="Parar" name="WLStopAnimSky"/>
- <button label="Usar el horario del estado" label_selected="Ir al horario del estado" name="WLUseLindenTime"/>
- <button label="Guardar este tipo de día" label_selected="Guardar este tipo de día" name="WLSaveDayCycle"/>
- <button label="Cargar y probar un tipo de día" label_selected="Cargar y probar un tipo de día" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_env_settings.xml b/indra/newview/skins/default/xui/es/floater_env_settings.xml
deleted file mode 100644
index 195690f546..0000000000
--- a/indra/newview/skins/default/xui/es/floater_env_settings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="EDITOR DEL ENTORNO">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Duración de
-un día
- </text>
- <text name="EnvTimeText2">
- 12:00 PM
- </text>
- <text name="EnvCloudText">
- Nubosidad
- </text>
- <text name="EnvWaterColorText">
- Color del
-agua
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Pulsa para abrir el selector de color"/>
- <text name="EnvWaterFogText">
- Claridad del
-agua
- </text>
- <button bottom="-144" label="Usar el horario del estado" name="EnvUseEstateTimeButton" width="155"/>
- <button label="Cielo avanzado" left="167" name="EnvAdvancedSkyButton" width="155"/>
- <button label="Agua avanzada" left="326" name="EnvAdvancedWaterButton" width="155"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_settings_debug.xml b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
index bca1839f09..1da2e491e1 100644
--- a/indra/newview/skins/default/xui/es/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="CONFIGURACIONES DEL DEPURADOR">
<radio_group name="boolean_combo">
- <radio_item label="VERDADERO" name="TRUE" value="verdadero"/>
- <radio_item label="FALSO" name="FALSE" value=""/>
+ <radio_item label="VERDADERO" name="TRUE" />
+ <radio_item label="FALSO" name="FALSE" />
</radio_group>
<color_swatch label="Color" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml
index 9d29bc40bf..78f18b745c 100644
--- a/indra/newview/skins/default/xui/es/floater_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_tools.xml
@@ -65,7 +65,7 @@
</radio_group>
<check_box label="Editar las partes enlazadas" name="checkbox edit linked parts"/>
<button label="Enlazar" name="link_btn"/>
- <button label="Desenlazar" name="unlink_btn"/>
+ <button label="Desenlazar" name="unlink_btn" width="95"/>
<text name="RenderingCost" tool_tip="Muestra cuánto se calcula que cuesta renderizar este objeto">
þ: [COUNT]
</text>
diff --git a/indra/newview/skins/default/xui/es/floater_water.xml b/indra/newview/skins/default/xui/es/floater_water.xml
deleted file mode 100644
index 2c1f6cfbfb..0000000000
--- a/indra/newview/skins/default/xui/es/floater_water.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="EDITOR AVANZADO DEL AGUA">
- <text name="KeyFramePresetsText">
- Agua predefinida:
- </text>
- <button label="Nueva" label_selected="Nueva" name="WaterNewPreset"/>
- <button label="Guardar" label_selected="Guardar" name="WaterSavePreset"/>
- <button label="Borrar" label_selected="Borrar" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="CONFIGURACIÓN" name="Settings">
- <text name="BHText">
- Color del agua
- </text>
- <button label="?" left="175" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Pulsa para abrir el selector de color"/>
- <text name="WaterFogDensText">
- Transparencia
- </text>
- <button label="?" left="175" name="WaterFogDensityHelp"/>
- <text name="WaterUnderWaterFogModText">
- Modificar la claridad del agua
- </text>
- <button label="?" left="175" name="WaterUnderWaterFogModHelp"/>
- <text name="BDensText">
- Tamaño de las ondulaciones
- </text>
- <button label="?" left="405" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <text name="HDText">
- Escala de Fresnel
- </text>
- <button label="?" left="405" name="WaterFresnelScaleHelp"/>
- <text name="FresnelOffsetText">
- Coeficiente de reflexión
- </text>
- <button label="?" left="405" name="WaterFresnelOffsetHelp"/>
- <text name="DensMultText">
- Refracción de la superficie
- </text>
- <button label="?" left="640" name="WaterScaleAboveHelp"/>
- <text name="WaterScaleBelowText">
- Refracción bajo la superficie
- </text>
- <button label="?" left="640" name="WaterScaleBelowHelp"/>
- <text name="MaxAltText">
- Desenfoque
- </text>
- <button label="?" left="640" name="WaterBlurMultiplierHelp"/>
- </panel>
- <panel label="IMAGEN" name="Waves">
- <text name="BHText">
- Sentido de la onda grande
- </text>
- <button label="?" left="170" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Sentido de la onda pequeña
- </text>
- <button label="?" left="170" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Vista Normal
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_windlight_options.xml b/indra/newview/skins/default/xui/es/floater_windlight_options.xml
deleted file mode 100644
index 585a42e429..0000000000
--- a/indra/newview/skins/default/xui/es/floater_windlight_options.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="EDITOR AVANZADO DEL CIELO">
- <text name="KeyFramePresetsText">
- Cielos definidos:
- </text>
- <button label="Nuevo" label_selected="Nuevo" name="WLNewPreset"/>
- <button label="Guardar" label_selected="Guardar" name="WLSavePreset"/>
- <button label="Borrar" label_selected="Borrar" name="WLDeletePreset"/>
- <button font="SansSerifSmall" label="Editor del ciclo de un día" label_selected="Editor del ciclo de un día" left_delta="90" name="WLDayCycleMenuButton" width="150"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMÓSFERA" name="Atmosphere">
- <text name="BHText">
- Coloración
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- V
- </text>
- <text name="BHText4">
- A
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Cantidad de bruma
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Saturación
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- V
- </text>
- <text name="BHText8">
- A
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Densidad de la bruma
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Densidad
- </text>
- <button label="?" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Distancia
- </text>
- <button label="?" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Altitud máx.
- </text>
- <button label="?" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="LUZ" name="Lighting">
- <text name="SLCText">
- Color del Sol y de la Luna
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- V
- </text>
- <text name="BHText3">
- A
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Posición del Sol y la Luna
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Ambiental
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- V
- </text>
- <text name="BHText7">
- A
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Ángulo de elevación
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Resplandor del Sol
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Visión" name="WLGlowB"/>
- <slider label="Tamaño" name="WLGlowR"/>
- <text name="SceneGammaText">
- Gamma de la escena
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Brillo de las estrellas
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="NUBES" name="Clouds">
- <text name="WLCloudColorText">
- Color de las nubes
- </text>
- <button label="?" left="190" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- V
- </text>
- <text name="BHText3">
- A
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Posición/Densidad de las nubes
- </text>
- <button label="?" left="190" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Nubosidad
- </text>
- <button label="?" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Altitud de las nubes
- </text>
- <button label="?" name="WLCloudScaleHelp"/>
- <text font="SansSerifSmall" name="WLCloudDetailText">
- Detalle de las nubes (Posición/Densidad)
- </text>
- <button label="?" name="WLCloudDetailHelp"/>
- <text bottom="-113" name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <slider bottom="-127" name="WLCloudDetailX"/>
- <text name="WLCloudScrollXText">
- Velocidad de X
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="Bloquear" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Velocidad de Y
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="Bloquear" name="WLCloudLockY"/>
- <check_box label="Incluir nubes clásicas" name="DrawClassicClouds"/>
- <button label="?" left="618" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/panel_edit_pick.xml b/indra/newview/skins/default/xui/es/panel_edit_pick.xml
index 9b101ee4ba..cda465da9c 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Guardar" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Cancelar" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
index e8e95c3bac..293c9ef1d9 100644
--- a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="navigation_bar">
<panel name="navigation_panel">
- <pull_button name="back_btn" tool_tip="Volver a lo localización anterior"/>
+ <pull_button name="back_btn" tool_tip="Volver a la localización anterior"/>
<pull_button name="forward_btn" tool_tip="Ir una localización adelante"/>
<button name="home_btn" tool_tip="Teleportar a mi Base"/>
<location_input label="Localización" name="location_combo"/>
diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml
index 01149e412d..a9d38dca25 100644
--- a/indra/newview/skins/default/xui/es/panel_people.xml
+++ b/indra/newview/skins/default/xui/es/panel_people.xml
@@ -66,16 +66,16 @@
<layout_panel name="view_profile_btn_lp">
<button label="Perfil" name="view_profile_btn" tool_tip="Mostrar imágenes, grupos y otra información del Residente"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="MI" name="im_btn" tool_tip="Abrir una sesión de mensajes instantáneos"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Llamar" name="call_btn" tool_tip="Llamar a este Residente"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Compartir" name="share_btn" tool_tip="Compartir un objeto del inventario"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teleporte" name="teleport_btn" tool_tip="Ofrecer teleporte"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_colors.xml b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml
index e6e4c13203..d47a6d718a 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml
@@ -39,6 +39,6 @@
<text name="floater_opacity">
Opacidad de la ventana:
</text>
- <slider label="Activo:" name="active"/>
- <slider label="Inactivo:" name="inactive"/>
+ <slider label="Activa:" name="active"/>
+ <slider label="Inactiva:" name="inactive"/>
</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
index fa7806a75a..75d175b262 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
@@ -12,7 +12,7 @@
<slider label="Ambiental" name="Wind Volume"/>
<slider label="Efectos de sonido" name="SFX Volume"/>
<slider label="Música en streaming" name="Music Volume"/>
- <check_box label="Activados" name="enable_music"/>
+ <check_box label="Activada" name="enable_music"/>
<slider label="Multimedia" name="Media Volume"/>
<check_box label="Activados" name="enable_media"/>
<slider label="Chat de voz" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 3731b6b57c..72d7493a02 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -1211,9 +1211,6 @@ Intenta iniciar sesión de nuevo en unos instantes.
<string name="InvFolder My Inventory">
Mi Inventario
</string>
- <string name="InvFolder My Favorites">
- Mis Favoritos
- </string>
<string name="InvFolder Library">
Biblioteca
</string>
@@ -1272,10 +1269,10 @@ Intenta iniciar sesión de nuevo en unos instantes.
Gestos
</string>
<string name="InvFolder Favorite">
- Favoritos
+ Mis Favoritos
</string>
<string name="InvFolder favorite">
- Favoritos
+ Mis Favoritos
</string>
<string name="InvFolder Current Outfit">
Vestuario actual
@@ -3628,6 +3625,9 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE].
<string name="LocationCtrlComboBtnTooltip">
Historial de mis localizaciones
</string>
+ <string name="LocationCtrlForSaleTooltip">
+ Comprar este terreno
+ </string>
<string name="LocationCtrlAdultIconTooltip">
Región Adulta
</string>
diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
deleted file mode 100644
index 0ce17b9dc6..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="EDITEUR DU CYCLE DU JOUR">
- <tab_container name="Day Cycle Tabs">
- <panel label="Cycle du jour" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- Min.
- </text>
- <text name="WL3am">
- 3h
- </text>
- <text name="WL6am">
- 6h
- </text>
- <text name="WL9amHash">
- 9h
- </text>
- <text name="WL12pmHash">
- Midi
- </text>
- <text name="WL3pm">
- 15h
- </text>
- <text name="WL6pm">
- 18h
- </text>
- <text name="WL9pm">
- 21h
- </text>
- <text name="WL12am2">
- Min.
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey"/>
- <button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Réglages des images-clés :
- </text>
- <text name="WLCurKeyTimeText">
- Heure de la clé :
- </text>
- <spinner label="Heure" name="WLCurKeyHour"/>
- <spinner label="Min" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Préréglages clés :
- </text>
- <combo_box label="Préréglage" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Snap :
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Durée du cycle :
- </text>
- <spinner label="Heure" name="WLLengthOfDayHour"/>
- <spinner label="Min" name="WLLengthOfDayMin"/>
- <spinner label="Sec" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Aperçu :
- </text>
- <button label="Lire" label_selected="Lire" name="WLAnimSky"/>
- <button label="Arrêter" label_selected="Stop" name="WLStopAnimSky"/>
- <button label="Utiliser heure domaine" label_selected="Aller heure domaine" name="WLUseLindenTime"/>
- <button label="Enregistrer jour test" label_selected="Enregistrer jour test" name="WLSaveDayCycle"/>
- <button label="Charger jour test" label_selected="Charger jour test" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_env_settings.xml b/indra/newview/skins/default/xui/fr/floater_env_settings.xml
deleted file mode 100644
index dd714e85b6..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_env_settings.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="ÉDITEUR D&apos;ENVIRONNEMENT">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text bottom="-45" name="EnvTimeText" top="29">
- Heure de la
-journée
- </text>
- <text bottom_delta="-36" name="EnvTimeText2">
- Midi
- </text>
- <text name="EnvCloudText">
- Couverture
-nuageuse
- </text>
- <text bottom="-45" name="EnvWaterColorText" top="29">
- Couleur de
-l&apos;eau
- </text>
- <color_swatch name="EnvWaterColor" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/>
- <text name="EnvWaterFogText">
- Brouillard
-dans l&apos;eau
- </text>
- <button bottom="-144" label="Utiliser heure du domaine" name="EnvUseEstateTimeButton" width="152"/>
- <button label="Ciel avancé" left="162" name="EnvAdvancedSkyButton" width="145"/>
- <button label="Eau avancée" left="316" name="EnvAdvancedWaterButton" width="145"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml
deleted file mode 100644
index 7d1e3cd65c..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_water.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="ÉDITEUR D&apos;EAU AVANCÉ">
- <floater.string name="WLDefaultWaterNames">
- Valeur par défaut:Transparente:Bassin:Trouble:Première plaie:SERPENT !!!:Valdez
- </floater.string>
- <text name="KeyFramePresetsText" width="120">
- Préréglages :
- </text>
- <button label="Nouveau" label_selected="Nouveau" name="WaterNewPreset"/>
- <button label="Enregistrer" label_selected="Enregistrer" left_delta="75" name="WaterSavePreset" width="75"/>
- <button label="Supprimer" label_selected="Supprimer" left_delta="80" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="PARAMÈTRES" name="Settings">
- <text name="BHText">
- Couleur du brouillard dans l&apos;eau
- </text>
- <color_swatch left="75" name="WaterFogColor" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/>
- <text name="WaterFogDensText">
- Densité du brouillard
- </text>
- <text name="WaterUnderWaterFogModText">
- Brouillard sous-marin
- </text>
- <text name="BDensText">
- Échelle des vaguelettes
- </text>
- <slider label="1" name="WaterNormalScaleX"/>
- <slider label="2" name="WaterNormalScaleY"/>
- <slider label="3" name="WaterNormalScaleZ"/>
- <text name="HDText">
- Échelle Fresnel
- </text>
- <text name="FresnelOffsetText">
- Décalage Fresnel
- </text>
- <text name="DensMultText">
- Réfraction au-dessus
- </text>
- <text name="WaterScaleBelowText">
- Réfraction en dessous
- </text>
- <text name="MaxAltText">
- Multiplicateur de flou
- </text>
- </panel>
- <panel label="IMAGE" name="Waves">
- <text name="BHText">
- Direction grande vague
- </text>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Direction petite vague
- </text>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Normal Map
- </text>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
deleted file mode 100644
index 657e5f5051..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="ÉDITEUR DE CIEL AVANCÉ" width="706">
- <text name="KeyFramePresetsText">
- Préréglages :
- </text>
- <button label="Nouveau" label_selected="Nouveau" name="WLNewPreset"/>
- <button label="Enregistrer" label_selected="Enregistrer" left_delta="75" name="WLSavePreset" width="75"/>
- <button label="Supprimer" label_selected="Supprimer" left_delta="80" name="WLDeletePreset"/>
- <button label="Éditeur du cycle du jour" label_selected="Éditeur du cycle du jour" left_delta="95" left_pad="20" name="WLDayCycleMenuButton" width="150"/>
- <tab_container name="WindLight Tabs" width="706">
- <panel label="ATMOSPHÈRE" name="Atmosphere">
- <text name="BHText">
- Bleu de l&apos;horizon
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- V
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Quantité de brume
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Densité du bleu
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- V
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Densité de la brume
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Multiplicateur de densité
- </text>
- <button label="?" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Multiplicateur de distance
- </text>
- <button label="?" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Altitude maximum
- </text>
- <button label="?" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="LUMIÈRE" name="Lighting">
- <text name="SLCText">
- Couleur soleil/lune
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- V
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Position soleil/lune
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Éclairage ambiant
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- V
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Angle du levant
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Rayonnement du soleil
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Netteté " name="WLGlowB"/>
- <slider label="Taille " name="WLGlowR"/>
- <text name="SceneGammaText">
- Gamma de la scène
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Éclat des étoiles
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="NUAGES" name="Clouds">
- <text name="WLCloudColorText">
- Couleur des nuages
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- V
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Nuages XY/densité
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Couverture nuageuse
- </text>
- <button label="?" left="407" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Altitude des nuages
- </text>
- <button label="?" left="407" name="WLCloudScaleHelp"/>
- <text name="WLCloudDetailText">
- Détails nuages (XY/densité)
- </text>
- <button bottom_delta="-2" label="?" left="407" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Direction et vitesse X
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="Verrouiller" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Direction et vitesse Y
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="Verrouiller" name="WLCloudLockY"/>
- <check_box label="Nuages classiques" name="DrawClassicClouds"/>
- <button label="?" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-Minuit:A-Midi:A-3h:A-15h:A-16h30:A-6h:A-18h:A-9h:A-21h:Barcelone:Blizzard:Bleu mi-journée:Après-midi sur la côte:Coucher de soleil (côte):Valeur par défaut:Coucher de soleil (désert):Belle journée:Gros nuages floconneux:Brumeux:Funky Funky:Funky Funky Funky:Gelatto:Fantôme:Vérités incohérentes:Mi-journée 1:Mi-journée 2:Mi-journée 3:Mi-journée 4:Nuit:Pirate:Mauve:Rêve de navigateur:Sensualité pure
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
index 2364d9bbb2..247e18da82 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Enregistrer" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Annuler" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/fr/panel_people.xml b/indra/newview/skins/default/xui/fr/panel_people.xml
index 166f04b3e4..b24c340708 100644
--- a/indra/newview/skins/default/xui/fr/panel_people.xml
+++ b/indra/newview/skins/default/xui/fr/panel_people.xml
@@ -66,16 +66,16 @@ Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife://
<layout_panel name="view_profile_btn_lp">
<button label="Profil" name="view_profile_btn" tool_tip="Afficher la photo, les groupes et autres infos des résidents"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="Ouvrir une session IM"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Appel" name="call_btn" tool_tip="Appeler ce résident"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Partager" name="share_btn" tool_tip="Partager un article de l&apos;inventaire"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Téléporter" name="teleport_btn" tool_tip="Proposer une téléportation"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 3ec85551da..077e545851 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -1238,9 +1238,6 @@ Veuillez réessayer de vous connecter dans une minute.
<string name="InvFolder My Inventory">
Mon inventaire
</string>
- <string name="InvFolder My Favorites">
- Mes Favoris
- </string>
<string name="InvFolder Library">
Bibliothèque
</string>
@@ -1299,10 +1296,10 @@ Veuillez réessayer de vous connecter dans une minute.
Gestes
</string>
<string name="InvFolder Favorite">
- Favoris
+ Mes Favoris
</string>
<string name="InvFolder favorite">
- Favoris
+ Mes Favoris
</string>
<string name="InvFolder Current Outfit">
Tenue actuelle
diff --git a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml
deleted file mode 100644
index 98c385d29f..0000000000
--- a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="EDITOR DELLE CICLO GIORNO/NOTTE">
- <tab_container name="Day Cycle Tabs">
- <panel label="Ciclo giorno/notte" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 0:00
- </text>
- <text name="WL3am">
- 3:00
- </text>
- <text name="WL6am">
- 6:00
- </text>
- <text name="WL9amHash">
- 9:00
- </text>
- <text name="WL12pmHash">
- 12:00
- </text>
- <text name="WL3pm">
- 15:00
- </text>
- <text name="WL6pm">
- 18:00
- </text>
- <text name="WL9pm">
- 21:00
- </text>
- <text name="WL12am2">
- 24:00
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/>
- <button label_selected="Cancella voce" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Impostazioni del fotogramma chiave:
- </text>
- <text name="WLCurKeyTimeText">
- Tempo:
- </text>
- <spinner label="Ora" name="WLCurKeyHour"/>
- <spinner label="Min" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Impostazione chiave:
- </text>
- <combo_box label="Programma:" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Raggruppa:
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Lunghezza del ciclo:
- </text>
- <spinner label="Ore" name="WLLengthOfDayHour"/>
- <spinner label="Min" name="WLLengthOfDayMin"/>
- <spinner label="Sec" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Anteprima:
- </text>
- <button label="Avvia" label_selected="Avvia" name="WLAnimSky"/>
- <button label="Arresta!" label_selected="Arresta" name="WLStopAnimSky"/>
- <button label="Usa l&apos;ora della proprietà" label_selected="Vai all&apos;ora della proprietà" name="WLUseLindenTime"/>
- <button label="Salva il test del giorno" label_selected="Salva il test del giorno" name="WLSaveDayCycle"/>
- <button label="Carica il test del giorno" label_selected="Carica il test del giorno" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/floater_env_settings.xml b/indra/newview/skins/default/xui/it/floater_env_settings.xml
deleted file mode 100644
index 1c17c18e84..0000000000
--- a/indra/newview/skins/default/xui/it/floater_env_settings.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="EDITOR DELL&apos;AMBIENTE">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Ora del
-giorno
- </text>
- <text name="EnvTimeText2">
- 12:00 PM
- </text>
- <text name="EnvCloudText">
- Intensità delle
-Nuvole
- </text>
- <text name="EnvWaterColorText">
- Colore
-dell&apos;Acqua
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Clicca per aprire il selettore dei colori"/>
- <text name="EnvWaterFogText">
- Nebbiosità
-dell&apos;acqua
- </text>
- <button bottom="-144" label="Usa orario della regione" name="EnvUseEstateTimeButton" width="145"/>
- <button label="Cielo avanzato" name="EnvAdvancedSkyButton"/>
- <button label="Acqua avanzata" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/floater_settings_debug.xml b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
index aab00a26ce..489d52d3b8 100644
--- a/indra/newview/skins/default/xui/it/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="PARAMETRI DI DEBUG">
<radio_group name="boolean_combo">
- <radio_item label="VERO" name="TRUE" value="vero"/>
- <radio_item label="FALSO" name="FALSE" value=""/>
+ <radio_item label="VERO" name="TRUE" />
+ <radio_item label="FALSO" name="FALSE" />
</radio_group>
<color_swatch label="Colore" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/it/floater_water.xml b/indra/newview/skins/default/xui/it/floater_water.xml
deleted file mode 100644
index b25f0a6266..0000000000
--- a/indra/newview/skins/default/xui/it/floater_water.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="EDITOR AVANZATO DELL&apos;ACQUA">
- <text name="KeyFramePresetsText" width="245">
- Impostazioni predeterminate dell&apos;acqua:
- </text>
- <combo_box left_delta="245" name="WaterPresetsCombo" width="150"/>
- <button label="Nuovo" label_selected="Nuovo" name="WaterNewPreset"/>
- <button label="Salva" label_selected="Salva" name="WaterSavePreset"/>
- <button label="Cancella" label_selected="Cancella" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="IMPOSTAZIONI" name="Settings">
- <text name="BHText">
- Colore della nebbiosità dell&apos;acqua
- </text>
- <button label="?" left="209" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Clicca per aprire il selettore dei colori"/>
- <text font="SansSerifSmall" name="WaterFogDensText">
- Esponente di densità della nebbia
- dell&apos;acqua
- </text>
- <slider bottom_delta="-40" name="WaterFogDensity"/>
- <button label="?" left="209" name="WaterFogDensityHelp"/>
- <text bottom="-140" font="SansSerifSmall" name="WaterUnderWaterFogModText">
- Regolatore effetto nebbia subacquea
- </text>
- <button label="?" left="209" name="WaterUnderWaterFogModHelp"/>
- <text name="BDensText">
- Scala di riflessione delle onde
- </text>
- <button label="?" left="415" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <text name="HDText">
- Scala Fresnel
- </text>
- <button label="?" left="415" name="WaterFresnelScaleHelp"/>
- <text name="FresnelOffsetText">
- Offset Fresnel
- </text>
- <button label="?" left="415" name="WaterFresnelOffsetHelp"/>
- <text font="SansSerifSmall" name="DensMultText">
- Scala di rifrazione nell&apos;acqua
- dall&apos;alto
- </text>
- <slider bottom_delta="-40" name="WaterScaleAbove"/>
- <button label="?" left="650" name="WaterScaleAboveHelp"/>
- <text bottom="-70" font="SansSerifSmall" name="WaterScaleBelowText">
- Scala di rifrazione nell&apos;acqua
- dal basso
- </text>
- <slider bottom_delta="-40" name="WaterScaleBelow"/>
- <button label="?" left="650" name="WaterScaleBelowHelp"/>
- <text bottom="-122" name="MaxAltText">
- Moltiplicatore della sfocatura
- </text>
- <button label="?" left="650" name="WaterBlurMultiplierHelp"/>
- </panel>
- <panel label="IMMAGINE" name="Waves">
- <text name="BHText">
- Direzione della grande onda
- </text>
- <button label="?" left="170" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Direzione della piccola onda
- </text>
- <button label="?" left="170" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Mappatura normale
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/floater_windlight_options.xml b/indra/newview/skins/default/xui/it/floater_windlight_options.xml
deleted file mode 100644
index 6828d05be0..0000000000
--- a/indra/newview/skins/default/xui/it/floater_windlight_options.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="EDITOR AVANZATO DEL CIELO">
- <text name="KeyFramePresetsText" width="105">
- Cieli predefiniti:
- </text>
- <combo_box left_delta="105" name="WLPresetsCombo"/>
- <button label="Nuovo" label_selected="Nuovo" name="WLNewPreset"/>
- <button label="Salva" label_selected="Salva" left_delta="72" name="WLSavePreset"/>
- <button label="Elimina" label_selected="Elimina" left_delta="72" name="WLDeletePreset"/>
- <button font="SansSerifSmall" label="Editor del ciclo giorno/notte" label_selected="Editor del ciclo giorno/notte" left_delta="85" name="WLDayCycleMenuButton" width="165"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSFERA" name="Atmosphere">
- <text name="BHText">
- Blu dell&apos;Orizzonte
- </text>
- <button label="?" left="189" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text font="SansSerifSmall" name="BDensText">
- Altezza della Foschia all&apos;Orizzonte
- </text>
- <button label="?" left="189" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Densità del Blu
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Densità  della Foschia
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Moltiplicatore di Densità
- </text>
- <button label="?" left="645" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Moltiplicatore della Distanza
- </text>
- <button label="?" left="645" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Altitudine Massima
- </text>
- <button label="?" left="645" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="ILLUMINAZIONE" name="Lighting">
- <text name="SLCText">
- Colore Sole/Luna
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Posizione Sole/Luna
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Ambiente
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Angolo Est
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Corona intorno al sole
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Focus" name="WLGlowB"/>
- <slider label="Grandezza" name="WLGlowR"/>
- <text name="SceneGammaText">
- Gamma della Scena
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Luminosità  delle stelle
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="NUVOLE" name="Clouds">
- <text name="WLCloudColorText">
- Colore delle Nuvole
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Nuvole XY/Densità
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Copertura delle Nuvole
- </text>
- <button label="?" left="415" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Altitudine delle Nuvole
- </text>
- <button label="?" left="415" name="WLCloudScaleHelp"/>
- <text name="WLCloudDetailText">
- Dettagli Nuvole (XY/ Densità)
- </text>
- <button label="?" left="415" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Scorrimento delle X
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="Blocca" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Scorrimento delle Y
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="Blocca" name="WLCloudLockY"/>
- <check_box label="Mostra le Nuvole Classiche" name="DrawClassicClouds"/>
- <button label="?" left="645" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/panel_edit_pick.xml b/indra/newview/skins/default/xui/it/panel_edit_pick.xml
index 8e464ca037..145b8cf4e3 100644
--- a/indra/newview/skins/default/xui/it/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/it/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Salva luogo preferito" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Annulla" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/it/panel_people.xml b/indra/newview/skins/default/xui/it/panel_people.xml
index b24a4055f7..f903ae6e2c 100644
--- a/indra/newview/skins/default/xui/it/panel_people.xml
+++ b/indra/newview/skins/default/xui/it/panel_people.xml
@@ -66,16 +66,16 @@ Stai cercando persone da frequentare? Prova la [secondlife:///app/worldmap Mappa
<layout_panel name="view_profile_btn_lp">
<button label="Profilo" name="view_profile_btn" tool_tip="Mostra immagine, gruppi e altre informazioni del residente"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="Apri una sessione messaggio istantaneo"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Chiama" name="call_btn" tool_tip="Chiama questo residente"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Condividi" name="share_btn" tool_tip="Condividi un oggetto dell&apos;inventario"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teleport" name="teleport_btn" tool_tip="Offri teleport"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index cbe8ef24c4..6af515d82d 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -1217,9 +1217,6 @@ Prova ad accedere nuovamente tra un minuto.
<string name="InvFolder My Inventory">
Il mio inventario
</string>
- <string name="InvFolder My Favorites">
- I miei preferiti
- </string>
<string name="InvFolder Library">
Libreria
</string>
@@ -1278,10 +1275,10 @@ Prova ad accedere nuovamente tra un minuto.
Gesture
</string>
<string name="InvFolder Favorite">
- Preferiti
+ I miei preferiti
</string>
<string name="InvFolder favorite">
- Preferiti
+ I miei preferiti
</string>
<string name="InvFolder Current Outfit">
Abbigliamento attuale
diff --git a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml
deleted file mode 100644
index b0949cd4e0..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="デイサイクル編集">
- <tab_container name="Day Cycle Tabs">
- <panel label="デイサイクル" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 深夜 12時
- </text>
- <text name="WL3am">
- 午前 3時
- </text>
- <text name="WL6am">
- 午前 6時
- </text>
- <text name="WL9amHash">
- 午前 9時
- </text>
- <text name="WL12pmHash">
- 正午 12時
- </text>
- <text name="WL3pm">
- 午後 3時
- </text>
- <text name="WL6pm">
- 午後 6時
- </text>
- <text name="WL9pm">
- 午後 9時
- </text>
- <text name="WL12am2">
- 深夜 12時
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="キーの追加" label_selected="キーの追加" name="WLAddKey"/>
- <button label="キーの削除" label_selected="キーの削除" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- キーフレームの設定:
- </text>
- <text name="WLCurKeyTimeText">
- キータイム:
- </text>
- <spinner label="時間" name="WLCurKeyHour"/>
- <spinner label="分" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- キーの事前設定:
- </text>
- <combo_box label="事前設定" name="WLKeyPresets"/>
- <text name="DayCycleText">
- スナップ:
- </text>
- <combo_box label="5 分" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- サイクルの長さ:
- </text>
- <spinner label="時間" name="WLLengthOfDayHour"/>
- <spinner label="分" name="WLLengthOfDayMin"/>
- <spinner label="秒" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- プレビュー:
- </text>
- <button label="再生" label_selected="再生" name="WLAnimSky"/>
- <button label="停止" label_selected="停止" name="WLStopAnimSky"/>
- <button label="不動産の時刻を使用" label_selected="不動産の時刻に変更" name="WLUseLindenTime"/>
- <button label="デイテストを保存" label_selected="デイテストを保存" name="WLSaveDayCycle"/>
- <button label="デイテストをロード" label_selected="デイテストをロード" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_env_settings.xml b/indra/newview/skins/default/xui/ja/floater_env_settings.xml
deleted file mode 100644
index 1d5f26a6eb..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_env_settings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="自然環境エディター">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- 時刻
- </text>
- <text name="EnvTimeText2">
- 正午 12:00
- </text>
- <text name="EnvCloudText">
- 雲の量
- </text>
- <text name="EnvWaterColorText">
- 水の色
- </text>
- <color_swatch name="EnvWaterColor" tool_tip="クリックしてカラーピッカーを開きます"/>
- <text name="EnvWaterFogText">
- 水中照度
- </text>
- <button label="不動産の時刻を使用" name="EnvUseEstateTimeButton"/>
- <button label="空の高度な設定" name="EnvAdvancedSkyButton"/>
- <button label="水の高度な設定" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml
index 0b14f92ae7..f7d77d351e 100644
--- a/indra/newview/skins/default/xui/ja/floater_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_tools.xml
@@ -69,13 +69,13 @@
<text name="RenderingCost" tool_tip="このオブジェクトにかかるレンダリングコストを表示">
þ: [COUNT]
</text>
- <check_box label="" left="116" name="checkbox uniform"/>
+ <check_box label="" name="checkbox uniform"/>
<text label="両側を延ばす" name="checkbox uniform label">
両側を延ばす
</text>
<check_box initial_value="true" label="テクスチャを引き延ばす" name="checkbox stretch textures"/>
- <check_box initial_value="true" label="グリッドにスナップ" left_delta="27" name="checkbox snap to grid"/>
- <combo_box left_delta="60" name="combobox grid mode" tool_tip="オブジェクトの配置に使うグリッドルーラを選択します" width="76">
+ <check_box initial_value="true" label="グリッドにスナップ" name="checkbox snap to grid"/>
+ <combo_box name="combobox grid mode" tool_tip="オブジェクトの配置に使うグリッドルーラを選択します" >
<combo_box.item label="インワールドグリッド" name="World"/>
<combo_box.item label="ローカルグリッド" name="Local"/>
<combo_box.item label="リファレンスグリッド" name="Reference"/>
@@ -137,7 +137,7 @@
<text name="object_cost" tool_tip="[prims] / [physics complexity] として現在選択されているオブジェクトのコスト">
料金: [COST] / [PHYSICS]
</text>
- <tab_container name="Object Info Tabs" tab_max_width="150" tab_min_width="30">
+ <tab_container name="Object Info Tabs" >
<panel label="一般" name="General">
<panel.string name="text deed continued">
譲渡
@@ -379,22 +379,22 @@
オブジェクトの特徴を編集:
</text>
<check_box label="フレキシブルパス" name="Flexible1D Checkbox Ctrl" tool_tip="Z 軸を中心にオブジェクトの屈曲を有効にします(クライアント側のみ)"/>
- <spinner label="柔軟性" label_width="72" name="FlexNumSections" width="135"/>
- <spinner label="重力" label_width="72" name="FlexGravity" width="135"/>
- <spinner label="ドラッグ" label_width="72" name="FlexFriction" width="135"/>
- <spinner label="風" label_width="72" name="FlexWind" width="135"/>
- <spinner label="緊張" label_width="72" name="FlexTension" width="135"/>
- <spinner label="X 軸方向の力" label_width="72" name="FlexForceX" width="135"/>
- <spinner label="Y 軸方向の力" label_width="72" name="FlexForceY" width="135"/>
- <spinner label="Z 軸方向の力" label_width="72" name="FlexForceZ" width="135"/>
+ <spinner label="柔軟性" name="FlexNumSections" />
+ <spinner label="重力" name="FlexGravity" />
+ <spinner label="ドラッグ" name="FlexFriction" />
+ <spinner label="風" name="FlexWind" />
+ <spinner label="緊張" name="FlexTension" />
+ <spinner label="X 軸方向の力" name="FlexForceX" />
+ <spinner label="Y 軸方向の力" name="FlexForceY" />
+ <spinner label="Z 軸方向の力" name="FlexForceZ" />
<check_box label="光" name="Light Checkbox Ctrl" tool_tip="オブジェクトが発光します"/>
- <color_swatch label="" left_delta="74" name="colorswatch" tool_tip="クリックしてカラーピッカーを開きます"/>
+ <color_swatch label="" name="colorswatch" tool_tip="クリックしてカラーピッカーを開きます"/>
<texture_picker label="" name="light texture control" tool_tip="クリックで投影画を選択します(遅延レンダリング有効時のみ)"/>
- <spinner label="輝度" label_width="72" name="Light Intensity" width="135"/>
+ <spinner label="輝度" name="Light Intensity" />
<spinner label="FOV" name="Light FOV"/>
- <spinner label="半径" label_width="72" name="Light Radius" width="135"/>
+ <spinner label="半径" name="Light Radius" />
<spinner label="焦点" name="Light Focus"/>
- <spinner label="弱まる" label_width="72" name="Light Falloff" width="135"/>
+ <spinner label="弱まる" name="Light Falloff" />
<spinner label="環境" name="Light Ambiance"/>
<text name="label physicsshapetype">
実像の種類:
@@ -496,18 +496,18 @@
</panel>
</panel>
<panel label="中身" name="Contents">
- <button label="新しいスクリプト" label_selected="新規スクリプト" name="button new script" width="120"/>
- <button label="権限" left_delta="130" name="button permissions" width="80"/>
+ <button label="新しいスクリプト" label_selected="新規スクリプト" name="button new script" />
+ <button label="権限" name="button permissions" />
</panel>
</tab_container>
<panel name="land info panel">
<text name="label_parcel_info">
区画情報
</text>
- <text name="label_area_price" width="200">
+ <text name="label_area_price" >
価格: [AREA] 平方メートル L$ [PRICE]
</text>
- <text name="label_area" width="200">
+ <text name="label_area" >
面積: [AREA] 平方メートル
</text>
<button label="土地情報" label_selected="土地情報" name="button about land"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_water.xml b/indra/newview/skins/default/xui/ja/floater_water.xml
deleted file mode 100644
index fb64332e79..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_water.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="水の高度な編集">
- <floater.string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </floater.string>
- <text name="KeyFramePresetsText">
- 水の事前設定:
- </text>
- <button label="新規" label_selected="新規" name="WaterNewPreset"/>
- <button label="保存" label_selected="保存" name="WaterSavePreset"/>
- <button label="削除" label_selected="削除" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="設定" name="Settings">
- <text name="BHText">
- 水中のフォグ効果の色
- </text>
- <color_swatch name="WaterFogColor" tool_tip="クリックしてカラーピッカーを開きます"/>
- <text name="WaterFogDensText">
- 水中の透明度指数
- </text>
- <text name="WaterUnderWaterFogModText">
- 水中のフォグ効果加減
- </text>
- <text name="BDensText">
- さざ波の反射スケール
- </text>
- <slider label="1" name="WaterNormalScaleX"/>
- <slider label="2" name="WaterNormalScaleY"/>
- <slider label="3" name="WaterNormalScaleZ"/>
- <text name="HDText">
- フレネルのスケール
- </text>
- <text name="FresnelOffsetText">
- フレネルのオフセット
- </text>
- <text name="DensMultText">
- 水面の屈折スケール
- </text>
- <text name="WaterScaleBelowText">
- 水中の屈折スケール
- </text>
- <text name="MaxAltText">
- 不透明度の増幅
- </text>
- </panel>
- <panel label="画像" name="Waves">
- <text name="BHText">
- 大波の方向
- </text>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- 小波の方向
- </text>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- ノーマルマップ
- </text>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_windlight_options.xml b/indra/newview/skins/default/xui/ja/floater_windlight_options.xml
deleted file mode 100644
index feb94ef73e..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_windlight_options.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="空の高度な編集">
- <text name="KeyFramePresetsText">
- 空の事前設定:
- </text>
- <button label="新規" label_selected="新規" name="WLNewPreset"/>
- <button label="保存" label_selected="保存" name="WLSavePreset"/>
- <button label="削除" label_selected="削除" name="WLDeletePreset"/>
- <button label="デイサイクル編集" label_selected="デイサイクル編集" name="WLDayCycleMenuButton"/>
- <tab_container name="WindLight Tabs">
- <panel label="大気" name="Atmosphere">
- <text name="BHText">
- 空の配色
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- 空と遠景の露光
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- 空の配色と濃度
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- 大気の不透明度
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- 大気の不透明度の増幅
- </text>
- <button label="?" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- 視界の増幅
- </text>
- <button label="?" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- 最大高度
- </text>
- <button label="?" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="ライティング" name="Lighting">
- <text name="SLCText">
- 太陽/月の色
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- 太陽/月の位置
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- アンビエント
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- 東の角度
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- 太陽の輝き
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="フォーカス " name="WLGlowB"/>
- <slider label="サイズ " name="WLGlowR"/>
- <text name="SceneGammaText">
- 風景ガンマ
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- 星の輝き
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="雲" name="Clouds">
- <text name="WLCloudColorText">
- 雲の色
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- 雲の XY/密度
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- 雲の量
- </text>
- <button label="?" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- 雲のスケール
- </text>
- <button label="?" name="WLCloudScaleHelp"/>
- <text name="WLCloudDetailText">
- 雲の詳細 (XY/密度)
- </text>
- <button label="?" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- 雲の移動速度 (X 方向)
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="ロック" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- 雲の移動速度 (Y 方向)
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="ロック" name="WLCloudLockY"/>
- <check_box label="従来の雲を描画" name="DrawClassicClouds"/>
- <button label="?" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/panel_edit_pick.xml b/indra/newview/skins/default/xui/ja/panel_edit_pick.xml
index 4fb031b677..39ea1df1e3 100644
--- a/indra/newview/skins/default/xui/ja/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/ja/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="ピックを保存" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="取り消し" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/ja/panel_people.xml b/indra/newview/skins/default/xui/ja/panel_people.xml
index c7f71c6de0..1c90f7327e 100644
--- a/indra/newview/skins/default/xui/ja/panel_people.xml
+++ b/indra/newview/skins/default/xui/ja/panel_people.xml
@@ -66,16 +66,16 @@
<layout_panel name="view_profile_btn_lp">
<button label="プロフィール" name="view_profile_btn" tool_tip="写真、グループ、その他住人情報を表示"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="インスタントメッセージを開きます"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="コール" name="call_btn" tool_tip="この住人にコールする"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="共有" name="share_btn" tool_tip="「持ち物」のアイテムを共有する"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="テレポート" name="teleport_btn" tool_tip="テレポートを送ります"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index a6691fb764..fa6d25d238 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -1238,9 +1238,6 @@ support@secondlife.com にお問い合わせください。
<string name="InvFolder My Inventory">
持ち物
</string>
- <string name="InvFolder My Favorites">
- お気に入り
- </string>
<string name="InvFolder Library">
ライブラリ
</string>
@@ -3821,7 +3818,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
アドホックコンファレンス
</string>
<string name="conference-title-incoming">
- [AGENT_NAME]とコンファレンスする
+ [AGENT_NAME] とコンファレンスする
</string>
<string name="inventory_item_offered-im">
持ち物アイテムを送りました
diff --git a/indra/newview/skins/default/xui/nl/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/nl/floater_day_cycle_options.xml
deleted file mode 100644
index 1f3e045a75..0000000000
--- a/indra/newview/skins/default/xui/nl/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="DAGCYCLUS EDITOR">
- <tab_container name="Day Cycle Tabs">
- <panel label="Dagcyclus" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 0:00
- </text>
- <text name="WL3am">
- 3:00
- </text>
- <text name="WL6am">
- 6:00
- </text>
- <text name="WL9amHash">
- 9:00
- </text>
- <text name="WL12pmHash">
- 12:00
- </text>
- <text name="WL3pm">
- 15:00
- </text>
- <text name="WL6pm">
- 18:00
- </text>
- <text name="WL9pm">
- 21:00
- </text>
- <text name="WL12am2">
- 0:00
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Key toevoegen" label_selected="Key toevoegen" name="WLAddKey"/>
- <button label="Key verwijderen" label_selected="Key verwijderen" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Gemarkeerde frame instelling:
- </text>
- <text name="WLCurKeyTimeText">
- Markering tijd:
- </text>
- <spinner label="Uur" name="WLCurKeyHour"/>
- <spinner label="Min" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Markering voorinstelling:
- </text>
- <combo_box label="Voorinstelling" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Snap:
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Lengte van cyclus:
- </text>
- <spinner label="Uur" name="WLLengthOfDayHour"/>
- <spinner label="Min" name="WLLengthOfDayMin"/>
- <spinner label="Sec" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Voorbeeld:
- </text>
- <button label="Afspelen" label_selected="Afspelen" name="WLAnimSky"/>
- <button label="Stop!" label_selected="Stop" name="WLStopAnimSky"/>
- <button label="Gebruik estatetijd" label_selected="Ga naar Estate tijd" name="WLUseLindenTime"/>
- <button label="Opslaan testdag" label_selected="Opslaan testdag" name="WLSaveDayCycle"/>
- <button label="Laad testdag" label_selected="Laad testdag" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/nl/floater_env_settings.xml b/indra/newview/skins/default/xui/nl/floater_env_settings.xml
deleted file mode 100644
index 3c207040d2..0000000000
--- a/indra/newview/skins/default/xui/nl/floater_env_settings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="OMGEVING EDITOR">
- <text bottom="-42" name="EnvTimeText">
- Tijd van de
-dag
- </text>
- <text bottom_delta="-36" name="EnvTimeText2">
- 0:00
- </text>
- <text name="EnvCloudText">
- Wolkendek
- </text>
- <text name="EnvWaterColorText">
- Waterkleur
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Klik om de kleurkiezer te openen"/>
- <text name="EnvWaterFogText">
- Watermist
- </text>
- <button label="Gebruik estate tijd" name="EnvUseEstateTimeButton"/>
- <button label="Geavanceerde lucht" name="EnvAdvancedSkyButton"/>
- <button label="Geavanceerd water" name="EnvAdvancedWaterButton"/>
- <button label="?" name="EnvSettingsHelpButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/nl/floater_preview_gesture.xml b/indra/newview/skins/default/xui/nl/floater_preview_gesture.xml
index 7dd85460a2..c6b301841a 100644
--- a/indra/newview/skins/default/xui/nl/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/nl/floater_preview_gesture.xml
@@ -15,7 +15,7 @@
<text name="trigger_label">
Trigger:
</text>
- <text name="replace_text" tool_tip="Vervang de startseinwoorden door deze woorden. Bijvoorbeeld, startsein &apos;hallo&apos; vervang door &apos;hoi&apos; zal de chat &apos;Ik wilde hallo zeggen&apos; veranderen in &apos;Ik wilde hoi zeggen&apos;, waarbij tevens het gebaar afgespeeld zal worden!" left="208">
+ <text name="replace_text" tool_tip="Vervang de startseinwoorden door deze woorden. Bijvoorbeeld, startsein &apos;hallo&apos; vervang door &apos;hoi&apos; zal de chat &apos;Ik wilde hallo zeggen&apos; veranderen in &apos;Ik wilde hoi zeggen&apos;, waarbij tevens het gebaar afgespeeld zal worden!">
Vervangen door:
</text>
<line_editor name="replace_editor" tool_tip="Vervang de startseinwoorden door deze woorden. Bijvoorbeeld, startsein &apos;hallo&apos; vervang door &apos;hoi&apos; zal de chat &apos;Ik wilde hallo zeggen&apos; veranderen in &apos;Ik wilde hoi zeggen&apos;, waarbij tevens het gebaar afgespeeld zal worden."/>
diff --git a/indra/newview/skins/default/xui/nl/floater_water.xml b/indra/newview/skins/default/xui/nl/floater_water.xml
deleted file mode 100644
index 1fb1ca241b..0000000000
--- a/indra/newview/skins/default/xui/nl/floater_water.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="GEAVANCEERDE WATER EDITOR">
- <combo_box bottom="-50" height="18" left_delta="116" name="WaterPresetsCombo" width="150" />
- <text name="KeyFramePresetsText">
- Watervoorinstellingen
- </text>
- <button label="Nieuw" label_selected="Nieuw" name="WaterNewPreset" left_delta="190"/>
- <button label="Opslaan" label_selected="Opslaan" name="WaterSavePreset"/>
- <button label="Verwijderen" label_selected="Verwijderen" name="WaterDeletePreset" width="80"/>
- <tab_container name="Water Tabs">
- <panel label="Instellingen" name="Settings">
- <text name="BHText">
- Watermistkleur
- </text>
- <button label="?" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Klik om de kleurkiezer te openen"/>
- <text name="WaterFogDensText">
- Mistdichtheidsexponent
- </text>
- <button label="?" name="WaterFogDensityHelp"/>
- <text name="WaterUnderWaterFogModText">
- Onderwatermist wijziger
- </text>
- <button label="?" name="WaterUnderWaterFogModHelp"/>
- <text name="BDensText">
- Reflectie wavelet schaal
- </text>
- <button label="?" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <text name="HDText">
- Fresnelschaal
- </text>
- <button label="?" name="WaterFresnelScaleHelp"/>
- <text name="FresnelOffsetText">
- Fresnelverplaatsing
- </text>
- <button label="?" name="WaterFresnelOffsetHelp"/>
- <text name="DensMultText">
- Refractieschaal boven
- </text>
- <button label="?" name="WaterScaleAboveHelp"/>
- <text name="WaterScaleBelowText">
- Refractieschaal onder
- </text>
- <button label="?" name="WaterScaleBelowHelp"/>
- <text name="MaxAltText">
- Wazigheidvermeerderaar
- </text>
- <button label="?" name="WaterBlurMultiplierHelp"/>
- </panel>
- <panel label="Afbeelding" name="Waves">
- <text name="BHText">
- Grote golven richting
- </text>
- <button label="?" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Kleine golf richting
- </text>
- <button label="?" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Normaalmap
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/nl/floater_windlight_options.xml b/indra/newview/skins/default/xui/nl/floater_windlight_options.xml
deleted file mode 100644
index b26dd7916e..0000000000
--- a/indra/newview/skins/default/xui/nl/floater_windlight_options.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="GEAVANCEERDE LUCHT EDITOR">
- <combo_box allow_text_entry="false" follows="left|top" mouse_opaque="true" name="WLPresetsCombo"/>
- <text name="KeyFramePresetsText">
- Lucht voorinstellingen
- </text>
- <button label="Nieuw" label_selected="Nieuw" name="WLNewPreset"/>
- <button label="Opslaan" label_selected="Opslaan" name="WLSavePreset"/>
- <button label="Verwijderen" label_selected="Verwijderen" name="WLDeletePreset"/>
- <button label="Dag cyclus editor" label_selected="Dag cyclus editor" name="WLDayCycleMenuButton"/>
- <tab_container name="WindLight Tabs">
- <panel label="Atmosfeer" name="Atmosphere">
- <text name="BHText">
- Blauw Horizon
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Nevel horizon
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Blauw dichtheid
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Nevel dichtheid
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Dichtheidsfactor
- </text>
- <button label="?" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Afstandsfactor
- </text>
- <button label="?" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Max hoogte
- </text>
- <button label="?" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="Licht" name="Lighting">
- <text name="SLCText">
- Zon/maan kleur
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Zon/maan positie
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Omgeving
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Oosthoek
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Zonnegloed
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Focus " name="WLGlowB"/>
- <slider label="Grootte" name="WLGlowR"/>
- <text name="SceneGammaText">
- Scenegamma
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Ster helderheid
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="Wolken" name="Clouds">
- <text name="WLCloudColorText">
- Wolkenkleur
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Wolken (XY/Dichtheid)
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Wolkenbedekking
- </text>
- <button label="?" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Wolkenschaal
- </text>
- <button label="?" name="WLCloudScaleHelp"/>
- <text name="WLCloudDetailText">
- Wolkendetail (XY/Dichtheid)
- </text>
- <button label="?" name="WLCloudDetailHelp" left="404"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Wolk verplaatsing X
- </text>
- <button label="?" name="WLCloudScrollXHelp" left="600"/>
- <check_box label="Vastzetten" name="WLCloudLockX" left="622"/>
- <text name="WLCloudScrollYText">
- Wolk verplaatsing Y
- </text>
- <button label="?" name="WLCloudScrollYHelp" left="600"/>
- <check_box label="Vastzetten" name="WLCloudLockY" left="622"/>
- <check_box label="Teken klassieke wolken" name="DrawClassicClouds"/>
- <button label="?" name="WLClassicCloudsHelp" left="620"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/nl/strings.xml b/indra/newview/skins/default/xui/nl/strings.xml
index a53c0769dc..e9db237e82 100644
--- a/indra/newview/skins/default/xui/nl/strings.xml
+++ b/indra/newview/skins/default/xui/nl/strings.xml
@@ -849,9 +849,6 @@
<string name="InvFolder My Inventory">
Mijn Inventaris
</string>
- <string name="InvFolder My Favorites">
- Mijn Favorieten
- </string>
<string name="InvFolder Library">
Bibliotheek
</string>
@@ -910,10 +907,10 @@
Gebaren
</string>
<string name="InvFolder Favorite">
- Favoriten
+ Mijn Favorieten
</string>
<string name="InvFolder favorite">
- Favoriten
+ Mijn Favorieten
</string>
<string name="InvFolder Current Outfit">
Huidige Uitrusting
diff --git a/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml
deleted file mode 100644
index f3929df3e3..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="EDYTOR CYKLU DNIA">
- <tab_container name="Day Cycle Tabs">
- <panel label="Cykl dnia" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <multi_slider label="" name="WLTimeSlider"/>
- <multi_slider label="" name="WLDayCycleKeys"/>
- <text name="WL12am">
- 12am
- </text>
- <text name="WL3am">
- 3am
- </text>
- <text name="WL6am">
- 6am
- </text>
- <text name="WL9amHash">
- 9am
- </text>
- <text name="WL12pmHash">
- 12pm
- </text>
- <text name="WL3pm">
- 3pm
- </text>
- <text name="WL6pm">
- 6pm
- </text>
- <text name="WL9pm">
- 9pm
- </text>
- <text name="WL12am2">
- 12am
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Dodaj" label_selected="Dodaj" name="WLAddKey"/>
- <button label="Usuń" label_selected="Usuń" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Preferencje czasu:
- </text>
- <text name="WLCurKeyTimeText">
- Czas:
- </text>
- <spinner label="Godz" name="WLCurKeyHour"/>
- <spinner label="Min" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Ustawienia:
- </text>
- <combo_box label="Preset" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Przerwij:
- </text>
- <combo_box label="5 min" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Długość cyklu:
- </text>
- <spinner label="Godz" name="WLLengthOfDayHour"/>
- <spinner label="Min" name="WLLengthOfDayMin"/>
- <spinner label="Sek" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Przeglądaj:
- </text>
- <button label="Start" label_selected="Start" name="WLAnimSky"/>
- <button label="Stop" label_selected="Stop" name="WLStopAnimSky"/>
- <button label="Używaj czasu regionu" label_selected="Używaj czasu regionu" name="WLUseLindenTime"/>
- <button label="Zapisz test dnia" label_selected="Zapisz test dnia" name="WLSaveDayCycle"/>
- <button label="Załaduj test dnia" label_selected="Załaduj test dnia" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_env_settings.xml b/indra/newview/skins/default/xui/pl/floater_env_settings.xml
deleted file mode 100644
index 3ab854fbbb..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_env_settings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="EDYTOR ŚRODOWISKA">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Czas
- </text>
- <text name="EnvTimeText2">
- 12:00 PM
- </text>
- <slider label="" name="EnvTimeSlider"/>
- <text name="EnvCloudText">
- Chmury:
- </text>
- <slider label="" name="EnvCloudSlider"/>
- <text name="EnvWaterColorText">
- Kolor wody
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Kliknij aby wybrać kolor"/>
- <text name="EnvWaterFogText">
- Zamglenie:
- </text>
- <slider label="" name="EnvWaterFogSlider"/>
- <button label="Używaj czasu regionu" name="EnvUseEstateTimeButton"/>
- <button label="Zaawansowane niebo" name="EnvAdvancedSkyButton"/>
- <button label="Zaawansowana woda" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
index 7c29d52e7b..131f92d56f 100644
--- a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="USTAWIENIA DEBUGOWANIA">
<radio_group name="boolean_combo">
- <radio_item label="PRAWDA" name="TRUE" value="prawda"/>
- <radio_item label="NIEPRAWDA" name="FALSE" value=""/>
+ <radio_item label="PRAWDA" name="TRUE" />
+ <radio_item label="NIEPRAWDA" name="FALSE" />
</radio_group>
<color_swatch label="Kolor" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_water.xml b/indra/newview/skins/default/xui/pl/floater_water.xml
deleted file mode 100644
index 9720dae516..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_water.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="ZAAWANSOWANY EDYTOR WODY">
- <text name="KeyFramePresetsText">
- Ustawienia wody:
- </text>
- <button label="Nowe" label_selected="Nowe" name="WaterNewPreset"/>
- <button label="Zapisz" label_selected="Zapisz" name="WaterSavePreset"/>
- <button label="Usuń" label_selected="Usuń" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="USTAWIENIA" name="Settings">
- <text name="BHText">
- Kolor podwodnej mgły
- </text>
- <button label="?" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Kliknij aby wybrać kolor"/>
- <text name="WaterFogDensText">
- Wykładnik gęstości mgły
- </text>
- <button label="?" name="WaterFogDensityHelp"/>
- <slider label="" name="WaterFogDensity"/>
- <text name="WaterUnderWaterFogModText">
- Modyfikator mgły
- </text>
- <button label="?" name="WaterUnderWaterFogModHelp"/>
- <slider label="" name="WaterUnderWaterFogMod"/>
- <text name="BDensText">
- Skala zmarszczeń
- </text>
- <button label="?" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <slider label="" name="WaterNormalScaleX"/>
- <slider label="" name="WaterNormalScaleY"/>
- <slider label="" name="WaterNormalScaleZ"/>
- <text name="HDText">
- Skala Fresnela
- </text>
- <button label="?" name="WaterFresnelScaleHelp"/>
- <slider label="" name="WaterFresnelScale"/>
- <text name="FresnelOffsetText">
- Przesunięcie Fresnela
- </text>
- <button label="?" name="WaterFresnelOffsetHelp"/>
- <slider label="" name="WaterFresnelOffset"/>
- <text name="DensMultText">
- Górna refrakcja
- </text>
- <button label="?" name="WaterScaleAboveHelp"/>
- <slider label="" name="WaterScaleAbove"/>
- <text name="WaterScaleBelowText">
- Dolna refrakcja
- </text>
- <button label="?" name="WaterScaleBelowHelp"/>
- <slider label="" name="WaterScaleBelow"/>
- <text name="MaxAltText">
- Mnożnik rozmycia
- </text>
- <button label="?" name="WaterBlurMultiplierHelp"/>
- <slider label="" name="WaterBlurMult"/>
- </panel>
- <panel label="OBRAZ" name="Waves">
- <text name="BHText">
- Kierunek dużych fal
- </text>
- <button label="?" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <slider label="" name="WaterWave1DirX"/>
- <slider label="" name="WaterWave1DirY"/>
- <text name="BHText2">
- Kierunek małych fal
- </text>
- <button label="?" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <slider label="" name="WaterWave2DirX"/>
- <slider label="" name="WaterWave2DirY"/>
- <text name="BHText3">
- Mapa normalnych
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- <texture_picker label="" name="WaterNormalMap"/>
- </panel>
- </tab_container>
- <string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_windlight_options.xml b/indra/newview/skins/default/xui/pl/floater_windlight_options.xml
deleted file mode 100644
index 930e904464..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_windlight_options.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="ZAAWANSOWANY EDYTOR NIEBA">
- <text name="KeyFramePresetsText">
- Ustawienia nieba:
- </text>
- <button label="Nowe" label_selected="Nowe" name="WLNewPreset"/>
- <button label="Zapisz" label_selected="Zapisz" name="WLSavePreset"/>
- <button label="Usuń" label_selected="Usuń" name="WLDeletePreset"/>
- <button label="Edytor cyklu dnia" label_selected="Edytor cyklu dnia" name="WLDayCycleMenuButton"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSFERA" name="Atmosphere">
- <text name="BHText">
- Horyzont błękitu
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <slider label="" name="WLBlueHorizonR"/>
- <slider label="" name="WLBlueHorizonG"/>
- <slider label="" name="WLBlueHorizonB"/>
- <slider label="" name="WLBlueHorizonI"/>
- <text name="BDensText">
- Horyzont zamglenia
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <slider label="" name="WLHazeHorizon"/>
- <text name="BDensText2">
- Gęstość błękitu
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <slider label="" name="WLBlueDensityR"/>
- <slider label="" name="WLBlueDensityG"/>
- <slider label="" name="WLBlueDensityB"/>
- <slider label="" name="WLBlueDensityI"/>
- <text name="HDText">
- Gęstość zamglenia
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <slider label="" name="WLHazeDensity"/>
- <text name="DensMultText">
- Mnożnik gęsości
- </text>
- <button label="?" name="WLDensityMultHelp"/>
- <slider label="" name="WLDensityMult"/>
- <text name="WLDistanceMultText">
- Mnożnik dystansu
- </text>
- <button label="?" name="WLDistanceMultHelp"/>
- <slider label="" name="WLDistanceMult"/>
- <text name="MaxAltText">
- Max wysokość
- </text>
- <button label="?" name="WLMaxAltitudeHelp"/>
- <slider label="" name="WLMaxAltitude"/>
- </panel>
- <panel label="ŚWIATŁO" name="Lighting">
- <text name="SLCText">
- Kolor Słońca/Księżyca
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <slider label="" name="WLSunlightR"/>
- <slider label="" name="WLSunlightG"/>
- <slider label="" name="WLSunlightB"/>
- <slider label="" name="WLSunlightI"/>
- <text name="TODText">
- Pozycja Słońca/Księżyca
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <slider label="" name="WLSunAngle"/>
- <text name="WLAmbientText">
- Otoczenie
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <slider label="" name="WLAmbientR"/>
- <slider label="" name="WLAmbientG"/>
- <slider label="" name="WLAmbientB"/>
- <slider label="" name="WLAmbientI"/>
- <text name="WLEastAngleText">
- Pozycja wschodu
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <slider label="" name="WLEastAngle"/>
- <text name="SunGlowText">
- Blask Słońca
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Ostrość" name="WLGlowB"/>
- <slider label="Rozmiar" name="WLGlowR"/>
- <text name="SceneGammaText">
- Jasność obrazu
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <slider label="" name="WLGamma"/>
- <text name="WLStarText">
- Blask gwiazd
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- <slider label="" name="WLStarAlpha"/>
- </panel>
- <panel label="CHMURY" name="Clouds">
- <text name="WLCloudColorText">
- Kolor chmur
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <slider label="" name="WLCloudColorR"/>
- <slider label="" name="WLCloudColorG"/>
- <slider label="" name="WLCloudColorB"/>
- <slider label="" name="WLCloudColorI"/>
- <text name="WLCloudColorText2">
- Chmury (XY/Gęstość)
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- G
- </text>
- <slider label="" name="WLCloudX"/>
- <slider label="" name="WLCloudY"/>
- <slider label="" name="WLCloudDensity"/>
- <text name="WLCloudCoverageText">
- Pokrycie chmur
- </text>
- <button label="?" name="WLCloudCoverageHelp"/>
- <slider label="" name="WLCloudCoverage"/>
- <text name="WLCloudScaleText">
- Skala chmur
- </text>
- <button label="?" name="WLCloudScaleHelp"/>
- <slider label="" name="WLCloudScale"/>
- <text name="WLCloudDetailText">
- Szczegóły (XY/gęstość)
- </text>
- <button label="?" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- G
- </text>
- <slider label="" name="WLCloudDetailX"/>
- <slider label="" name="WLCloudDetailY"/>
- <slider label="" name="WLCloudDetailDensity"/>
- <text name="WLCloudScrollXText">
- Przewijanie chmur X
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="Zablokuj" name="WLCloudLockX"/>
- <slider label="" name="WLCloudScrollX"/>
- <text name="WLCloudScrollYText">
- Przewijanie chmur Y
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="Zablokuj" name="WLCloudLockY"/>
- <slider label="" name="WLCloudScrollY"/>
- <check_box label="Klasyczne chmury" name="DrawClassicClouds"/>
- <button label="?" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
- <string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </string>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/panel_edit_pick.xml b/indra/newview/skins/default/xui/pl/panel_edit_pick.xml
index 8a183c00cf..72c162f63d 100644
--- a/indra/newview/skins/default/xui/pl/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/pl/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Zapisz obrazek" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Cofnij" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/pl/panel_people.xml b/indra/newview/skins/default/xui/pl/panel_people.xml
index da9f84cb2e..ef52e2148b 100644
--- a/indra/newview/skins/default/xui/pl/panel_people.xml
+++ b/indra/newview/skins/default/xui/pl/panel_people.xml
@@ -66,16 +66,16 @@ Chcesz spotkać ludzi? Spróbuj [secondlife:///app/worldmap Mapa Świata].
<layout_panel name="view_profile_btn_lp">
<button label="Profil" name="view_profile_btn" tool_tip="Pokaż zdjęcie, grupy i inne informacje o Rezydencie"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="Otwórz wiadomości IM"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Dzwoń" name="call_btn" tool_tip="Zadzwoń do tego Rezydenta"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Udostępnij" name="share_btn" tool_tip="Udostępnij obiekt z Szafy"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teleportuj" name="teleport_btn" tool_tip="Zaproponuj teleport"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index 6eceed46d3..e93da48dc0 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -1072,9 +1072,6 @@
<string name="InvFolder My Inventory">
Moja Szafa
</string>
- <string name="InvFolder My Favorites">
- Moje ulubione
- </string>
<string name="InvFolder Library">
Biblioteka
</string>
@@ -1133,10 +1130,10 @@
Gesturki
</string>
<string name="InvFolder Favorite">
- Ulubione
+ Moje ulubione
</string>
<string name="InvFolder favorite">
- Ulubione
+ Moje ulubione
</string>
<string name="InvFolder Current Outfit">
Obecny strój
diff --git a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml
deleted file mode 100644
index 9560a3b418..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="EDITOR DE CICLO DE DIA">
- <tab_container name="Day Cycle Tabs">
- <panel label="Ciclo do dia" name="Day Cycle">
- <button label="?" name="WLDayCycleHelp"/>
- <text name="WL12am">
- 0:00
- </text>
- <text name="WL3am">
- 3:00
- </text>
- <text name="WL6am">
- 6:00
- </text>
- <text name="WL9amHash">
- 9:00
- </text>
- <text name="WL12pmHash">
- 12:00
- </text>
- <text name="WL3pm">
- 15:00
- </text>
- <text name="WL6pm">
- 18:00
- </text>
- <text name="WL9pm">
- 21:00
- </text>
- <text name="WL12am2">
- 24:00
- </text>
- <button label="Adicionar chave" label_selected="Adicionar chave" name="WLAddKey"/>
- <button label="Apagar chave" label_selected="Apagar chave" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Configurações de Quadro-chave:
- </text>
- <text name="WLCurKeyTimeText">
- Tempo-chave:
- </text>
- <spinner label="Hora" name="WLCurKeyHour"/>
- <spinner label="Minutos" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Ajuste-chave:
- </text>
- <combo_box label="Ajuste" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Grudar:
- </text>
- <combo_box label="5 minutos" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Duração do Ciclo:
- </text>
- <spinner label="Hora" name="WLLengthOfDayHour"/>
- <spinner label="Min." name="WLLengthOfDayMin"/>
- <spinner label="Seg." name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- Visualizar
- </text>
- <button label="Tocar" label_selected="Tocar" name="WLAnimSky"/>
- <button label="Pare!" label_selected="Pare" name="WLStopAnimSky"/>
- <button label="Usar o horário da Propriedade" label_selected="Ir para o horário da Propriedade" name="WLUseLindenTime"/>
- <button label="Salvar o Dia teste" label_selected="Salvar o Dia teste" name="WLSaveDayCycle"/>
- <button label="Carregar o Dia teste" label_selected="Carregar o Dia teste" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_env_settings.xml b/indra/newview/skins/default/xui/pt/floater_env_settings.xml
deleted file mode 100644
index 3ca8d934c9..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_env_settings.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="EDITOR DO AMBIENTE">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Hora do Dia
- </text>
- <text name="EnvTimeText2">
- 12:00 PM
- </text>
- <text name="EnvCloudText">
- Cobertura de
-Nuvens
- </text>
- <text name="EnvWaterColorText">
- Cor da água
- </text>
- <color_swatch label="" name="EnvWaterColor" tool_tip="Selecionar a cor"/>
- <text name="EnvWaterFogText">
- Névoa da
-água
- </text>
- <button bottom="-144" label="Usar hora da propriedade" name="EnvUseEstateTimeButton" width="155"/>
- <button label="Céu Avançado" left="167" name="EnvAdvancedSkyButton" width="155"/>
- <button label="Água Avançada" left="326" name="EnvAdvancedWaterButton" width="155"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
index c6694d13b2..83f7b24572 100644
--- a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="DEBUG SETTINGS">
<radio_group name="boolean_combo">
- <radio_item label="TRUE" name="TRUE" value="verdadeiro"/>
- <radio_item label="FALSE" name="FALSE" value=""/>
+ <radio_item label="TRUE" name="TRUE" />
+ <radio_item label="FALSE" name="FALSE" />
</radio_group>
<color_swatch label="Cor" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_water.xml b/indra/newview/skins/default/xui/pt/floater_water.xml
deleted file mode 100644
index b2a06f4ff2..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_water.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="EDITOR DE ÁGUA AVANÇADO">
- <text name="KeyFramePresetsText" width="175">
- Pré-configurações da Água:
- </text>
- <combo_box left_delta="175" name="WaterPresetsCombo" width="150"/>
- <button label="Novo" label_selected="Novo" name="WaterNewPreset"/>
- <button label="Salvar" label_selected="Salvar" name="WaterSavePreset"/>
- <button label="Deletar" label_selected="Deletar" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="DEFINIÇÕES" name="Settings">
- <text name="BHText">
- Cor da névoa da Água
- </text>
- <button label="?" name="WaterFogColorHelp"/>
- <color_swatch label="" name="WaterFogColor" tool_tip="Selecionar a cor"/>
- <text name="WaterFogDensText">
- Expoente da Densidade de névoa
- </text>
- <button label="?" left="209" name="WaterFogDensityHelp"/>
- <text name="WaterUnderWaterFogModText">
- Modificador da névoa Subaquática
- </text>
- <button label="?" left="209" name="WaterUnderWaterFogModHelp"/>
- <text name="BDensText">
- Escala da Marola de Reflexão
- </text>
- <button label="?" left="415" name="WaterNormalScaleHelp"/>
- <text name="BHText2">
- 1
- </text>
- <text name="BHText3">
- 2
- </text>
- <text name="BHText4">
- 3
- </text>
- <text name="HDText">
- Escala de Fresnel
- </text>
- <button label="?" left="415" name="WaterFresnelScaleHelp"/>
- <text name="FresnelOffsetText">
- Deslocamento de Fresnel
- </text>
- <button label="?" left="415" name="WaterFresnelOffsetHelp"/>
- <text name="DensMultText">
- Refratar a Escala para Cima
- </text>
- <button label="?" left="640" name="WaterScaleAboveHelp"/>
- <text name="WaterScaleBelowText">
- Refratar a Escala para Baixo
- </text>
- <button label="?" left="640" name="WaterScaleBelowHelp"/>
- <text name="MaxAltText">
- Multiplicador de Difusão
- </text>
- <button label="?" left="640" name="WaterBlurMultiplierHelp"/>
- </panel>
- <panel label="IMAGEM" name="Waves">
- <text name="BHText">
- Direção da Onda Maior
- </text>
- <button label="?" left="170" name="WaterWave1Help"/>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Direção da Onda Pequena
- </text>
- <button label="?" left="170" name="WaterWave2Help"/>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- Mapa Normal
- </text>
- <button label="?" name="WaterNormalMapHelp"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml b/indra/newview/skins/default/xui/pt/floater_windlight_options.xml
deleted file mode 100644
index ec459bbb26..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="EDITOR DE CÉU AVANÇADO">
- <text name="KeyFramePresetsText" width="140">
- Pré-definições de Céu:
- </text>
- <combo_box left_delta="140" name="WLPresetsCombo"/>
- <button label="Novo" label_selected="Novo" name="WLNewPreset"/>
- <button label="Salvar" label_selected="Salvar" left_delta="72" name="WLSavePreset"/>
- <button label="Deletar" label_selected="Deletar" left_delta="72" name="WLDeletePreset"/>
- <button label="Editor de Ciclos do Dia" label_selected="Editor de Ciclos do Dia" left_delta="84" name="WLDayCycleMenuButton" width="150"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSFERA" name="Atmosphere">
- <text name="BHText">
- Horizonte Azul
- </text>
- <button label="?" name="WLBlueHorizonHelp"/>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Horizonte da Neblina
- </text>
- <button label="?" name="WLHazeHorizonHelp"/>
- <text name="BDensText2">
- Densidade de Azul
- </text>
- <button label="?" name="WLBlueDensityHelp"/>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Densidade da Neblina
- </text>
- <button label="?" name="WLHazeDensityHelp"/>
- <text name="DensMultText">
- Multiplicador de Densidade
- </text>
- <button label="?" left="635" name="WLDensityMultHelp"/>
- <text name="WLDistanceMultText">
- Multiplicador de Distância
- </text>
- <button label="?" left="635" name="WLDistanceMultHelp"/>
- <text name="MaxAltText">
- Altitude Máxima
- </text>
- <button label="?" left="635" name="WLMaxAltitudeHelp"/>
- </panel>
- <panel label="ILUMINAÇÃO" name="Lighting">
- <text name="SLCText">
- Cor do Sol/Lua
- </text>
- <button label="?" name="WLSunlightColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Posição do Sol/Lua
- </text>
- <button label="?" name="WLTimeOfDayHelp"/>
- <text name="WLAmbientText">
- Ambiente
- </text>
- <button label="?" name="WLAmbientHelp"/>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- Ângulo Leste
- </text>
- <button label="?" name="WLEastAngleHelp"/>
- <text name="SunGlowText">
- Brilho do Sol
- </text>
- <button label="?" name="WLSunGlowHelp"/>
- <slider label="Foco" name="WLGlowB"/>
- <slider label="Tamanho" name="WLGlowR"/>
- <text name="SceneGammaText">
- Gamma da Cena
- </text>
- <button label="?" name="WLSceneGammaHelp"/>
- <text name="WLStarText">
- Brilho da Estrela
- </text>
- <button label="?" name="WLStarBrightnessHelp"/>
- </panel>
- <panel label="NUVENS" name="Clouds">
- <text name="WLCloudColorText">
- Cor da Nuvem
- </text>
- <button label="?" name="WLCloudColorHelp"/>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Densidade/ XY da Nuvem
- </text>
- <button label="?" name="WLCloudDensityHelp"/>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Cobertura da Nuvem
- </text>
- <button label="?" name="WLCloudCoverageHelp"/>
- <text name="WLCloudScaleText">
- Escala da Nuvem
- </text>
- <button label="?" name="WLCloudScaleHelp"/>
- <text font="SansSerifSmall" name="WLCloudDetailText">
- Detalhe da Nuvem (XY/Densidade)
- </text>
- <button label="?" left="421" name="WLCloudDetailHelp"/>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Rolagem X da Nuvem
- </text>
- <button label="?" name="WLCloudScrollXHelp"/>
- <check_box label="Travar" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Rolagem Y da Nuvem
- </text>
- <button label="?" name="WLCloudScrollYHelp"/>
- <check_box label="Travar" name="WLCloudLockY"/>
- <check_box label="Desenhar Nuvens Clássicas" name="DrawClassicClouds"/>
- <button label="?" left="645" name="WLClassicCloudsHelp"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_pick.xml b/indra/newview/skins/default/xui/pt/panel_edit_pick.xml
index 432affcf09..5eb9987e71 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_pick.xml
@@ -29,7 +29,7 @@
<layout_panel name="layout_panel1">
<button label="Salvar destaque" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="Cancelar" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml
index aece30738b..f3af15b991 100644
--- a/indra/newview/skins/default/xui/pt/panel_people.xml
+++ b/indra/newview/skins/default/xui/pt/panel_people.xml
@@ -66,16 +66,16 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa-
<layout_panel name="view_profile_btn_lp">
<button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="MI" name="im_btn" tool_tip="Abrir sessão de mensagem instantânea"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="Ligar" name="call_btn" tool_tip="Ligar para este residente"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="Compartilhar" name="share_btn" tool_tip="Compartilhar item de inventário"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="Teletransportar" name="teleport_btn" tool_tip="Oferecer teletransporte"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index c5268966c1..ed93217d59 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -1172,9 +1172,6 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar
<string name="InvFolder My Inventory">
Meu inventário
</string>
- <string name="InvFolder My Favorites">
- Meus favoritos
- </string>
<string name="InvFolder Library">
Biblioteca
</string>
@@ -1233,10 +1230,10 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar
Gestos
</string>
<string name="InvFolder Favorite">
- Favoritos
+ Meus favoritos
</string>
<string name="InvFolder favorite">
- Favoritos
+ Meus favoritos
</string>
<string name="InvFolder Current Outfit">
Look atual
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index 58e8c41c38..bee940ddc1 100644
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -25,11 +25,11 @@
<floater.string name="AboutLibs">
OpenGL Version: [OPENGL_VERSION]
-libcurl Version: [LIBCURL_VERSION]
-J2C Decoder Version: [J2C_VERSION]
-Audio Driver Version: [AUDIO_DRIVER_VERSION]
-Qt Webkit Version: [QT_WEBKIT_VERSION]
-Voice Server Version: [VOICE_VERSION]
+libcurl 版本: [LIBCURL_VERSION]
+J2C 解碼器版本: [J2C_VERSION]
+音效驅動程式版本: [AUDIO_DRIVER_VERSION]
+Qt Webkit 版本: [QT_WEBKIT_VERSION]
+語音伺服器版本: [VOICE_VERSION]
</floater.string>
<floater.string name="none">
(無)
diff --git a/indra/newview/skins/default/xui/zh/floater_about_land.xml b/indra/newview/skins/default/xui/zh/floater_about_land.xml
index a9142b22ad..efd8909e67 100644
--- a/indra/newview/skins/default/xui/zh/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about_land.xml
@@ -81,7 +81,7 @@
分級:
</text>
<text name="ContentRatingText">
- Adult
+ 成人
</text>
<text name="Owner:">
擁有者:
@@ -186,7 +186,7 @@
分級:
</text>
<text name="region_maturity_text">
- Adult
+ 成人
</text>
<text name="resellable_lbl">
Resale:
@@ -289,7 +289,7 @@ Only large parcels can be listed in search.
Moderate Content
</panel.string>
<panel.string name="mature_check_adult">
- Adult Content
+ 成人內容
</panel.string>
<panel.string name="mature_check_mature_tooltip">
Your parcel information or content is considered moderate.
@@ -307,35 +307,35 @@ Only large parcels can be listed in search.
禁止推撞(地區設定覆蓋)
</panel.string>
<text name="allow_label">
- Allow other Residents to:
+ 允許其他居民去:
</text>
- <check_box label="Edit Terrain" name="edit land check" tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land."/>
- <check_box label="飛行" name="check fly" tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land."/>
+ <check_box label="編輯地形" name="edit land check" tool_tip="若勾選則任何人將可以變形你的土地,最好是保持未勾選,因為你隨時可以編輯變更你的土地。"/>
+ <check_box label="飛行" name="check fly" tool_tip="逤勾選則居民可以在你飛行,不然就只能由外面飛入或飛越你的土地。"/>
<text name="allow_label2">
建造:
</text>
<check_box label="任何人" name="edit objects check"/>
<check_box label="社團" name="edit group objects check"/>
<text name="allow_label3">
- Object Entry:
+ 物件進入:
</text>
<check_box label="任何人" name="all object entry check"/>
<check_box label="社團" name="group object entry check"/>
<text name="allow_label4">
- Run Scripts:
+ 執行腳本:
</text>
<check_box label="任何人" name="check other scripts"/>
<check_box label="社團" name="check group scripts"/>
<text name="land_options_label">
- Land Options:
+ 土地選項:
</text>
- <check_box label="安全(無傷害)" name="check safe" tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."/>
- <check_box label="禁止推撞" name="PushRestrictCheck" tool_tip="Prevents scripts from pushing. Checking this option may be useful for preventing disruptive behavior on your land."/>
+ <check_box label="安全(無傷害)" name="check safe" tool_tip="若勾選則設應土地為安全的,傷害性的戰鬥將被關閉。清除勾選後才能進行傷害性的戰鬥。"/>
+ <check_box label="禁止推撞" name="PushRestrictCheck" tool_tip="防止使用腳本推撞。勾選這個選項將可以有效防止你土地上的破壞行為。"/>
<check_box label="將地點刊登顯示在搜尋中(L$30 / 每週)" name="ShowDirectoryCheck" tool_tip="Let people see this parcel in search results"/>
<combo_box name="land category with adult">
<combo_box.item label="任何類別" name="item0"/>
<combo_box.item label="Linden Location" name="item1"/>
- <combo_box.item label="Adult" name="item2"/>
+ <combo_box.item label="成人" name="item2"/>
<combo_box.item label="Arts &amp; Culture" name="item3"/>
<combo_box.item label="Business" name="item4"/>
<combo_box.item label="Educational" name="item5"/>
@@ -467,7 +467,7 @@ Only large parcels can be listed in search.
</panel>
<panel name="Banned_layout_panel">
<text label="Ban" name="BanCheck">
- Banned Residents
+ 被封鎖的居民
</text>
<name_list name="BannedList" tool_tip="([LISTED] listed, [MAX] max)"/>
<button label="添加" name="add_banned"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_animation_preview.xml b/indra/newview/skins/default/xui/zh/floater_animation_preview.xml
index b4d7f71eec..b5d65119f7 100644
--- a/indra/newview/skins/default/xui/zh/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/zh/floater_animation_preview.xml
@@ -9,7 +9,7 @@
Maximum animation length is [MAX_LENGTH] seconds.
</floater.string>
<floater.string name="failed_file_read">
- Unable to read animation file.
+ 無法讀取動作檔。
[STATUS]
</floater.string>
@@ -23,7 +23,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
Cannot read constraint definition.
</floater.string>
<floater.string name="E_ST_NO_FILE">
- Cannot open BVH file.
+ 無法開啟 BVH 檔案。
</floater.string>
<floater.string name="E_ST_NO_HIER">
Invalid HIERARCHY header.
@@ -115,7 +115,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
<text name="description_label">
描述:
</text>
- <spinner label="Priority" name="priority" tool_tip="Controls which other animations can be overridden by this animation"/>
+ <spinner label="優先度" name="priority" tool_tip="Controls which other animations can be overridden by this animation"/>
<check_box label="Loop" name="loop_check" tool_tip="Makes this animation loop"/>
<spinner label="In(%)" name="loop_in_point" tool_tip="Sets point in animation that looping returns to"/>
<spinner label="Out(%)" name="loop_out_point" tool_tip="Sets point in animation that ends a loop"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml b/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml
index 90fd7c029e..27a4199f8c 100644
--- a/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml
@@ -29,18 +29,18 @@
<columns label="使用者名稱" name="username"/>
</scroll_list>
</panel>
- <panel label="Friends" name="FriendsPanel">
+ <panel label="朋友" name="FriendsPanel">
<text name="InstructSelectFriend">
選擇一個人:
</text>
</panel>
<panel label="接近我" name="NearMePanel">
<text name="InstructSelectResident">
- Select a person nearby:
+ 選擇一位附近的人:
</text>
- <slider label="Range" name="near_me_range"/>
+ <slider label="範圍" name="near_me_range"/>
<text name="meters">
- Meters
+ 公尺
</text>
<scroll_list name="NearMe">
<columns label="名稱" name="name"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml
index fb17c0bb8a..b1dc081f04 100644
--- a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml
@@ -15,13 +15,13 @@ Textures
</text>
<button label="Dump IDs to Console" label_selected="Dump" name="Dump"/>
<panel name="scroll_content_panel">
- <texture_picker label="Hair" name="hair-baked"/>
- <texture_picker label="Hair" name="hair_grain"/>
+ <texture_picker label="頭髮" name="hair-baked"/>
+ <texture_picker label="頭髮" name="hair_grain"/>
<texture_picker label="Hair Alpha" name="hair_alpha"/>
- <texture_picker label="Head" name="head-baked"/>
+ <texture_picker label="頭部" name="head-baked"/>
<texture_picker label="Makeup" name="head_bodypaint"/>
<texture_picker label="Head Alpha" name="head_alpha"/>
- <texture_picker label="Head Tattoo" name="head_tattoo"/>
+ <texture_picker label="頭部刺青" name="head_tattoo"/>
<texture_picker label="眼睛" name="eyes-baked"/>
<texture_picker label="眼睛" name="eyes_iris"/>
<texture_picker label="Eyes Alpha" name="eyes_alpha"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml
index 0c4514600f..d8e9fb0ecc 100644
--- a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml
@@ -40,7 +40,7 @@
[ACTION]
</text>
<text name="total_label">
- My new balance will be
+ 我的帳戶餘額將為
</text>
<text name="total_amount">
L$ [AMT]
diff --git a/indra/newview/skins/default/xui/zh/floater_buy_land.xml b/indra/newview/skins/default/xui/zh/floater_buy_land.xml
index 023c531692..34401c11d0 100644
--- a/indra/newview/skins/default/xui/zh/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/zh/floater_buy_land.xml
@@ -68,7 +68,7 @@ Try selecting a smaller area.
none needed
</floater.string>
<floater.string name="must_upgrade">
- Your account must be upgraded to own land.
+ 你的帳戶必須要升級才能擁有土地。
</floater.string>
<floater.string name="cant_own_land">
你的帳戶能擁有土地。
@@ -83,7 +83,7 @@ Try selecting a smaller area.
Buy L$ [AMOUNT] for approx. [LOCAL_AMOUNT],
</floater.string>
<floater.string name="parcel_meters">
- This parcel is [AMOUNT] m²
+ 這個地段為 [AMOUNT] m²
</floater.string>
<floater.string name="premium_land">
This land is premium, and will charge as [AMOUNT] m².
@@ -122,7 +122,7 @@ supports [AMOUNT2] objects
You need to buy at least L$ [AMOUNT] to afford this land.
</floater.string>
<floater.string name="no_parcel_selected">
- (no parcel selected)
+ (無地段被選擇)
</floater.string>
<text name="region_name_label">
地區:
diff --git a/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml
deleted file mode 100644
index 8adc094fca..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="日循環編輯器">
- <tab_container name="Day Cycle Tabs">
- <panel label="日循環" name="Day Cycle">
- <multi_slider initial_value="0" name="WLTimeSlider"/>
- <multi_slider initial_value="0" name="WLDayCycleKeys"/>
- <text name="WL12am">
- 12am
- </text>
- <text name="WL3am">
- 3am
- </text>
- <text name="WL6am">
- 6am
- </text>
- <text name="WL9amHash">
- 9am
- </text>
- <text name="WL12pmHash">
- 12pm
- </text>
- <text name="WL3pm">
- 3pm
- </text>
- <text name="WL6pm">
- 6pm
- </text>
- <text name="WL9pm">
- 9pm
- </text>
- <text name="WL12am2">
- 12am
- </text>
- <text name="WL12amHash">
- |
- </text>
- <text name="WL3amHash">
- I
- </text>
- <text name="WL6amHash">
- |
- </text>
- <text name="WL9amHash2">
- I
- </text>
- <text name="WL12pmHash2">
- |
- </text>
- <text name="WL3pmHash">
- I
- </text>
- <text name="WL6pmHash">
- |
- </text>
- <text name="WL9pmHash">
- I
- </text>
- <text name="WL12amHash2">
- |
- </text>
- <button label="Add Key" label_selected="Add Key" name="WLAddKey"/>
- <button label="Delete Key" label_selected="Delete Key" name="WLDeleteKey"/>
- <text name="WLCurKeyFrameText">
- Key Frame Settings:
- </text>
- <text name="WLCurKeyTimeText">
- Key Time:
- </text>
- <spinner label="Hour" name="WLCurKeyHour"/>
- <spinner label="Min" name="WLCurKeyMin"/>
- <text name="WLCurKeyTimeText2">
- Key Preset:
- </text>
- <combo_box label="Preset" name="WLKeyPresets"/>
- <text name="DayCycleText">
- Snap:
- </text>
- <combo_box label="五分鐘" name="WLSnapOptions"/>
- <text name="DayCycleText2">
- Length of Cycle:
- </text>
- <spinner label="小時" name="WLLengthOfDayHour"/>
- <spinner label="分" name="WLLengthOfDayMin"/>
- <spinner label="秒" name="WLLengthOfDaySec"/>
- <text name="DayCycleText3">
- 預覽:
- </text>
- <button label="Play" label_selected="Play" name="WLAnimSky"/>
- <button label="Stop!" label_selected="Stop" name="WLStopAnimSky"/>
- <button label="Use Estate Time" label_selected="Go to Estate Time" name="WLUseLindenTime"/>
- <button label="Save Test Day" label_selected="Save Test Day" name="WLSaveDayCycle"/>
- <button label="Load Test Day" label_selected="Load Test Day" name="WLLoadDayCycle"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_env_settings.xml b/indra/newview/skins/default/xui/zh/floater_env_settings.xml
deleted file mode 100644
index 65a97f0cff..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_env_settings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="ENVIRONMENT EDITOR">
- <floater.string name="timeStr">
- [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc]
- </floater.string>
- <text name="EnvTimeText">
- Time of Day
- </text>
- <text name="EnvTimeText2">
- 12:00 PM
- </text>
- <text name="EnvCloudText">
- Cloud Cover
- </text>
- <text name="EnvWaterColorText">
- Water Color
- </text>
- <color_swatch name="EnvWaterColor" tool_tip="Click to open color picker"/>
- <text name="EnvWaterFogText">
- Water Fog
- </text>
- <button label="Use Estate Time" name="EnvUseEstateTimeButton"/>
- <button label="Advanced Sky" name="EnvAdvancedSkyButton"/>
- <button label="Advanced Water" name="EnvAdvancedWaterButton"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_gesture.xml b/indra/newview/skins/default/xui/zh/floater_gesture.xml
index 2dcb46fb77..651a976774 100644
--- a/indra/newview/skins/default/xui/zh/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/zh/floater_gesture.xml
@@ -16,11 +16,11 @@
</scroll_list>
<panel label="bottom_panel" name="bottom_panel">
<menu_button name="gear_btn" tool_tip="更多選項"/>
- <button name="new_gesture_btn" tool_tip="Make new gesture"/>
+ <button name="new_gesture_btn" tool_tip="製作新姿勢e"/>
<button name="activate_btn" tool_tip="Activate/Deactivate selected gesture"/>
- <button name="del_btn" tool_tip="Delete this gesture"/>
+ <button name="del_btn" tool_tip="刪除這個姿勢"/>
</panel>
<button label="編輯" name="edit_btn"/>
- <button label="Play" name="play_btn"/>
- <button label="Stop" name="stop_btn"/>
+ <button label="播放" name="play_btn"/>
+ <button label="停止" name="stop_btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_god_tools.xml b/indra/newview/skins/default/xui/zh/floater_god_tools.xml
index 86403494e0..fbe89ab2a6 100644
--- a/indra/newview/skins/default/xui/zh/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/zh/floater_god_tools.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="godtools floater" title="GOD TOOLS">
+<floater name="godtools floater" title="神之工具">
<tab_container name="GodTools Tabs">
<panel label="網格" name="grid">
<button label="Flush This Region&apos;s Map Visibility Caches" label_selected="Flush This Region&apos;s Map Visibility Caches" name="Flush This Region&apos;s Map Visibility Caches"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_image_preview.xml b/indra/newview/skins/default/xui/zh/floater_image_preview.xml
index 7eef0177ef..d7e9a7704c 100644
--- a/indra/newview/skins/default/xui/zh/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/zh/floater_image_preview.xml
@@ -11,7 +11,7 @@
</text>
<combo_box label="服裝類型" name="clothing_type_combo">
<item label="圖像" name="Image" value="圖像"/>
- <item label="Hair" name="Hair" value="Hair"/>
+ <item label="頭髮" name="Hair" value="頭髮"/>
<item label="Female Head" name="FemaleHead" value="Female Head"/>
<item label="Female Upper Body" name="FemaleUpperBody" value="Female Upper Body"/>
<item label="Female Lower Body" name="FemaleLowerBody" value="Female Lower Body"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_incoming_call.xml b/indra/newview/skins/default/xui/zh/floater_incoming_call.xml
index 4f678dbd9d..123cdd9f2c 100644
--- a/indra/newview/skins/default/xui/zh/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/zh/floater_incoming_call.xml
@@ -4,10 +4,10 @@
5
</floater.string>
<floater.string name="localchat">
- Nearby Voice Chat
+ 附近的音聊天
</floater.string>
<floater.string name="anonymous">
- anonymous
+ 匿名
</floater.string>
<floater.string name="VoiceInviteP2P">
通話中。
@@ -28,6 +28,6 @@
Do you want to leave [CURRENT_CHAT] and join this voice chat?
</text>
<button label="接受" label_selected="接受" name="Accept"/>
- <button label="Reject" label_selected="Reject" name="Reject"/>
+ <button label="拒絕" label_selected="拒絕" name="Reject"/>
<button label="開始 IM" name="Start IM"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml
index a442eb9cbc..a4ede92ab1 100644
--- a/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Inventory Finder" title="最近_收納區_物品">
- <check_box label="Animation" name="check_animation"/>
+ <check_box label="動作" name="check_animation"/>
<check_box label="Calling Cards" name="check_calling_card"/>
<check_box label="服裝" name="check_clothing"/>
<check_box label="姿勢" name="check_gesture"/>
<check_box label="地標" name="check_landmark"/>
<check_box label="Notecards" name="check_notecard"/>
<check_box label="Objects" name="check_object"/>
- <check_box label="Scripts" name="check_script"/>
+ <check_box label="腳本" name="check_script"/>
<check_box label="Sounds" name="check_sound"/>
<check_box label="材質" name="check_texture"/>
<check_box label="Snapshots" name="check_snapshot"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_media_browser.xml b/indra/newview/skins/default/xui/zh/floater_media_browser.xml
index 616c326d6b..6e75016fad 100644
--- a/indra/newview/skins/default/xui/zh/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/zh/floater_media_browser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="MEDIA BROWSER">
+<floater name="floater_about" title="媒體劉覽器">
<floater.string name="home_page_url">
http://www.secondlife.com
</floater.string>
@@ -8,22 +8,22 @@
</floater.string>
<layout_stack name="stack1">
<layout_panel name="nav_controls">
- <button label="Back" name="back"/>
- <button label="Forward" name="forward"/>
- <button label="Reload" name="reload"/>
+ <button label="向後" name="back"/>
+ <button label="向前" name="forward"/>
+ <button label="重載" name="reload"/>
<button label="Go" name="go"/>
</layout_panel>
<layout_panel name="time_controls">
<button label="rewind" name="rewind"/>
- <button label="stop" name="stop"/>
- <button label="forward" name="seek"/>
+ <button label="停止" name="stop"/>
+ <button label="向前" name="seek"/>
</layout_panel>
<layout_panel name="parcel_owner_controls">
- <button label="Send Current Page to Parcel" name="assign"/>
+ <button label="送出目前頁面到地段" name="assign"/>
</layout_panel>
<layout_panel name="external_controls">
- <button label="Open in My Web Browser" name="open_browser"/>
- <check_box label="Always open in my web browser" name="open_always"/>
+ <button label="在我的網頁瀏覽器中開啟" name="open_browser"/>
+ <check_box label="總是在我的網頁瀏覽器中開啟" name="open_always"/>
<button label="關閉" name="close"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml b/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml
index 3fa62b1b60..93c1b58df6 100644
--- a/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml
@@ -12,7 +12,7 @@
[NOTE2]
</text>
<button label="Start" name="start_btn"/>
- <button label="Stop" name="stop_btn"/>
+ <button label="停止" name="stop_btn"/>
<button label="Release" name="release_btn"/>
<button label="關閉" name="close_btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml b/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
index bed7c20ba5..f0c34acb06 100644
--- a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="nearby_chat" title="NEARBY CHAT">
+<floater name="nearby_chat" title="附近的聊天">
<check_box label="Translate chat (powered by Google)" name="translate_chat_checkbox"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_pay.xml b/indra/newview/skins/default/xui/zh/floater_pay.xml
index eeaaf0ab7d..b4841df0ff 100644
--- a/indra/newview/skins/default/xui/zh/floater_pay.xml
+++ b/indra/newview/skins/default/xui/zh/floater_pay.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Give Money">
<string name="payee_group">
- Pay Group
+ 支付社團
</string>
<string name="payee_resident">
- Pay Resident
+ 支付居民
</string>
<text name="payee_name">
Test Name That Is Extremely Long To Check Clipping
@@ -14,8 +14,8 @@
<button label="L$10" label_selected="L$10" name="fastpay 10"/>
<button label="L$20" label_selected="L$20" name="fastpay 20"/>
<text name="amount text">
- Or, choose amount:
+ 或,選擇一個金額:
</text>
- <button label="Pay" label_selected="Pay" name="pay btn"/>
+ <button label="支付" label_selected="支付" name="pay btn"/>
<button label="取消" label_selected="取消" name="cancel btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_pay_object.xml b/indra/newview/skins/default/xui/zh/floater_pay_object.xml
index 234aa9f7af..2a2aec93b9 100644
--- a/indra/newview/skins/default/xui/zh/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/zh/floater_pay_object.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Give Money">
<string name="payee_group">
- Pay Group
+ 支付社團
</string>
<string name="payee_resident">
- Pay Resident
+ 支付居民
</string>
<text name="payee_name">
Ericacita Moostopolison
</text>
<text name="object_name_label">
- Via object:
+ 經由物件:
</text>
<icon name="icon_object" tool_tip="物件"/>
<text name="object_name_text">
@@ -23,6 +23,6 @@
<text name="amount text">
或者,選擇一個金額:
</text>
- <button label="Pay" label_selected="Pay" name="pay btn"/>
+ <button label="支付" label_selected="支付" name="pay btn"/>
<button label="取消" label_selected="取消" name="cancel btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_preview_animation.xml b/indra/newview/skins/default/xui/zh/floater_preview_animation.xml
index 5ac2de4dc5..ead8dc49a6 100644
--- a/indra/newview/skins/default/xui/zh/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/zh/floater_preview_animation.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="preview_anim">
<floater.string name="Title">
- Animation: [NAME]
+ 動作: [NAME]
</floater.string>
<text name="desc txt">
描述:
</text>
- <button label="Play Inworld" label_selected="Stop" name="Anim play btn" tool_tip="Play this animation so that others can see it"/>
- <button label="Play Locally" label_selected="Stop" name="Anim audition btn" tool_tip="Play this animation so that only you can see it"/>
+ <button label="Play Inworld" label_selected="停止" name="Anim play btn" tool_tip="Play this animation so that others can see it"/>
+ <button label="Play Locally" label_selected="停止" name="Anim audition btn" tool_tip="Play this animation so that only you can see it"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml b/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml
index 52e6a9d8e4..0649ecb791 100644
--- a/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml
@@ -13,7 +13,7 @@
Wait:
</floater.string>
<floater.string name="stop_txt">
- Stop
+ 停止
</floater.string>
<floater.string name="preview_txt">
預覽
@@ -43,10 +43,10 @@
Library:
</text>
<scroll_list name="library_list">
- <scroll_list.rows name="action_animation" value="Animation"/>
- <scroll_list.rows name="action_sound" value="Sound"/>
+ <scroll_list.rows name="action_animation" value="動作"/>
+ <scroll_list.rows name="action_sound" value="聲音"/>
<scroll_list.rows name="action_chat" value="聊天"/>
- <scroll_list.rows name="action_wait" value="Wait"/>
+ <scroll_list.rows name="action_wait" value="等待"/>
</scroll_list>
<button label="Add &gt;&gt;" name="add_btn"/>
<text name="steps_label">
@@ -59,10 +59,10 @@
(選項)
</text>
<radio_group name="animation_trigger_type">
- <radio_item label="Start" name="start"/>
- <radio_item label="Stop" name="stop"/>
+ <radio_item label="開始" name="start"/>
+ <radio_item label="停止" name="stop"/>
</radio_group>
- <check_box label="until animations are done" name="wait_anim_check"/>
+ <check_box label="直到動作結束。" name="wait_anim_check"/>
<check_box label="time in seconds:" name="wait_time_check"/>
<text name="help_label">
All steps happen simultaneously, unless you add wait steps.
diff --git a/indra/newview/skins/default/xui/zh/floater_script_debug.xml b/indra/newview/skins/default/xui/zh/floater_script_debug.xml
index 12e646785d..5b3500c018 100644
--- a/indra/newview/skins/default/xui/zh/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/zh/floater_script_debug.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<multi_floater name="script debug floater" title="Script Warning/Error"/>
+<multi_floater name="script debug floater" title="腳本 警告/錯誤"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_sell_land.xml b/indra/newview/skins/default/xui/zh/floater_sell_land.xml
index b6a929caeb..19580c99a1 100644
--- a/indra/newview/skins/default/xui/zh/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/zh/floater_sell_land.xml
@@ -41,7 +41,7 @@
<combo_box name="sell_to">
<combo_box.item label="- 選擇一個 -" name="--selectone--"/>
<combo_box.item label="任何人" name="Anyone"/>
- <combo_box.item label="Specific person:" name="Specificuser:"/>
+ <combo_box.item label="指定人:" name="Specificuser:"/>
</combo_box>
<button label="選擇" name="sell_to_select_agent"/>
<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/zh/floater_snapshot.xml b/indra/newview/skins/default/xui/zh/floater_snapshot.xml
index c9a66c1644..9edc19969f 100644
--- a/indra/newview/skins/default/xui/zh/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/zh/floater_snapshot.xml
@@ -11,7 +11,7 @@
<text name="file_size_label">
[SIZE] KB
</text>
- <button label="Send" name="send_btn"/>
+ <button label="送出" name="send_btn"/>
<button label="儲存(L$[AMOUNT])" name="upload_btn"/>
<flyout_button label="儲存" name="save_btn" tool_tip="儲存圖像到檔案">
<flyout_button.item label="儲存" name="save_item"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_stats.xml b/indra/newview/skins/default/xui/zh/floater_stats.xml
index 54c5ba5cc0..eebd5df3f7 100644
--- a/indra/newview/skins/default/xui/zh/floater_stats.xml
+++ b/indra/newview/skins/default/xui/zh/floater_stats.xml
@@ -1,53 +1,53 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Statistics" title="STATISTICS">
+<floater name="Statistics" title="統計">
<scroll_container name="statistics_scroll">
<container_view name="statistics_view">
- <stat_view label="Basic" name="basic">
+ <stat_view label="基本" name="basic">
<stat_bar label="FPS" name="fps"/>
- <stat_bar label="Bandwidth" name="bandwidth"/>
+ <stat_bar label="頻寬" name="bandwidth"/>
<stat_bar label="封包損失" name="packet_loss"/>
<stat_bar label="Ping Sim" name="ping"/>
</stat_view>
- <stat_view label="Advanced" name="advanced">
+ <stat_view label="進階" name="advanced">
<stat_view label="Render" name="render">
<stat_bar label="KTris Drawn" name="ktrisframe"/>
<stat_bar label="KTris Drawn" name="ktrissec"/>
- <stat_bar label="Total Objects" name="objs"/>
- <stat_bar label="New Objects" name="newobjs"/>
+ <stat_bar label="物件總計" name="objs"/>
+ <stat_bar label="新物件" name="newobjs"/>
</stat_view>
<stat_view label="材質" name="texture">
- <stat_bar label="Count" name="numimagesstat"/>
+ <stat_bar label="計數" name="numimagesstat"/>
<stat_bar label="Raw Count" name="numrawimagesstat"/>
<stat_bar label="GL Mem" name="gltexmemstat"/>
<stat_bar label="Formatted Mem" name="formattedmemstat"/>
<stat_bar label="Raw Mem" name="rawmemstat"/>
<stat_bar label="Bound Mem" name="glboundmemstat"/>
</stat_view>
- <stat_view label="Network" name="network">
+ <stat_view label="網路" name="network">
<stat_bar label="Packets In" name="packetsinstat"/>
<stat_bar label="Packets Out" name="packetsoutstat"/>
- <stat_bar label="Objects" name="objectkbitstat"/>
+ <stat_bar label="物件" name="objectkbitstat"/>
<stat_bar label="材質" name="texturekbitstat"/>
- <stat_bar label="Asset" name="assetkbitstat"/>
+ <stat_bar label="資產" name="assetkbitstat"/>
<stat_bar label="Layers" name="layerskbitstat"/>
<stat_bar label="Actual In" name="actualinkbitstat"/>
<stat_bar label="Actual Out" name="actualoutkbitstat"/>
<stat_bar label="VFS Pending Ops" name="vfspendingoperations"/>
</stat_view>
</stat_view>
- <stat_view label="Simulator" name="sim">
+ <stat_view label="模擬器" name="sim">
<stat_bar label="Time Dilation" name="simtimedilation"/>
<stat_bar label="Sim FPS" name="simfps"/>
<stat_bar label="Physics FPS" name="simphysicsfps"/>
<stat_view label="Physics Details" name="physicsdetail">
<stat_bar label="Pinned Objects" name="physicspinnedtasks"/>
<stat_bar label="Low LOD Objects" name="physicslodtasks"/>
- <stat_bar label="Memory Allocated" name="physicsmemoryallocated"/>
+ <stat_bar label="記憶體配置" name="physicsmemoryallocated"/>
</stat_view>
<stat_bar label="Agent Updates/Sec" name="simagentups"/>
<stat_bar label="Main Agents" name="simmainagents"/>
<stat_bar label="Child Agents" name="simchildagents"/>
- <stat_bar label="Objects" name="simobjects"/>
+ <stat_bar label="物件" name="simobjects"/>
<stat_bar label="Active Objects" name="simactiveobjects"/>
<stat_bar label="Active Scripts" name="simactivescripts"/>
<stat_bar label="Script Events" name="simscripteps"/>
@@ -63,7 +63,7 @@
<stat_bar label="Simulation Time" name="simsimothermsec"/>
<stat_bar label="Agent Time" name="simagentmsec"/>
<stat_bar label="Images Time" name="simimagesmsec"/>
- <stat_bar label="Script Time" name="simscriptmsec"/>
+ <stat_bar label="腳本時間" name="simscriptmsec"/>
</stat_view>
</stat_view>
</container_view>
diff --git a/indra/newview/skins/default/xui/zh/floater_tools.xml b/indra/newview/skins/default/xui/zh/floater_tools.xml
index 7ba1a0d6c4..300d7ee63b 100644
--- a/indra/newview/skins/default/xui/zh/floater_tools.xml
+++ b/indra/newview/skins/default/xui/zh/floater_tools.xml
@@ -39,11 +39,11 @@
<floater.string name="grid_attachment_text">
Attachment
</floater.string>
- <button name="button focus" tool_tip="Focus"/>
+ <button name="button focus" tool_tip="聚焦"/>
<button name="button move" tool_tip="移動"/>
<button name="button edit" tool_tip="編輯"/>
- <button name="button create" tool_tip="Create"/>
- <button name="button land" tool_tip="Land"/>
+ <button name="button create" tool_tip="創造"/>
+ <button name="button land" tool_tip="土地"/>
<text name="text status">
Drag to move, shift-drag to copy
</text>
@@ -61,17 +61,17 @@
<radio_group name="edit_radio_group">
<radio_item label="移動" name="radio position"/>
<radio_item label="旋轉(Ctrl)" name="radio rotate"/>
- <radio_item label="Stretch (Ctrl+Shift)" name="radio stretch"/>
- <radio_item label="Select Face" name="radio select face"/>
+ <radio_item label="伸展(Ctrl+Shift)" name="radio stretch"/>
+ <radio_item label="選擇面" name="radio select face"/>
</radio_group>
- <check_box label="Edit linked" name="checkbox edit linked parts"/>
- <button label="Link" name="link_btn"/>
- <button label="Unlink" name="unlink_btn"/>
+ <check_box label="編輯聯結部分" name="checkbox edit linked parts"/>
+ <button label="聯結" name="link_btn"/>
+ <button label="取消聯結" name="unlink_btn"/>
<text name="RenderingCost" tool_tip="Shows the rendering cost calculated for this object">
þ: [COUNT]
</text>
- <text label="Stretch Both Sides" name="checkbox uniform label">
- Stretch Both Sides
+ <text label="同時伸展兩側" name="checkbox uniform label">
+ 同時伸展兩側
</text>
<check_box initial_value="true" label="伸展材質" name="checkbox stretch textures"/>
<check_box initial_value="true" label="貼齊格線" name="checkbox snap to grid"/>
@@ -80,7 +80,7 @@
<combo_box.item label="Local grid" name="Local"/>
<combo_box.item label="Reference grid" name="Reference"/>
</combo_box>
- <button name="Options..." tool_tip="See more grid options"/>
+ <button name="Options..." tool_tip="察看更多格線選項"/>
<button name="ToolCube" tool_tip="Cube"/>
<button name="ToolPrism" tool_tip="Prism"/>
<button name="ToolPyramid" tool_tip="Pyramid"/>
@@ -96,33 +96,33 @@
<button name="ToolRing" tool_tip="Ring"/>
<button name="ToolTree" tool_tip="Tree"/>
<button name="ToolGrass" tool_tip="Grass"/>
- <check_box label="Keep Tool selected" name="checkbox sticky"/>
- <check_box label="Copy selection" name="checkbox copy selection"/>
+ <check_box label="保持已選擇的工具" name="checkbox sticky"/>
+ <check_box label="覆製選擇" name="checkbox copy selection"/>
<check_box initial_value="true" label="Center Copy" name="checkbox copy centers"/>
<check_box label="Rotate Copy" name="checkbox copy rotates"/>
<radio_group name="land_radio_group">
- <radio_item label="Select Land" name="radio select land"/>
- <radio_item label="Flatten" name="radio flatten"/>
- <radio_item label="Raise" name="radio raise"/>
- <radio_item label="Lower" name="radio lower"/>
- <radio_item label="Smooth" name="radio smooth"/>
- <radio_item label="Roughen" name="radio noise"/>
- <radio_item label="Revert" name="radio revert"/>
+ <radio_item label="選擇土地" name="radio select land"/>
+ <radio_item label="攤平" name="radio flatten"/>
+ <radio_item label="提高" name="radio raise"/>
+ <radio_item label="降低" name="radio lower"/>
+ <radio_item label="平滑" name="radio smooth"/>
+ <radio_item label="粗糙" name="radio noise"/>
+ <radio_item label="還原" name="radio revert"/>
</radio_group>
<text name="Bulldozer:">
- Bulldozer:
+ 推土機:
</text>
<text name="Dozer Size:">
尺寸
</text>
<slider_bar initial_value="2.0" name="slider brush size"/>
<text name="Strength:">
- Strength
+ 力道
</text>
<slider_bar initial_value="0.00" name="slider force"/>
- <button label="套用" label_selected="套用" name="button apply to selection" tool_tip="Modify selected land"/>
+ <button label="套用" label_selected="套用" name="button apply to selection" tool_tip="修改所選擇的土地"/>
<text name="obj_count">
- Objects: [COUNT]
+ 物件: [COUNT]
</text>
<text name="prim_count">
Prims: [COUNT]
@@ -136,19 +136,19 @@
Deed
</panel.string>
<panel.string name="text modify info 1">
- You can modify this object
+ 你能修改這個物件
</panel.string>
<panel.string name="text modify info 2">
- You can modify these objects
+ 你能修改這些物件
</panel.string>
<panel.string name="text modify info 3">
- You can&apos;t modify this object
+ 你不能修改這個物件
</panel.string>
<panel.string name="text modify info 4">
- You can&apos;t modify these objects
+ 你不能修改這些物件
</panel.string>
<panel.string name="text modify warning">
- You must select entire object to set permissions
+ 你必須選取整個物件以設定權限
</panel.string>
<panel.string name="Cost Default">
價格: L$
@@ -157,7 +157,7 @@
總價: L$
</panel.string>
<panel.string name="Cost Per Unit">
- Price Per: L$
+ 單價每個: L$
</panel.string>
<panel.string name="Cost Mixed">
Mixed Price
@@ -181,19 +181,19 @@
社團:
</text>
<name_box initial_value="載入中..." name="Group Name Proxy"/>
- <button name="button set group" tool_tip="Choose a group to share this object&apos;s permissions"/>
+ <button name="button set group" tool_tip="選擇一個社團以分享這物件權限"/>
<check_box label="分享" name="checkbox share with group" tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."/>
<button label="Deed" label_selected="Deed" name="button deed" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."/>
<text name="label click action">
- Click to:
+ 點擊以:
</text>
<combo_box name="clickaction">
- <combo_box.item label="Touch (default)" name="Touch/grab(default)"/>
- <combo_box.item label="Sit on object" name="Sitonobject"/>
- <combo_box.item label="Buy object" name="Buyobject"/>
- <combo_box.item label="Pay object" name="Payobject"/>
- <combo_box.item label="Open" name="Open"/>
- <combo_box.item label="Zoom" name="Zoom"/>
+ <combo_box.item label="觸碰(預設)" name="Touch/grab(default)"/>
+ <combo_box.item label="坐在物件上" name="Sitonobject"/>
+ <combo_box.item label="購買物件" name="Buyobject"/>
+ <combo_box.item label="支付物件" name="Payobject"/>
+ <combo_box.item label="開啟" name="Open"/>
+ <combo_box.item label="縮放" name="Zoom"/>
</combo_box>
<check_box label="出售:" name="checkbox for sale"/>
<combo_box name="sale type">
@@ -202,7 +202,7 @@
<combo_box.item label="原件" name="Original"/>
</combo_box>
<spinner label="價格: L$" name="Edit Cost"/>
- <check_box label="顯示在搜尋中" name="search_check" tool_tip="Let people see this object in search results"/>
+ <check_box label="顯示在搜尋中" name="search_check" tool_tip="讓其他人可以在搜尋結果中看到這物件"/>
<panel name="perms_build">
<text name="perm_modify">
你可以修改這個物件
@@ -238,13 +238,13 @@
</text>
</panel>
</panel>
- <panel label="Object" name="Object">
- <check_box label="鎖定" name="checkbox locked" tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits."/>
- <check_box label="物理性" name="Physical Checkbox Ctrl" tool_tip="Allows object to be pushed and affected by gravity"/>
- <check_box label="暫時性" name="Temporary Checkbox Ctrl" tool_tip="Causes object to be deleted 1 minute after creation"/>
- <check_box label="幻影性" name="Phantom Checkbox Ctrl" tool_tip="Causes object to not collide with other objects or avatars"/>
+ <panel label="物件" name="Object">
+ <check_box label="鎖定" name="checkbox locked" tool_tip="預防物件被移動或刪除,最常使用的狀況是在建造過程中避免被意外的編輯。"/>
+ <check_box label="物理性" name="Physical Checkbox Ctrl" tool_tip="允許物件被推撞與受重力影響"/>
+ <check_box label="暫時性" name="Temporary Checkbox Ctrl" tool_tip="使物件在建造後的一分鐘自動刪除"/>
+ <check_box label="幻影性" name="Phantom Checkbox Ctrl" tool_tip="使物件不會與其他物件或化身產生碰撞"/>
<text name="label position">
- Position (meters)
+ 位置(公尺)
</text>
<spinner label="X" name="Pos X"/>
<spinner label="Y" name="Pos Y"/>
@@ -256,7 +256,7 @@
<spinner label="Y" name="Scale Y"/>
<spinner label="Z" name="Scale Z"/>
<text name="label rotation">
- Rotation (degrees)
+ 旋轉(角度)
</text>
<spinner label="X" name="Rot X"/>
<spinner label="Y" name="Rot Y"/>
@@ -273,12 +273,12 @@
</combo_box>
<combo_box name="material">
<combo_box.item label="Stone" name="Stone"/>
- <combo_box.item label="Metal" name="Metal"/>
- <combo_box.item label="Glass" name="Glass"/>
- <combo_box.item label="Wood" name="Wood"/>
- <combo_box.item label="Flesh" name="Flesh"/>
- <combo_box.item label="Plastic" name="Plastic"/>
- <combo_box.item label="Rubber" name="Rubber"/>
+ <combo_box.item label="金屬" name="Metal"/>
+ <combo_box.item label="玻璃" name="Glass"/>
+ <combo_box.item label="木頭" name="Wood"/>
+ <combo_box.item label="肌肉" name="Flesh"/>
+ <combo_box.item label="塑膠" name="Plastic"/>
+ <combo_box.item label="橡膠" name="Rubber"/>
</combo_box>
<text name="text cut">
Path Cut (begin/end)
@@ -286,13 +286,13 @@
<spinner label="B" name="cut begin"/>
<spinner label="E" name="cut end"/>
<text name="text hollow">
- Hollow
+ 中空
</text>
<text name="text skew">
Skew
</text>
<text name="Hollow Shape">
- Hollow Shape
+ 中空形狀
</text>
<combo_box name="hole">
<combo_box.item label="預設" name="Default"/>
@@ -354,12 +354,12 @@
<combo_box.item label="Cylinder" name="Cylinder"/>
</combo_box>
</panel>
- <panel label="Features" name="Features">
+ <panel label="特性" name="Features">
<text name="select_single">
Select only one primitive to edit features.
</text>
<text name="edit_object">
- Edit object features:
+ 編輯物件特性:
</text>
<check_box label="Flexible Path" name="Flexible1D Checkbox Ctrl" tool_tip="Allows object to flex about the Z axis (Client-side only)"/>
<spinner label="Softness" name="FlexNumSections"/>
@@ -371,7 +371,7 @@
<spinner label="Force Y" name="FlexForceY"/>
<spinner label="Force Z" name="FlexForceZ"/>
<check_box label="Light" name="Light Checkbox Ctrl" tool_tip="Causes object to emit light"/>
- <color_swatch name="colorswatch" tool_tip="Click to open color picker"/>
+ <color_swatch name="colorswatch" tool_tip="點擊以開啟顏色挑選器"/>
<texture_picker label="" name="light texture control" tool_tip="Click to choose a projection image (only has effect with deferred rendering enabled)"/>
<spinner label="Intensity" name="Light Intensity"/>
<spinner label="FOV" name="Light FOV"/>
@@ -382,38 +382,38 @@
</panel>
<panel label="材質" name="Texture">
<panel.string name="string repeats per meter">
- Repeats Per Meter
+ 每公尺重覆次數
</panel.string>
<panel.string name="string repeats per face">
- Repeats Per Face
+ 每一面重覆次數
</panel.string>
<texture_picker label="材質" name="texture control" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color" name="colorswatch" tool_tip="Click to open color picker"/>
+ <color_swatch label="顏色" name="colorswatch" tool_tip="點擊以開啟顏色挑選器"/>
<text name="color trans">
- Transparency %
+ 透明度 %
</text>
<text name="glow label">
- Glow
+ 光暈
</text>
- <check_box label="Full Bright" name="checkbox fullbright"/>
+ <check_box label="全亮" name="checkbox fullbright"/>
<text name="tex gen">
- Mapping
+ 映射方式
</text>
<combo_box name="combobox texgen">
<combo_box.item label="預設" name="Default"/>
- <combo_box.item label="Planar" name="Planar"/>
+ <combo_box.item label="平面" name="Planar"/>
</combo_box>
<text name="label shininess">
- Shininess
+ 光澤
</text>
<combo_box name="combobox shininess">
<combo_box.item label="無" name="None"/>
- <combo_box.item label="Low" name="Low"/>
- <combo_box.item label="Medium" name="Medium"/>
- <combo_box.item label="High" name="High"/>
+ <combo_box.item label="低" name="Low"/>
+ <combo_box.item label="中" name="Medium"/>
+ <combo_box.item label="高" name="High"/>
</combo_box>
<text name="label bumpiness">
- Bumpiness
+ 凹凸貼圖
</text>
<combo_box name="combobox bumpiness">
<combo_box.item label="無" name="None"/>
@@ -435,65 +435,65 @@
<combo_box.item label="suction" name="suction"/>
<combo_box.item label="weave" name="weave"/>
</combo_box>
- <check_box initial_value="false" label="Align planar faces" name="checkbox planar align" tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping."/>
+ <check_box initial_value="false" label="對齊平面" name="checkbox planar align" tool_tip="以最後所選擇的面為基準,對齊全部所選擇的面上的材質。這必須使用平面材質映射方式。"/>
<text name="rpt">
- Repeats / Face
- </text>
- <spinner label="Horizontal (U)" name="TexScaleU"/>
- <check_box label="Flip" name="checkbox flip s"/>
- <spinner label="Vertical (V)" name="TexScaleV"/>
- <check_box label="Flip" name="checkbox flip t"/>
- <spinner label="Rotation˚" name="TexRot"/>
- <spinner label="Repeats / Meter" name="rptctrl"/>
+ 重覆次數 / 面
+ </text>
+ <spinner label="水平(U)" name="TexScaleU"/>
+ <check_box label="翻轉" name="checkbox flip s"/>
+ <spinner label="垂直(V)" name="TexScaleV"/>
+ <check_box label="翻轉" name="checkbox flip t"/>
+ <spinner label="旋轉˚" name="TexRot"/>
+ <spinner label="重覆次數 / 公尺" name="rptctrl"/>
<button label="套用" label_selected="套用" name="button apply"/>
<text name="tex offset">
材質位移
</text>
- <spinner label="Horizontal (U)" name="TexOffsetU"/>
- <spinner label="Vertical (V)" name="TexOffsetV"/>
+ <spinner label="水平(U)" name="TexOffsetU"/>
+ <spinner label="垂直(V)" name="TexOffsetV"/>
<panel name="Add_Media">
<text name="media_tex">
- Media
+ 媒體
</text>
- <button name="add_media" tool_tip="Add Media"/>
+ <button name="add_media" tool_tip="添加媒體"/>
<button name="delete_media" tool_tip="刪除這個媒體材質"/>
- <button name="edit_media" tool_tip="Edit this Media"/>
- <button label="Align" label_selected="Align Media" name="button align" tool_tip="Align media texture (must load first)"/>
+ <button name="edit_media" tool_tip="編輯這個媒體"/>
+ <button label="對齊" label_selected="對齊媒體" name="button align" tool_tip="對齊媒體材質(須先載入)"/>
</panel>
</panel>
- <panel label="Content" name="Contents">
- <button label="New Script" label_selected="New Script" name="button new script"/>
- <button label="Permissions" name="button permissions"/>
+ <panel label="內容" name="Contents">
+ <button label="新腳本" label_selected="新腳本" name="button new script"/>
+ <button label="權限" name="button permissions"/>
</panel>
</tab_container>
<panel name="land info panel">
<text name="label_parcel_info">
- Parcel Information
+ 地段資訊
</text>
<text name="label_area_price">
- Price: L$[PRICE] for [AREA] m²
+ 價格: L$[PRICE] 購買 [AREA] m²
</text>
<text name="label_area">
面積: [AREA] m²
</text>
<button label="關於土地" label_selected="關於土地" name="button about land"/>
- <check_box label="顯示擁有主" name="checkbox show owners" tool_tip="Colorize the parcels according to the type of owner:
+ <check_box label="顯示擁有者" name="checkbox show owners" tool_tip="Colorize the parcels according to the type of owner:
-Green = Your land
-Aqua = Your group&apos;s land
-Red = Owned by others
-Yellow = For sale
-Purple = For auction
-Grey = Public"/>
+綠色 = 你的土地
+水藍 = 你社團的土地
+紅色 = 其他人所有
+黃色 = 出售
+紫色 = 拍賣
+灰色 = 公有地"/>
<text name="label_parcel_modify">
- Modify Parcel
+ 修改地段
</text>
- <button label="Subdivide" label_selected="Subdivide" name="button subdivide land"/>
- <button label="Join" label_selected="Join" name="button join land"/>
+ <button label="分割" label_selected="分割" name="button subdivide land"/>
+ <button label="合併" label_selected="合併" name="button join land"/>
<text name="label_parcel_trans">
- Land Transactions
+ 土地交易
</text>
<button label="購買土地" label_selected="購買土地" name="button buy land"/>
- <button label="Abandon Land" label_selected="Abandon Land" name="button abandon land"/>
+ <button label="放棄土地" label_selected="放棄土地" name="button abandon land"/>
</panel>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_top_objects.xml b/indra/newview/skins/default/xui/zh/floater_top_objects.xml
index c1ad927bbb..074a4a1881 100644
--- a/indra/newview/skins/default/xui/zh/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/zh/floater_top_objects.xml
@@ -19,7 +19,7 @@
Top [COUNT] objects experiencing many potential collisions
</floater.string>
<floater.string name="colliders_score_label">
- Score
+ 積分
</floater.string>
<floater.string name="none_descriptor">
None found.
@@ -28,7 +28,7 @@
載入中...
</text>
<scroll_list name="objects_list">
- <scroll_list.columns label="Score" name="score"/>
+ <scroll_list.columns label="積分" name="score"/>
<scroll_list.columns label="名稱" name="name"/>
<scroll_list.columns label="擁有者" name="owner"/>
<scroll_list.columns label="位置" name="location"/>
@@ -37,19 +37,19 @@
<scroll_list.columns label="URLs" name="URLs"/>
</scroll_list>
<text name="id_text">
- Object ID:
+ 物件 ID:
</text>
<button label="Show Beacon" name="show_beacon_btn"/>
<text name="obj_name_text">
物件名稱:
</text>
- <button label="Filter" name="filter_object_btn"/>
+ <button label="過濾器" name="filter_object_btn"/>
<text name="owner_name_text">
擁有者:
</text>
- <button label="Filter" name="filter_owner_btn"/>
- <button label="Return Selected" name="return_selected_btn"/>
+ <button label="過濾器" name="filter_owner_btn"/>
+ <button label="退回所選擇的" name="return_selected_btn"/>
<button label="全部退回" name="return_all_btn"/>
- <button label="Disable Selected" name="disable_selected_btn"/>
- <button label="Disable All" name="disable_all_btn"/>
+ <button label="關閉所選擇的" name="disable_selected_btn"/>
+ <button label="全部關閉" name="disable_all_btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_url_entry.xml b/indra/newview/skins/default/xui/zh/floater_url_entry.xml
index 04945ac83b..65f6a9cb95 100644
--- a/indra/newview/skins/default/xui/zh/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/zh/floater_url_entry.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="url_entry">
<text name="media_label">
- Media URL:
+ 媒體 URL:
</text>
<button label="" name="ok_btn"/>
<button label="取消" name="cancel_btn"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml b/indra/newview/skins/default/xui/zh/floater_voice_effect.xml
index e45c7c59ac..36efe20b65 100644
--- a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/zh/floater_voice_effect.xml
@@ -19,7 +19,7 @@
Record a sample, then click on a voice to hear how it will sound.
</text>
<button label="Record" name="record_btn" tool_tip="Record a sample of your voice."/>
- <button label="Stop" name="record_stop_btn"/>
+ <button label="停止" name="record_stop_btn"/>
<text name="voice_morphing_link">
[[URL] Subscribe Now]
</text>
diff --git a/indra/newview/skins/default/xui/zh/floater_water.xml b/indra/newview/skins/default/xui/zh/floater_water.xml
deleted file mode 100644
index fba0415967..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_water.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="進階水文編輯器">
- <floater.string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
- </floater.string>
- <text name="KeyFramePresetsText">
- Water Presets:
- </text>
- <button label="新增" label_selected="新增" name="WaterNewPreset"/>
- <button label="儲存" label_selected="儲存" name="WaterSavePreset"/>
- <button label="刪除" label_selected="刪除" name="WaterDeletePreset"/>
- <tab_container name="Water Tabs">
- <panel label="設定" name="Settings">
- <text name="BHText">
- Water Fog Color
- </text>
- <color_swatch name="WaterFogColor" tool_tip="Click to open color picker"/>
- <text name="WaterFogDensText">
- Fog Density Exponent
- </text>
- <text name="WaterUnderWaterFogModText">
- Underwater Fog Modifier
- </text>
- <text name="BDensText">
- Reflection Wavelet Scale
- </text>
- <slider label="1" name="WaterNormalScaleX"/>
- <slider label="2" name="WaterNormalScaleY"/>
- <slider label="3" name="WaterNormalScaleZ"/>
- <text name="HDText">
- Fresnel Scale
- </text>
- <text name="FresnelOffsetText">
- Fresnel Offset
- </text>
- <text name="DensMultText">
- Refract Scale Above
- </text>
- <text name="WaterScaleBelowText">
- Refract Scale Below
- </text>
- <text name="MaxAltText">
- Blur Multiplier
- </text>
- </panel>
- <panel label="圖像" name="Waves">
- <text name="BHText">
- Big Wave Direction
- </text>
- <text name="WaterWave1DirXText">
- X
- </text>
- <text name="WaterWave1DirYText">
- Y
- </text>
- <text name="BHText2">
- Little Wave Direction
- </text>
- <text name="WaterWave2DirXText">
- X
- </text>
- <text name="WaterWave2DirYText">
- Y
- </text>
- <text name="BHText3">
- 正常地圖
- </text>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_web_content.xml b/indra/newview/skins/default/xui/zh/floater_web_content.xml
index 2670e223d3..a756498b81 100644
--- a/indra/newview/skins/default/xui/zh/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/zh/floater_web_content.xml
@@ -4,9 +4,9 @@
<layout_panel name="nav_controls">
<button name="back" tool_tip="Navigate back"/>
<button name="forward" tool_tip="Navigate forward"/>
- <button name="stop" tool_tip="Stop navigation"/>
+ <button name="stop" tool_tip="停止導覽"/>
<button name="reload" tool_tip="重載頁面"/>
- <combo_box name="address" tool_tip="Enter URL here"/>
+ <combo_box name="address" tool_tip="在此輸入 URL 位置"/>
<icon name="media_secure_lock_flag" tool_tip="Secured Browsing"/>
<button name="popexternal" tool_tip="Open current URL in your desktop browser"/>
</layout_panel>
diff --git a/indra/newview/skins/default/xui/zh/floater_windlight_options.xml b/indra/newview/skins/default/xui/zh/floater_windlight_options.xml
deleted file mode 100644
index fce851cc90..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_windlight_options.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="進階天空編輯器">
- <floater.string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
- </floater.string>
- <text name="KeyFramePresetsText">
- Sky Presets:
- </text>
- <button label="新增" label_selected="新增" name="WLNewPreset"/>
- <button label="儲存" label_selected="儲存" name="WLSavePreset"/>
- <button label="刪除" label_selected="刪除" name="WLDeletePreset"/>
- <button label="Day Cycle Editor" label_selected="Day Cycle Editor" name="WLDayCycleMenuButton"/>
- <tab_container name="WindLight Tabs">
- <panel label="ATMOSPHERE" name="Atmosphere">
- <text name="BHText">
- Blue Horizon
- </text>
- <text name="BHText2">
- R
- </text>
- <text name="BHText3">
- G
- </text>
- <text name="BHText4">
- B
- </text>
- <text name="BHText5">
- I
- </text>
- <text name="BDensText">
- Haze Horizon
- </text>
- <text name="BDensText2">
- Blue Density
- </text>
- <text name="BHText6">
- R
- </text>
- <text name="BHText7">
- G
- </text>
- <text name="BHText8">
- B
- </text>
- <text name="BHText9">
- I
- </text>
- <text name="HDText">
- Haze Density
- </text>
- <text name="DensMultText">
- Density Multiplier
- </text>
- <text name="WLDistanceMultText">
- Distance Multiplier
- </text>
- <text name="MaxAltText">
- Max Altitude
- </text>
- </panel>
- <panel label="LIGHTING" name="Lighting">
- <text name="SLCText">
- Sun/Moon Color
- </text>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="TODText">
- Sun/Moon Position
- </text>
- <text name="WLAmbientText">
- Ambient
- </text>
- <text name="BHText5">
- R
- </text>
- <text name="BHText6">
- G
- </text>
- <text name="BHText7">
- B
- </text>
- <text name="BHText8">
- I
- </text>
- <text name="WLEastAngleText">
- East Angle
- </text>
- <text name="SunGlowText">
- Sun Glow
- </text>
- <slider label="Focus" name="WLGlowB"/>
- <slider label="尺寸" name="WLGlowR"/>
- <text name="SceneGammaText">
- Scene Gamma
- </text>
- <text name="WLStarText">
- Star Brightness
- </text>
- </panel>
- <panel label="CLOUDS" name="Clouds">
- <text name="WLCloudColorText">
- Cloud Color
- </text>
- <text name="BHText">
- R
- </text>
- <text name="BHText2">
- G
- </text>
- <text name="BHText3">
- B
- </text>
- <text name="BHText4">
- I
- </text>
- <text name="WLCloudColorText2">
- Cloud XY/Density
- </text>
- <text name="BHText5">
- X
- </text>
- <text name="BHText6">
- Y
- </text>
- <text name="BHText7">
- D
- </text>
- <text name="WLCloudCoverageText">
- Cloud Coverage
- </text>
- <text name="WLCloudScaleText">
- Cloud Scale
- </text>
- <text name="WLCloudDetailText">
- Cloud Detail (XY/Density)
- </text>
- <text name="BHText8">
- X
- </text>
- <text name="BHText9">
- Y
- </text>
- <text name="BHText10">
- D
- </text>
- <text name="WLCloudScrollXText">
- Cloud Scroll X
- </text>
- <check_box label="Lock" name="WLCloudLockX"/>
- <text name="WLCloudScrollYText">
- Cloud Scroll Y
- </text>
- <check_box label="Lock" name="WLCloudLockY"/>
- <check_box label="Draw Classic Clouds" name="DrawClassicClouds"/>
- </panel>
- </tab_container>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_window_size.xml b/indra/newview/skins/default/xui/zh/floater_window_size.xml
index e47238482f..54b72afccc 100644
--- a/indra/newview/skins/default/xui/zh/floater_window_size.xml
+++ b/indra/newview/skins/default/xui/zh/floater_window_size.xml
@@ -6,7 +6,7 @@
<text name="windowsize_text">
設定視窗尺寸大小:
</text>
- <combo_box name="window_size_combo" tool_tip="width x height">
+ <combo_box name="window_size_combo" tool_tip="寬度 x 高度">
<combo_box.item label="1000 x 700 (預設)" name="item0"/>
<combo_box.item label="1024 x 768" name="item1"/>
<combo_box.item label="1280 x 720 (720p)" name="item2"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_world_map.xml b/indra/newview/skins/default/xui/zh/floater_world_map.xml
index 47038e3b3d..552bb02582 100644
--- a/indra/newview/skins/default/xui/zh/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/zh/floater_world_map.xml
@@ -11,7 +11,7 @@
Me
</text>
<text name="person_label">
- Person
+ 人
</text>
<text name="infohub_label">
Infohub
@@ -40,7 +40,7 @@
Moderate
</text>
<text name="events_adult_label">
- Adult
+ 成人
</text>
</panel>
<panel name="layout_panel_3">
diff --git a/indra/newview/skins/default/xui/zh/inspect_group.xml b/indra/newview/skins/default/xui/zh/inspect_group.xml
index 01649496bc..3583976646 100644
--- a/indra/newview/skins/default/xui/zh/inspect_group.xml
+++ b/indra/newview/skins/default/xui/zh/inspect_group.xml
@@ -8,7 +8,7 @@
私人社團
</string>
<string name="FreeToJoin">
- Free to join
+ 免費加入
</string>
<string name="CostToJoin">
L$[AMOUNT] to join
@@ -26,7 +26,7 @@ Fear the moose! Fear it! And the mongoose too!
<text name="group_cost">
L$123 to join
</text>
- <button label="Join" name="join_btn"/>
- <button label="Leave" name="leave_btn"/>
+ <button label="加入" name="join_btn"/>
+ <button label="退出" name="leave_btn"/>
<button label="察看檔案" name="view_profile_btn"/>
</floater>
diff --git a/indra/newview/skins/default/xui/zh/inspect_object.xml b/indra/newview/skins/default/xui/zh/inspect_object.xml
index f1fe037087..58091b3aef 100644
--- a/indra/newview/skins/default/xui/zh/inspect_object.xml
+++ b/indra/newview/skins/default/xui/zh/inspect_object.xml
@@ -35,7 +35,7 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
http://www.superdupertest.com
</text>
<button label="購買" name="buy_btn"/>
- <button label="Pay" name="pay_btn"/>
+ <button label="支付" name="pay_btn"/>
<button label="取得副本" name="take_free_copy_btn"/>
<button label="Touch" name="touch_btn"/>
<button label="Sit" name="sit_btn"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_attachment_other.xml b/indra/newview/skins/default/xui/zh/menu_attachment_other.xml
index cba82e7dce..a04d59bc81 100644
--- a/indra/newview/skins/default/xui/zh/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/zh/menu_attachment_other.xml
@@ -12,6 +12,6 @@
<menu_item_call label="踢出" name="Eject..."/>
<menu_item_call label="材質除錯" name="Debug..."/>
<menu_item_call label="Zoom In" name="Zoom In"/>
- <menu_item_call label="Pay" name="Pay..."/>
+ <menu_item_call label="支付" name="Pay..."/>
<menu_item_call label="物件檔案" name="Object Inspect"/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_avatar_icon.xml b/indra/newview/skins/default/xui/zh/menu_avatar_icon.xml
index 1da583b3d0..ef0986a13b 100644
--- a/indra/newview/skins/default/xui/zh/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/zh/menu_avatar_icon.xml
@@ -3,5 +3,5 @@
<menu_item_call label="察看檔案" name="Show Profile"/>
<menu_item_call label="送出 IM..." name="Send IM"/>
<menu_item_call label="加為朋友..." name="Add Friend"/>
- <menu_item_call label="Remove Friend..." name="Remove Friend"/>
+ <menu_item_call label="移除朋友..." name="Remove Friend"/>
</menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_avatar_other.xml b/indra/newview/skins/default/xui/zh/menu_avatar_other.xml
index 283367708b..acf98dfdfa 100644
--- a/indra/newview/skins/default/xui/zh/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/zh/menu_avatar_other.xml
@@ -12,5 +12,5 @@
<menu_item_call label="踢出" name="Eject..."/>
<menu_item_call label="材質除錯" name="Debug..."/>
<menu_item_call label="Zoom In" name="Zoom In"/>
- <menu_item_call label="Pay" name="Pay..."/>
+ <menu_item_call label="支付" name="Pay..."/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml b/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml
index 8e30a15562..e053eb2388 100644
--- a/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml
@@ -3,7 +3,7 @@
<menu_item_call label="Add/Remove from Favorites" name="activate"/>
<menu_item_call label="覆製" name="copy_gesture"/>
<menu_item_call label="貼上" name="paste"/>
- <menu_item_call label="Copy UUID" name="copy_uuid"/>
+ <menu_item_call label="覆製 UUID" name="copy_uuid"/>
<menu_item_call label="儲存到目前裝扮" name="save_to_outfit"/>
<menu_item_call label="編輯" name="edit_gesture"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml
index bae7cf3f05..0f14057c07 100644
--- a/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml
@@ -16,6 +16,6 @@
<menu_item_call label="材質除錯" name="debug"/>
<menu_item_call label="Find On Map" name="find_on_map"/>
<menu_item_call label="Zoom In" name="zoom_in"/>
- <menu_item_call label="Pay" name="pay"/>
+ <menu_item_call label="支付" name="pay"/>
<menu_item_call label="分享" name="share"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml
index dab95fcadc..94ab82b8a9 100644
--- a/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml
+++ b/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<toggleable_menu name="Gear Menu">
- <menu_item_call label="Touch" name="touch"/>
- <menu_item_call label="Sit" name="sit"/>
+ <menu_item_call label="觸碰" name="touch"/>
+ <menu_item_call label="坐下" name="sit"/>
<menu_item_call label="Pay" name="pay"/>
<menu_item_call label="購買" name="buy"/>
- <menu_item_call label="Take" name="take"/>
+ <menu_item_call label="取得" name="take"/>
<menu_item_call label="取得副本" name="take_copy"/>
- <menu_item_call label="Open" name="open"/>
+ <menu_item_call label="開啟" name="open"/>
<menu_item_call label="編輯" name="edit"/>
- <menu_item_call label="Wear" name="wear"/>
- <menu_item_call label="Add" name="add"/>
+ <menu_item_call label="穿上" name="wear"/>
+ <menu_item_call label="添加" name="add"/>
<menu_item_call label="回報" name="report"/>
<menu_item_call label="Block" name="block"/>
<menu_item_call label="Zoom In" name="zoom_in"/>
- <menu_item_call label="Remove" name="remove"/>
+ <menu_item_call label="移除" name="remove"/>
<menu_item_call label="更多資訊" name="more_info"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_inventory.xml b/indra/newview/skins/default/xui/zh/menu_inventory.xml
index fd8f73e4ea..a93e8be149 100644
--- a/indra/newview/skins/default/xui/zh/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/zh/menu_inventory.xml
@@ -28,17 +28,17 @@
<menu_item_call label="New Physics" name="New Physics"/>
</menu>
<menu label="新身體部位" name="New Body Parts">
- <menu_item_call label="New Shape" name="New Shape"/>
- <menu_item_call label="New Skin" name="New Skin"/>
- <menu_item_call label="New Hair" name="New Hair"/>
- <menu_item_call label="New Eyes" name="New Eyes"/>
+ <menu_item_call label="新體形" name="New Shape"/>
+ <menu_item_call label="新皮膚" name="New Skin"/>
+ <menu_item_call label="新頭髮" name="New Hair"/>
+ <menu_item_call label="新眼睛" name="New Eyes"/>
</menu>
- <menu label="Change Type" name="Change Type">
+ <menu label="變更類型" name="Change Type">
<menu_item_call label="預設" name="Default"/>
<menu_item_call label="手套" name="Gloves"/>
<menu_item_call label="夾克" name="Jacket"/>
<menu_item_call label="褲子" name="Pants"/>
- <menu_item_call label="Shape" name="Shape"/>
+ <menu_item_call label="體形" name="Shape"/>
<menu_item_call label="鞋子" name="Shoes"/>
<menu_item_call label="襯衫" name="Shirt"/>
<menu_item_call label="裙子" name="Skirt"/>
@@ -46,19 +46,19 @@
<menu_item_call label="內衣" name="Undershirt"/>
</menu>
<menu_item_call label="瞬間傳送" name="Landmark Open"/>
- <menu_item_call label="Open" name="Animation Open"/>
- <menu_item_call label="Open" name="Sound Open"/>
+ <menu_item_call label="開啟" name="Animation Open"/>
+ <menu_item_call label="開啟" name="Sound Open"/>
<menu_item_call label="取代目前的裝扮" name="Replace Outfit"/>
<menu_item_call label="添加到目前裝扮" name="Add To Outfit"/>
<menu_item_call label="由目前的裝扮移除" name="Remove From Outfit"/>
<menu_item_call label="Find Original" name="Find Original"/>
<menu_item_call label="Purge Item" name="Purge Item"/>
<menu_item_call label="Restore Item" name="Restore Item"/>
- <menu_item_call label="Open" name="Open"/>
+ <menu_item_call label="開啟" name="Open"/>
<menu_item_call label="Open Original" name="Open Original"/>
<menu_item_call label="Properties" name="Properties"/>
<menu_item_call label="更名" name="Rename"/>
- <menu_item_call label="Copy Asset UUID" name="Copy Asset UUID"/>
+ <menu_item_call label="覆製資產 UUID" name="Copy Asset UUID"/>
<menu_item_call label="覆製" name="Copy"/>
<menu_item_call label="貼上" name="Paste"/>
<menu_item_call label="Paste As Link" name="Paste As Link"/>
@@ -66,11 +66,11 @@
<menu_item_call label="刪除" name="Delete"/>
<menu_item_call label="刪除系統資料夾" name="Delete System Folder"/>
<menu_item_call label="Start Conference Chat" name="Conference Chat Folder"/>
- <menu_item_call label="Play" name="Sound Play"/>
+ <menu_item_call label="播放" name="Sound Play"/>
<menu_item_call label="添加地標" name="About Landmark"/>
<menu_item_call label="Play Inworld" name="Animation Play"/>
<menu_item_call label="Play Locally" name="Animation Audition"/>
- <menu_item_call label="Send Instant Message" name="Send Instant Message"/>
+ <menu_item_call label="送出即時訊息" name="Send Instant Message"/>
<menu_item_call label="Offer Teleport..." name="Offer Teleport..."/>
<menu_item_call label="Start Conference Chat" name="Conference Chat"/>
<menu_item_call label="Activate" name="Activate"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/zh/menu_inventory_gear_default.xml
index 8c938222e7..f51b27d9ce 100644
--- a/indra/newview/skins/default/xui/zh/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/zh/menu_inventory_gear_default.xml
@@ -3,12 +3,12 @@
<menu_item_call label="新收納區視窗" name="new_window"/>
<menu_item_check label="依名稱排序" name="sort_by_name"/>
<menu_item_check label="依最近排序" name="sort_by_recent"/>
- <menu_item_check label="Sort Folders Always by Name" name="sort_folders_by_name"/>
- <menu_item_check label="Sort System Folders to Top" name="sort_system_folders_to_top"/>
- <menu_item_call label="Show Filters" name="show_filters"/>
+ <menu_item_check label="總是由名稱排序資料夾" name="sort_folders_by_name"/>
+ <menu_item_check label="系統資料夾排序到最上方" name="sort_system_folders_to_top"/>
+ <menu_item_call label="顯示過濾器" name="show_filters"/>
<menu_item_call label="Reset Filters" name="reset_filters"/>
<menu_item_call label="關閉全部資料夾" name="close_folders"/>
- <menu_item_call label="Empty Lost and Found" name="empty_lostnfound"/>
+ <menu_item_call label="清空 Lost and Found" name="empty_lostnfound"/>
<menu_item_call label="儲存材質為" name="Save Texture As"/>
<menu_item_call label="分享" name="Share"/>
<menu_item_call label="Find Original" name="Find Original"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_landmark.xml b/indra/newview/skins/default/xui/zh/menu_landmark.xml
index 5f7657db79..7372b223cf 100644
--- a/indra/newview/skins/default/xui/zh/menu_landmark.xml
+++ b/indra/newview/skins/default/xui/zh/menu_landmark.xml
@@ -2,6 +2,6 @@
<toggleable_menu name="landmark_overflow_menu">
<menu_item_call label="覆製 SLurl" name="copy"/>
<menu_item_call label="刪除" name="delete"/>
- <menu_item_call label="Create Pick" name="pick"/>
+ <menu_item_call label="建立精選地點" name="pick"/>
<menu_item_call label="添加到最愛列" name="add_to_favbar"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_login.xml b/indra/newview/skins/default/xui/zh/menu_login.xml
index 27a0baf560..d6bf34c66e 100644
--- a/indra/newview/skins/default/xui/zh/menu_login.xml
+++ b/indra/newview/skins/default/xui/zh/menu_login.xml
@@ -11,15 +11,15 @@
<menu_item_check label="顯示除錯選單" name="Show Debug Menu"/>
<menu label="除錯" name="Debug">
<menu_item_call label="顯示除錯設定" name="Debug Settings"/>
- <menu_item_call label="UI/Color Settings" name="UI/Color Settings"/>
- <menu_item_call label="XUI Preview Tool" name="UI Preview Tool"/>
+ <menu_item_call label="UI / 顏色 設定" name="UI/Color Settings"/>
+ <menu_item_call label="XUI 預覽工具" name="UI Preview Tool"/>
<menu label="UI 測試" name="UI Tests"/>
<menu_item_call label="設定視窗尺寸大小..." name="Set Window Size..."/>
<menu_item_call label="顯示 TOS" name="TOS"/>
- <menu_item_call label="Show Critical Message" name="Critical"/>
- <menu_item_call label="Media Browser Test" name="Web Browser Test"/>
- <menu_item_call label="Web Content Floater Test" name="Web Content Floater Test"/>
- <menu_item_check label="Show Grid Picker" name="Show Grid Picker"/>
- <menu_item_call label="Show Notifications Console" name="Show Notifications Console"/>
+ <menu_item_call label="顯示嚴重訊息" name="Critical"/>
+ <menu_item_call label="媒體瀏覽器測試" name="Web Browser Test"/>
+ <menu_item_call label="網頁內容浮動視窗測試" name="Web Content Floater Test"/>
+ <menu_item_check label="顯示網格挑選器" name="Show Grid Picker"/>
+ <menu_item_call label="顯示通知控制台" name="Show Notifications Console"/>
</menu>
</menu_bar>
diff --git a/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml b/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml
index 169dbf2187..cf47020bd9 100644
--- a/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml
@@ -18,10 +18,10 @@
<menu_item_call label="新刺青" name="New Tattoo"/>
</menu>
<menu label="新身體部位" name="New Body Parts">
- <menu_item_call label="New Shape" name="New Shape"/>
- <menu_item_call label="New Skin" name="New Skin"/>
- <menu_item_call label="New Hair" name="New Hair"/>
- <menu_item_call label="New Eyes" name="New Eyes"/>
+ <menu_item_call label="新體形" name="New Shape"/>
+ <menu_item_call label="新皮膚" name="New Skin"/>
+ <menu_item_call label="新頭髮" name="New Hair"/>
+ <menu_item_call label="新眼睛" name="New Eyes"/>
</menu>
<menu_item_call label="裝扮更名" name="rename"/>
<menu_item_call label="刪除裝扮" name="delete_outfit"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_participant_list.xml b/indra/newview/skins/default/xui/zh/menu_participant_list.xml
index 7b6f6f954e..3737e3d041 100644
--- a/indra/newview/skins/default/xui/zh/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/zh/menu_participant_list.xml
@@ -7,7 +7,7 @@
<menu_item_call label="IM" name="IM"/>
<menu_item_call label="通話" name="Call"/>
<menu_item_call label="分享" name="Share"/>
- <menu_item_call label="Pay" name="Pay"/>
+ <menu_item_call label="支付" name="Pay"/>
<menu_item_check label="View People Icons" name="View Icons"/>
<menu_item_check label="Block Voice" name="Block/Unblock"/>
<menu_item_check label="Block Text" name="MuteText"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/zh/menu_people_groups_view_sort.xml
index 06247ab249..cf36507d74 100644
--- a/indra/newview/skins/default/xui/zh/menu_people_groups_view_sort.xml
+++ b/indra/newview/skins/default/xui/zh/menu_people_groups_view_sort.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<toggleable_menu name="menu_group_plus">
- <menu_item_check label="Display Group Icons" name="Display Group Icons"/>
+ <menu_item_check label="顯示社團圖示" name="Display Group Icons"/>
<menu_item_call label="脫離所選擇的社團" name="Leave Selected Group"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_people_nearby.xml b/indra/newview/skins/default/xui/zh/menu_people_nearby.xml
index 73b754e059..49fa775424 100644
--- a/indra/newview/skins/default/xui/zh/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/zh/menu_people_nearby.xml
@@ -7,7 +7,7 @@
<menu_item_call label="通話" name="Call"/>
<menu_item_call label="地圖" name="Map"/>
<menu_item_call label="分享" name="Share"/>
- <menu_item_call label="Pay" name="Pay"/>
+ <menu_item_call label="支付" name="Pay"/>
<menu_item_check label="Block/Unblock" name="Block/Unblock"/>
<menu_item_call label="Offer Teleport" name="teleport"/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/zh/menu_people_nearby_multiselect.xml
index 4ffbcaff83..c7aff48df4 100644
--- a/indra/newview/skins/default/xui/zh/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/zh/menu_people_nearby_multiselect.xml
@@ -5,6 +5,6 @@
<menu_item_call label="IM" name="IM"/>
<menu_item_call label="通話" name="Call"/>
<menu_item_call label="分享" name="Share"/>
- <menu_item_call label="Pay" name="Pay"/>
+ <menu_item_call label="支付" name="Pay"/>
<menu_item_call label="Offer Teleport" name="teleport"/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_picks_plus.xml b/indra/newview/skins/default/xui/zh/menu_picks_plus.xml
index 9e55c633f9..e962bd90d5 100644
--- a/indra/newview/skins/default/xui/zh/menu_picks_plus.xml
+++ b/indra/newview/skins/default/xui/zh/menu_picks_plus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<toggleable_menu name="picks_plus_menu">
- <menu_item_call label="New Pick" name="create_pick"/>
+ <menu_item_call label="新精選地點" name="create_pick"/>
<menu_item_call label="New Classified" name="create_classified"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_place.xml b/indra/newview/skins/default/xui/zh/menu_place.xml
index 6ffdf329df..3733baf119 100644
--- a/indra/newview/skins/default/xui/zh/menu_place.xml
+++ b/indra/newview/skins/default/xui/zh/menu_place.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<toggleable_menu name="place_overflow_menu">
<menu_item_call label="製作一個地標" name="landmark"/>
- <menu_item_call label="Create Pick" name="pick"/>
+ <menu_item_call label="建立精選地點" name="pick"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml
index 7f1d091f44..7f4144d14d 100644
--- a/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml
+++ b/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml
@@ -2,7 +2,7 @@
<toggleable_menu name="menu_folder_gear">
<menu_item_call label="添加地標" name="add_landmark"/>
<menu_item_call label="添加資料夾" name="add_folder"/>
- <menu_item_call label="Restore Item" name="restore_item"/>
+ <menu_item_call label="還原物品" name="restore_item"/>
<menu_item_call label="剪下" name="cut"/>
<menu_item_call label="覆製" name="copy_folder"/>
<menu_item_call label="貼上" name="paste"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/zh/menu_places_gear_landmark.xml
index 8578751a28..f23d970b78 100644
--- a/indra/newview/skins/default/xui/zh/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/zh/menu_places_gear_landmark.xml
@@ -15,5 +15,5 @@
<menu_item_call label="展開全部資料夾" name="expand_all"/>
<menu_item_call label="摺疊全部資料夾" name="collapse_all"/>
<menu_item_check label="依日期排序" name="sort_by_date"/>
- <menu_item_call label="Create Pick" name="create_pick"/>
+ <menu_item_call label="建立精選地點" name="create_pick"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml b/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml
index c06b7dc039..ca637ae54d 100644
--- a/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml
+++ b/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<toggleable_menu name="profile_overflow_menu">
<menu_item_call label="地圖" name="show_on_map"/>
- <menu_item_call label="Pay" name="pay"/>
+ <menu_item_call label="支付" name="pay"/>
<menu_item_call label="分享" name="share"/>
<menu_item_call label="Block" name="block"/>
<menu_item_call label="Unblock" name="unblock"/>
diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml
index e7016dc663..6d70ac4c1f 100644
--- a/indra/newview/skins/default/xui/zh/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml
@@ -54,7 +54,7 @@
<menu_item_check label="地段屬性" name="Parcel Properties"/>
<menu_item_check label="進階選單" name="Show Advanced Menu"/>
</menu>
- <menu_item_call label="瞬間傳送回家" name="Teleport Home"/>
+ <menu_item_call label="瞬間瞬間傳送回家" name="Teleport Home"/>
<menu_item_call label="設定家在此處" name="Set Home to Here"/>
<menu label="太陽" name="Environment Settings">
<menu_item_call label="日出" name="Sunrise"/>
@@ -84,21 +84,21 @@
<menu_item_call label="包括上一部位" name="Include Previous Part"/>
</menu>
<menu_item_call label="聚焦於所選部位" name="Focus on Selection"/>
- <menu_item_call label="Zoom to Selection" name="Zoom to Selection"/>
+ <menu_item_call label="縮放至所選部位" name="Zoom to Selection"/>
<menu label="物件" name="Object">
<menu_item_call label="購買" name="Menu Object Buy"/>
<menu_item_call label="取得" name="Menu Object Take"/>
<menu_item_call label="取得副本" name="Take Copy"/>
<menu_item_call label="回存到我的收納區" name="Save Object Back to My Inventory"/>
- <menu_item_call label="Save Back to Object Contents" name="Save Object Back to Object Contents"/>
+ <menu_item_call label="回存到物件內容" name="Save Object Back to Object Contents"/>
<menu_item_call label="退回物件" name="Return Object back to Owner"/>
</menu>
<menu label="腳本" name="Scripts">
- <menu_item_call label="Recompile Scripts (Mono)" name="Mono"/>
- <menu_item_call label="Recompile Scripts (LSL)" name="LSL"/>
+ <menu_item_call label="重新編譯腳本(Mono)" name="Mono"/>
+ <menu_item_call label="重新編譯腳本(LSL)" name="LSL"/>
<menu_item_call label="Reset Scripts" name="Reset Scripts"/>
- <menu_item_call label="Set Scripts to Running" name="Set Scripts to Running"/>
- <menu_item_call label="Set Scripts to Not Running" name="Set Scripts to Not Running"/>
+ <menu_item_call label="設定腳本為執行中" name="Set Scripts to Running"/>
+ <menu_item_call label="設定腳本為非執行中" name="Set Scripts to Not Running"/>
</menu>
<menu label="選項" name="Options">
<menu_item_check label="顯示進階權限" name="DebugPermissions"/>
@@ -110,16 +110,16 @@
<menu_item_check label="Show Light Radius for Selection" name="Show Light Radius for Selection"/>
<menu_item_check label="Show Selection Beam" name="Show Selection Beam"/>
<menu_item_check label="貼齊格線" name="Snap to Grid"/>
- <menu_item_call label="Snap Object XY to Grid" name="Snap Object XY to Grid"/>
+ <menu_item_call label="貼齊物件 XY 軸到格線" name="Snap Object XY to Grid"/>
<menu_item_call label="Use Selection for Grid" name="Use Selection for Grid"/>
<menu_item_call label="格線選項" name="Grid Options"/>
</menu>
<menu label="上傳" name="Upload">
<menu_item_call label="圖像(L$[COST])..." name="Upload Image"/>
- <menu_item_call label="Sound (L$[COST])..." name="Upload Sound"/>
- <menu_item_call label="Animation (L$[COST])..." name="Upload Animation"/>
- <menu_item_call label="Bulk (L$[COST] per file)..." name="Bulk Upload"/>
- <menu_item_call label="Set Default Upload Permissions" name="perm prefs"/>
+ <menu_item_call label="聲音(L$[COST])..." name="Upload Sound"/>
+ <menu_item_call label="動作(L$[COST])..." name="Upload Animation"/>
+ <menu_item_call label="大量上傳(每檔案 L$[COST] )..." name="Bulk Upload"/>
+ <menu_item_call label="設定預設上傳權限" name="perm prefs"/>
</menu>
<menu_item_call label="復原" name="Undo"/>
<menu_item_call label="重做" name="Redo"/>
@@ -135,12 +135,12 @@
<menu_item_call label="Rebake Textures" name="Rebake Texture"/>
<menu_item_call label="設定使用者界面大小至預設值" name="Set UI Size to Default"/>
<menu_item_call label="設定視窗尺寸大小..." name="Set Window Size..."/>
- <menu_item_check label="Limit Select Distance" name="Limit Select Distance"/>
+ <menu_item_check label="限制選擇距離" name="Limit Select Distance"/>
<menu_item_check label="Disable Camera Constraints" name="Disable Camera Distance"/>
<menu_item_check label="高解析度快照" name="HighResSnapshot"/>
- <menu_item_check label="Quiet Snapshots to Disk" name="QuietSnapshotsToDisk"/>
- <menu_item_check label="Compress Snapshots to Disk" name="CompressSnapshotsToDisk"/>
- <menu label="Performance Tools" name="Performance Tools">
+ <menu_item_check label="靜音拍攝快照到硬碟" name="QuietSnapshotsToDisk"/>
+ <menu_item_check label="壓縮快照存到硬碟" name="CompressSnapshotsToDisk"/>
+ <menu label="效能工具" name="Performance Tools">
<menu_item_call label="Lag Meter" name="Lag Meter"/>
<menu_item_check label="統計列" name="Statistics Bar"/>
<menu_item_check label="Show Avatar Rendering Cost" name="Avatar Rendering Cost"/>
@@ -149,8 +149,8 @@
<menu_item_check label="Cheesy Beacon" name="Cheesy Beacon"/>
<menu_item_check label="Hide Particles" name="Hide Particles"/>
<menu_item_check label="Hide Selected" name="Hide Selected"/>
- <menu_item_check label="Highlight Transparent" name="Highlight Transparent"/>
- <menu_item_check label="Show HUD Attachments" name="Show HUD Attachments"/>
+ <menu_item_check label="高亮顯示透明物件" name="Highlight Transparent"/>
+ <menu_item_check label="顯示 HUD 附件" name="Show HUD Attachments"/>
<menu_item_check label="Show Mouselook Crosshairs" name="ShowCrosshairs"/>
</menu>
<menu label="Rendering Types" name="Rendering Types">
@@ -190,7 +190,7 @@
<menu_item_call label="關閉視窗" name="Close Window"/>
<menu_item_call label="關閉全部視窗" name="Close All Windows"/>
<menu_item_call label="Snapshot to Disk" name="Snapshot to Disk"/>
- <menu_item_call label="Mouselook" name="Mouselook"/>
+ <menu_item_call label="第一人稱視角" name="Mouselook"/>
<menu_item_check label="Joystick Flycam" name="Joystick Flycam"/>
<menu_item_call label="Reset View" name="Reset View"/>
<menu_item_call label="Look at Last Chatter" name="Look at Last Chatter"/>
@@ -226,7 +226,7 @@
<menu_item_check label="Badge" name="Badge"/>
</menu>
<menu label="顯示資訊" name="Display Info">
- <menu_item_check label="Show Time" name="Show Time"/>
+ <menu_item_check label="顯示時間" name="Show Time"/>
<menu_item_check label="Show Render Info" name="Show Render Info"/>
<menu_item_check label="顯示材質資訊" name="Show Texture Info"/>
<menu_item_check label="Show Matrices" name="Show Matrices"/>
@@ -338,10 +338,10 @@
<menu_item_call label="送出測試 IMs" name="Send Test IMs"/>
<menu_item_call label="Flush Names Caches" name="Flush Names Caches"/>
</menu>
- <menu label="Avatar" name="Character">
+ <menu label="化身" name="Character">
<menu label="Grab Baked Texture" name="Grab Baked Texture">
<menu_item_call label="Iris" name="Iris"/>
- <menu_item_call label="Head" name="Head"/>
+ <menu_item_call label="頭部" name="Head"/>
<menu_item_call label="Upper Body" name="Upper Body"/>
<menu_item_call label="Lower Body" name="Lower Body"/>
<menu_item_call label="裙子" name="Skirt"/>
@@ -355,10 +355,10 @@
<menu_item_check label="Allow Select Avatar" name="Allow Select Avatar"/>
</menu>
<menu_item_call label="Force Params to Default" name="Force Params to Default"/>
- <menu_item_check label="Animation Info" name="Animation Info"/>
- <menu_item_check label="Slow Motion Animations" name="Slow Motion Animations"/>
- <menu_item_check label="Show Look At" name="Show Look At"/>
- <menu_item_check label="Show Point At" name="Show Point At"/>
+ <menu_item_check label="動作資訊" name="Animation Info"/>
+ <menu_item_check label="慢動作" name="Slow Motion Animations"/>
+ <menu_item_check label="顯示注視在" name="Show Look At"/>
+ <menu_item_check label="顯示指向在" name="Show Point At"/>
<menu_item_check label="Debug Joint Updates" name="Debug Joint Updates"/>
<menu_item_check label="Disable LOD" name="Disable LOD"/>
<menu_item_check label="Debug Character Vis" name="Debug Character Vis"/>
diff --git a/indra/newview/skins/default/xui/zh/mime_types.xml b/indra/newview/skins/default/xui/zh/mime_types.xml
index d2d1321c2a..3498942f9b 100644
--- a/indra/newview/skins/default/xui/zh/mime_types.xml
+++ b/indra/newview/skins/default/xui/zh/mime_types.xml
@@ -176,7 +176,7 @@
</mimetype>
<mimetype name="text/plain">
<label name="text/plain_label">
- Text
+ 文字
</label>
</mimetype>
<mimetype name="text/xml">
diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml
index 16d4965d5a..65bb8ce517 100644
--- a/indra/newview/skins/default/xui/zh/notifications.xml
+++ b/indra/newview/skins/default/xui/zh/notifications.xml
@@ -1242,7 +1242,7 @@ Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click
You can only have [MAX_AGENTS] Allowed Residents.
</notification>
<notification name="MaxBannedAgentsOnRegion">
- You can only have [MAX_BANNED] Banned Residents.
+ 你只可以有最多 [MAX_BANNED] 位被封鎖的居民。
</notification>
<notification name="MaxAgentOnRegionBatch">
Failure while attempting to add [NUM_ADDED] agents:
@@ -1253,10 +1253,10 @@ Exceeds the [MAX_AGENTS] [LIST_TYPE] limit by [NUM_EXCESS].
<usetemplate name="okcancelbuttons" notext="取消" yestext="Bake"/>
</notification>
<notification name="MaxManagersOnRegion">
- You can only have [MAX_MANAGER] Estate Managers.
+ 你只可以有最多 [MAX_MANAGER] 位領地經理。
</notification>
<notification name="OwnerCanNotBeDenied">
- Can&apos;t add estate owner to estate &apos;Banned Resident&apos; list.
+ 無法添加領地擁有者到領地的 &apos;被封鎖的居民&apos; 名單中。
</notification>
<notification name="CanNotChangeAppearanceUntilLoaded">
無法變更外觀,直到服裝與體形下載完畢。
@@ -1273,15 +1273,15 @@ Please set the object for sale and try again.
[DOWNLOAD_PATH].
</notification>
<notification name="DownloadWindowsMandatory">
- A new version of [APP_NAME] is available.
+ 一個新版本的 [APP_NAME] 已經可用。
[MESSAGE]
-You must download this update to use [APP_NAME].
+你必須下載這個更新以使用 [APP_NAME]。
<usetemplate name="okcancelbuttons" notext="結束退出" yestext="下載"/>
</notification>
<notification name="DownloadWindows">
- An updated version of [APP_NAME] is available.
+ 一個 [APP_NAME] 更新過的版本已經可用。
[MESSAGE]
-This update is not required, but we suggest you install it to improve performance and stability.
+這個更新並非強制更新,但我們建議你安裝以增強效能及穩定性。
<usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/>
</notification>
<notification name="DownloadWindowsReleaseForDownload">
@@ -1356,12 +1356,12 @@ or you can install it now.
<notification name="DownloadBackgroundTip">
We have downloaded an update to your [APP_NAME] installation.
Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
- <usetemplate name="okcancelbuttons" notext="Later..." yestext="Install now and restart [APP_NAME]"/>
+ <usetemplate name="okcancelbuttons" notext="稍候..." yestext="立即安裝及重新啟動 [APP_NAME]"/>
</notification>
<notification name="DownloadBackgroundDialog">
We have downloaded an update to your [APP_NAME] installation.
Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
- <usetemplate name="okcancelbuttons" notext="Later..." yestext="Install now and restart [APP_NAME]"/>
+ <usetemplate name="okcancelbuttons" notext="梢候..." yestext="立即安裝及重新啟動 [APP_NAME]"/>
</notification>
<notification name="RequiredUpdateDownloadedVerboseDialog">
We have downloaded a required software update.
@@ -1371,7 +1371,7 @@ We must restart [APP_NAME] to install the update.
<usetemplate name="okbutton" yestext="確定"/>
</notification>
<notification name="RequiredUpdateDownloadedDialog">
- We must restart [APP_NAME] to install the update.
+ 我門必須重新啟動 [APP_NAME] 以安裝更新。
<usetemplate name="okbutton" yestext="確定"/>
</notification>
<notification name="DeedObjectToGroup">
@@ -1569,17 +1569,17 @@ Please try again later.
</notification>
<notification name="TeleportToPick">
瞬間傳送到 [PICK]?
- <usetemplate ignoretext="Confirm that I want to teleport to a location in Picks" name="okcancelignore" notext="取消" yestext="Teleport"/>
+ <usetemplate ignoretext="確認我要瞬間傳送到精選地點的所在位置" name="okcancelignore" notext="取消" yestext="瞬間傳送"/>
</notification>
<notification name="TeleportToClassified">
瞬間傳送到 [CLASSIFIED]?
- <usetemplate ignoretext="Confirm that I want to teleport to a location in Classifieds" name="okcancelignore" notext="取消" yestext="瞬間傳送"/>
+ <usetemplate ignoretext="確認我要瞬間傳送到個人廣告的所在位置" name="okcancelignore" notext="取消" yestext="瞬間傳送"/>
</notification>
<notification name="TeleportToHistoryEntry">
瞬間傳送到 [HISTORY_ENTRY]?
- <usetemplate ignoretext="Confirm that I want to teleport to a history location" name="okcancelignore" notext="取消" yestext="瞬間傳送"/>
+ <usetemplate ignoretext="確認我要瞬間傳送到歷史紀錄中的位置" name="okcancelignore" notext="取消" yestext="瞬間傳送"/>
</notification>
- <notification label="Message everyone in your Estate" name="MessageEstate">
+ <notification label="送出訊息給你領地內的每一個人" name="MessageEstate">
Type a short announcement which will be sent to everyone currently in your estate.
<form name="form">
<button name="OK" text="確定"/>
@@ -1780,15 +1780,15 @@ To enter Adult regions, Residents must be Account Verified, either by age-verifi
<notification label="Voice Version Mismatch" name="VoiceVersionMismatch">
This version of [APP_NAME] is not compatible with the Voice Chat feature in this region. In order for Voice Chat to function correctly you will need to update [APP_NAME].
</notification>
- <notification label="Can&apos;t Buy Objects" name="BuyObjectOneOwner">
+ <notification label="無法購買物件" name="BuyObjectOneOwner">
Cannot buy objects from different owners at the same time.
Please select only one object and try again.
</notification>
- <notification label="Can&apos;t Buy Contents" name="BuyContentsOneOnly">
+ <notification label="無法購買內容物" name="BuyContentsOneOnly">
Unable to buy the contents of more than one object at a time.
Please select only one object and try again.
</notification>
- <notification label="Can&apos;t Buy Contents" name="BuyContentsOneOwner">
+ <notification label="無法購買內容物" name="BuyContentsOneOwner">
Cannot buy objects from different owners at the same time.
Please select only one object and try again.
</notification>
@@ -1950,7 +1950,7 @@ Do you want to replace it with the selected object?
<button ignore="絕不取代" name="No" text="取消"/>
</form>
</notification>
- <notification label="Busy Mode Warning" name="BusyModePay">
+ <notification label="忙碌模式警告" name="BusyModePay">
You are in Busy Mode, which means you will not receive any items offered in exchange for this payment.
Would you like to leave Busy Mode before completing this transaction?
diff --git a/indra/newview/skins/default/xui/zh/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/zh/panel_adhoc_control_panel.xml
index c9e47984e2..7d16ac4129 100644
--- a/indra/newview/skins/default/xui/zh/panel_adhoc_control_panel.xml
+++ b/indra/newview/skins/default/xui/zh/panel_adhoc_control_panel.xml
@@ -5,7 +5,7 @@
<button label="通話" name="call_btn"/>
</layout_panel>
<layout_panel name="end_call_btn_panel">
- <button label="Leave Call" name="end_call_btn"/>
+ <button label="離開通話" name="end_call_btn"/>
</layout_panel>
<layout_panel name="voice_ctrls_btn_panel">
<button label="語音控制" name="voice_ctrls_btn"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml
index 23b76eea9b..eccb938f15 100644
--- a/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml
@@ -21,7 +21,7 @@
<string name="FormatYears">
[COUNT]y
</string>
- <text name="avatar_name" value="(loading)"/>
+ <text name="avatar_name" value="(載入)"/>
<text name="last_interaction" value="0s"/>
<icon name="permission_edit_theirs_icon" tool_tip="你不能編輯這位朋友的物件"/>
<icon name="permission_edit_mine_icon" tool_tip="這位朋友能編輯、刪除或取得你的物件"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_hair.xml b/indra/newview/skins/default/xui/zh/panel_edit_hair.xml
index 0578fe9ef1..d9ddafac3b 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_hair.xml
@@ -5,7 +5,7 @@
</panel>
<panel name="accordion_panel">
<accordion name="wearable_accordion">
- <accordion_tab name="hair_color_tab" title="Color"/>
+ <accordion_tab name="hair_color_tab" title="顏色"/>
<accordion_tab name="hair_style_tab" title="Style"/>
<accordion_tab name="hair_eyebrows_tab" title="Eyebrows"/>
<accordion_tab name="hair_facial_tab" title="Facial"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_pants.xml b/indra/newview/skins/default/xui/zh/panel_edit_pants.xml
index b453fdc758..76560256f7 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_pants.xml
@@ -2,7 +2,7 @@
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
<texture_picker label="材質" name="Fabric" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/>
+ <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟顏色挑選器"/>
</panel>
<panel name="accordion_panel">
<accordion name="wearable_accordion">
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_pick.xml b/indra/newview/skins/default/xui/zh/panel_edit_pick.xml
index 0f1f72ceb9..a624877ab3 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_pick.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Edit Pick" name="panel_edit_pick">
+<panel label="編輯精選地點" name="panel_edit_pick">
<panel.string name="location_notice">
- (will update after save)
+ (將在儲存後更新)
</panel.string>
<text name="title">
- Edit Pick
+ 編輯精選地點
</text>
<scroll_container name="profile_scroll">
<panel name="scroll_content_panel">
<icon label="" name="edit_icon" tool_tip="點擊以選擇圖像"/>
<text name="Name:">
- Title:
+ 標題:
</text>
<text name="description_label">
描述:
@@ -21,15 +21,15 @@
<text name="pick_location">
載入中...
</text>
- <button label="Set to Current Location" name="set_to_curr_location_btn"/>
+ <button label="設定為目前位置" name="set_to_curr_location_btn"/>
</panel>
</scroll_container>
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="layout_stack1">
<layout_panel name="layout_panel1">
- <button label="Save Pick" name="save_changes_btn"/>
+ <button label="儲存精選地點" name="save_changes_btn"/>
</layout_panel>
- <layout_panel name="layout_panel1">
+ <layout_panel name="layout_panel2">
<button label="取消" name="cancel_btn"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_shape.xml b/indra/newview/skins/default/xui/zh/panel_edit_shape.xml
index da6049ea75..f249100786 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_shape.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_shape.xml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shape_panel">
<string name="meters">
- Meters
+ 公尺
</string>
<string name="feet">
- Feet
+ 英呎
</string>
<string name="height">
- Height:
+ 身高:
</string>
<panel label="襯衫" name="accordion_panel">
<accordion name="wearable_accordion">
- <accordion_tab name="shape_body_tab" title="Body"/>
- <accordion_tab name="shape_head_tab" title="Head"/>
+ <accordion_tab name="shape_body_tab" title="身體"/>
+ <accordion_tab name="shape_head_tab" title="頭部"/>
<accordion_tab name="shape_eyes_tab" title="眼睛"/>
- <accordion_tab name="shape_ears_tab" title="Ears"/>
- <accordion_tab name="shape_nose_tab" title="Nose"/>
- <accordion_tab name="shape_mouth_tab" title="Mouth"/>
- <accordion_tab name="shape_chin_tab" title="Chin"/>
- <accordion_tab name="shape_torso_tab" title="Torso"/>
- <accordion_tab name="shape_legs_tab" title="Legs"/>
+ <accordion_tab name="shape_ears_tab" title="耳朵"/>
+ <accordion_tab name="shape_nose_tab" title="鼻子"/>
+ <accordion_tab name="shape_mouth_tab" title="嘴巴"/>
+ <accordion_tab name="shape_chin_tab" title="下巴"/>
+ <accordion_tab name="shape_torso_tab" title="軀幹"/>
+ <accordion_tab name="shape_legs_tab" title="腿部"/>
</accordion>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml b/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml
index 321fb68756..ecfc1e2fad 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml
@@ -2,7 +2,7 @@
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
<texture_picker label="材質" name="Fabric" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/>
+ <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟顏色挑選器"/>
</panel>
<panel name="accordion_panel">
<accordion name="wearable_accordion">
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml b/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml
index 096a83c871..5c46f94fe9 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml
@@ -2,7 +2,7 @@
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
<texture_picker label="材質" name="Fabric" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/>
+ <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟顏色挑選器"/>
</panel>
<panel name="accordion_panel">
<accordion name="wearable_accordion">
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_socks.xml b/indra/newview/skins/default/xui/zh/panel_edit_socks.xml
index dab132bad2..09c888f226 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_socks.xml
@@ -2,7 +2,7 @@
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
<texture_picker label="材質" name="Fabric" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/>
+ <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟顏色挑選器"/>
</panel>
<panel name="accordion_panel">
<accordion name="wearable_accordion">
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml
index d183e6897d..946f8b22dc 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_tattoo_panel">
<panel name="avatar_tattoo_color_panel">
- <texture_picker label="Head Tattoo" name="Head Tattoo" tool_tip="點擊以挑選圖片"/>
- <texture_picker label="Upper Tattoo" name="Upper Tattoo" tool_tip="Click to choose a picture"/>
- <texture_picker label="Lower Tattoo" name="Lower Tattoo" tool_tip="點擊以挑選圖片"/>
- <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/>
+ <texture_picker label="頭部刺青" name="Head Tattoo" tool_tip="點擊以挑選圖片"/>
+ <texture_picker label="上半身刺青" name="Upper Tattoo" tool_tip="點擊以挑選照片"/>
+ <texture_picker label="下半身刺青" name="Lower Tattoo" tool_tip="點擊以挑選圖片"/>
+ <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟顏色挑選器"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml b/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml
index d741ed70df..936a2651ab 100644
--- a/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml
@@ -49,16 +49,16 @@
Editing Physics
</string>
<string name="shape_desc_text">
- Shape:
+ 體形:
</string>
<string name="skin_desc_text">
- Skin:
+ 皮膚:
</string>
<string name="hair_desc_text">
- Hair:
+ 頭髮:
</string>
<string name="eyes_desc_text">
- Eyes:
+ 眼睛:
</string>
<string name="shirt_desc_text">
襯衫:
diff --git a/indra/newview/skins/default/xui/zh/panel_group_general.xml b/indra/newview/skins/default/xui/zh/panel_group_general.xml
index 1706541f2b..a97a35056b 100644
--- a/indra/newview/skins/default/xui/zh/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_group_general.xml
@@ -6,7 +6,7 @@
Hover your mouse over the options for more help.
</panel.string>
<panel.string name="group_info_unchanged">
- General group information has changed
+ 一般社團資訊已經被變更
</panel.string>
<panel.string name="incomplete_member_data_str">
Retrieving member data
@@ -17,7 +17,7 @@ Hover your mouse over the options for more help.
創辦人:
</text>
<text name="join_cost_text">
- Free
+ 免費
</text>
<button label="現在就加入!!" name="btn_join"/>
</panel>
@@ -50,7 +50,7 @@ Hover your mouse over the options for more help.
- 選擇內容分級 -
</combo_item>
<combo_box.item label="Moderate Content" name="mature"/>
- <combo_box.item label="General Content" name="pg"/>
+ <combo_box.item label="一般內容" name="pg"/>
</combo_box>
<check_box initial_value="true" label="顯示在搜尋中" name="show_in_group_list" tool_tip="Let people see this group in search results"/>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_group_invite.xml b/indra/newview/skins/default/xui/zh/panel_group_invite.xml
index 0a0a1f1941..a1395f454b 100644
--- a/indra/newview/skins/default/xui/zh/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/zh/panel_group_invite.xml
@@ -19,7 +19,7 @@
Choose what Role to assign them to:
</text>
<combo_box name="role_name" tool_tip="Choose from the list of Roles you are allowed to assign members to"/>
- <button label="Send Invitations" name="ok_button"/>
+ <button label="送出邀請" name="ok_button"/>
<button label="取消" name="cancel_button"/>
<string name="GroupInvitation">
社團邀請
diff --git a/indra/newview/skins/default/xui/zh/panel_group_land_money.xml b/indra/newview/skins/default/xui/zh/panel_group_land_money.xml
index 71f139a3e6..58022c2279 100644
--- a/indra/newview/skins/default/xui/zh/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/zh/panel_group_land_money.xml
@@ -22,9 +22,9 @@
<scroll_list name="group_parcel_list">
<scroll_list.columns label="地段" name="name"/>
<scroll_list.columns label="地區" name="location"/>
- <scroll_list.columns label="Type" name="type"/>
- <scroll_list.columns label="Area" name="area"/>
- <scroll_list.columns label="Hidden" name="hidden"/>
+ <scroll_list.columns label="類型" name="type"/>
+ <scroll_list.columns label="區域" name="area"/>
+ <scroll_list.columns label="隱藏" name="hidden"/>
</scroll_list>
<text name="total_contributed_land_label">
Total contribution:
diff --git a/indra/newview/skins/default/xui/zh/panel_group_notices.xml b/indra/newview/skins/default/xui/zh/panel_group_notices.xml
index 5fed96dbd9..65c07e7137 100644
--- a/indra/newview/skins/default/xui/zh/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/zh/panel_group_notices.xml
@@ -6,11 +6,11 @@ Notices only go to group members in Roles with the ability to receive Notices.
You can turn off Notices on the General tab.
</panel.string>
<panel.string name="no_notices_text">
- There are no past notices
+ 沒有過去的通知
</panel.string>
<text name="lbl2">
- Notices are kept for 14 days.
-Maximum 200 per group daily
+ 通知保留 14 天。
+每個社團一天最多 200 則
</text>
<scroll_list name="notice_list">
<scroll_list.columns label="主旨" name="subject"/>
@@ -18,7 +18,7 @@ Maximum 200 per group daily
<scroll_list.columns label="日期" name="date"/>
</scroll_list>
<text name="notice_list_none_found">
- None found
+ 沒發現。
</text>
<button label="新通知" name="create_new_notice" tool_tip="建立一個新通知"/>
<button name="refresh_notices" tool_tip="Refresh list of notices"/>
@@ -39,16 +39,16 @@ Maximum 200 per group daily
將物品拖曳並丟於此處以添加為附件:
</text>
<button label="收納區" name="open_inventory" tool_tip="開啟收納區"/>
- <button name="remove_attachment" tool_tip="Remove attachment from your notification"/>
- <button label="Send" label_selected="Send" name="send_notice"/>
+ <button name="remove_attachment" tool_tip="由你的通知移除附件"/>
+ <button label="送出" label_selected="送出" name="send_notice"/>
<group_drop_target name="drop_target" tool_tip="Drag an inventory item onto this target box to send it with this notice. You must have permission to copy and transfer the item in order to attach it."/>
</panel>
<panel label="察看過去的通知" name="panel_view_past_notice">
<text name="lbl">
- Archived Notice
+ 存檔的通知
</text>
<text name="lbl2">
- To send a new notice, click the + button
+ 要送出一個新通知,點擊 + 按鈕
</text>
<text name="lbl3">
主旨:
diff --git a/indra/newview/skins/default/xui/zh/panel_group_roles.xml b/indra/newview/skins/default/xui/zh/panel_group_roles.xml
index 8947ab6e45..fff4383893 100644
--- a/indra/newview/skins/default/xui/zh/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/zh/panel_group_roles.xml
@@ -19,7 +19,7 @@ clicking on their names.
<filter_editor label="成員過濾器" name="filter_input"/>
<name_list name="member_list">
<name_list.columns label="成員" name="name"/>
- <name_list.columns label="Donation" name="donated"/>
+ <name_list.columns label="捐款" name="donated"/>
<name_list.columns label="狀態" name="online"/>
</name_list>
<button label="邀請" name="member_invite"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml b/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml
index 881f8eac0b..703182e04d 100644
--- a/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml
+++ b/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml
@@ -14,7 +14,7 @@
<button label="分享" name="share_btn"/>
</layout_panel>
<layout_panel name="pay_btn_panel">
- <button label="Pay" name="pay_btn"/>
+ <button label="支付" name="pay_btn"/>
</layout_panel>
<layout_panel name="call_btn_panel">
<button label="通話" name="call_btn"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_me.xml b/indra/newview/skins/default/xui/zh/panel_me.xml
index abdbfd7429..a236dfc17a 100644
--- a/indra/newview/skins/default/xui/zh/panel_me.xml
+++ b/indra/newview/skins/default/xui/zh/panel_me.xml
@@ -2,6 +2,6 @@
<panel label="我的檔案" name="panel_me">
<tab_container name="tabs">
<panel label="我的檔案" name="panel_profile"/>
- <panel label="MY PICKS" name="panel_picks"/>
+ <panel label="我的精選地點" name="panel_picks"/>
</tab_container>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml b/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml
index f3163e3c19..059a78cf7d 100644
--- a/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml
@@ -11,7 +11,7 @@
預覽
</text>
<text name="current_url_label">
- Current Page:
+ 目前頁面:
</text>
<text name="current_url" tool_tip="The current page for this media source" value=""/>
<button label="Reset" name="current_url_reset_btn"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml
index 6e2d47c09e..3645f471ce 100644
--- a/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml
+++ b/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="自訂" name="Media settings for controls">
<text name="controls_label">
- Controls:
+ 控制:
</text>
<combo_box name="controls">
<combo_item name="Standard">
- Standard
+ 標準
</combo_item>
<combo_item name="Mini">
- Mini
+ 迷你
</combo_item>
</combo_box>
<text name="owner_label">
- Owner
+ 擁有者
</text>
<check_box initial_value="false" label="Allow Navigation &amp; Interactivity" name="perms_owner_interact"/>
<check_box initial_value="false" label="顯示控制列" name="perms_owner_control"/>
@@ -22,7 +22,7 @@
<check_box initial_value="false" label="Allow Navigation &amp; Interactivity" name="perms_group_interact"/>
<check_box initial_value="false" label="顯示控制列" name="perms_group_control"/>
<text name="anyone_label">
- Anyone
+ 任何人
</text>
<check_box initial_value="false" label="Allow Navigation &amp; Interactivity" name="perms_anyone_interact"/>
<check_box initial_value="false" label="顯示控制列" name="perms_anyone_control"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml
index 724cd54bf1..3cabfcfaba 100644
--- a/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <line_editor label="點擊此處開始聊天。" name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout"/>
- <button name="show_nearby_chat" tool_tip="顯示 / 隱藏 附近聊天紀錄"/>
+ <line_editor label="點擊此處開始聊天。" name="chat_box" tool_tip="按下 Enter 鍵來說或按下 Ctrl+Enter 來喊叫"/>
+ <button name="show_nearby_chat" tool_tip="顯示 / 隱藏 附近的聊天紀錄"/>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_nearby_media.xml b/indra/newview/skins/default/xui/zh/panel_nearby_media.xml
index 0b8a7a5f42..5ab6837569 100644
--- a/indra/newview/skins/default/xui/zh/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/zh/panel_nearby_media.xml
@@ -44,13 +44,13 @@
<panel name="media_controls_panel">
<layout_stack name="media_controls">
<layout_panel name="stop">
- <button name="stop_btn" tool_tip="Stop selected media"/>
+ <button name="stop_btn" tool_tip="停止所選擇媒體"/>
</layout_panel>
<layout_panel name="play">
- <button name="play_btn" tool_tip="Play selected media"/>
+ <button name="play_btn" tool_tip="播放所選擇的媒體"/>
</layout_panel>
<layout_panel name="pause">
- <button name="pause_btn" tool_tip="Pause selected media"/>
+ <button name="pause_btn" tool_tip="暫停所選擇的媒體"/>
</layout_panel>
<layout_panel name="volume_slider_ctrl">
<slider_bar initial_value="0.5" name="volume_slider" tool_tip="Audio volume for selected media"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_notify_textbox.xml b/indra/newview/skins/default/xui/zh/panel_notify_textbox.xml
index bdbc89f71c..01a8210338 100644
--- a/indra/newview/skins/default/xui/zh/panel_notify_textbox.xml
+++ b/indra/newview/skins/default/xui/zh/panel_notify_textbox.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="instant_message" name="panel_notify_textbox">
+<panel label="即時訊息" name="panel_notify_textbox">
<string name="message_max_lines_count" value="7"/>
<panel label="info_panel" name="info_panel">
- <text_editor name="message" value="message"/>
+ <text_editor name="message" value="訊息"/>
</panel>
<panel label="control_panel" name="control_panel">
- <button label="Submit" name="btn_submit"/>
+ <button label="提交" name="btn_submit"/>
<button label="忽視" name="ignore_btn"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml b/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml
index 6ceaf447a7..263106d13a 100644
--- a/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml
@@ -15,7 +15,7 @@
<string name="Filter.Objects" value="物件"/>
<string name="Filter.Clothing" value="服裝"/>
<string name="Filter.Bodyparts" value="身體部位"/>
- <string name="replace_body_part" value="Click to replace your existing shape"/>
+ <string name="replace_body_part" value="點擊以取代你現存的體形"/>
<text name="title" value="編輯裝扮"/>
<panel name="header_panel">
<panel name="outfit_name_and_status">
@@ -27,7 +27,7 @@
<layout_panel name="outfit_wearables_panel">
<layout_stack name="filter_panels">
<layout_panel name="add_button_and_combobox">
- <button label="Add More..." name="show_add_wearables_btn" tool_tip="開啟 / 關閉"/>
+ <button label="添加更多..." name="show_add_wearables_btn" tool_tip="開啟 / 關閉"/>
</layout_panel>
<layout_panel name="filter_panel">
<filter_editor label="收納區可穿著過濾器" name="look_item_filter"/>
@@ -35,7 +35,7 @@
</layout_stack>
</layout_panel>
<layout_panel name="add_wearables_panel">
- <button label="Wear Item" name="plus_btn"/>
+ <button label="穿上物品" name="plus_btn"/>
</layout_panel>
</layout_stack>
<panel name="no_add_wearables_button_bar">
diff --git a/indra/newview/skins/default/xui/zh/panel_people.xml b/indra/newview/skins/default/xui/zh/panel_people.xml
index 8da75e334e..4c6d6c76be 100644
--- a/indra/newview/skins/default/xui/zh/panel_people.xml
+++ b/indra/newview/skins/default/xui/zh/panel_people.xml
@@ -66,16 +66,16 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
<layout_panel name="view_profile_btn_lp">
<button label="檔案" name="view_profile_btn" tool_tip="Show picture, groups, and other Residents information"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="im_btn_lp">
<button label="IM" name="im_btn" tool_tip="開啟即時訊息會話"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="call_btn_lp">
<button label="通話" name="call_btn" tool_tip="Call this Resident"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="share_btn_lp">
<button label="分享" name="share_btn" tool_tip="分享一個收納區物品"/>
</layout_panel>
- <layout_panel name="chat_btn_lp">
+ <layout_panel name="teleport_btn_lp">
<button label="瞬間傳送" name="teleport_btn" tool_tip="Offer teleport"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/zh/panel_pick_info.xml b/indra/newview/skins/default/xui/zh/panel_pick_info.xml
index 44ae5703c6..cd4cdbf999 100644
--- a/indra/newview/skins/default/xui/zh/panel_pick_info.xml
+++ b/indra/newview/skins/default/xui/zh/panel_pick_info.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="panel_pick_info">
- <text name="title" value="Pick Info"/>
+ <text name="title" value="精選地點資訊"/>
<scroll_container name="profile_scroll">
<panel name="scroll_content_panel">
<text_editor name="pick_name" value="[name]"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_picks.xml b/indra/newview/skins/default/xui/zh/panel_picks.xml
index 3b356967f9..a233092dc2 100644
--- a/indra/newview/skins/default/xui/zh/panel_picks.xml
+++ b/indra/newview/skins/default/xui/zh/panel_picks.xml
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Picks" name="panel_picks">
- <string name="no_picks" value="No Picks"/>
+<panel label="精選地點" name="panel_picks">
+ <string name="no_picks" value="無精選地點"/>
<string name="no_classifieds" value="No Classifieds"/>
<accordion name="accordion">
- <accordion_tab name="tab_picks" title="Picks"/>
+ <accordion_tab name="tab_picks" title="精選地點"/>
<accordion_tab name="tab_classifieds" title="Classifieds"/>
</accordion>
<panel label="bottom_panel" name="edit_panel">
<layout_stack name="edit_panel_ls">
<layout_panel name="gear_menu_btn">
- <button name="new_btn" tool_tip="Create a new pick or classified at the current location"/>
+ <button name="new_btn" tool_tip="以目前位置建立新的精選地點或個人廣告"/>
</layout_panel>
</layout_stack>
</panel>
<panel name="buttons_cucks">
<layout_stack name="buttons_cucks_ls">
<layout_panel name="info_btn_lp">
- <button label="資訊" name="info_btn" tool_tip="Show pick information"/>
+ <button label="資訊" name="info_btn" tool_tip="顯示精選地點資訊"/>
</layout_panel>
<layout_panel name="teleport_btn_lp">
- <button label="瞬間傳送" name="teleport_btn" tool_tip="Teleport to the corresponding area"/>
+ <button label="瞬間傳送" name="teleport_btn" tool_tip="瞬間傳送到相對應的區域"/>
</layout_panel>
<layout_panel name="show_on_map_btn_lp">
- <button label="地圖" name="show_on_map_btn" tool_tip="Show the corresponding area on the World Map"/>
+ <button label="地圖" name="show_on_map_btn" tool_tip="在世界地圖上顯示相對應的區域"/>
</layout_panel>
</layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_place_profile.xml b/indra/newview/skins/default/xui/zh/panel_place_profile.xml
index b0919c9151..aa7b036398 100644
--- a/indra/newview/skins/default/xui/zh/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/zh/panel_place_profile.xml
@@ -11,7 +11,7 @@
<string name="unknown" value="(未知)"/>
<string name="public" value="(公開)"/>
<string name="none_text" value="(無)"/>
- <string name="sale_pending_text" value="(Sale Pending)"/>
+ <string name="sale_pending_text" value="(擱置銷售)"/>
<string name="group_owned_text" value="(社團所擁有)"/>
<string name="price_text" value="L$"/>
<string name="area_text" value="m²"/>
@@ -60,11 +60,11 @@
<text name="voice_value" value="On"/>
<text name="fly_label" value="飛行:"/>
<text name="fly_value" value="On"/>
- <text name="push_label" value="Push:"/>
+ <text name="push_label" value="推撞:"/>
<text name="push_value" value="Off"/>
- <text name="build_label" value="Build:"/>
+ <text name="build_label" value="建造:"/>
<text name="build_value" value="On"/>
- <text name="scripts_label" value="Scripts:"/>
+ <text name="scripts_label" value="腳本:"/>
<text name="scripts_value" value="On"/>
<text name="damage_label" value="Damage:"/>
<text name="damage_value" value="Off"/>
@@ -78,7 +78,7 @@
<text name="region_type_label" value="類型:"/>
<text name="region_type" value="Moose"/>
<text name="region_rating_label" value="分級:"/>
- <text name="region_rating" value="Adult"/>
+ <text name="region_rating" value="成人"/>
<text name="region_owner_label" value="擁有者:"/>
<text name="region_owner" value="moose Van Moose extra long name moose"/>
<text name="region_group_label" value="社團:"/>
@@ -103,7 +103,7 @@
<text name="area_label" value="面積:"/>
<text name="traffic_label" value="流量:"/>
<text name="primitives_label" value="Primitives:"/>
- <text name="parcel_scripts_label" value="Scripts:"/>
+ <text name="parcel_scripts_label" value="腳本:"/>
<text name="terraform_limits_label" value="Terraform limits:"/>
<text name="subdivide_label" value="Subdivide/Join ability:"/>
<text name="resale_label" value="ReSale ability:"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
index a39402c858..c691edb11c 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
@@ -33,7 +33,7 @@
Use machine translation while chatting (powered by Google)
</text>
<text name="translate_language_text">
- Translate chat into:
+ 聊天翻譯為:
</text>
<combo_box name="translate_language_combobox">
<combo_box.item label="系統預設" name="System Default Language"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
index c7299ad8a9..b7449dad10 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
@@ -17,10 +17,10 @@
<combo_box.item label="日本語 (Japanese) - Beta" name="(Japanese)"/>
</combo_box>
<text name="language_textbox2">
- (Requires restart)
+ (須重新啟動)
</text>
<text name="maturity_desired_prompt">
- I want to access content rated:
+ 我想要能進出內容分級的地區為:
</text>
<combo_box name="maturity_desired_combobox">
<combo_box.item label="General, Moderate, Adult" name="Desired_Adult"/>
@@ -36,34 +36,34 @@
</combo_box>
<check_box initial_value="true" label="登入時顯示" name="show_location_checkbox"/>
<text name="name_tags_textbox">
- Name tags:
+ 名稱標籤:
</text>
<radio_group name="Name_Tag_Preference">
<radio_item label="Off" name="radio" value="0"/>
<radio_item label="On" name="radio2" value="1"/>
- <radio_item label="Show briefly" name="radio3" value="2"/>
+ <radio_item label="簡短顯示" name="radio3" value="2"/>
</radio_group>
- <check_box label="My name" name="show_my_name_checkbox1"/>
- <check_box label="使用者名稱" name="show_slids" tool_tip="Show username, like bobsmith123"/>
- <check_box label="社團頭銜" name="show_all_title_checkbox1" tool_tip="Show group titles, like Officer or Member"/>
+ <check_box label="我的名字" name="show_my_name_checkbox1"/>
+ <check_box label="使用者名稱" name="show_slids" tool_tip="顯示使用者名稱,就像 bobsmith123 這類的"/>
+ <check_box label="社團頭銜" name="show_all_title_checkbox1" tool_tip="顯示社團頭銜,像是 Officer 或成員"/>
<check_box label="高亮顯示朋友" name="show_friends" tool_tip="高亮顯示你朋友的名稱標籤"/>
<check_box label="View Display Names" name="display_names_check" tool_tip="Check to use display names in chat, IM, name tags, etc."/>
<text name="inworld_typing_rg_label">
- Pressing letter keys:
+ 按下字母鍵:
</text>
<radio_group name="inworld_typing_preference">
- <radio_item label="Starts local chat" name="radio_start_chat" value="1"/>
- <radio_item label="Affects movement (i.e. WASD)" name="radio_move" value="0"/>
+ <radio_item label="開始本地聊天" name="radio_start_chat" value="1"/>
+ <radio_item label="影響移動(例如 WASD鍵)" name="radio_move" value="0"/>
</radio_group>
<text name="title_afk_text">
- Away timeout:
+ 離開逾時設定:
</text>
- <combo_box label="Away timeout:" name="afk">
- <combo_box.item label="2 minutes" name="item0"/>
- <combo_box.item label="5 minutes" name="item1"/>
- <combo_box.item label="10 minutes" name="item2"/>
- <combo_box.item label="30 minutes" name="item3"/>
- <combo_box.item label="never" name="item4"/>
+ <combo_box label="離開逾時設定:" name="afk">
+ <combo_box.item label="2 分鐘" name="item0"/>
+ <combo_box.item label="5 分鐘" name="item1"/>
+ <combo_box.item label="10 分鐘" name="item2"/>
+ <combo_box.item label="30 分鐘" name="item3"/>
+ <combo_box.item label="絕不" name="item4"/>
</combo_box>
<text name="text_box3">
忙碌模式回應:
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_move.xml b/indra/newview/skins/default/xui/zh/panel_preferences_move.xml
index ff582d774b..de296f72f3 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_move.xml
@@ -13,9 +13,9 @@
Mouselook mouse sensitivity:
</text>
<check_box label="反轉" name="invert_mouse"/>
- <check_box label="Arrow keys always move me" name="arrow_keys_move_avatar_check"/>
+ <check_box label="總是使用方向鍵移動" name="arrow_keys_move_avatar_check"/>
<check_box label="Tap-tap-hold to run" name="tap_tap_hold_to_run"/>
- <check_box label="Double-Click to:" name="double_click_chkbox"/>
+ <check_box label="雙擊以D:" name="double_click_chkbox"/>
<radio_group name="double_click_action">
<radio_item label="瞬間傳送" name="radio_teleport"/>
<radio_item label="Auto-pilot" name="radio_autopilot"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml b/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml
index 2cab05e2ad..305d1e2ac9 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml
@@ -10,29 +10,29 @@
</text>
<slider label="按鍵音" name="UI Volume"/>
<slider label="Ambient" name="Wind Volume"/>
- <slider label="Sound Effects" name="SFX Volume"/>
- <slider label="Streaming music" name="Music Volume"/>
- <check_box label="Enabled" name="enable_music"/>
- <slider label="Media" name="Media Volume"/>
- <check_box label="Enabled" name="enable_media"/>
- <slider label="Voice Chat" name="Voice Volume"/>
- <check_box label="Enabled" name="enable_voice_check"/>
- <check_box label="Allow Media to auto-play" name="media_auto_play_btn" tool_tip="Check this to let media auto-play if it wants" value="true"/>
- <check_box label="Play media attached to other avatars" name="media_show_on_others_btn" tool_tip="Uncheck this to hide media attached to other avatars nearby" value="true"/>
+ <slider label="音效" name="SFX Volume"/>
+ <slider label="串流音樂" name="Music Volume"/>
+ <check_box label="已啟用" name="enable_music"/>
+ <slider label="媒體" name="Media Volume"/>
+ <check_box label="已啟用" name="enable_media"/>
+ <slider label="語音聊天" name="Voice Volume"/>
+ <check_box label="已啟用" name="enable_voice_check"/>
+ <check_box label="允許媒體自動播放" name="media_auto_play_btn" tool_tip="若你想要,可以勾選這個允許媒體自動播放" value="true"/>
+ <check_box label="播放附加到其他化身身上的媒體" name="media_show_on_others_btn" tool_tip="Uncheck this to hide media attached to other avatars nearby" value="true"/>
<text name="voice_chat_settings">
- Voice Chat Settings
+ 語音聊天設定
</text>
<text name="Listen from">
- Listen from:
+ 傾聽位置:
</text>
<radio_group name="ear_location">
- <radio_item label="Camera position" name="0"/>
- <radio_item label="Avatar position" name="1"/>
+ <radio_item label="攝影機位置" name="0"/>
+ <radio_item label="化身位置" name="1"/>
</radio_group>
- <check_box label="Move avatar lips when speaking" name="enable_lip_sync"/>
+ <check_box label="說話時同步移動化身嘴唇" name="enable_lip_sync"/>
<check_box label="Toggle speak on/off when I press:" name="push_to_talk_toggle_check" tool_tip="When in toggle mode, press and release the trigger key ONCE to switch your microphone on or off. When not in toggle mode, the microphone broadcasts your voice only while the trigger is being held down."/>
<line_editor label="Push-to-Speak trigger" name="modifier_combo"/>
- <button label="Set Key" name="set_voice_hotkey_button"/>
+ <button label="設定按鍵" name="set_voice_hotkey_button"/>
<button name="set_voice_middlemouse_button" tool_tip="Reset to Middle Mouse Button"/>
<button label="輸入 / 輸出設備" name="device_settings_btn"/>
<panel label="設備設定" name="device_settings_panel">
@@ -49,7 +49,7 @@
輸入
</text>
<text name="My volume label">
- My volume:
+ 我的音量:
</text>
<slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Change the volume using this slider"/>
<text name="wait_text">
diff --git a/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml
index 71de9f861a..8d0e2a6355 100644
--- a/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml
@@ -40,7 +40,7 @@
<button name="home_btn" tool_tip="Home page"/>
</layout_panel>
<layout_panel name="media_stop">
- <button name="media_stop_btn" tool_tip="Stop media"/>
+ <button name="media_stop_btn" tool_tip="停止媒體"/>
</layout_panel>
<layout_panel name="reload">
<button name="reload_btn" tool_tip="Reload"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile.xml b/indra/newview/skins/default/xui/zh/panel_profile.xml
index 7536311daf..fcf7bb64db 100644
--- a/indra/newview/skins/default/xui/zh/panel_profile.xml
+++ b/indra/newview/skins/default/xui/zh/panel_profile.xml
@@ -32,7 +32,7 @@
<panel name="first_life_image_panel">
<text name="title_rw_descr_text" value="真實世界:"/>
</panel>
- <text name="title_member_text" value="Resident Since:"/>
+ <text name="title_member_text" value="成為居民自:"/>
<text name="title_acc_status_text" value="帳戶狀態:"/>
<text name="title_partner_text" value="配偶:"/>
<panel name="partner_data_panel">
@@ -59,7 +59,7 @@
<button label="瞬間傳送" name="teleport" tool_tip="Offer teleport"/>
</layout_panel>
<layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Pay money to or share inventory with the Resident"/>
+ <menu_button label="▼" name="overflow_btn" tool_tip="支付金錢,或分享收納區給居民"/>
</layout_panel>
</layout_stack>
</layout_panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile_view.xml b/indra/newview/skins/default/xui/zh/panel_profile_view.xml
index ac8c7cad3d..12fe776e45 100644
--- a/indra/newview/skins/default/xui/zh/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/zh/panel_profile_view.xml
@@ -14,7 +14,7 @@
<text name="user_label" value="使用者名稱:"/>
<tab_container name="tabs">
<panel label="檔案" name="panel_profile"/>
- <panel label="PICKS" name="panel_picks"/>
+ <panel label="精選地點" name="panel_picks"/>
<panel label="NOTES &amp; PRIVACY" name="panel_notes"/>
</tab_container>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_region_covenant.xml b/indra/newview/skins/default/xui/zh/panel_region_covenant.xml
index 2e52efb804..315bc0ac8e 100644
--- a/indra/newview/skins/default/xui/zh/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/zh/panel_region_covenant.xml
@@ -62,18 +62,18 @@
分級:
</text>
<text name="region_maturity_text">
- Adult
+ 成人
</text>
<text name="resellable_lbl">
- Resale:
+ 轉售:
</text>
<text name="resellable_clause">
- Land in this region may not be resold.
+ 這地區的土地不能轉售。
</text>
<text name="changeable_lbl">
- Subdivide:
+ 分割:
</text>
<text name="changeable_clause">
- Land in this region may not be joined/subdivided.
+ 這地區的土地不能合併或分割。
</text>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_region_debug.xml b/indra/newview/skins/default/xui/zh/panel_region_debug.xml
index 798831bc84..1ffbcbf8fd 100644
--- a/indra/newview/skins/default/xui/zh/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/zh/panel_region_debug.xml
@@ -11,24 +11,24 @@
<check_box label="Disable Physics" name="disable_physics_check" tool_tip="Disable all physics in this region"/>
<button label="套用" name="apply_btn"/>
<text name="objret_text_lbl">
- Object Return
+ 物件退回
</text>
<text name="resident_text_lbl">
- Resident:
+ 居民:
</text>
<line_editor name="target_avatar_name">
(無)
</line_editor>
- <button label="Choose" name="choose_avatar_btn"/>
+ <button label="選擇" name="choose_avatar_btn"/>
<text name="options_text_lbl">
選項:
</text>
- <check_box label="With scripts" name="return_scripts" tool_tip="Return only objects which have scripts"/>
+ <check_box label="With scripts" name="return_scripts" tool_tip="只退回R包含腳本的物件"/>
<check_box label="On someone else&apos;s land" name="return_other_land" tool_tip="Return only objects which are on land belonging to someone else"/>
<check_box label="In every region of this estate" name="return_estate_wide" tool_tip="Return objects in all of the regions that make up this estate"/>
- <button label="Return" name="return_btn"/>
+ <button label="退回" name="return_btn"/>
<button label="Get Top Colliders..." name="top_colliders_btn" tool_tip="List of objects experiencing the most potential collisions"/>
<button label="Get Top Scripts..." name="top_scripts_btn" tool_tip="List of objects spending the most time running scripts"/>
- <button label="Restart Region" name="restart_btn" tool_tip="Give 2 minute countdown and restart region"/>
- <button label="Delay Restart" name="cancel_restart_btn" tool_tip="Delay region restart by one hour"/>
+ <button label="地區重新啟動" name="restart_btn" tool_tip="給予兩分鐘倒數計時並重新啟動"/>
+ <button label="延遲重新啟動" name="cancel_restart_btn" tool_tip="延遲地區重新啟動一小時"/>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_region_estate.xml b/indra/newview/skins/default/xui/zh/panel_region_estate.xml
index 899191c3f0..1f1676167b 100644
--- a/indra/newview/skins/default/xui/zh/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/zh/panel_region_estate.xml
@@ -27,7 +27,7 @@
<check_box label="允許語音聊天" name="voice_chat_check"/>
<check_box label="允許直接瞬間傳送" name="allow_direct_teleport"/>
<button label="套用" name="apply_btn"/>
- <button label="瞬間傳送訊息到領地..." name="message_estate_btn"/>
+ <button label="送出訊息到領地..." name="message_estate_btn"/>
<button label="由領地將居民踢出..." name="kick_user_from_estate_btn"/>
<text name="estate_manager_label">
領地管理員:
diff --git a/indra/newview/skins/default/xui/zh/panel_region_general.xml b/indra/newview/skins/default/xui/zh/panel_region_general.xml
index 71caaf1144..dce75c997d 100644
--- a/indra/newview/skins/default/xui/zh/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_region_general.xml
@@ -7,7 +7,7 @@
未知
</text>
<text name="version_channel_text_lbl">
- Version:
+ 版本:
</text>
<text name="version_channel_text">
未知
@@ -22,22 +22,22 @@
<check_box label="Block Fly" name="block_fly_check"/>
<check_box label="Allow Damage" name="allow_damage_check"/>
<check_box label="Restrict Pushing" name="restrict_pushobject"/>
- <check_box label="Allow Land Resell" name="allow_land_resell_check"/>
- <check_box label="Allow Land Join/Divide" name="allow_parcel_changes_check"/>
+ <check_box label="允許土地轉售" name="allow_land_resell_check"/>
+ <check_box label="允許土地 合併/分割" name="allow_parcel_changes_check"/>
<check_box label="阻擋土地顯示於搜尋中" name="block_parcel_search_check" tool_tip="Let people see this region and its parcels in search results"/>
- <spinner label="Agent Limit" name="agent_limit_spin"/>
+ <spinner label="人數上限" name="agent_limit_spin"/>
<spinner label="Object Bonus" name="object_bonus_spin"/>
<text label="Maturity" name="access_text">
分級:
</text>
<icons_combo_box label="Moderate" name="access_combo">
- <icons_combo_box.item label="Adult" name="Adult" value="42"/>
+ <icons_combo_box.item label="成人" name="Adult" value="42"/>
<icons_combo_box.item label="Moderate" name="Mature" value="21"/>
<icons_combo_box.item label="一般" name="PG" value="13"/>
</icons_combo_box>
<button label="套用" name="apply_btn"/>
<button label="強制瞬間傳送一位居民回家..." name="kick_btn"/>
<button label="強制瞬間傳送所有居民回家..." name="kick_all_btn"/>
- <button label="傳送訊息到地區..." name="im_btn"/>
+ <button label="送出訊息到地區..." name="im_btn"/>
<button label="管理瞬間傳送中心..." name="manage_telehub_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_side_tray.xml b/indra/newview/skins/default/xui/zh/panel_side_tray.xml
index 85ac4613dd..625213e376 100644
--- a/indra/newview/skins/default/xui/zh/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/zh/panel_side_tray.xml
@@ -6,7 +6,7 @@
<sidetray_tab description="首頁。" name="sidebar_home" tab_title="首頁">
<panel label="首頁" name="panel_home"/>
</sidetray_tab>
- <sidetray_tab description="編輯你的公開檔案及精選。" name="sidebar_me" tab_title="我的檔案">
+ <sidetray_tab description="編輯你的公開檔案及精選地點。" name="sidebar_me" tab_title="我的檔案">
<panel_container name="panel_container">
<panel label="自己" name="panel_me"/>
</panel_container>
diff --git a/indra/newview/skins/default/xui/zh/panel_teleport_history.xml b/indra/newview/skins/default/xui/zh/panel_teleport_history.xml
index 6c81ede76c..a2a63db000 100644
--- a/indra/newview/skins/default/xui/zh/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/zh/panel_teleport_history.xml
@@ -2,7 +2,7 @@
<panel name="Teleport History">
<accordion name="history_accordion">
<no_matched_tabs_text name="no_matched_teleports_msg" value="沒有發現你要找的嗎?試試 [secondlife:///app/search/places/[SEARCH_TERM] 搜尋]。"/>
- <no_visible_tabs_text name="no_teleports_msg" value="瞬間傳送紀錄是空白的。試試 [secondlife:///app/search/places/ 搜尋]。"/>
+ <no_visible_tabs_text name="no_teleports_msg" value="瞬間傳送紀錄是空白的。試試 [secondlife:///app/search/places/ Search]。"/>
<accordion_tab name="today" title="今天"/>
<accordion_tab name="yesterday" title="昨天"/>
<accordion_tab name="2_days_ago" title="前天"/>
diff --git a/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml b/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml
index 6f8f19b26d..7d8a502594 100644
--- a/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml
@@ -8,7 +8,7 @@
<button label="E" name="editappearance_btn"/>
<button label="O" name="openoutfit_btn"/>
<text name="currentlook_status">
- (Status)
+ (狀態)
</text>
<text name="currentlook_name">
MyOutfit With a really Long Name like MOOSE
diff --git a/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml b/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml
index de5a10ba51..f308f2d4d0 100644
--- a/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml
@@ -58,18 +58,18 @@
<name_box initial_value="載入中..." name="Group Name Proxy"/>
<button label="Deed" label_selected="Deed" name="button deed" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."/>
<text name="label click action">
- Click to:
+ 點擊以:
</text>
<combo_box name="clickaction">
- <combo_box.item label="Touch (default)" name="Touch/grab(default)"/>
- <combo_box.item label="Sit on object" name="Sitonobject"/>
- <combo_box.item label="Buy object" name="Buyobject"/>
- <combo_box.item label="Pay object" name="Payobject"/>
- <combo_box.item label="Open" name="Open"/>
+ <combo_box.item label="觸碰(預設)" name="Touch/grab(default)"/>
+ <combo_box.item label="坐在物件上" name="Sitonobject"/>
+ <combo_box.item label="購買物件" name="Buyobject"/>
+ <combo_box.item label="支付物件" name="Payobject"/>
+ <combo_box.item label="開啟" name="Open"/>
</combo_box>
<panel name="perms_inv">
<text name="perm_modify">
- You can modify this object
+ 你能修改這個物件
</text>
<text name="Anyone can:">
任何人:
@@ -115,9 +115,9 @@
</text>
</panel>
<panel name="button_panel">
- <button label="Open" name="open_btn"/>
- <button label="Pay" name="pay_btn"/>
+ <button label="開啟" name="open_btn"/>
+ <button label="支付" name="pay_btn"/>
<button label="購買" name="buy_btn"/>
- <button label="Details" name="details_btn"/>
+ <button label="細節" name="details_btn"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml
index 211d91a707..28b8cce5b2 100644
--- a/indra/newview/skins/default/xui/zh/strings.xml
+++ b/indra/newview/skins/default/xui/zh/strings.xml
@@ -5,19 +5,19 @@
that are returned from one component and may appear in many places-->
<strings>
<string name="SECOND_LIFE">
- Second Life
+ 第二人生
</string>
<string name="APP_NAME">
- Second Life
+ 第二人生
</string>
<string name="CAPITALIZED_APP_NAME">
- SECOND LIFE
+ 第二人生
</string>
<string name="SECOND_LIFE_GRID">
- Second Life Grid
+ 第二人生網格
</string>
<string name="SUPPORT_SITE">
- Second Life Support Portal
+ 第二人生支援入口
</string>
<string name="StartupDetectingHardware">
硬體偵測中...
@@ -131,10 +131,10 @@
http://join.secondlife.com/
</string>
<string name="AgentLostConnection">
- This region may be experiencing trouble. Please check your connection to the Internet.
+ 這個地區可能遭遇問題,請檢查你的網路連線。
</string>
<string name="SavingSettings">
- Saving your settings...
+ 你的設定儲存中...
</string>
<string name="LoggingOut">
登出中...
@@ -149,10 +149,10 @@
You were sent to an invalid region.
</string>
<string name="TestingDisconnect">
- Testing viewer disconnect
+ 測試瀏覽器斷線
</string>
<string name="TooltipPerson">
- Person
+ 人
</string>
<string name="TooltipNoName">
(no name)
@@ -173,41 +173,41 @@
Group Build
</string>
<string name="TooltipFlagNoBuild">
- No Build
+ 禁止建造
</string>
<string name="TooltipFlagNoEdit">
- Group Build
+ 社團建造
</string>
<string name="TooltipFlagNotSafe">
- Not Safe
+ 非安全
</string>
<string name="TooltipFlagNoFly">
禁止飛行
</string>
<string name="TooltipFlagGroupScripts">
- Group Scripts
+ 社團腳本
</string>
<string name="TooltipFlagNoScripts">
- No Scripts
+ 禁止腳本
</string>
<string name="TooltipLand">
土地:
</string>
<string name="TooltipMustSingleDrop">
- Only a single item can be dragged here
+ 只有一個物品可以被拖曳到此處
</string>
<string name="TooltipPrice" value="L$[AMOUNT]:"/>
<string name="TooltipHttpUrl">
點擊以察看這個網頁
</string>
<string name="TooltipSLURL">
- Click to view this location&apos;s information
+ 點擊以察看這個位置資訊
</string>
<string name="TooltipAgentUrl">
- Click to view this Resident&apos;s profile
+ 點擊以察看這個居民檔案
</string>
<string name="TooltipAgentInspect">
- Learn more about this Resident
+ 瞭解更多有關這個居民
</string>
<string name="TooltipAgentMute">
Click to mute this Resident
@@ -219,7 +219,7 @@
點擊開始 IM 這位居民
</string>
<string name="TooltipAgentPay">
- Click to Pay this Resident
+ 點擊以支付這位居民
</string>
<string name="TooltipAgentOfferTeleport">
Click to offer a teleport request to this Resident
@@ -268,7 +268,7 @@
IM
</string>
<string name="SLappAgentPay">
- Pay
+ 支付
</string>
<string name="SLappAgentOfferTeleport">
Offer Teleport to
@@ -286,7 +286,7 @@
關閉
</string>
<string name="BUTTON_RESTORE">
- Restore
+ 還原
</string>
<string name="BUTTON_MINIMIZE">
最小化
@@ -331,7 +331,7 @@
Avaline Caller [ORDER]
</string>
<string name="AssetErrorNone">
- No error
+ 無錯誤
</string>
<string name="AssetErrorRequestFailed">
Asset request: failed
@@ -361,13 +361,13 @@
Viewer and server do not agree on price
</string>
<string name="AssetErrorUnknownStatus">
- Unknown status
+ 未知狀態
</string>
<string name="texture">
材質
</string>
<string name="sound">
- sound
+ 聲音
</string>
<string name="calling card">
calling card
@@ -661,13 +661,13 @@
載入中...
</string>
<string name="worldmap_offline">
- Offline
+ 離線
</string>
<string name="worldmap_item_tooltip_format">
[AREA] m² L$[PRICE]
</string>
<string name="worldmap_results_none_found">
- None found.
+ 沒有發現。
</string>
<string name="Ok">
確定
@@ -748,10 +748,10 @@
Moderate
</string>
<string name="SIM_ACCESS_ADULT">
- Adult
+ 成人
</string>
<string name="SIM_ACCESS_DOWN">
- Offline
+ 離線
</string>
<string name="SIM_ACCESS_MIN">
未知
@@ -760,34 +760,34 @@
(未知)
</string>
<string name="Estate / Full Region">
- Estate / Full Region
+ 領地 / 完整地區
</string>
<string name="Estate / Homestead">
- Estate / Homestead
+ 領地 / 家園
</string>
<string name="Mainland / Homestead">
- Mainland / Homestead
+ 大陸 / 家園
</string>
<string name="Mainland / Full Region">
- Mainland / Full Region
+ 大陸 / 完整地區
</string>
<string name="all_files">
全部檔案
</string>
<string name="sound_files">
- Sounds
+ 聲音
</string>
<string name="animation_files">
- Animations
+ 動作
</string>
<string name="image_files">
圖像
</string>
<string name="save_file_verb">
- Save
+ 儲存
</string>
<string name="load_file_verb">
- Load
+ 載入
</string>
<string name="targa_image_files">
Targa 圖像
@@ -808,34 +808,34 @@
RAW File
</string>
<string name="compressed_image_files">
- Compressed Images
+ 壓縮的圖像
</string>
<string name="load_files">
- Load Files
+ 載入檔案
</string>
<string name="choose_the_directory">
- Choose Directory
+ 選擇目錄
</string>
<string name="AvatarSetNotAway">
- Not Away
+ 非離開
</string>
<string name="AvatarSetAway">
- Away
+ 離開
</string>
<string name="AvatarSetNotBusy">
- Not Busy
+ 非忙碌
</string>
<string name="AvatarSetBusy">
- Busy
+ 忙碌
</string>
<string name="shape">
- Shape
+ 體形
</string>
<string name="skin">
- Skin
+ 皮膚
</string>
<string name="hair">
- Hair
+ 頭髮
</string>
<string name="eyes">
眼睛
@@ -877,49 +877,49 @@
Physics
</string>
<string name="invalid">
- invalid
+ 無效
</string>
<string name="none">
</string>
<string name="shirt_not_worn">
- Shirt not worn
+ 襯衫未穿
</string>
<string name="pants_not_worn">
- Pants not worn
+ 褲子未穿
</string>
<string name="shoes_not_worn">
- Shoes not worn
+ 鞋子未穿
</string>
<string name="socks_not_worn">
- Socks not worn
+ 襪子未穿
</string>
<string name="jacket_not_worn">
- Jacket not worn
+ 夾克未穿
</string>
<string name="gloves_not_worn">
- Gloves not worn
+ 手套未穿
</string>
<string name="undershirt_not_worn">
- Undershirt not worn
+ 內衣未穿
</string>
<string name="underpants_not_worn">
- Underpants not worn
+ 內褲未穿
</string>
<string name="skirt_not_worn">
- Skirt not worn
+ 裙子未穿
</string>
<string name="alpha_not_worn">
Alpha not worn
</string>
<string name="tattoo_not_worn">
- Tattoo not worn
+ 刺青未穿
</string>
<string name="physics_not_worn">
Physics not worn
</string>
<string name="invalid_not_worn">
- invalid
+ 無效
</string>
<string name="create_new_shape">
創造新體形
@@ -931,34 +931,34 @@
創造新頭髮
</string>
<string name="create_new_eyes">
- 創耖新眼睛
+ 創造新眼睛
</string>
<string name="create_new_shirt">
- Create new shirt
+ 創造新襯衫
</string>
<string name="create_new_pants">
- Create new pants
+ 創造新褲子
</string>
<string name="create_new_shoes">
- Create new shoes
+ 創造新鞋子
</string>
<string name="create_new_socks">
- Create new socks
+ 創造新襪子
</string>
<string name="create_new_jacket">
- Create new jacket
+ 創造新夾克
</string>
<string name="create_new_gloves">
- Create new gloves
+ 創造新手套
</string>
<string name="create_new_undershirt">
- Create new undershirt
+ 創造新內衣
</string>
<string name="create_new_underpants">
- Create new underpants
+ 創造新內褲
</string>
<string name="create_new_skirt">
- Create new skirt
+ 創造新裙子
</string>
<string name="create_new_alpha">
Create new alpha
@@ -970,13 +970,13 @@
Create new physics
</string>
<string name="create_new_invalid">
- invalid
+ 無效
</string>
<string name="NewWearable">
- New [WEARABLE_ITEM]
+ 新 [WEARABLE_ITEM]
</string>
<string name="next">
- Next
+ 下一個
</string>
<string name="ok">
確定
@@ -988,7 +988,7 @@
社團通知
</string>
<string name="GroupNotifySentBy">
- Sent by
+ 送出由
</string>
<string name="GroupNotifyAttached">
Attached:
@@ -1006,16 +1006,16 @@
Teleport offering
</string>
<string name="StartUpNotifications">
- New notifications arrived while you were away.
+ 當你離開時有新的通知送達。
</string>
<string name="OverflowInfoChannelString">
- You have %d more notification
+ 你有約 %d 通知
</string>
<string name="BodyPartsRightArm">
Right Arm
</string>
<string name="BodyPartsHead">
- Head
+ 頭部
</string>
<string name="BodyPartsLeftArm">
Left Arm
@@ -1024,7 +1024,7 @@
Left Leg
</string>
<string name="BodyPartsTorso">
- Torso
+ 軀幹
</string>
<string name="BodyPartsRightLeg">
Right Leg
@@ -1099,9 +1099,6 @@
<string name="InvFolder My Inventory">
我的收納區
</string>
- <string name="InvFolder My Favorites">
- My Favorites
- </string>
<string name="InvFolder Library">
Library
</string>
@@ -1160,10 +1157,10 @@
姿勢
</string>
<string name="InvFolder Favorite">
- Favorites
+ My Favorites
</string>
<string name="InvFolder favorite">
- Favorites
+ My Favorites
</string>
<string name="InvFolder Current Outfit">
目前裝扮
@@ -1175,7 +1172,7 @@
我的裝扮
</string>
<string name="InvFolder Accessories">
- Accessories
+ 配件
</string>
<string name="InvFolder Friends">
朋友
@@ -1253,7 +1250,7 @@
</string>
<string name="Chin">
- Chin
+ 下巴
</string>
<string name="Left Ear">
左耳
@@ -1328,7 +1325,7 @@
[AGEDAYS] old
</string>
<string name="TodayOld">
- 今日剛加入
+ 高日剛加入
</string>
<string name="AgeYearsA">
[COUNT] 年
@@ -1469,7 +1466,7 @@
設為非執行中
</string>
<string name="CompileSuccessful">
- 編譯成功!
+ 編譯成功!!
</string>
<string name="CompileSuccessfulSaving">
編譯成功,儲存中...
@@ -1579,7 +1576,7 @@
Chest
</string>
<string name="ATTACH_HEAD">
- Head
+ 頭部
</string>
<string name="ATTACH_LSHOULDER">
Left Shoulder
@@ -1609,7 +1606,7 @@
Mouth
</string>
<string name="ATTACH_CHIN">
- Chin
+ 下巴
</string>
<string name="ATTACH_LEAR">
Left Ear
@@ -1750,7 +1747,7 @@
You haven&apos;t created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified.
</string>
<string name="NoAvatarPicksClassifiedsText">
- User has no picks or classifieds
+ 使用者無精選地點或個人廣告
</string>
<string name="PicksClassifiedsLoadingText">
載入中...
@@ -1955,7 +1952,7 @@
Linden Location
</string>
<string name="Adult">
- Adult
+ 成人
</string>
<string name="Arts&amp;Culture">
Arts &amp; Culture
@@ -2392,7 +2389,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
Chest Size
</string>
<string name="Chin Angle">
- Chin Angle
+ 下巴角度
</string>
<string name="Chin Cleft">
Chin Cleft
@@ -2629,7 +2626,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
Glove Length
</string>
<string name="Hair">
- Hair
+ 頭髮
</string>
<string name="Hair Back">
Hair: Back
@@ -3577,13 +3574,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
Health
</string>
<string name="LocationCtrlAdultIconTooltip">
- Adult Region
+ 成人地區
</string>
<string name="LocationCtrlModerateIconTooltip">
Moderate Region
</string>
<string name="LocationCtrlGeneralIconTooltip">
- General Region
+ 一般地區
</string>
<string name="UpdaterWindowTitle">
[APP_NAME] 更新
diff --git a/indra/newview/skins/default/xui/zh/teleport_strings.xml b/indra/newview/skins/default/xui/zh/teleport_strings.xml
index 9702832f44..b18eb4a390 100644
--- a/indra/newview/skins/default/xui/zh/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/zh/teleport_strings.xml
@@ -53,7 +53,7 @@ Try again in a moment.
Relaying to destination.
</message>
<message name="sending_home">
- 傳送家位置的要求。
+ 送出家位置的要求。
</message>
<message name="sending_landmark">
地標位置要求瞬間傳送中。
diff --git a/indra/newview/skins/minimal/xui/da/floater_media_browser.xml b/indra/newview/skins/minimal/xui/da/floater_media_browser.xml
index d3028c32f9..42fbdeaa9e 100644
--- a/indra/newview/skins/minimal/xui/da/floater_media_browser.xml
+++ b/indra/newview/skins/minimal/xui/da/floater_media_browser.xml
@@ -1,18 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="MEDIE VÆLGER">
+<floater name="floater_about" title="MEDIA BROWSER">
+ <floater.string name="home_page_url">
+ http://www.secondlife.com
+ </floater.string>
+ <floater.string name="support_page_url">
+ http://support.secondlife.com
+ </floater.string>
<layout_stack name="stack1">
<layout_panel name="nav_controls">
<button label="Tilbage" name="back"/>
<button label="Frem" name="forward"/>
- <button label="Opdater" name="reload"/>
- <button label="Gå til" name="go"/>
+ <button label="Genlæs" name="reload"/>
+ <button label="Go" name="go"/>
+ </layout_panel>
+ <layout_panel name="time_controls">
+ <button label="tilbage" name="rewind"/>
+ <button label="stop" name="stop"/>
+ <button label="fremad" name="seek"/>
</layout_panel>
<layout_panel name="parcel_owner_controls">
<button label="Send denne side til parcel" name="assign"/>
</layout_panel>
<layout_panel name="external_controls">
- <button label="Åben i min browser" name="open_browser"/>
- <check_box label="Åben altid i min browser" name="open_always"/>
+ <button label="Åben i min internetbrowser" name="open_browser"/>
+ <check_box label="Åben altid i min internetbrowser" name="open_always"/>
<button label="Luk" name="close"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/minimal/xui/da/floater_web_content.xml b/indra/newview/skins/minimal/xui/da/floater_web_content.xml
index 74092e88ec..0410f74324 100644
--- a/indra/newview/skins/minimal/xui/da/floater_web_content.xml
+++ b/indra/newview/skins/minimal/xui/da/floater_web_content.xml
@@ -2,13 +2,13 @@
<floater name="floater_web_content" title="">
<layout_stack name="stack1">
<layout_panel name="nav_controls">
- <button name="back" tool_tip="Navigér tilbage"/>
- <button name="forward" tool_tip="Navigér frem"/>
- <button name="stop" tool_tip="Stop navigering"/>
+ <button name="back" tool_tip="Gå bagud"/>
+ <button name="forward" tool_tip="Gå frem"/>
+ <button name="stop" tool_tip="Stop"/>
<button name="reload" tool_tip="Genindlæs side"/>
<combo_box name="address" tool_tip="Indtast URL her"/>
<icon name="media_secure_lock_flag" tool_tip="Sikker browsing"/>
- <button name="popexternal" tool_tip="Åben denne URL i din normale browser"/>
+ <button name="popexternal" tool_tip="Åben denne URL i din normale internet browser"/>
</layout_panel>
</layout_stack>
</floater>
diff --git a/indra/newview/skins/minimal/xui/da/menu_people_nearby.xml b/indra/newview/skins/minimal/xui/da/menu_people_nearby.xml
index 5470c32761..220ab8724f 100644
--- a/indra/newview/skins/minimal/xui/da/menu_people_nearby.xml
+++ b/indra/newview/skins/minimal/xui/da/menu_people_nearby.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<context_menu name="Avatar Context Menu">
- <menu_item_call label="Profil" name="View Profile"/>
- <menu_item_call label="Tilføj ven" name="Add Friend"/>
- <menu_item_call label="Fjern ven" name="Remove Friend"/>
- <menu_item_call label="Besked" name="IM"/>
+ <menu_item_call label="Vis profil" name="View Profile"/>
+ <menu_item_call label="Tilføj som ven" name="Add Friend"/>
+ <menu_item_call label="Fjern venskab" name="Remove Friend"/>
+ <menu_item_call label="IM" name="IM"/>
<menu_item_call label="Opkald" name="Call"/>
<menu_item_call label="Kort" name="Map"/>
<menu_item_call label="Del" name="Share"/>
diff --git a/indra/newview/skins/minimal/xui/da/notifications.xml b/indra/newview/skins/minimal/xui/da/notifications.xml
index 0d2aaf45ce..e77eeee8df 100644
--- a/indra/newview/skins/minimal/xui/da/notifications.xml
+++ b/indra/newview/skins/minimal/xui/da/notifications.xml
@@ -1327,21 +1327,19 @@ Prøv igen om lidt.
No valid parcel could be found.
</notification>
<notification name="ObjectGiveItem">
- Et object med navnet &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; ejet af [NAME_SLURL] har givet dig denne [OBJECTTYPE]:
-[ITEM_SLURL]
+ Et objekt ved navn &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; ejet af [NAME_SLURL] tilbyder dig [ITEM_SLURL]. For at bruge denne genstand skal du skifte til avanceret tilstand, hvor du kan finde genstanden i din beholdning. Ønsker du at logge ud for at skifte tilstand? Valg af tilstand findes på login skærmbilledet.
<form name="form">
- <button name="Keep" text="Behold"/>
- <button name="Discard" text="Smid væk"/>
- <button name="Mute" text="Blokér"/>
+ <button name="Keep" text="Behold genstand"/>
+ <button name="Discard" text="Afvis genstand"/>
+ <button name="Mute" text="Blokér objekt"/>
</form>
</notification>
<notification name="UserGiveItem">
- [NAME_SLURL] har givet dig denne/dette [OBJECTTYPE]:
-[ITEM_SLURL]
+ [NAME_SLURL] tilbyder dig [ITEM_SLURL]. For at bruge denne genstand skal du skifte til avanceret tilstand, hvor du kan finde genstanden i din beholdning. Ønsker du at logge ud for at skifte tilstand? Valg af tilstand findes på login skærmbilledet.
<form name="form">
- <button name="Show" text="Vis"/>
- <button name="Discard" text="Smid væk"/>
- <button name="Mute" text="Blokér"/>
+ <button name="Show" text="Behold genstand"/>
+ <button name="Discard" text="Afvis genstand"/>
+ <button name="Mute" text="Blokér bruger"/>
</form>
</notification>
<notification name="GodMessage">
diff --git a/indra/newview/skins/minimal/xui/da/panel_adhoc_control_panel.xml b/indra/newview/skins/minimal/xui/da/panel_adhoc_control_panel.xml
index 1953fad31f..14250453eb 100644
--- a/indra/newview/skins/minimal/xui/da/panel_adhoc_control_panel.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_adhoc_control_panel.xml
@@ -5,7 +5,7 @@
<button label="Opkald" name="call_btn"/>
</layout_panel>
<layout_panel name="end_call_btn_panel">
- <button label="Forlad opkald" name="end_call_btn"/>
+ <button label="Forlad samtale" name="end_call_btn"/>
</layout_panel>
<layout_panel name="voice_ctrls_btn_panel">
<button label="Stemmekontroller" name="voice_ctrls_btn"/>
diff --git a/indra/newview/skins/minimal/xui/da/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/da/panel_bottomtray.xml
index 53a30136ae..bd20ece764 100644
--- a/indra/newview/skins/minimal/xui/da/panel_bottomtray.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_bottomtray.xml
@@ -4,26 +4,32 @@
<string name="SpeakBtnToolTip" value="Slå mikrofon til/fra"/>
<string name="VoiceControlBtnToolTip" value="Vis/skjul stemme kontrolpanel"/>
<layout_stack name="toolbar_stack">
+ <layout_panel name="speak_panel">
+ <button label="Tal" name="speak_btn" tool_tip="Tænd og sluk for mikrofon"/>
+ </layout_panel>
+ <layout_panel name="speak_flyout_panel">
+ <button label="" name="flyout_btn" tool_tip="Ændring af opsætning for lyd"/>
+ </layout_panel>
<layout_panel name="gesture_panel">
- <gesture_combo_list label="Bevægelse" name="Gesture" tool_tip="Skjuler/viser bevægelser"/>
+ <gesture_combo_list label="Bevægelse" name="Gesture" tool_tip="Lad din avatar gøre ting"/>
</layout_panel>
<layout_panel name="cam_panel">
- <bottomtray_button label="Vis" name="camera_btn" tool_tip="Vis/Skjul kamerakontroller"/>
+ <bottomtray_button label="Vis" name="camera_btn" tool_tip="Kontrollér kameravinkel"/>
+ </layout_panel>
+ <layout_panel name="destinations_panel">
+ <bottomtray_button label="Destinationer" name="destination_btn" tool_tip="Rejs i Second Life"/>
</layout_panel>
- <layout_panel name="avatar_and_destinations_panel">
- <radio_group name="avatar_and_destination_btns">
- <radio_item name="destination_btn" value="0"/>
- <radio_item name="avatar_btn" value="1"/>
- </radio_group>
+ <layout_panel name="avatar_panel">
+ <bottomtray_button label="Min avatar" name="avatar_btn" tool_tip="Ændre dit udseende"/>
</layout_panel>
<layout_panel name="people_panel">
- <bottomtray_button label="Personer" name="show_people_button" tool_tip="Vis person-vindue"/>
+ <bottomtray_button label="Personer" name="show_people_button" tool_tip="Find personer i Second Life"/>
</layout_panel>
<layout_panel name="profile_panel">
- <bottomtray_button label="Profil" name="show_profile_btn" tool_tip="Vis profil vindue"/>
+ <bottomtray_button label="Profil" name="show_profile_btn" tool_tip="Se og rediger din profil"/>
</layout_panel>
<layout_panel name="howto_panel">
- <bottomtray_button label="Hvordan" name="show_help_btn" tool_tip="Åben Second Life &quot;How To topics&quot;"/>
+ <bottomtray_button label="Hvordan" name="show_help_btn" tool_tip="Vis hjælpeinformation for Second Life"/>
</layout_panel>
<layout_panel name="im_well_panel">
<chiclet_im_well name="im_well">
diff --git a/indra/newview/skins/minimal/xui/da/panel_group_control_panel.xml b/indra/newview/skins/minimal/xui/da/panel_group_control_panel.xml
index 26fe4f6ebe..23a5e79e22 100644
--- a/indra/newview/skins/minimal/xui/da/panel_group_control_panel.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_group_control_panel.xml
@@ -8,10 +8,10 @@
<button label="Opkald gruppe" name="call_btn"/>
</layout_panel>
<layout_panel name="end_call_btn_panel">
- <button label="Forlad opkald" name="end_call_btn"/>
+ <button label="Forlad samtale" name="end_call_btn"/>
</layout_panel>
<layout_panel name="voice_ctrls_btn_panel">
- <button label="Åben stemmekontroller" name="voice_ctrls_btn"/>
+ <button label="Åben stemme indstillinger" name="voice_ctrls_btn"/>
</layout_panel>
</layout_stack>
</panel>
diff --git a/indra/newview/skins/minimal/xui/da/panel_im_control_panel.xml b/indra/newview/skins/minimal/xui/da/panel_im_control_panel.xml
index 5cecb93d40..b8a7ec0b34 100644
--- a/indra/newview/skins/minimal/xui/da/panel_im_control_panel.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_im_control_panel.xml
@@ -20,7 +20,7 @@
<button label="Opkald" name="call_btn"/>
</layout_panel>
<layout_panel name="end_call_btn_panel">
- <button label="Afslut kald" name="end_call_btn"/>
+ <button label="Afslut samtale" name="end_call_btn"/>
</layout_panel>
<layout_panel name="voice_ctrls_btn_panel">
<button label="Stemme kontroller" name="voice_ctrls_btn"/>
diff --git a/indra/newview/skins/minimal/xui/da/panel_login.xml b/indra/newview/skins/minimal/xui/da/panel_login.xml
index fdcc550d82..2e0f726e1a 100644
--- a/indra/newview/skins/minimal/xui/da/panel_login.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_login.xml
@@ -21,7 +21,7 @@
Tilstand:
</text>
<combo_box name="mode_combo" tool_tip="Vælg ønsket tilstand. Vælg basis for hurtig og nem udforskning og chat. Vælg avanceret for at få adgang til flere muligheder.">
- <combo_box.item label="Basis (Standard)" name="Basic"/>
+ <combo_box.item label="Basis" name="Basic"/>
<combo_box.item label="Avanceret" name="Advanced"/>
</combo_box>
<text name="start_location_text">
diff --git a/indra/newview/skins/minimal/xui/da/panel_people.xml b/indra/newview/skins/minimal/xui/da/panel_people.xml
index a540025343..49cd2c71f2 100644
--- a/indra/newview/skins/minimal/xui/da/panel_people.xml
+++ b/indra/newview/skins/minimal/xui/da/panel_people.xml
@@ -70,7 +70,7 @@ Leder du efter personer at være sammen med? Prøv destinationsknappen nedenfor.
<button label="IM" name="im_btn" tool_tip="Åben session med privat besked (IM)"/>
</layout_panel>
<layout_panel name="chat_btn_lp">
- <button label="Kald" name="call_btn" tool_tip="Opkald til denne beboer"/>
+ <button label="Opkald" name="call_btn" tool_tip="Kald til denne beboer"/>
</layout_panel>
<layout_panel name="chat_btn_lp">
<button label="Del" name="share_btn" tool_tip="Del en genstand fra beholdning"/>
diff --git a/indra/newview/skins/minimal/xui/de/menu_inspect_avatar_gear.xml b/indra/newview/skins/minimal/xui/de/menu_inspect_avatar_gear.xml
index fbc119c483..72ba7fe41d 100644
--- a/indra/newview/skins/minimal/xui/de/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/minimal/xui/de/menu_inspect_avatar_gear.xml
@@ -3,6 +3,7 @@
<menu_item_call label="Profil anzeigen" name="view_profile"/>
<menu_item_call label="Freund hinzufügen" name="add_friend"/>
<menu_item_call label="IM" name="im"/>
+ <menu_item_call label="Anrufen" name="call"/>
<menu_item_call label="Teleportieren" name="teleport"/>
<menu_item_call label="Ignorieren" name="block"/>
<menu_item_call label="Freischalten" name="unblock"/>
diff --git a/indra/newview/skins/minimal/xui/de/panel_adhoc_control_panel.xml b/indra/newview/skins/minimal/xui/de/panel_adhoc_control_panel.xml
new file mode 100644
index 0000000000..cc45f42169
--- /dev/null
+++ b/indra/newview/skins/minimal/xui/de/panel_adhoc_control_panel.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="panel_im_control_panel">
+ <layout_stack name="vertical_stack">
+ <layout_panel name="call_btn_panel">
+ <button label="Anrufen" name="call_btn"/>
+ </layout_panel>
+ <layout_panel name="end_call_btn_panel">
+ <button label="Anruf beenden" name="end_call_btn"/>
+ </layout_panel>
+ </layout_stack>
+</panel>
diff --git a/indra/newview/skins/minimal/xui/de/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/de/panel_bottomtray.xml
index a4d80921ec..2278bfb699 100644
--- a/indra/newview/skins/minimal/xui/de/panel_bottomtray.xml
+++ b/indra/newview/skins/minimal/xui/de/panel_bottomtray.xml
@@ -4,26 +4,32 @@
<string name="SpeakBtnToolTip" value="Schaltet Mikrofon ein/aus"/>
<string name="VoiceControlBtnToolTip" value="Voice-Chat-Steuerung anzeigen/ausblenden"/>
<layout_stack name="toolbar_stack">
+ <layout_panel name="speak_panel">
+ <button label="Sprechen" name="speak_btn" tool_tip="Mikrofon ein- und ausschalten"/>
+ </layout_panel>
+ <layout_panel name="speak_flyout_panel">
+ <button label="" name="flyout_btn" tool_tip="Soundeinstellungen ändern"/>
+ </layout_panel>
<layout_panel name="gesture_panel">
- <gesture_combo_list label="Gesten" name="Gesture" tool_tip="Gesten anzeigen/ausblenden"/>
+ <gesture_combo_list label="Gesten" name="Gesture" tool_tip="Ihren Avatar bestimmte Aktionen durchführen lassen"/>
</layout_panel>
<layout_panel name="cam_panel">
- <bottomtray_button label="Ansicht" name="camera_btn" tool_tip="Kamerasteuerung anzeigen/ausblenden"/>
+ <bottomtray_button label="Ansicht" name="camera_btn" tool_tip="Kamerawinkel steuern"/>
</layout_panel>
- <layout_panel name="avatar_and_destinations_panel">
- <bottomtray_button label="Ziele" name="destination_btn" tool_tip="Zeigt Leutefenster an"/>
+ <layout_panel name="destinations_panel">
+ <bottomtray_button label="Ziele" name="destination_btn" tool_tip="Durch Second Life reisen"/>
</layout_panel>
- <layout_panel name="avatar_and_destinations_panel">
- <bottomtray_button label="Mein Avatar" name="avatar_btn"/>
+ <layout_panel name="avatar_panel">
+ <bottomtray_button label="Mein Avatar" name="avatar_btn" tool_tip="Eigenes Aussehen verändern"/>
</layout_panel>
<layout_panel name="people_panel">
- <bottomtray_button label="Leute" name="show_people_button" tool_tip="Zeigt Leutefenster an"/>
+ <bottomtray_button label="Leute" name="show_people_button" tool_tip="Personen in Second Life suchen"/>
</layout_panel>
<layout_panel name="profile_panel">
- <bottomtray_button label="Profil" name="show_profile_btn" tool_tip="Zeigt Profilfenster an"/>
+ <bottomtray_button label="Profil" name="show_profile_btn" tool_tip="Eigenes Profil anzeigen und bearbeiten"/>
</layout_panel>
<layout_panel name="howto_panel">
- <bottomtray_button label="Anweisungen" name="show_help_btn" tool_tip="Second Life-Anweisungsthemen öffnen"/>
+ <bottomtray_button label="Anweisungen" name="show_help_btn" tool_tip="Hilfeinfos zu Second Life anzeigen"/>
</layout_panel>
<layout_panel name="im_well_panel">
<chiclet_im_well name="im_well">
diff --git a/indra/newview/skins/minimal/xui/de/panel_im_control_panel.xml b/indra/newview/skins/minimal/xui/de/panel_im_control_panel.xml
index abf8011d9d..0ef2234fec 100644
--- a/indra/newview/skins/minimal/xui/de/panel_im_control_panel.xml
+++ b/indra/newview/skins/minimal/xui/de/panel_im_control_panel.xml
@@ -9,7 +9,7 @@
<button label="Freund hinzufügen" name="add_friend_btn"/>
</layout_panel>
<layout_panel name="teleport_btn_panel">
- <button label="Teleportieren" name="teleport_btn" tool_tip="Dieser Person einen Teleport anbieten."/>
+ <button label="Teleportieren" name="teleport_btn" tool_tip="Dieser Person einen Teleport anbieten"/>
</layout_panel>
<layout_panel name="share_btn_panel">
<button label="Teilen" name="share_btn"/>
diff --git a/indra/newview/skins/minimal/xui/de/panel_people.xml b/indra/newview/skins/minimal/xui/de/panel_people.xml
index c6253e17de..4f8f70ad17 100644
--- a/indra/newview/skins/minimal/xui/de/panel_people.xml
+++ b/indra/newview/skins/minimal/xui/de/panel_people.xml
@@ -52,6 +52,9 @@
<button label="IM" name="im_btn" tool_tip="Instant Messenger öffnen"/>
</layout_panel>
<layout_panel name="chat_btn_lp">
+ <button label="Anrufen" name="call_btn" tool_tip="Diesen Einwohner anrufen"/>
+ </layout_panel>
+ <layout_panel name="chat_btn_lp">
<button label="Teleportieren" name="teleport_btn" tool_tip="Teleport anbieten"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
index cc551f7d58..477f210352 100644
--- a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
@@ -3,14 +3,13 @@
legacy_header_height="18"
can_resize="true"
can_minimize="false"
- height="360"
+ height="460"
layout="topleft"
min_height="360"
- left="645"
+ left="10000"
top="10"
- min_width="345"
+ min_width="335"
name="floater_help_browser"
- save_rect="true"
single_instance="true"
title="HOW TO"
width="335">
@@ -22,7 +21,7 @@
name="done_text">
</floater.string>
<layout_stack
- bottom="360"
+ bottom="460"
follows="left|right|top|bottom"
layout="topleft"
left="5"
@@ -38,7 +37,7 @@
user_resize="false"
width="325">
<web_browser
- trusted_content="true"
+ trusted_content="true"
bottom="-5"
follows="left|right|top|bottom"
layout="topleft"
diff --git a/indra/newview/skins/minimal/xui/en/floater_web_content.xml b/indra/newview/skins/minimal/xui/en/floater_web_content.xml
index 50cb5b14ce..1d9a967d5a 100644
--- a/indra/newview/skins/minimal/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/minimal/xui/en/floater_web_content.xml
@@ -17,6 +17,7 @@
follows="left|right|top|bottom"
layout="topleft"
left="5"
+ animate="false"
name="stack1"
orientation="vertical"
top="20"
@@ -155,14 +156,20 @@
name="external_controls"
top_delta="0"
user_resize="false"
+ auto_resize="true"
width="585">
<web_browser
- bottom="-22"
+ bottom="-2"
follows="all"
layout="topleft"
left="0"
name="webbrowser"
top="0"/>
+ </layout_panel>
+ <layout_panel name="status_bar"
+ height="23"
+ auto_resize="false"
+ user_resize="false">
<text
type="string"
length="200"
@@ -173,7 +180,7 @@
name="statusbartext"
parse_urls="false"
text_color="0.4 0.4 0.4 1"
- top_pad="5"
+ top_pad="3"
width="495"/>
<progress_bar
color_bar="0.3 1.0 0.3 1"
diff --git a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml
index be13bc1bb7..2cb77bcdf3 100644
--- a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml
@@ -23,102 +23,172 @@
orientation="vertical"
top_pad="5"
width="145">
- <layout_panel
- auto_resize="false"
- follows="top|left|right"
- height="20"
- layout="topleft"
- left="2"
- min_height="20"
- width="140"
- name="view_profile_btn_panel"
- top="0"
- user_resize="false">
- <button
- follows="left|top|right"
- height="23"
- label="Profile"
- name="view_profile_btn"
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="20"
+ layout="topleft"
+ left="2"
+ min_height="20"
+ width="140"
+ name="view_profile_btn_panel"
top="0"
- width="140" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="top|left|right"
- height="25"
- layout="topleft"
- min_height="25"
- width="140"
- name="add_friend_btn_panel"
- user_resize="false">
- <button
- follows="left|top|right"
- height="23"
- label="Add Friend"
- name="add_friend_btn"
- top="5"
- width="140" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="top|left|right"
- height="25"
- layout="topleft"
- min_height="25"
- width="140"
- name="teleport_btn_panel"
- user_resize="false">
- <button
- auto_resize="false"
+ user_resize="false">
+ <button
+ follows="left|top|right"
+ height="23"
+ label="Profile"
+ name="view_profile_btn"
+ top="0"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="25"
+ width="140"
+ name="add_friend_btn_panel"
+ user_resize="false">
+ <button
follows="left|top|right"
height="23"
- label="Teleport"
- name="teleport_btn"
- tool_tip = "Offer to teleport this person"
+ label="Add Friend"
+ name="add_friend_btn"
+ top="5"
width="140" />
- </layout_panel>
- <layout_panel
+ </layout_panel>
+ <layout_panel
auto_resize="false"
follows="top|left|right"
height="25"
layout="topleft"
min_height="25"
width="140"
- name="call_btn_panel"
+ name="teleport_btn_panel"
user_resize="false">
- <button
- follows="left|top|right"
- height="23"
- label="Call"
- name="call_btn"
- width="140" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="top|left|right"
- height="25"
- layout="topleft"
- min_height="25"
- width="140"
- name="end_call_btn_panel"
- user_resize="false"
- visible="false">
- <button
- follows="left|top|right"
- height="23"
- label="End Call"
- name="end_call_btn"
- width="140" />
- </layout_panel>
- <layout_panel
- mouse_opaque="false"
- auto_resize="true"
- follows="top|left"
- height="0"
- layout="topleft"
- min_height="0"
- width="140"
- name="spacer"
- user_resize="false" />
+ <button
+ auto_resize="false"
+ follows="left|top|right"
+ height="23"
+ label="Teleport"
+ name="teleport_btn"
+ tool_tip = "Offer to teleport this person"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="25"
+ width="140"
+ name="call_btn_panel"
+ user_resize="false">
+ <button
+ follows="left|top|right"
+ height="23"
+ label="Call"
+ name="call_btn"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="25"
+ width="140"
+ name="end_call_btn_panel"
+ user_resize="false"
+ visible="false">
+ <button
+ follows="left|top|right"
+ height="23"
+ label="End Call"
+ name="end_call_btn"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="25"
+ width="140"
+ name="block_btn_panel"
+ user_resize="false">
+ <button
+ follows="left|top|right"
+ height="23"
+ label="Block"
+ name="block_btn"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="25"
+ width="140"
+ name="unblock_btn_panel"
+ user_resize="false"
+ visible="false">
+ <button
+ follows="left|top|right"
+ height="23"
+ label="Unblock"
+ name="unblock_btn"
+ width="140" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="top|left|right"
+ height="25"
+ layout="topleft"
+ min_height="54"
+ width="140"
+ name="volume_ctrl_panel"
+ visible="false"
+ user_resize="false">
+ <slider
+ follows="top|left"
+ height="23"
+ increment="0.01"
+ left="0"
+ max_val="0.95"
+ min_val="0.05"
+ name="volume_slider"
+ show_text="false"
+ tool_tip="Call Volume"
+ top_pad="32"
+ value="0.5"
+ width="125" />
+ <button
+ follows="top|left"
+ height="16"
+ image_disabled="Audio_Off"
+ image_disabled_selected="AudioMute_Off"
+ image_hover_selected="AudioMute_Over"
+ image_selected="AudioMute_Off"
+ image_unselected="Audio_Off"
+ is_toggle="true"
+ left_pad="0"
+ top_delta="4"
+ name="mute_btn"
+ width="16" />
+ </layout_panel>
+ <layout_panel
+ mouse_opaque="false"
+ auto_resize="true"
+ follows="top|left"
+ height="0"
+ layout="topleft"
+ min_height="0"
+ width="140"
+ name="spacer"
+ user_resize="false" />
</layout_stack>
</panel>
diff --git a/indra/newview/skins/minimal/xui/en/widgets/location_input.xml b/indra/newview/skins/minimal/xui/en/widgets/location_input.xml
index fe06a2d816..ba148cf421 100644
--- a/indra/newview/skins/minimal/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/minimal/xui/en/widgets/location_input.xml
@@ -113,6 +113,14 @@
font="SansSerifSmall"
text_color="TextFgColor"
/>
+ <see_avatars_icon
+ name="see_avatars_icon"
+ width="0"
+ height="0"
+ visible="false"
+ top="21"
+ follows="right|top"
+ />
<combo_button
name="Location History"
label=""
diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp
new file mode 100644
index 0000000000..6646860b5e
--- /dev/null
+++ b/indra/newview/tests/lldir_stub.cpp
@@ -0,0 +1,45 @@
+/**
+ * @file lldir_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Use me only if you need to stub out some helper functions, not if you e.g. need sane numbers from countFilesInDir
+
+LLDir::LLDir() {}
+LLDir::~LLDir() {}
+BOOL LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) { return true; }
+void LLDir::setChatLogsDir(const std::string &path) {}
+void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last) {}
+void LLDir::setLindenUserDir(const std::string &first, const std::string &last) {}
+void LLDir::setSkinFolder(const std::string &skin_folder) {}
+bool LLDir::setCacheDir(const std::string &path) { return true; }
+void LLDir::dumpCurrentDirectories() {}
+
+class LLDir_stub : public LLDir
+{
+public:
+ LLDir_stub() {}
+ ~LLDir_stub() {}
+
+ /*virtual*/ void initAppDirs(const std::string &app_name) {}
+
+ /*virtual*/ std::string getCurPath() { return "CUR_PATH_FROM_LLDIR"; }
+ /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask) { return 42; }
+ /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) { fname = fname + "_NEXT"; return false; }
+ /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) { fname = "RANDOM_FILE"; }
+ /*virtual*/ BOOL fileExists(const std::string &filename) const { return false; }
+};
+
+LLDir_stub gDirUtil;
+
+LLDir* gDirUtilp = &gDirUtil;
+
+std::string LLDir::getExpandedFilename(ELLPath loc, const std::string& subdir, const std::string& filename) const
+{
+ return subdir + " --- " + filename + " --- expanded!";
+}
+
diff --git a/indra/newview/tests/llglslshader_stub.cpp b/indra/newview/tests/llglslshader_stub.cpp
new file mode 100644
index 0000000000..5333c8a361
--- /dev/null
+++ b/indra/newview/tests/llglslshader_stub.cpp
@@ -0,0 +1,22 @@
+/**
+ * @file llglslshader_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "llglslshader.h"
+
+void LLGLSLShader::uniform1f(const std::string& uniform, F32 num)
+{
+}
+
+void LLGLSLShader::uniform3fv(const std::string& uniform, U32 count, const GLfloat *v)
+{
+}
+
+void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
+{
+}
diff --git a/indra/newview/tests/llpipeline_stub.cpp b/indra/newview/tests/llpipeline_stub.cpp
new file mode 100644
index 0000000000..85bf0ae3fb
--- /dev/null
+++ b/indra/newview/tests/llpipeline_stub.cpp
@@ -0,0 +1,15 @@
+/**
+ * @file llpipeline_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+class LLPipeline
+{
+public: BOOL canUseWindLightShaders() const;
+};
+BOOL LLPipeline::canUseWindLightShaders() const {return TRUE;}
+LLPipeline gPipeline;
diff --git a/indra/newview/tests/llsky_stub.cpp b/indra/newview/tests/llsky_stub.cpp
new file mode 100644
index 0000000000..35f4944a95
--- /dev/null
+++ b/indra/newview/tests/llsky_stub.cpp
@@ -0,0 +1,20 @@
+/**
+ * @file llsky_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+class LLSky
+{
+public:
+ void setOverrideSun(BOOL override);
+ void setSunDirection(const LLVector3 &sun_direction, const LLVector3 &sun_ang_velocity);
+};
+
+void LLSky::setOverrideSun(BOOL override) {}
+void LLSky::setSunDirection(const LLVector3 &sun_direction, const LLVector3 &sun_ang_velocity) {}
+
+LLSky gSky;
diff --git a/indra/newview/tests/llviewershadermgr_stub.cpp b/indra/newview/tests/llviewershadermgr_stub.cpp
new file mode 100644
index 0000000000..0dae527035
--- /dev/null
+++ b/indra/newview/tests/llviewershadermgr_stub.cpp
@@ -0,0 +1,33 @@
+/**
+ * @file llglslshader_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "../llviewershadermgr.h"
+
+LLShaderMgr::LLShaderMgr() {}
+LLShaderMgr::~LLShaderMgr() {}
+
+LLViewerShaderMgr::LLViewerShaderMgr() {}
+LLViewerShaderMgr::~LLViewerShaderMgr() {}
+
+LLViewerShaderMgr* stub_instance = NULL;
+
+LLViewerShaderMgr* LLViewerShaderMgr::instance() {
+ if(NULL == stub_instance)
+ {
+ stub_instance = new LLViewerShaderMgr();
+ }
+
+ return stub_instance;
+}
+LLViewerShaderMgr::shader_iter fake_iter;
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::beginShaders() const {return fake_iter;}
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::endShaders() const {return fake_iter;}
+
+void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader* shader) {return;}
+std::string LLViewerShaderMgr::getShaderDirPrefix() {return "SHADER_DIR_PREFIX-";}
diff --git a/indra/newview/tests/llwlanimator_stub.cpp b/indra/newview/tests/llwlanimator_stub.cpp
new file mode 100644
index 0000000000..4d1bb85544
--- /dev/null
+++ b/indra/newview/tests/llwlanimator_stub.cpp
@@ -0,0 +1,12 @@
+/**
+ * @file llwlanimator_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+LLWLAnimator::LLWLAnimator(void) {}
+void LLWLAnimator::update(LLWLParamSet& set) {}
+void LLWLAnimator::setTrack(std::map<F32, LLWLParamKey>& track, F32 dayRate, F64 dayTime, bool run) {}
diff --git a/indra/newview/tests/llwldaycycle_stub.cpp b/indra/newview/tests/llwldaycycle_stub.cpp
new file mode 100644
index 0000000000..d98c9614b4
--- /dev/null
+++ b/indra/newview/tests/llwldaycycle_stub.cpp
@@ -0,0 +1,35 @@
+/**
+ * @file llwldaycycle_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+LLWLDayCycle::LLWLDayCycle(void)
+{
+}
+
+LLWLDayCycle::~LLWLDayCycle(void)
+{
+}
+
+bool LLWLDayCycle::getKeytime(LLWLParamKey keyFrame, F32& keyTime)
+{
+ keyTime = 0.5;
+ return true;
+}
+
+bool LLWLDayCycle::removeKeyframe(F32 time)
+{
+ return true;
+}
+
+void LLWLDayCycle::loadDayCycleFromFile(const std::string& fileName)
+{
+}
+
+void LLWLDayCycle::removeReferencesTo(const LLWLParamKey &keyframe)
+{
+}
diff --git a/indra/newview/tests/llwlparammanager_test.cpp b/indra/newview/tests/llwlparammanager_test.cpp
new file mode 100644
index 0000000000..a6c6a2abf4
--- /dev/null
+++ b/indra/newview/tests/llwlparammanager_test.cpp
@@ -0,0 +1,254 @@
+/**
+ * @file llwlparammanager_test.cpp
+ * @brief LLWLParamManager tests
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled headers
+#include "../llviewerprecompiledheaders.h"
+
+// Class to test
+#include "../llwlparammanager.h"
+
+// Dependencies
+#include "linden_common.h"
+
+// TUT header
+#include "lltut.h"
+
+// Stubs
+#include "llwldaycycle_stub.cpp"
+#include "llwlparamset_stub.cpp"
+#include "llwlanimator_stub.cpp"
+#include "llglslshader_stub.cpp"
+#include "lldir_stub.cpp"
+#include "llsky_stub.cpp"
+#include "llpipeline_stub.cpp"
+#include "llviewershadermgr_stub.cpp"
+
+void assert_glerror(void) {}
+LLViewerCamera::LLViewerCamera() {}
+void LLViewerCamera::setView(F32 vertical_fov_rads) {}
+std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) { return std::string(""); }
+
+char* curl_unescape(const char* c_str, int length)
+{
+ char* copy = new char[length+4];
+ memcpy(copy, c_str, length);
+ copy[length+0] = 'E';
+ copy[length+1] = 'S';
+ copy[length+2] = 'C';
+ copy[length+3] = '\0';
+ return copy;
+}
+void curl_free(void* p) {delete[] ((char*)p);}
+char* curl_escape(const char* c_str, int length) {
+ char* copy = new char[length+6];
+ memcpy(copy, c_str, length);
+ copy[length+0] = 'U';
+ copy[length+1] = 'N';
+ copy[length+2] = 'E';
+ copy[length+3] = 'S';
+ copy[length+4] = 'C';
+ copy[length+5] = '\0';
+ return copy;
+}
+
+namespace tut
+{
+ // Main Setup
+ struct LLWLParamManagerFixture
+ {
+ class LLWLParamManagerTest
+ {
+ };
+
+ LLWLParamManager* mTestManager;
+
+ LLWLParamManagerFixture()
+ : mTestManager(LLWLParamManager::getInstance())
+ {
+ }
+
+ ~LLWLParamManagerFixture()
+ {
+ }
+ };
+ typedef test_group<LLWLParamManagerFixture> factory;
+ typedef factory::object object;
+ factory tf("LLWLParamManager test");
+
+ // Tests
+ template<> template<>
+ void object::test<1>()
+ {
+ try
+ {
+ std::string preset =
+ "<llsd>\
+ <map>\
+ <key>ambient</key>\
+ <array>\
+ <real>1.0499999523162842</real>\
+ <real>1.0499999523162842</real>\
+ <real>1.0499999523162842</real>\
+ <real>0.34999999403953552</real>\
+ </array>\
+ <key>blue_density</key>\
+ <array>\
+ <real>0.2447581488182351</real>\
+ <real>0.44872328639030457</real>\
+ <real>0.75999999046325684</real>\
+ <real>0.38000004053115788</real>\
+ </array>\
+ <key>blue_horizon</key>\
+ <array>\
+ <real>0.49548382097675159</real>\
+ <real>0.49548381382419748</real>\
+ <real>0.63999999284744291</real>\
+ <real>0.31999999642372146</real>\
+ </array>\
+ <key>cloud_color</key>\
+ <array>\
+ <real>0.40999999165535073</real>\
+ <real>0.40999999165535073</real>\
+ <real>0.40999999165535073</real>\
+ <real>0.40999999165535073</real>\
+ </array>\
+ <key>cloud_pos_density1</key>\
+ <array>\
+ <real>1.6884100437164307</real>\
+ <real>0.52609699964523315</real>\
+ <real>0.99999999999999289</real>\
+ <real>1</real>\
+ </array>\
+ <key>cloud_pos_density2</key>\
+ <array>\
+ <real>1.6884100437164307</real>\
+ <real>0.52609699964523315</real>\
+ <real>0.125</real>\
+ <real>1</real>\
+ </array>\
+ <key>cloud_scale</key>\
+ <array>\
+ <real>0.4199999868869746</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>cloud_scroll_rate</key>\
+ <array>\
+ <real>10.199999809265137</real>\
+ <real>10.01099967956543</real>\
+ </array>\
+ <key>cloud_shadow</key>\
+ <array>\
+ <real>0.26999998092651367</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>density_multiplier</key>\
+ <array>\
+ <real>0.00017999998817685818</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>distance_multiplier</key>\
+ <array>\
+ <real>0.80000001192093606</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>east_angle</key>\
+ <real>0</real>\
+ <key>enable_cloud_scroll</key>\
+ <array>\
+ <boolean>1</boolean>\
+ <boolean>1</boolean>\
+ </array>\
+ <key>gamma</key>\
+ <array>\
+ <real>1</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>glow</key>\
+ <array>\
+ <real>5</real>\
+ <real>0.0010000000474974513</real>\
+ <real>-0.47999998927116394</real>\
+ <real>1</real>\
+ </array>\
+ <key>haze_density</key>\
+ <array>\
+ <real>0.69999998807907104</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>haze_horizon</key>\
+ <array>\
+ <real>0.18999999761581243</real>\
+ <real>0.19915600121021271</real>\
+ <real>0.19915600121021271</real>\
+ <real>1</real>\
+ </array>\
+ <key>lightnorm</key>\
+ <array>\
+ <real>0</real>\
+ <real>0.70710659027099609</real>\
+ <real>-0.70710694789886475</real>\
+ <real>0</real>\
+ </array>\
+ <key>max_y</key>\
+ <array>\
+ <real>1605</real>\
+ <real>0</real>\
+ <real>0</real>\
+ <real>1</real>\
+ </array>\
+ <key>preset_num</key>\
+ <integer>22</integer>\
+ <key>star_brightness</key>\
+ <real>0</real>\
+ <key>sun_angle</key>\
+ <real>2.3561947345733643</real>\
+ <key>sunlight_color</key>\
+ <array>\
+ <real>0.73421055078505759</real>\
+ <real>0.78157895803450828</real>\
+ <real>0.89999997615813498</real>\
+ <real>0.29999998211860301</real>\
+ </array>\
+ </map>\
+ </llsd>";
+
+ std::stringstream preset_stream(preset);
+ mTestManager->loadPresetFromXML(LLWLParamKey("test1", LLWLParamKey::SCOPE_LOCAL), preset_stream);
+ LLWLParamSet dummy;
+ ensure("Couldn't get ParamSet after loading it", mTestManager->getParamSet(LLWLParamKey("test1", LLWLParamKey::SCOPE_LOCAL), dummy));
+ }
+ catch (...)
+ {
+ fail("loadPresetFromXML test crashed!");
+ }
+ }
+
+ template<> template<>
+ void object::test<2>()
+ {
+ mTestManager->propagateParameters();
+ ensure_equals("Wrong value from getDomeOffset()", mTestManager->getDomeOffset(), 0.96f);
+ ensure_equals("Wrong value from getDomeRadius()", mTestManager->getDomeRadius(), 15000.f);
+ ensure_equals("Wrong value from getLightDir()", mTestManager->getLightDir(), LLVector4(-0,0,1,0));
+ ensure_equals("Wrong value from getClampedLightDir()", mTestManager->getClampedLightDir(), LLVector4(-0,0,1,0));
+ ensure_equals("Wrong value from getRotatedLightDir()", mTestManager->getRotatedLightDir(), LLVector4(0,0,0,1));
+ }
+}
diff --git a/indra/newview/tests/llwlparamset_stub.cpp b/indra/newview/tests/llwlparamset_stub.cpp
new file mode 100644
index 0000000000..6ce4b5827d
--- /dev/null
+++ b/indra/newview/tests/llwlparamset_stub.cpp
@@ -0,0 +1,24 @@
+/**
+ * @file llwlparamset_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+LLWLParamSet::LLWLParamSet(void)
+{
+}
+
+void LLWLParamSet::updateCloudScrolling()
+{
+}
+
+void LLWLParamSet::set(const std::string& name, const LLVector4& val)
+{
+}
+
+void LLWLParamSet::update(LLGLSLShader *shader) const
+{
+}